diff options
author | David Seikel | 2011-04-26 21:30:21 +1000 |
---|---|---|
committer | David Seikel | 2011-04-26 21:30:21 +1000 |
commit | da97e24c3b045d16589124496d032ffb9b4ca07f (patch) | |
tree | 34d84cf4355f83e1a106d06a10ed2a4bb121fdc4 /linden | |
parent | Apparently there is a wrong client tag for firestorm out in the wild. (diff) | |
parent | Changed version to Experimental 2011.04.19 (diff) | |
download | meta-impy-da97e24c3b045d16589124496d032ffb9b4ca07f.zip meta-impy-da97e24c3b045d16589124496d032ffb9b4ca07f.tar.gz meta-impy-da97e24c3b045d16589124496d032ffb9b4ca07f.tar.bz2 meta-impy-da97e24c3b045d16589124496d032ffb9b4ca07f.tar.xz |
Merge remote-tracking branch 'imprudence/exp' into exp
Conflicts (for future reference):
linden/indra/llcommon/llstring.cpp
linden/indra/newview/llpanelnetwork.cpp
linden/indra/newview/llselectmgr.cpp
linden/indra/newview/llstartup.cpp
linden/indra/newview/lltoolmgr.cpp
linden/indra/newview/llvoavatar.cpp
Diffstat (limited to 'linden')
130 files changed, 8542 insertions, 1826 deletions
diff --git a/linden/indra/llcommon/imageids.cpp b/linden/indra/llcommon/imageids.cpp index 6b4fcd3..e5343fe 100644 --- a/linden/indra/llcommon/imageids.cpp +++ b/linden/indra/llcommon/imageids.cpp | |||
@@ -75,3 +75,5 @@ const LLUUID TERRAIN_MOUNTAIN_DETAIL ("303cd381-8560-7579-23f1-f0a880799740"); / | |||
75 | const LLUUID TERRAIN_ROCK_DETAIL ("53a2f406-4895-1d13-d541-d2e3b86bc19c"); // VIEWER | 75 | const LLUUID TERRAIN_ROCK_DETAIL ("53a2f406-4895-1d13-d541-d2e3b86bc19c"); // VIEWER |
76 | 76 | ||
77 | const LLUUID DEFAULT_WATER_NORMAL ("822ded49-9a6c-f61c-cb89-6df54f42cdf4"); // VIEWER | 77 | const LLUUID DEFAULT_WATER_NORMAL ("822ded49-9a6c-f61c-cb89-6df54f42cdf4"); // VIEWER |
78 | |||
79 | const LLUUID DEFAULT_UNREZZED_AVATAR_PARTICLE ("c6e07fda-aea5-4149-acb6-6f09980e0db5"); // VIEWER only | ||
diff --git a/linden/indra/llcommon/imageids.h b/linden/indra/llcommon/imageids.h index dc726dc..516fda1 100644 --- a/linden/indra/llcommon/imageids.h +++ b/linden/indra/llcommon/imageids.h | |||
@@ -72,4 +72,5 @@ LL_COMMON_API extern const LLUUID TERRAIN_ROCK_DETAIL; | |||
72 | 72 | ||
73 | LL_COMMON_API extern const LLUUID DEFAULT_WATER_NORMAL; | 73 | LL_COMMON_API extern const LLUUID DEFAULT_WATER_NORMAL; |
74 | 74 | ||
75 | LL_COMMON_API extern const LLUUID DEFAULT_UNREZZED_AVATAR_PARTICLE; | ||
75 | #endif | 76 | #endif |
diff --git a/linden/indra/llcommon/llstring.cpp b/linden/indra/llcommon/llstring.cpp index 32a75c0..069365b 100644 --- a/linden/indra/llcommon/llstring.cpp +++ b/linden/indra/llcommon/llstring.cpp | |||
@@ -50,7 +50,8 @@ std::string ll_safe_string(const char* in) | |||
50 | 50 | ||
51 | std::string ll_safe_string(const char* in, S32 maxlen) | 51 | std::string ll_safe_string(const char* in, S32 maxlen) |
52 | { | 52 | { |
53 | if(in) return std::string(in, maxlen); | 53 | //KOKUA FIXME: Which wormhole all the antistrings (strings with negative length) come from ? |
54 | if(in && maxlen > 0) return std::string(in, maxlen); | ||
54 | return std::string(); | 55 | return std::string(); |
55 | } | 56 | } |
56 | 57 | ||
diff --git a/linden/indra/llcommon/llsys.cpp b/linden/indra/llcommon/llsys.cpp index a56ac47..95dd2e5 100644 --- a/linden/indra/llcommon/llsys.cpp +++ b/linden/indra/llcommon/llsys.cpp | |||
@@ -76,6 +76,75 @@ extern int errno; | |||
76 | static const S32 CPUINFO_BUFFER_SIZE = 16383; | 76 | static const S32 CPUINFO_BUFFER_SIZE = 16383; |
77 | LLCPUInfo gSysCPU; | 77 | LLCPUInfo gSysCPU; |
78 | 78 | ||
79 | #if LL_WINDOWS | ||
80 | #ifndef DLLVERSIONINFO | ||
81 | typedef struct _DllVersionInfo | ||
82 | { | ||
83 | DWORD cbSize; | ||
84 | DWORD dwMajorVersion; | ||
85 | DWORD dwMinorVersion; | ||
86 | DWORD dwBuildNumber; | ||
87 | DWORD dwPlatformID; | ||
88 | }DLLVERSIONINFO; | ||
89 | #endif | ||
90 | |||
91 | #ifndef DLLGETVERSIONPROC | ||
92 | typedef int (FAR WINAPI *DLLGETVERSIONPROC) (DLLVERSIONINFO *); | ||
93 | #endif | ||
94 | |||
95 | bool get_shell32_dll_version(DWORD& major, DWORD& minor, DWORD& build_number) | ||
96 | { | ||
97 | bool result = false; | ||
98 | const U32 BUFF_SIZE = 32767; | ||
99 | WCHAR tempBuf[BUFF_SIZE]; | ||
100 | if(GetSystemDirectory((LPWSTR)&tempBuf, BUFF_SIZE)) | ||
101 | { | ||
102 | |||
103 | std::basic_string<WCHAR> shell32_path(tempBuf); | ||
104 | |||
105 | // Shell32.dll contains the DLLGetVersion function. | ||
106 | // according to msdn its not part of the API | ||
107 | // so you have to go in and get it. | ||
108 | // http://msdn.microsoft.com/en-us/library/bb776404(VS.85).aspx | ||
109 | shell32_path += TEXT("\\shell32.dll"); | ||
110 | |||
111 | HMODULE hDllInst = LoadLibrary(shell32_path.c_str()); //load the DLL | ||
112 | if(hDllInst) | ||
113 | { // Could successfully load the DLL | ||
114 | DLLGETVERSIONPROC pDllGetVersion; | ||
115 | /* | ||
116 | You must get this function explicitly because earlier versions of the DLL | ||
117 | don't implement this function. That makes the lack of implementation of the | ||
118 | function a version marker in itself. | ||
119 | */ | ||
120 | pDllGetVersion = (DLLGETVERSIONPROC) GetProcAddress(hDllInst, | ||
121 | "DllGetVersion"); | ||
122 | |||
123 | if(pDllGetVersion) | ||
124 | { | ||
125 | // DLL supports version retrieval function | ||
126 | DLLVERSIONINFO dvi; | ||
127 | |||
128 | ZeroMemory(&dvi, sizeof(dvi)); | ||
129 | dvi.cbSize = sizeof(dvi); | ||
130 | HRESULT hr = (*pDllGetVersion)(&dvi); | ||
131 | |||
132 | if(SUCCEEDED(hr)) | ||
133 | { // Finally, the version is at our hands | ||
134 | major = dvi.dwMajorVersion; | ||
135 | minor = dvi.dwMinorVersion; | ||
136 | build_number = dvi.dwBuildNumber; | ||
137 | result = true; | ||
138 | } | ||
139 | } | ||
140 | |||
141 | FreeLibrary(hDllInst); // Release DLL | ||
142 | } | ||
143 | } | ||
144 | return result; | ||
145 | } | ||
146 | #endif // LL_WINDOWS | ||
147 | |||
79 | LLOSInfo::LLOSInfo() : | 148 | LLOSInfo::LLOSInfo() : |
80 | mMajorVer(0), mMinorVer(0), mBuild(0) | 149 | mMajorVer(0), mMinorVer(0), mBuild(0) |
81 | { | 150 | { |
@@ -98,44 +167,74 @@ LLOSInfo::LLOSInfo() : | |||
98 | mMinorVer = osvi.dwMinorVersion; | 167 | mMinorVer = osvi.dwMinorVersion; |
99 | mBuild = osvi.dwBuildNumber; | 168 | mBuild = osvi.dwBuildNumber; |
100 | 169 | ||
170 | DWORD shell32_major, shell32_minor, shell32_build; | ||
171 | bool got_shell32_version = get_shell32_dll_version(shell32_major, | ||
172 | shell32_minor, | ||
173 | shell32_build); | ||
174 | |||
101 | switch(osvi.dwPlatformId) | 175 | switch(osvi.dwPlatformId) |
102 | { | 176 | { |
103 | case VER_PLATFORM_WIN32_NT: | 177 | case VER_PLATFORM_WIN32_NT: |
104 | { | 178 | { |
105 | // Test for the product. | 179 | // Test for the product. |
106 | if(osvi.dwMajorVersion <= 4) | 180 | if (osvi.dwMajorVersion <= 4) |
107 | { | 181 | { |
108 | mOSStringSimple = "Microsoft Windows NT "; | 182 | mOSStringSimple = "Microsoft Windows NT "; |
109 | } | 183 | } |
110 | else if(osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0) | 184 | else if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0) |
111 | { | 185 | { |
112 | mOSStringSimple = "Microsoft Windows 2000 "; | 186 | mOSStringSimple = "Microsoft Windows 2000 "; |
113 | } | 187 | } |
114 | else if(osvi.dwMajorVersion ==5 && osvi.dwMinorVersion == 1) | 188 | else if (osvi.dwMajorVersion ==5 && osvi.dwMinorVersion == 1) |
115 | { | 189 | { |
116 | mOSStringSimple = "Microsoft Windows XP "; | 190 | mOSStringSimple = "Microsoft Windows XP "; |
117 | } | 191 | } |
118 | else if(osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2) | 192 | else if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2) |
119 | { | 193 | { |
120 | if(osvi.wProductType == VER_NT_WORKSTATION) | 194 | if (osvi.wProductType == VER_NT_WORKSTATION) |
195 | { | ||
121 | mOSStringSimple = "Microsoft Windows XP x64 Edition "; | 196 | mOSStringSimple = "Microsoft Windows XP x64 Edition "; |
122 | else | 197 | } |
123 | mOSStringSimple = "Microsoft Windows Server 2003 "; | 198 | else |
199 | { | ||
200 | mOSStringSimple = "Microsoft Windows Server 2003 "; | ||
201 | } | ||
124 | } | 202 | } |
125 | else if(osvi.dwMajorVersion == 6 && osvi.dwMinorVersion <= 1) | 203 | else if (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion <= 2) |
126 | { | 204 | { |
127 | if(osvi.dwMinorVersion == 0) | 205 | if (osvi.dwMinorVersion == 0) |
128 | { | 206 | { |
129 | mOSStringSimple = "Microsoft Windows Vista "; | 207 | if (osvi.wProductType == VER_NT_WORKSTATION) |
208 | { | ||
209 | mOSStringSimple = "Microsoft Windows Vista "; | ||
210 | } | ||
211 | else | ||
212 | { | ||
213 | mOSStringSimple = "Windows Server 2008 "; | ||
214 | } | ||
215 | |||
130 | } | 216 | } |
131 | else if(osvi.dwMinorVersion == 1) | 217 | else if (osvi.dwMinorVersion == 1) |
132 | { | 218 | { |
133 | mOSStringSimple = "Microsoft Windows 7 "; | 219 | if (osvi.wProductType == VER_NT_WORKSTATION) |
220 | { | ||
221 | mOSStringSimple = "Microsoft Windows 7 "; | ||
222 | } | ||
223 | else | ||
224 | { | ||
225 | mOSStringSimple = "Windows Server 2008 R2 "; | ||
226 | } | ||
134 | } | 227 | } |
135 | 228 | else if (osvi.dwMinorVersion == 2) | |
136 | if(osvi.wProductType != VER_NT_WORKSTATION) | ||
137 | { | 229 | { |
138 | mOSStringSimple += "Server "; | 230 | if (osvi.wProductType == VER_NT_WORKSTATION) |
231 | { | ||
232 | mOSStringSimple = "Microsoft Windows 8 "; | ||
233 | } | ||
234 | else | ||
235 | { | ||
236 | mOSStringSimple = "Windows Server 2012 "; | ||
237 | } | ||
139 | } | 238 | } |
140 | 239 | ||
141 | ///get native system info if available.. | 240 | ///get native system info if available.. |
@@ -146,8 +245,8 @@ LLOSInfo::LLOSInfo() : | |||
146 | pGNSI = (PGNSI) GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetNativeSystemInfo"); //load kernel32 get function | 245 | pGNSI = (PGNSI) GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetNativeSystemInfo"); //load kernel32 get function |
147 | if(NULL != pGNSI) //check if it has failed | 246 | if(NULL != pGNSI) //check if it has failed |
148 | pGNSI(&si); //success | 247 | pGNSI(&si); //success |
149 | else | 248 | else |
150 | GetSystemInfo(&si); //if it fails get regular system info | 249 | GetSystemInfo(&si); //if it fails get regular system info |
151 | //(Warning: If GetSystemInfo it may result in incorrect information in a WOW64 machine, if the kernel fails to load) | 250 | //(Warning: If GetSystemInfo it may result in incorrect information in a WOW64 machine, if the kernel fails to load) |
152 | 251 | ||
153 | //msdn microsoft finds 32 bit and 64 bit flavors this way.. | 252 | //msdn microsoft finds 32 bit and 64 bit flavors this way.. |
@@ -206,6 +305,7 @@ LLOSInfo::LLOSInfo() : | |||
206 | csdversion.c_str(), | 305 | csdversion.c_str(), |
207 | (osvi.dwBuildNumber & 0xffff)); | 306 | (osvi.dwBuildNumber & 0xffff)); |
208 | } | 307 | } |
308 | |||
209 | mOSString = mOSStringSimple + tmpstr; | 309 | mOSString = mOSStringSimple + tmpstr; |
210 | } | 310 | } |
211 | break; | 311 | break; |
@@ -235,6 +335,20 @@ LLOSInfo::LLOSInfo() : | |||
235 | mOSString = mOSStringSimple; | 335 | mOSString = mOSStringSimple; |
236 | break; | 336 | break; |
237 | } | 337 | } |
338 | |||
339 | std::string compatibility_mode; | ||
340 | if(got_shell32_version) | ||
341 | { | ||
342 | if(osvi.dwMajorVersion != shell32_major || osvi.dwMinorVersion != shell32_minor) | ||
343 | { | ||
344 | compatibility_mode = llformat(" compatibility mode. real ver: %d.%d (Build %d)", | ||
345 | shell32_major, | ||
346 | shell32_minor, | ||
347 | shell32_build); | ||
348 | } | ||
349 | } | ||
350 | mOSString += compatibility_mode; | ||
351 | |||
238 | #else | 352 | #else |
239 | struct utsname un; | 353 | struct utsname un; |
240 | if(uname(&un) != -1) | 354 | if(uname(&un) != -1) |
@@ -262,8 +376,8 @@ LLOSInfo::LLOSInfo() : | |||
262 | else if (ostype == "Linux") | 376 | else if (ostype == "Linux") |
263 | { | 377 | { |
264 | // Only care about major and minor Linux versions, truncate at second '.' | 378 | // Only care about major and minor Linux versions, truncate at second '.' |
265 | S32 idx1 = mOSStringSimple.find_first_of(".", 0); | 379 | std::string::size_type idx1 = mOSStringSimple.find_first_of(".", 0); |
266 | S32 idx2 = (idx1 != std::string::npos) ? mOSStringSimple.find_first_of(".", idx1+1) : std::string::npos; | 380 | std::string::size_type idx2 = (idx1 != std::string::npos) ? mOSStringSimple.find_first_of(".", idx1+1) : std::string::npos; |
267 | std::string simple = mOSStringSimple.substr(0, idx2); | 381 | std::string simple = mOSStringSimple.substr(0, idx2); |
268 | if (simple.length() > 0) | 382 | if (simple.length() > 0) |
269 | mOSStringSimple = simple; | 383 | mOSStringSimple = simple; |
@@ -429,15 +543,15 @@ LLCPUInfo::LLCPUInfo() | |||
429 | mHasSSE = info->_Ext.SSE_StreamingSIMD_Extensions; | 543 | mHasSSE = info->_Ext.SSE_StreamingSIMD_Extensions; |
430 | mHasSSE2 = info->_Ext.SSE2_StreamingSIMD2_Extensions; | 544 | mHasSSE2 = info->_Ext.SSE2_StreamingSIMD2_Extensions; |
431 | mHasAltivec = info->_Ext.Altivec_Extensions; | 545 | mHasAltivec = info->_Ext.Altivec_Extensions; |
432 | mCPUMhz = (S32)(proc.GetCPUFrequency(50)/1000000.0); | 546 | mCPUMHz = (F64)(proc.GetCPUFrequency(50)/1000000.0); |
433 | mFamily.assign( info->strFamily ); | 547 | mFamily.assign( info->strFamily ); |
434 | mCPUString = "Unknown"; | 548 | mCPUString = "Unknown"; |
435 | 549 | ||
436 | #if LL_WINDOWS || LL_DARWIN || LL_SOLARIS | 550 | #if LL_WINDOWS || LL_DARWIN || LL_SOLARIS |
437 | out << proc.strCPUName; | 551 | out << proc.strCPUName; |
438 | if (200 < mCPUMhz && mCPUMhz < 10000) // *NOTE: cpu speed is often way wrong, do a sanity check | 552 | if (200 < mCPUMHz && mCPUMHz < 10000) // *NOTE: cpu speed is often way wrong, do a sanity check |
439 | { | 553 | { |
440 | out << " (" << mCPUMhz << " MHz)"; | 554 | out << " (" << mCPUMHz << " MHz)"; |
441 | } | 555 | } |
442 | mCPUString = out.str(); | 556 | mCPUString = out.str(); |
443 | 557 | ||
@@ -482,7 +596,7 @@ LLCPUInfo::LLCPUInfo() | |||
482 | if (LLStringUtil::convertToF64(cpuinfo["cpu mhz"], mhz) | 596 | if (LLStringUtil::convertToF64(cpuinfo["cpu mhz"], mhz) |
483 | && 200.0 < mhz && mhz < 10000.0) | 597 | && 200.0 < mhz && mhz < 10000.0) |
484 | { | 598 | { |
485 | mCPUMhz = (S32)llrint(mhz); | 599 | mCPUMHz = (F64)llrint(mhz); |
486 | } | 600 | } |
487 | if (!cpuinfo["model name"].empty()) | 601 | if (!cpuinfo["model name"].empty()) |
488 | mCPUString = cpuinfo["model name"]; | 602 | mCPUString = cpuinfo["model name"]; |
@@ -505,9 +619,9 @@ bool LLCPUInfo::hasSSE2() const | |||
505 | return mHasSSE2; | 619 | return mHasSSE2; |
506 | } | 620 | } |
507 | 621 | ||
508 | S32 LLCPUInfo::getMhz() const | 622 | F64 LLCPUInfo::getMHz() const |
509 | { | 623 | { |
510 | return mCPUMhz; | 624 | return mCPUMHz; |
511 | } | 625 | } |
512 | 626 | ||
513 | std::string LLCPUInfo::getCPUString() const | 627 | std::string LLCPUInfo::getCPUString() const |
@@ -554,7 +668,7 @@ void LLCPUInfo::stream(std::ostream& s) const | |||
554 | s << "->mHasSSE: " << (U32)mHasSSE << std::endl; | 668 | s << "->mHasSSE: " << (U32)mHasSSE << std::endl; |
555 | s << "->mHasSSE2: " << (U32)mHasSSE2 << std::endl; | 669 | s << "->mHasSSE2: " << (U32)mHasSSE2 << std::endl; |
556 | s << "->mHasAltivec: " << (U32)mHasAltivec << std::endl; | 670 | s << "->mHasAltivec: " << (U32)mHasAltivec << std::endl; |
557 | s << "->mCPUMhz: " << mCPUMhz << std::endl; | 671 | s << "->mCPUMHz: " << mCPUMHz << std::endl; |
558 | s << "->mCPUString: " << mCPUString << std::endl; | 672 | s << "->mCPUString: " << mCPUString << std::endl; |
559 | } | 673 | } |
560 | 674 | ||
@@ -631,6 +745,26 @@ U32 LLMemoryInfo::getPhysicalMemoryClamped() const | |||
631 | } | 745 | } |
632 | } | 746 | } |
633 | 747 | ||
748 | //static | ||
749 | void LLMemoryInfo::getAvailableMemoryKB(U32& avail_physical_mem_kb, U32& avail_virtual_mem_kb) | ||
750 | { | ||
751 | #if LL_WINDOWS | ||
752 | MEMORYSTATUSEX state; | ||
753 | state.dwLength = sizeof(state); | ||
754 | GlobalMemoryStatusEx(&state); | ||
755 | |||
756 | avail_physical_mem_kb = (U32)(state.ullAvailPhys/1024) ; | ||
757 | avail_virtual_mem_kb = (U32)(state.ullAvailVirtual/1024) ; | ||
758 | |||
759 | #else | ||
760 | //do not know how to collect available memory info for other systems. | ||
761 | //leave it blank here for now. | ||
762 | |||
763 | avail_physical_mem_kb = -1 ; | ||
764 | avail_virtual_mem_kb = -1 ; | ||
765 | #endif | ||
766 | } | ||
767 | |||
634 | void LLMemoryInfo::stream(std::ostream& s) const | 768 | void LLMemoryInfo::stream(std::ostream& s) const |
635 | { | 769 | { |
636 | #if LL_WINDOWS | 770 | #if LL_WINDOWS |
diff --git a/linden/indra/llcommon/llsys.h b/linden/indra/llcommon/llsys.h index d5575b2..e481c88 100644 --- a/linden/indra/llcommon/llsys.h +++ b/linden/indra/llcommon/llsys.h | |||
@@ -81,7 +81,7 @@ public: | |||
81 | bool hasAltivec() const; | 81 | bool hasAltivec() const; |
82 | bool hasSSE() const; | 82 | bool hasSSE() const; |
83 | bool hasSSE2() const; | 83 | bool hasSSE2() const; |
84 | S32 getMhz() const; | 84 | F64 getMHz() const; |
85 | 85 | ||
86 | // Family is "AMD Duron" or "Intel Pentium Pro" | 86 | // Family is "AMD Duron" or "Intel Pentium Pro" |
87 | const std::string& getFamily() const { return mFamily; } | 87 | const std::string& getFamily() const { return mFamily; } |
@@ -90,7 +90,7 @@ private: | |||
90 | bool mHasSSE; | 90 | bool mHasSSE; |
91 | bool mHasSSE2; | 91 | bool mHasSSE2; |
92 | bool mHasAltivec; | 92 | bool mHasAltivec; |
93 | S32 mCPUMhz; | 93 | F64 mCPUMHz; |
94 | std::string mFamily; | 94 | std::string mFamily; |
95 | std::string mCPUString; | 95 | std::string mCPUString; |
96 | }; | 96 | }; |
@@ -120,6 +120,9 @@ public: | |||
120 | ** be returned. | 120 | ** be returned. |
121 | */ | 121 | */ |
122 | U32 getPhysicalMemoryClamped() const; ///< Memory size in clamped bytes | 122 | U32 getPhysicalMemoryClamped() const; ///< Memory size in clamped bytes |
123 | |||
124 | //get the available memory infomation in KiloBytes. | ||
125 | static void getAvailableMemoryKB(U32& avail_physical_mem_kb, U32& avail_virtual_mem_kb); | ||
123 | }; | 126 | }; |
124 | 127 | ||
125 | 128 | ||
diff --git a/linden/indra/llimage/llimageworker.cpp b/linden/indra/llimage/llimageworker.cpp index dc989e5..5e61f69 100644 --- a/linden/indra/llimage/llimageworker.cpp +++ b/linden/indra/llimage/llimageworker.cpp | |||
@@ -164,7 +164,7 @@ void LLImageDecodeThread::ImageRequest::finishRequest(bool completed) | |||
164 | { | 164 | { |
165 | if (mResponder.notNull()) | 165 | if (mResponder.notNull()) |
166 | { | 166 | { |
167 | bool success = completed && mDecodedRaw && (!mNeedsAux || mDecodedAux); | 167 | bool success = completed && mDecodedRaw && mDecodedImageRaw->getDataSize() && (!mNeedsAux || mDecodedAux); |
168 | mResponder->completed(success, mDecodedImageRaw, mDecodedImageAux); | 168 | mResponder->completed(success, mDecodedImageRaw, mDecodedImageAux); |
169 | } | 169 | } |
170 | // Will automatically be deleted | 170 | // Will automatically be deleted |
diff --git a/linden/indra/llimagej2coj/llimagej2coj.cpp b/linden/indra/llimagej2coj/llimagej2coj.cpp index fd92370..f003d60 100644 --- a/linden/indra/llimagej2coj/llimagej2coj.cpp +++ b/linden/indra/llimagej2coj/llimagej2coj.cpp | |||
@@ -152,13 +152,8 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod | |||
152 | /* open a byte stream */ | 152 | /* open a byte stream */ |
153 | cio = opj_cio_open((opj_common_ptr)dinfo, base.getData(), base.getDataSize()); | 153 | cio = opj_cio_open((opj_common_ptr)dinfo, base.getData(), base.getDataSize()); |
154 | 154 | ||
155 | /* decode the stream and fill the image structure, also fill in an additional | 155 | /* decode the stream and fill the image structure */ |
156 | structure to get the decoding result. This structure is a bit unusual in that | 156 | image = opj_decode(dinfo, cio); |
157 | it is not received through opj, but still has some dynamically allocated fields | ||
158 | that need to be cleared up at the end by calling a destroy function. */ | ||
159 | opj_codestream_info_t cinfo; | ||
160 | memset(&cinfo, 0, sizeof(opj_codestream_info_t)); | ||
161 | image = opj_decode_with_info(dinfo, cio, &cinfo); | ||
162 | 157 | ||
163 | /* close the byte stream */ | 158 | /* close the byte stream */ |
164 | opj_cio_close(cio); | 159 | opj_cio_close(cio); |
@@ -175,6 +170,7 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod | |||
175 | if(!image) | 170 | if(!image) |
176 | { | 171 | { |
177 | LL_DEBUGS("Openjpeg") << "ERROR -> decodeImpl: failed to decode image - no image" << LL_ENDL; | 172 | LL_DEBUGS("Openjpeg") << "ERROR -> decodeImpl: failed to decode image - no image" << LL_ENDL; |
173 | base.decodeFailed(); | ||
178 | return TRUE; // done | 174 | return TRUE; // done |
179 | } | 175 | } |
180 | 176 | ||
@@ -185,51 +181,35 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod | |||
185 | LL_DEBUGS("Openjpeg") << "ERROR -> decodeImpl: failed to decode image wrong number of components: " << img_components << LL_ENDL; | 181 | LL_DEBUGS("Openjpeg") << "ERROR -> decodeImpl: failed to decode image wrong number of components: " << img_components << LL_ENDL; |
186 | if (image) | 182 | if (image) |
187 | { | 183 | { |
188 | opj_destroy_cstr_info(&cinfo); | ||
189 | opj_image_destroy(image); | 184 | opj_image_destroy(image); |
190 | } | 185 | } |
191 | 186 | ||
187 | base.decodeFailed(); | ||
192 | return TRUE; // done | 188 | return TRUE; // done |
193 | } | 189 | } |
194 | 190 | ||
195 | // sometimes we get bad data out of the cache - check to see if the decode succeeded | 191 | // sometimes we get bad data out of the cache - check to see if the decode succeeded |
196 | int decompdifference = 0; | 192 | for (S32 i = 0; i < img_components; i++) |
197 | if (cinfo.numdecompos) // sanity | ||
198 | { | 193 | { |
199 | for (int comp = 0; comp < image->numcomps; comp++) | 194 | if (image->comps[i].factor != base.getRawDiscardLevel()) |
200 | { /* get maximum decomposition level difference, first field is from the COD header and the second | ||
201 | is what is actually met in the codestream, NB: if everything was ok, this calculation will | ||
202 | return what was set in the cp_reduce value! */ | ||
203 | decompdifference = llmax(decompdifference, cinfo.numdecompos[comp] - image->comps[comp].resno_decoded); | ||
204 | } | ||
205 | if (decompdifference < 0) // sanity | ||
206 | { | 195 | { |
207 | decompdifference = 0; | 196 | // if we didn't get the discard level we're expecting, fail |
197 | if (image) //anyway somthing odd with the image, better check than crash | ||
198 | opj_image_destroy(image); | ||
199 | base.decodeFailed(); | ||
200 | return TRUE; | ||
208 | } | 201 | } |
209 | } | 202 | } |
210 | 203 | ||
211 | |||
212 | /* if OpenJPEG failed to decode all requested decomposition levels | ||
213 | the difference will be greater than this level */ | ||
214 | if (decompdifference > base.getRawDiscardLevel()) | ||
215 | { | ||
216 | llwarns << "not enough data for requested discard level, setting mDecoding to FALSE, difference: " << (decompdifference - base.getRawDiscardLevel()) << llendl; | ||
217 | opj_destroy_cstr_info(&cinfo); | ||
218 | opj_image_destroy(image); | ||
219 | base.mDecoding = FALSE; | ||
220 | return TRUE; | ||
221 | } | ||
222 | |||
223 | if(img_components <= first_channel) | 204 | if(img_components <= first_channel) |
224 | { | 205 | { |
225 | // sanity | ||
226 | LL_DEBUGS("Openjpeg") << "trying to decode more channels than are present in image: numcomps: " << img_components << " first_channel: " << first_channel << LL_ENDL; | 206 | LL_DEBUGS("Openjpeg") << "trying to decode more channels than are present in image: numcomps: " << img_components << " first_channel: " << first_channel << LL_ENDL; |
227 | if (image) | 207 | if (image) |
228 | { | 208 | { |
229 | opj_destroy_cstr_info(&cinfo); | ||
230 | opj_image_destroy(image); | 209 | opj_image_destroy(image); |
231 | } | 210 | } |
232 | 211 | ||
212 | base.decodeFailed(); | ||
233 | return TRUE; | 213 | return TRUE; |
234 | } | 214 | } |
235 | 215 | ||
@@ -275,17 +255,16 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod | |||
275 | else // Some rare OpenJPEG versions have this bug. | 255 | else // Some rare OpenJPEG versions have this bug. |
276 | { | 256 | { |
277 | llwarns << "ERROR -> decodeImpl: failed to decode image! (NULL comp data - OpenJPEG bug)" << llendl; | 257 | llwarns << "ERROR -> decodeImpl: failed to decode image! (NULL comp data - OpenJPEG bug)" << llendl; |
278 | opj_destroy_cstr_info(&cinfo); | ||
279 | opj_image_destroy(image); | 258 | opj_image_destroy(image); |
280 | 259 | ||
260 | base.decodeFailed(); | ||
281 | return TRUE; // done | 261 | return TRUE; // done |
282 | } | 262 | } |
283 | } | 263 | } |
284 | 264 | ||
285 | /* free opj data structures */ | 265 | /* free image data structure */ |
286 | if (image) | 266 | if (image) |
287 | { | 267 | { |
288 | opj_destroy_cstr_info(&cinfo); | ||
289 | opj_image_destroy(image); | 268 | opj_image_destroy(image); |
290 | } | 269 | } |
291 | 270 | ||
diff --git a/linden/indra/llinventory/lleconomy.cpp b/linden/indra/llinventory/lleconomy.cpp index 4366d1e..2e98112 100644 --- a/linden/indra/llinventory/lleconomy.cpp +++ b/linden/indra/llinventory/lleconomy.cpp | |||
@@ -44,7 +44,7 @@ LLGlobalEconomy::LLGlobalEconomy() | |||
44 | mPricePublicObjectDecay( -1 ), | 44 | mPricePublicObjectDecay( -1 ), |
45 | mPricePublicObjectDelete( -1 ), | 45 | mPricePublicObjectDelete( -1 ), |
46 | mPriceEnergyUnit( -1 ), | 46 | mPriceEnergyUnit( -1 ), |
47 | mPriceUpload( -1 ), | 47 | mPriceUpload( 0 ), |
48 | mPriceRentLight( -1 ), | 48 | mPriceRentLight( -1 ), |
49 | mTeleportMinPrice( -1 ), | 49 | mTeleportMinPrice( -1 ), |
50 | mTeleportPriceExponent( -1 ), | 50 | mTeleportPriceExponent( -1 ), |
diff --git a/linden/indra/llmath/llvolume.cpp b/linden/indra/llmath/llvolume.cpp index c4c3f07..618048c 100644 --- a/linden/indra/llmath/llvolume.cpp +++ b/linden/indra/llmath/llvolume.cpp | |||
@@ -3583,7 +3583,7 @@ S32 LLVolume::lineSegmentIntersect(const LLVector3& start, const LLVector3& end, | |||
3583 | if (face == -1) // ALL_SIDES | 3583 | if (face == -1) // ALL_SIDES |
3584 | { | 3584 | { |
3585 | start_face = 0; | 3585 | start_face = 0; |
3586 | end_face = getNumFaces() - 1; | 3586 | end_face = getNumVolumeFaces() - 1; |
3587 | } | 3587 | } |
3588 | else | 3588 | else |
3589 | { | 3589 | { |
diff --git a/linden/indra/llmath/llvolume.h b/linden/indra/llmath/llvolume.h index 0b9002f..77af2c4 100644 --- a/linden/indra/llmath/llvolume.h +++ b/linden/indra/llmath/llvolume.h | |||
@@ -949,9 +949,11 @@ public: | |||
949 | LLVector3 mLODScaleBias; // vector for biasing LOD based on scale | 949 | LLVector3 mLODScaleBias; // vector for biasing LOD based on scale |
950 | 950 | ||
951 | void sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level); | 951 | void sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level); |
952 | |||
953 | F32 sculptGetSurfaceArea(); | ||
954 | |||
952 | private: | 955 | private: |
953 | void sculptGenerateMapVertices(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, U8 sculpt_type); | 956 | void sculptGenerateMapVertices(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, U8 sculpt_type); |
954 | F32 sculptGetSurfaceArea(); | ||
955 | void sculptGeneratePlaceholder(); | 957 | void sculptGeneratePlaceholder(); |
956 | void sculptCalcMeshResolution(U16 width, U16 height, U8 type, S32& s, S32& t); | 958 | void sculptCalcMeshResolution(U16 width, U16 height, U8 type, S32& s, S32& t); |
957 | 959 | ||
diff --git a/linden/indra/llmessage/CMakeLists.txt b/linden/indra/llmessage/CMakeLists.txt index 9965191..b3f2b4c 100644 --- a/linden/indra/llmessage/CMakeLists.txt +++ b/linden/indra/llmessage/CMakeLists.txt | |||
@@ -98,6 +98,7 @@ set(llmessage_SOURCE_FILES | |||
98 | patch_code.cpp | 98 | patch_code.cpp |
99 | patch_dct.cpp | 99 | patch_dct.cpp |
100 | patch_idct.cpp | 100 | patch_idct.cpp |
101 | llsocks5.cpp | ||
101 | sound_ids.cpp | 102 | sound_ids.cpp |
102 | ) | 103 | ) |
103 | 104 | ||
@@ -198,6 +199,7 @@ set(llmessage_HEADER_FILES | |||
198 | patch_code.h | 199 | patch_code.h |
199 | patch_dct.h | 200 | patch_dct.h |
200 | sound_ids.h | 201 | sound_ids.h |
202 | llsocks5.h | ||
201 | ) | 203 | ) |
202 | 204 | ||
203 | set_source_files_properties(${llmessage_HEADER_FILES} | 205 | set_source_files_properties(${llmessage_HEADER_FILES} |
diff --git a/linden/indra/llmessage/llcurl.cpp b/linden/indra/llmessage/llcurl.cpp index 9ecfee4..b23ef33 100644 --- a/linden/indra/llmessage/llcurl.cpp +++ b/linden/indra/llmessage/llcurl.cpp | |||
@@ -56,6 +56,8 @@ | |||
56 | #include "llsdserialize.h" | 56 | #include "llsdserialize.h" |
57 | #include "llthread.h" | 57 | #include "llthread.h" |
58 | 58 | ||
59 | #include "llsocks5.h" | ||
60 | |||
59 | ////////////////////////////////////////////////////////////////////////////// | 61 | ////////////////////////////////////////////////////////////////////////////// |
60 | /* | 62 | /* |
61 | The trick to getting curl to do keep-alives is to reuse the | 63 | The trick to getting curl to do keep-alives is to reuse the |
@@ -270,6 +272,25 @@ LLCurl::Easy* LLCurl::Easy::getEasy() | |||
270 | // set no DMS caching as default for all easy handles. This prevents them adopting a | 272 | // set no DMS caching as default for all easy handles. This prevents them adopting a |
271 | // multi handles cache if they are added to one. | 273 | // multi handles cache if they are added to one. |
272 | curl_easy_setopt(easy->mCurlEasyHandle, CURLOPT_DNS_CACHE_TIMEOUT, 0); | 274 | curl_easy_setopt(easy->mCurlEasyHandle, CURLOPT_DNS_CACHE_TIMEOUT, 0); |
275 | |||
276 | if (LLSocks::getInstance()->isHttpProxyEnabled()) | ||
277 | { | ||
278 | std::string address = LLSocks::getInstance()->getHTTPProxy().getIPString(); | ||
279 | U16 port = LLSocks::getInstance()->getHTTPProxy().getPort(); | ||
280 | curl_easy_setopt(easy->mCurlEasyHandle, CURLOPT_PROXY,address.c_str()); | ||
281 | curl_easy_setopt(easy->mCurlEasyHandle, CURLOPT_PROXYPORT,port); | ||
282 | if (LLSocks::getInstance()->getHttpProxyType() == LLPROXY_SOCKS) | ||
283 | { | ||
284 | curl_easy_setopt(easy->mCurlEasyHandle, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); | ||
285 | if(LLSocks::getInstance()->getSelectedAuthMethod()==METHOD_PASSWORD) | ||
286 | curl_easy_setopt(easy->mCurlEasyHandle, CURLOPT_PROXYUSERPWD,LLSocks::getInstance()->getProxyUserPwd().c_str()); | ||
287 | } | ||
288 | else | ||
289 | { | ||
290 | curl_easy_setopt(easy->mCurlEasyHandle, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); | ||
291 | } | ||
292 | } | ||
293 | |||
273 | ++gCurlEasyCount; | 294 | ++gCurlEasyCount; |
274 | return easy; | 295 | return easy; |
275 | } | 296 | } |
@@ -443,6 +464,24 @@ void LLCurl::Easy::prepRequest(const std::string& url, | |||
443 | // setopt(CURLOPT_VERBOSE, 1); // usefull for debugging | 464 | // setopt(CURLOPT_VERBOSE, 1); // usefull for debugging |
444 | setopt(CURLOPT_NOSIGNAL, 1); | 465 | setopt(CURLOPT_NOSIGNAL, 1); |
445 | 466 | ||
467 | if (LLSocks::getInstance()->isHttpProxyEnabled()) | ||
468 | { | ||
469 | std::string address = LLSocks::getInstance()->getHTTPProxy().getIPString(); | ||
470 | U16 port = LLSocks::getInstance()->getHTTPProxy().getPort(); | ||
471 | setoptString(CURLOPT_PROXY, address.c_str()); | ||
472 | setopt(CURLOPT_PROXYPORT, port); | ||
473 | if (LLSocks::getInstance()->getHttpProxyType() == LLPROXY_SOCKS) | ||
474 | { | ||
475 | setopt(CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); | ||
476 | if(LLSocks::getInstance()->getSelectedAuthMethod()==METHOD_PASSWORD) | ||
477 | setoptString(CURLOPT_PROXYUSERPWD,LLSocks::getInstance()->getProxyUserPwd()); | ||
478 | } | ||
479 | else | ||
480 | { | ||
481 | setopt(CURLOPT_PROXYTYPE, CURLPROXY_HTTP); | ||
482 | } | ||
483 | } | ||
484 | |||
446 | mOutput.reset(new LLBufferArray); | 485 | mOutput.reset(new LLBufferArray); |
447 | setopt(CURLOPT_WRITEFUNCTION, (void*)&curlWriteCallback); | 486 | setopt(CURLOPT_WRITEFUNCTION, (void*)&curlWriteCallback); |
448 | setopt(CURLOPT_WRITEDATA, (void*)this); | 487 | setopt(CURLOPT_WRITEDATA, (void*)this); |
@@ -742,6 +781,7 @@ bool LLCurlRequest::getByteRange(const std::string& url, | |||
742 | if (length > 0) | 781 | if (length > 0) |
743 | { | 782 | { |
744 | std::string range = llformat("Range: bytes=%d-%d", offset,offset+length-1); | 783 | std::string range = llformat("Range: bytes=%d-%d", offset,offset+length-1); |
784 | //llinfos << "http url: " << url << " " << range << llendl; | ||
745 | easy->slist_append(range.c_str()); | 785 | easy->slist_append(range.c_str()); |
746 | } | 786 | } |
747 | easy->setHeaders(); | 787 | easy->setHeaders(); |
diff --git a/linden/indra/llmessage/llpacketring.cpp b/linden/indra/llmessage/llpacketring.cpp index 7f9617f..e7dad79 100644 --- a/linden/indra/llmessage/llpacketring.cpp +++ b/linden/indra/llmessage/llpacketring.cpp | |||
@@ -43,6 +43,15 @@ | |||
43 | #include "llmessagelog.h" | 43 | #include "llmessagelog.h" |
44 | #include "message.h" | 44 | #include "message.h" |
45 | 45 | ||
46 | #include "llsocks5.h" | ||
47 | |||
48 | #if LL_WINDOWS | ||
49 | #include <winsock2.h> | ||
50 | #else | ||
51 | #include <sys/socket.h> | ||
52 | #include <netinet/in.h> | ||
53 | #endif | ||
54 | |||
46 | /////////////////////////////////////////////////////////// | 55 | /////////////////////////////////////////////////////////// |
47 | LLPacketRing::LLPacketRing () : | 56 | LLPacketRing::LLPacketRing () : |
48 | mUseInThrottle(FALSE), | 57 | mUseInThrottle(FALSE), |
@@ -224,8 +233,25 @@ S32 LLPacketRing::receivePacket (S32 socket, char *datap) | |||
224 | else | 233 | else |
225 | { | 234 | { |
226 | // no delay, pull straight from net | 235 | // no delay, pull straight from net |
227 | packet_size = receive_packet(socket, datap); | 236 | if (LLSocks::isEnabled()) |
228 | mLastSender = ::get_sender(); | 237 | { |
238 | proxywrap_t * header; | ||
239 | datap = datap-10; | ||
240 | header = (proxywrap_t *)datap; | ||
241 | packet_size = receive_packet(socket, datap); | ||
242 | mLastSender.setAddress(header->addr); | ||
243 | mLastSender.setPort(ntohs(header->port)); | ||
244 | if (packet_size > 10) | ||
245 | { | ||
246 | packet_size -= 10; | ||
247 | } | ||
248 | } | ||
249 | else | ||
250 | { | ||
251 | packet_size = receive_packet(socket, datap); | ||
252 | mLastSender = ::get_sender(); | ||
253 | } | ||
254 | |||
229 | mLastReceivingIF = ::get_receiving_interface(); | 255 | mLastReceivingIF = ::get_receiving_interface(); |
230 | 256 | ||
231 | if (packet_size) // did we actually get a packet? | 257 | if (packet_size) // did we actually get a packet? |
@@ -254,7 +280,7 @@ BOOL LLPacketRing::sendPacket(int h_socket, char * send_buffer, S32 buf_size, LL | |||
254 | BOOL status = TRUE; | 280 | BOOL status = TRUE; |
255 | if (!mUseOutThrottle) | 281 | if (!mUseOutThrottle) |
256 | { | 282 | { |
257 | return send_packet(h_socket, send_buffer, buf_size, host.getAddress(), host.getPort() ); | 283 | return doSendPacket(h_socket, send_buffer, buf_size, host ); |
258 | } | 284 | } |
259 | else | 285 | else |
260 | { | 286 | { |
@@ -275,7 +301,7 @@ BOOL LLPacketRing::sendPacket(int h_socket, char * send_buffer, S32 buf_size, LL | |||
275 | mOutBufferLength -= packetp->getSize(); | 301 | mOutBufferLength -= packetp->getSize(); |
276 | packet_size = packetp->getSize(); | 302 | packet_size = packetp->getSize(); |
277 | 303 | ||
278 | status = send_packet(h_socket, packetp->getData(), packet_size, packetp->getHost().getAddress(), packetp->getHost().getPort()); | 304 | status = doSendPacket(h_socket, packetp->getData(), packet_size, packetp->getHost()); |
279 | 305 | ||
280 | delete packetp; | 306 | delete packetp; |
281 | // Update the throttle | 307 | // Update the throttle |
@@ -284,7 +310,7 @@ BOOL LLPacketRing::sendPacket(int h_socket, char * send_buffer, S32 buf_size, LL | |||
284 | else | 310 | else |
285 | { | 311 | { |
286 | // If the queue's empty, we can just send this packet right away. | 312 | // If the queue's empty, we can just send this packet right away. |
287 | status = send_packet(h_socket, send_buffer, buf_size, host.getAddress(), host.getPort() ); | 313 | status = doSendPacket(h_socket, send_buffer, buf_size, host ); |
288 | packet_size = buf_size; | 314 | packet_size = buf_size; |
289 | 315 | ||
290 | // Update the throttle | 316 | // Update the throttle |
@@ -322,3 +348,23 @@ BOOL LLPacketRing::sendPacket(int h_socket, char * send_buffer, S32 buf_size, LL | |||
322 | 348 | ||
323 | return status; | 349 | return status; |
324 | } | 350 | } |
351 | |||
352 | BOOL LLPacketRing::doSendPacket(int h_socket, const char * send_buffer, S32 buf_size, LLHost host) | ||
353 | { | ||
354 | |||
355 | if (!LLSocks::isEnabled()) | ||
356 | { | ||
357 | return send_packet(h_socket, send_buffer, buf_size, host.getAddress(), host.getPort()); | ||
358 | } | ||
359 | |||
360 | proxywrap_t *socks_header = (proxywrap_t *)&mProxyWrappedSendBuffer; | ||
361 | socks_header->rsv = 0; | ||
362 | socks_header->addr = host.getAddress(); | ||
363 | socks_header->port = htons(host.getPort()); | ||
364 | socks_header->atype = ADDRESS_IPV4; | ||
365 | socks_header->frag = 0; | ||
366 | |||
367 | memcpy(mProxyWrappedSendBuffer+10, send_buffer, buf_size); | ||
368 | |||
369 | return send_packet(h_socket,(const char*) mProxyWrappedSendBuffer, buf_size+10, LLSocks::getInstance()->getUDPPproxy().getAddress(), LLSocks::getInstance()->getUDPPproxy().getPort()); | ||
370 | } | ||
diff --git a/linden/indra/llmessage/llpacketring.h b/linden/indra/llmessage/llpacketring.h index 4408abe..5d2c246 100644 --- a/linden/indra/llmessage/llpacketring.h +++ b/linden/indra/llmessage/llpacketring.h | |||
@@ -88,6 +88,9 @@ protected: | |||
88 | 88 | ||
89 | LLHost mLastSender; | 89 | LLHost mLastSender; |
90 | LLHost mLastReceivingIF; | 90 | LLHost mLastReceivingIF; |
91 | |||
92 | BOOL doSendPacket(int h_socket, const char * send_buffer, S32 buf_size, LLHost host); | ||
93 | U8 mProxyWrappedSendBuffer[NET_BUFFER_SIZE]; | ||
91 | }; | 94 | }; |
92 | 95 | ||
93 | 96 | ||
diff --git a/linden/indra/llmessage/llsocks5.cpp b/linden/indra/llmessage/llsocks5.cpp new file mode 100644 index 0000000..7326e80 --- /dev/null +++ b/linden/indra/llmessage/llsocks5.cpp | |||
@@ -0,0 +1,210 @@ | |||
1 | /** | ||
2 | * @file llsocks5.cpp | ||
3 | * @brief Socks 5 implementation | ||
4 | * | ||
5 | * $LicenseInfo:firstyear=2000&license=viewergpl$ | ||
6 | * | ||
7 | * Copyright (c) 2000-2009, Linden Research, Inc. | ||
8 | * | ||
9 | * Second Life Viewer Source Code | ||
10 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
11 | * to you under the terms of the GNU General Public License, version 2.0 | ||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
16 | * | ||
17 | * There are special exceptions to the terms and conditions of the GPL as | ||
18 | * it is applied to this Source Code. View the full text of the exception | ||
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
20 | * online at | ||
21 | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
22 | * | ||
23 | * By copying, modifying or distributing this software, you acknowledge | ||
24 | * that you have read and understood your obligations described above, | ||
25 | * and agree to abide by those obligations. | ||
26 | * | ||
27 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
28 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
29 | * COMPLETENESS OR PERFORMANCE. | ||
30 | * $/LicenseInfo$ | ||
31 | */ | ||
32 | |||
33 | #include <string> | ||
34 | |||
35 | #include "linden_common.h" | ||
36 | #include "net.h" | ||
37 | #include "llhost.h" | ||
38 | #include "message.h" | ||
39 | #include "llsocks5.h" | ||
40 | |||
41 | // Static class variable instances | ||
42 | |||
43 | // We want this to be static to avoid excessive indirection on every | ||
44 | // incomming packet just to do a simple bool test. The getter for this | ||
45 | // member is also static | ||
46 | bool LLSocks::sUdpProxyEnabled; | ||
47 | bool LLSocks::sHttpProxyEnabled; | ||
48 | |||
49 | LLSocks::LLSocks() | ||
50 | { | ||
51 | sUdpProxyEnabled = false; | ||
52 | sHttpProxyEnabled = false; | ||
53 | mNeedUpdate = false; | ||
54 | } | ||
55 | |||
56 | // Perform a Socks5 authentication and UDP assioacation to the proxy | ||
57 | // specified by proxy, and assiocate UDP port message_port | ||
58 | int LLSocks::proxyHandshake(LLHost proxy, U32 message_port) | ||
59 | { | ||
60 | int result; | ||
61 | |||
62 | /* Socks 5 Auth request */ | ||
63 | socks_auth_request_t socks_auth_request; | ||
64 | socks_auth_response_t socks_auth_response; | ||
65 | |||
66 | socks_auth_request.version = SOCKS_VERSION; // Socks version 5 | ||
67 | socks_auth_request.num_methods = 1; // Sending 1 method | ||
68 | socks_auth_request.methods = mAuthMethodSelected; // send only the selected metho | ||
69 | |||
70 | result = tcp_handshake(hProxyControlChannel, (char*)&socks_auth_request, sizeof(socks_auth_request_t), (char*)&socks_auth_response, sizeof(socks_auth_response_t)); | ||
71 | if (result != 0) | ||
72 | { | ||
73 | llwarns << "Socks authentication request failed, error on TCP control channel : " << result << llendl; | ||
74 | stopProxy(); | ||
75 | return SOCKS_CONNECT_ERROR; | ||
76 | } | ||
77 | |||
78 | if (socks_auth_response.method == AUTH_NOT_ACCEPTABLE) | ||
79 | { | ||
80 | llwarns << "Socks5 server refused all our authentication methods" << llendl; | ||
81 | stopProxy(); | ||
82 | return SOCKS_NOT_ACCEPTABLE; | ||
83 | } | ||
84 | |||
85 | // SOCKS5 USERNAME/PASSWORD authentication | ||
86 | if (socks_auth_response.method == METHOD_PASSWORD) | ||
87 | { | ||
88 | // The server has requested a username/password combination | ||
89 | U32 request_size = mSocksUsername.size() + mSocksPassword.size() + 3; | ||
90 | char * password_auth = (char *)malloc(request_size); | ||
91 | password_auth[0] = 0x01; | ||
92 | password_auth[1] = mSocksUsername.size(); | ||
93 | memcpy(&password_auth[2],mSocksUsername.c_str(), mSocksUsername.size()); | ||
94 | password_auth[mSocksUsername.size()+2] = mSocksPassword.size(); | ||
95 | memcpy(&password_auth[mSocksUsername.size()+3], mSocksPassword.c_str(), mSocksPassword.size()); | ||
96 | |||
97 | authmethod_password_reply_t password_reply; | ||
98 | |||
99 | result = tcp_handshake(hProxyControlChannel, password_auth, request_size, (char*)&password_reply, sizeof(authmethod_password_reply_t)); | ||
100 | free (password_auth); | ||
101 | |||
102 | if (result != 0) | ||
103 | { | ||
104 | llwarns << "Socks authentication failed, error on TCP control channel : " << result << llendl; | ||
105 | stopProxy(); | ||
106 | return SOCKS_CONNECT_ERROR; | ||
107 | } | ||
108 | |||
109 | if (password_reply.status != AUTH_SUCCESS) | ||
110 | { | ||
111 | llwarns << "Socks authentication failed" << llendl; | ||
112 | stopProxy(); | ||
113 | return SOCKS_AUTH_FAIL; | ||
114 | } | ||
115 | } | ||
116 | |||
117 | /* SOCKS5 connect request */ | ||
118 | |||
119 | socks_command_request_t connect_request; | ||
120 | socks_command_response_t connect_reply; | ||
121 | |||
122 | connect_request.version = SOCKS_VERSION; //Socks V5 | ||
123 | connect_request.command = COMMAND_UDP_ASSOCIATE; // Associate UDP | ||
124 | connect_request.flag = FIELD_RESERVED; | ||
125 | connect_request.atype = ADDRESS_IPV4; | ||
126 | connect_request.address = 0; // 0.0.0.0 We are not fussy about address | ||
127 | // UDP is promiscious receive for our protocol | ||
128 | connect_request.port = 0; // Port must be 0 if you ever want to connect via NAT and your router does port rewrite for you | ||
129 | |||
130 | result = tcp_handshake(hProxyControlChannel, (char*)&connect_request, sizeof(socks_command_request_t), (char*)&connect_reply, sizeof(socks_command_response_t)); | ||
131 | if (result != 0) | ||
132 | { | ||
133 | llwarns << "Socks connect request failed, error on TCP control channel : " << result << llendl; | ||
134 | stopProxy(); | ||
135 | return SOCKS_CONNECT_ERROR; | ||
136 | } | ||
137 | |||
138 | if (connect_reply.reply != REPLY_REQUEST_GRANTED) | ||
139 | { | ||
140 | //Something went wrong | ||
141 | llwarns << "Connection to SOCKS5 server failed, UDP forward request not granted" << llendl; | ||
142 | stopProxy(); | ||
143 | return SOCKS_UDP_FWD_NOT_GRANTED; | ||
144 | } | ||
145 | |||
146 | mUDPProxy.setPort(ntohs(connect_reply.port)); // reply port is in network byte order | ||
147 | mUDPProxy.setAddress(proxy.getAddress()); | ||
148 | // All good now we have been given the UDP port to send requests that need forwarding. | ||
149 | llinfos << "Socks 5 UDP proxy connected on " << mUDPProxy << llendl; | ||
150 | return SOCKS_OK; | ||
151 | } | ||
152 | |||
153 | int LLSocks::startProxy(LLHost proxy, U32 message_port) | ||
154 | { | ||
155 | int status; | ||
156 | |||
157 | mTCPProxy = proxy; | ||
158 | mNeedUpdate = false; | ||
159 | |||
160 | stopProxy(); | ||
161 | hProxyControlChannel = tcp_open_channel(proxy); | ||
162 | if (hProxyControlChannel == -1) | ||
163 | { | ||
164 | return SOCKS_HOST_CONNECT_FAILED; | ||
165 | } | ||
166 | |||
167 | status = proxyHandshake(proxy, message_port); | ||
168 | if (status == SOCKS_OK) | ||
169 | { | ||
170 | sUdpProxyEnabled=true; | ||
171 | } | ||
172 | return status; | ||
173 | } | ||
174 | |||
175 | int LLSocks::startProxy(std::string host, U32 port) | ||
176 | { | ||
177 | mTCPProxy.setHostByName(host); | ||
178 | mTCPProxy.setPort(port); | ||
179 | return startProxy(mTCPProxy, (U32)gMessageSystem->mPort); | ||
180 | } | ||
181 | |||
182 | void LLSocks::stopProxy() | ||
183 | { | ||
184 | sUdpProxyEnabled = false; | ||
185 | |||
186 | if (hProxyControlChannel) | ||
187 | { | ||
188 | tcp_close_channel(hProxyControlChannel); | ||
189 | } | ||
190 | } | ||
191 | |||
192 | void LLSocks::setAuthNone() | ||
193 | { | ||
194 | mAuthMethodSelected = METHOD_NOAUTH; | ||
195 | } | ||
196 | |||
197 | |||
198 | void LLSocks::setAuthPassword(std::string username, std::string password) | ||
199 | { | ||
200 | mAuthMethodSelected = METHOD_PASSWORD; | ||
201 | mSocksUsername = username; | ||
202 | mSocksPassword = password; | ||
203 | } | ||
204 | |||
205 | void LLSocks::EnableHttpProxy(LLHost httpHost, LLHttpProxyType type) | ||
206 | { | ||
207 | sHttpProxyEnabled = true; | ||
208 | mHTTPProxy = httpHost; | ||
209 | mProxyType = type; | ||
210 | } | ||
diff --git a/linden/indra/llmessage/llsocks5.h b/linden/indra/llmessage/llsocks5.h new file mode 100644 index 0000000..d422d20 --- /dev/null +++ b/linden/indra/llmessage/llsocks5.h | |||
@@ -0,0 +1,248 @@ | |||
1 | /** | ||
2 | * @file llsocks5.h | ||
3 | * @brief Socks 5 implementation | ||
4 | * | ||
5 | * $LicenseInfo:firstyear=2001&license=viewergpl$ | ||
6 | * | ||
7 | * Copyright (c) 2001-2009, Linden Research, Inc. | ||
8 | * | ||
9 | * Second Life Viewer Source Code | ||
10 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
11 | * to you under the terms of the GNU General Public License, version 2.0 | ||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
16 | * | ||
17 | * There are special exceptions to the terms and conditions of the GPL as | ||
18 | * it is applied to this Source Code. View the full text of the exception | ||
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
20 | * online at | ||
21 | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
22 | * | ||
23 | * By copying, modifying or distributing this software, you acknowledge | ||
24 | * that you have read and understood your obligations described above, | ||
25 | * and agree to abide by those obligations. | ||
26 | * | ||
27 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
28 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
29 | * COMPLETENESS OR PERFORMANCE. | ||
30 | * $/LicenseInfo$ | ||
31 | */ | ||
32 | |||
33 | #ifndef LL_SOCKS5_H | ||
34 | #define LL_SOCKS5_H | ||
35 | |||
36 | #include "llhost.h" | ||
37 | #include "llmemory.h" | ||
38 | #include <string> | ||
39 | |||
40 | // Error codes returned from the StartProxy method | ||
41 | |||
42 | #define SOCKS_OK 0 | ||
43 | #define SOCKS_CONNECT_ERROR -1 | ||
44 | #define SOCKS_NOT_PERMITTED -2 | ||
45 | #define SOCKS_NOT_ACCEPTABLE -3 | ||
46 | #define SOCKS_AUTH_FAIL -4 | ||
47 | #define SOCKS_UDP_FWD_NOT_GRANTED -5 | ||
48 | #define SOCKS_HOST_CONNECT_FAILED -6 | ||
49 | |||
50 | #ifndef MAXHOSTNAMELEN | ||
51 | #define MAXHOSTNAMELEN (255 + 1) /* socks5: 255, +1 for len. */ | ||
52 | #endif | ||
53 | |||
54 | #define SOCKS_VERSION 0x05 // we are using socks 5 | ||
55 | |||
56 | // socks 5 address/hostname types | ||
57 | #define ADDRESS_IPV4 0x01 | ||
58 | #define ADDRESS_HOSTNAME 0x03 | ||
59 | #define ADDRESS_IPV6 0x04 | ||
60 | |||
61 | // Lets just use our own ipv4 struct rather than dragging in system | ||
62 | // specific headers | ||
63 | union ipv4_address_t { | ||
64 | unsigned char octects[4]; | ||
65 | U32 addr32; | ||
66 | }; | ||
67 | |||
68 | // Socks 5 control channel commands | ||
69 | #define COMMAND_TCP_STREAM 0x01 | ||
70 | #define COMMAND_TCP_BIND 0x02 | ||
71 | #define COMMAND_UDP_ASSOCIATE 0x03 | ||
72 | |||
73 | // Socks 5 command replys | ||
74 | #define REPLY_REQUEST_GRANTED 0x00 | ||
75 | #define REPLY_GENERAL_FAIL 0x01 | ||
76 | #define REPLY_RULESET_FAIL 0x02 | ||
77 | #define REPLY_NETWORK_UNREACHABLE 0x03 | ||
78 | #define REPLY_HOST_UNREACHABLE 0x04 | ||
79 | #define REPLY_CONNECTION_REFUSED 0x05 | ||
80 | #define REPLY_TTL_EXPIRED 0x06 | ||
81 | #define REPLY_PROTOCOL_ERROR 0x07 | ||
82 | #define REPLY_TYPE_NOT_SUPPORTED 0x08 | ||
83 | |||
84 | #define FIELD_RESERVED 0x00 | ||
85 | |||
86 | // The standard socks5 request packet | ||
87 | // Push current alignment to stack and set alignment to 1 byte boundary | ||
88 | // This enabled us to use structs directly to set up and receive network packets | ||
89 | // into the correct fields, without fear of boundary alignment causing issues | ||
90 | #pragma pack(push,1) | ||
91 | |||
92 | // Socks5 command packet | ||
93 | struct socks_command_request_t { | ||
94 | unsigned char version; | ||
95 | unsigned char command; | ||
96 | unsigned char flag; | ||
97 | unsigned char atype; | ||
98 | U32 address; | ||
99 | U16 port; | ||
100 | }; | ||
101 | |||
102 | // Standard socks5 reply packet | ||
103 | struct socks_command_response_t { | ||
104 | unsigned char version; | ||
105 | unsigned char reply; | ||
106 | unsigned char flag; | ||
107 | unsigned char atype; | ||
108 | unsigned char add_bytes[4]; | ||
109 | U16 port; | ||
110 | }; | ||
111 | |||
112 | #define AUTH_NOT_ACCEPTABLE 0xFF // reply if prefered methods are not avaiable | ||
113 | #define AUTH_SUCCESS 0x00 // reply if authentication successfull | ||
114 | |||
115 | // socks 5 authentication request, stating which methods the client supports | ||
116 | struct socks_auth_request_t { | ||
117 | unsigned char version; | ||
118 | unsigned char num_methods; | ||
119 | unsigned char methods; // We are only using a single method currently | ||
120 | }; | ||
121 | |||
122 | // socks 5 authentication response packet, stating server prefered method | ||
123 | struct socks_auth_response_t { | ||
124 | unsigned char version; | ||
125 | unsigned char method; | ||
126 | }; | ||
127 | |||
128 | // socks 5 password reply packet | ||
129 | struct authmethod_password_reply_t { | ||
130 | unsigned char version; | ||
131 | unsigned char status; | ||
132 | }; | ||
133 | |||
134 | // socks 5 UDP packet header | ||
135 | struct proxywrap_t { | ||
136 | U16 rsv; | ||
137 | U8 frag; | ||
138 | U8 atype; | ||
139 | U32 addr; | ||
140 | U16 port; | ||
141 | }; | ||
142 | |||
143 | #pragma pack(pop) /* restore original alignment from stack */ | ||
144 | |||
145 | |||
146 | // Currently selected http proxy type | ||
147 | enum LLHttpProxyType | ||
148 | { | ||
149 | LLPROXY_SOCKS=0, | ||
150 | LLPROXY_HTTP=1 | ||
151 | }; | ||
152 | |||
153 | // Auth types | ||
154 | enum LLSocks5AuthType | ||
155 | { | ||
156 | METHOD_NOAUTH=0x00, // Client supports no auth | ||
157 | METHOD_GSSAPI=0x01, // Client supports GSSAPI (Not currently supported) | ||
158 | METHOD_PASSWORD=0x02 // Client supports username/password | ||
159 | }; | ||
160 | |||
161 | class LLSocks: public LLSingleton<LLSocks> | ||
162 | { | ||
163 | public: | ||
164 | LLSocks(); | ||
165 | |||
166 | // Start a connection to the socks 5 proxy | ||
167 | int startProxy(std::string host,U32 port); | ||
168 | int startProxy(LLHost proxy,U32 messagePort); | ||
169 | |||
170 | // Disconnect and clean up any connection to the socks 5 proxy | ||
171 | void stopProxy(); | ||
172 | |||
173 | // Set up to use Password auth when connecting to the socks proxy | ||
174 | void setAuthPassword(std::string username,std::string password); | ||
175 | |||
176 | // Set up to use No Auth when connecting to the socks proxy; | ||
177 | void setAuthNone(); | ||
178 | |||
179 | // get the currently selected auth method | ||
180 | LLSocks5AuthType getSelectedAuthMethod() { return mAuthMethodSelected; }; | ||
181 | |||
182 | // static check for enabled status for UDP packets | ||
183 | static bool isEnabled(){return sUdpProxyEnabled;}; | ||
184 | |||
185 | // static check for enabled status for http packets | ||
186 | static bool isHttpProxyEnabled(){return sHttpProxyEnabled;}; | ||
187 | |||
188 | // Proxy http packets via httpHost, which can be a Socks5 or a http proxy | ||
189 | // as specified in type | ||
190 | void EnableHttpProxy(LLHost httpHost,LLHttpProxyType type); | ||
191 | |||
192 | // Stop proxying http packets | ||
193 | void DisableHttpProxy() {sHttpProxyEnabled = false;}; | ||
194 | |||
195 | // get the UDP proxy address and port | ||
196 | LLHost getUDPPproxy(){return mUDPProxy;}; | ||
197 | // get the socks 5 TCP control channel address and port | ||
198 | LLHost getTCPProxy(){return mTCPProxy;}; | ||
199 | //get the http proxy address and port | ||
200 | LLHost getHTTPProxy(){return mHTTPProxy;}; | ||
201 | |||
202 | // get the currently selected http proxy type | ||
203 | LLHttpProxyType getHttpProxyType(){return mProxyType;}; | ||
204 | |||
205 | // mark that we need an update due to a settings change | ||
206 | void updated() { mNeedUpdate = true; }; | ||
207 | // report if the current settings are applied or dirty pending a startProxy | ||
208 | bool needsUpdate() { return mNeedUpdate; }; | ||
209 | |||
210 | //Get the username password in a curl compatible format | ||
211 | std::string getProxyUserPwd(){ return (mSocksUsername+":"+mSocksPassword);}; | ||
212 | |||
213 | private: | ||
214 | |||
215 | // Open a communication channel to the socks5 proxy proxy, at port messagePort | ||
216 | int proxyHandshake(LLHost proxy,U32 messagePort); | ||
217 | |||
218 | // socket handle to proxy tcp control channel | ||
219 | S32 hProxyControlChannel; | ||
220 | |||
221 | // is the UDP proxy enabled | ||
222 | static bool sUdpProxyEnabled; | ||
223 | // is the http proxy enabled | ||
224 | static bool sHttpProxyEnabled; | ||
225 | |||
226 | // Have all settings been applied | ||
227 | bool mNeedUpdate; | ||
228 | |||
229 | // currently selected http proxy type | ||
230 | LLHttpProxyType mProxyType; | ||
231 | |||
232 | // UDP proxy address and port | ||
233 | LLHost mUDPProxy; | ||
234 | // TCP Proxy control channel address and port | ||
235 | LLHost mTCPProxy; | ||
236 | // HTTP proxy address and port | ||
237 | LLHost mHTTPProxy; | ||
238 | |||
239 | // socks 5 auth method selected | ||
240 | LLSocks5AuthType mAuthMethodSelected; | ||
241 | |||
242 | // socks 5 username | ||
243 | std::string mSocksUsername; | ||
244 | // socks 5 password | ||
245 | std::string mSocksPassword; | ||
246 | }; | ||
247 | |||
248 | #endif | ||
diff --git a/linden/indra/llmessage/message.cpp b/linden/indra/llmessage/message.cpp index 9a80d7b..3eda579 100644 --- a/linden/indra/llmessage/message.cpp +++ b/linden/indra/llmessage/message.cpp | |||
@@ -548,9 +548,9 @@ BOOL LLMessageSystem::checkMessages( S64 frame_count, bool faked_message, U8 fak | |||
548 | S32 acks = 0; | 548 | S32 acks = 0; |
549 | S32 true_rcv_size = 0; | 549 | S32 true_rcv_size = 0; |
550 | 550 | ||
551 | U8* buffer = mTrueReceiveBuffer; | 551 | U8* buffer = mTrueReceiveBuffer.buffer; |
552 | 552 | ||
553 | mTrueReceiveSize = mPacketRing.receivePacket(mSocket, (char *)mTrueReceiveBuffer); | 553 | mTrueReceiveSize = mPacketRing.receivePacket(mSocket, (char *)mTrueReceiveBuffer.buffer); |
554 | // If you want to dump all received packets into SecondLife.log, uncomment this | 554 | // If you want to dump all received packets into SecondLife.log, uncomment this |
555 | //dumpPacketToLog(); | 555 | //dumpPacketToLog(); |
556 | // <edit> | 556 | // <edit> |
@@ -622,7 +622,7 @@ BOOL LLMessageSystem::checkMessages( S64 frame_count, bool faked_message, U8 fak | |||
622 | for(S32 i = 0; i < acks; ++i) | 622 | for(S32 i = 0; i < acks; ++i) |
623 | { | 623 | { |
624 | true_rcv_size -= sizeof(TPACKETID); | 624 | true_rcv_size -= sizeof(TPACKETID); |
625 | memcpy(&mem_id, &mTrueReceiveBuffer[true_rcv_size], /* Flawfinder: ignore*/ | 625 | memcpy(&mem_id, &buffer[true_rcv_size], /* Flawfinder: ignore*/ |
626 | sizeof(TPACKETID)); | 626 | sizeof(TPACKETID)); |
627 | packet_id = ntohl(mem_id); | 627 | packet_id = ntohl(mem_id); |
628 | //LL_INFOS("Messaging") << "got ack: " << packet_id << llendl; | 628 | //LL_INFOS("Messaging") << "got ack: " << packet_id << llendl; |
@@ -3386,7 +3386,7 @@ void LLMessageSystem::dumpPacketToLog() | |||
3386 | { | 3386 | { |
3387 | S32 offset = cur_line_pos * 3; | 3387 | S32 offset = cur_line_pos * 3; |
3388 | snprintf(line_buffer + offset, sizeof(line_buffer) - offset, | 3388 | snprintf(line_buffer + offset, sizeof(line_buffer) - offset, |
3389 | "%02x ", mTrueReceiveBuffer[i]); /* Flawfinder: ignore */ | 3389 | "%02x ", mTrueReceiveBuffer.buffer[i]); /* Flawfinder: ignore */ |
3390 | cur_line_pos++; | 3390 | cur_line_pos++; |
3391 | if (cur_line_pos >= 16) | 3391 | if (cur_line_pos >= 16) |
3392 | { | 3392 | { |
diff --git a/linden/indra/llmessage/message.h b/linden/indra/llmessage/message.h index 660cd2b..1ef15d2 100644 --- a/linden/indra/llmessage/message.h +++ b/linden/indra/llmessage/message.h | |||
@@ -66,6 +66,7 @@ | |||
66 | #include "llmessagesenderinterface.h" | 66 | #include "llmessagesenderinterface.h" |
67 | 67 | ||
68 | #include "llstoredmessage.h" | 68 | #include "llstoredmessage.h" |
69 | #include "llsocks5.h" | ||
69 | 70 | ||
70 | const U32 MESSAGE_MAX_STRINGS_LENGTH = 64; | 71 | const U32 MESSAGE_MAX_STRINGS_LENGTH = 64; |
71 | const U32 MESSAGE_NUMBER_OF_HASH_BUCKETS = 8192; | 72 | const U32 MESSAGE_NUMBER_OF_HASH_BUCKETS = 8192; |
@@ -774,7 +775,18 @@ private: | |||
774 | LLMessagePollInfo *mPollInfop; | 775 | LLMessagePollInfo *mPollInfop; |
775 | 776 | ||
776 | U8 mEncodedRecvBuffer[MAX_BUFFER_SIZE]; | 777 | U8 mEncodedRecvBuffer[MAX_BUFFER_SIZE]; |
777 | U8 mTrueReceiveBuffer[MAX_BUFFER_SIZE]; | 778 | |
779 | // Push current alignment to stack and set alignment to 1 byte boundary | ||
780 | #pragma pack(push,1) | ||
781 | |||
782 | struct ReceiveBuffer_t | ||
783 | { | ||
784 | proxywrap_t header; | ||
785 | U8 buffer[MAX_BUFFER_SIZE]; | ||
786 | } mTrueReceiveBuffer; | ||
787 | |||
788 | #pragma pack(pop) /* restore original alignment from stack */ | ||
789 | |||
778 | S32 mTrueReceiveSize; | 790 | S32 mTrueReceiveSize; |
779 | 791 | ||
780 | // Must be valid during decode | 792 | // Must be valid during decode |
diff --git a/linden/indra/llmessage/net.cpp b/linden/indra/llmessage/net.cpp index 7166271..fa51645 100644 --- a/linden/indra/llmessage/net.cpp +++ b/linden/indra/llmessage/net.cpp | |||
@@ -56,6 +56,7 @@ | |||
56 | #include "lltimer.h" | 56 | #include "lltimer.h" |
57 | #include "indra_constants.h" | 57 | #include "indra_constants.h" |
58 | 58 | ||
59 | #include "llsocks5.h" | ||
59 | 60 | ||
60 | // Globals | 61 | // Globals |
61 | #if LL_WINDOWS | 62 | #if LL_WINDOWS |
@@ -179,7 +180,91 @@ U32 ip_string_to_u32(const char* ip_string) | |||
179 | ////////////////////////////////////////////////////////////////////////////////////////// | 180 | ////////////////////////////////////////////////////////////////////////////////////////// |
180 | 181 | ||
181 | #if LL_WINDOWS | 182 | #if LL_WINDOWS |
182 | 183 | ||
184 | int tcp_handshake(S32 handle, char * dataout, int outlen, char * datain, int maxinlen) | ||
185 | { | ||
186 | int result; | ||
187 | result = send(handle, dataout, outlen, 0); | ||
188 | if (result != outlen) | ||
189 | { | ||
190 | S32 err = WSAGetLastError(); | ||
191 | llwarns << "Error sending data to proxy control channel, number of bytes sent were " << result << " error code was " << err << llendl; | ||
192 | return -1; | ||
193 | } | ||
194 | |||
195 | result = recv(handle, datain, maxinlen, 0); | ||
196 | if (result != maxinlen) | ||
197 | { | ||
198 | S32 err = WSAGetLastError(); | ||
199 | llwarns << "Error receiving data from proxy control channel, number of bytes received were " << result << " error code was " << err << llendl; | ||
200 | return -1; | ||
201 | } | ||
202 | |||
203 | return 0; | ||
204 | } | ||
205 | |||
206 | S32 tcp_open_channel(LLHost host) | ||
207 | { | ||
208 | // Open a TCP channel | ||
209 | // Jump through some hoops to ensure that if the request hosts is down | ||
210 | // or not reachable connect() does not block | ||
211 | |||
212 | S32 handle; | ||
213 | handle = socket(AF_INET, SOCK_STREAM, 0); | ||
214 | if (!handle) | ||
215 | { | ||
216 | llwarns << "Error opening TCP control socket, socket() returned " << handle << llendl; | ||
217 | return -1; | ||
218 | } | ||
219 | |||
220 | struct sockaddr_in address; | ||
221 | address.sin_port = htons(host.getPort()); | ||
222 | address.sin_family = AF_INET; | ||
223 | address.sin_addr.s_addr = host.getAddress(); | ||
224 | |||
225 | // Non blocking | ||
226 | WSAEVENT hEvent=WSACreateEvent(); | ||
227 | WSAEventSelect(handle, hEvent, FD_CONNECT) ; | ||
228 | connect(handle, (struct sockaddr*)&address, sizeof(address)) ; | ||
229 | // Wait fot 5 seconds, if we can't get a TCP channel open in this | ||
230 | // time frame then there is something badly wrong. | ||
231 | WaitForSingleObject(hEvent, 1000*5); // 5 seconds time out | ||
232 | |||
233 | WSANETWORKEVENTS netevents; | ||
234 | WSAEnumNetworkEvents(handle,hEvent,&netevents); | ||
235 | |||
236 | // Check the async event status to see if we connected | ||
237 | if ((netevents.lNetworkEvents & FD_CONNECT) == FD_CONNECT) | ||
238 | { | ||
239 | if (netevents.iErrorCode[FD_CONNECT_BIT] != 0) | ||
240 | { | ||
241 | llwarns << "Unable to open TCP channel, WSA returned an error code of " << netevents.iErrorCode[FD_CONNECT_BIT] << llendl; | ||
242 | WSACloseEvent(hEvent); | ||
243 | return -1; | ||
244 | } | ||
245 | |||
246 | // Now we are connected disable non blocking | ||
247 | // we don't need support an async interface as | ||
248 | // currently our only consumer (socks5) will make one round | ||
249 | // of packets then just hold the connection open | ||
250 | WSAEventSelect(handle, hEvent, NULL) ; | ||
251 | unsigned long NonBlock = 0; | ||
252 | ioctlsocket(handle, FIONBIO, &NonBlock); | ||
253 | |||
254 | return handle; | ||
255 | } | ||
256 | |||
257 | llwarns << "Unable to open TCP channel, Timeout is the host up?" << netevents.iErrorCode[FD_CONNECT_BIT] << llendl; | ||
258 | return -1; | ||
259 | } | ||
260 | |||
261 | void tcp_close_channel(S32 handle) | ||
262 | { | ||
263 | llinfos << "Closing TCP channel" << llendl; | ||
264 | shutdown(handle, SD_BOTH); | ||
265 | closesocket(handle); | ||
266 | } | ||
267 | |||
183 | S32 start_net(S32& socket_out, int& nPort) | 268 | S32 start_net(S32& socket_out, int& nPort) |
184 | { | 269 | { |
185 | // Create socket, make non-blocking | 270 | // Create socket, make non-blocking |
@@ -377,6 +462,77 @@ BOOL send_packet(int hSocket, const char *sendBuffer, int size, U32 recipient, i | |||
377 | 462 | ||
378 | #else | 463 | #else |
379 | 464 | ||
465 | |||
466 | int tcp_handshake(S32 handle, char * dataout, int outlen, char * datain, int maxinlen) | ||
467 | { | ||
468 | if (send(handle, dataout, outlen, 0) != outlen) | ||
469 | { | ||
470 | llwarns << "Error sending data to proxy control channel" << llendl; | ||
471 | return -1; | ||
472 | } | ||
473 | |||
474 | if (recv(handle, datain, maxinlen, 0) != maxinlen) | ||
475 | { | ||
476 | llwarns << "Error receiving data to proxy control channel" << llendl; | ||
477 | return -1; | ||
478 | } | ||
479 | |||
480 | return 0; | ||
481 | } | ||
482 | |||
483 | S32 tcp_open_channel(LLHost host) | ||
484 | { | ||
485 | S32 handle; | ||
486 | handle = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); | ||
487 | if (!handle) | ||
488 | { | ||
489 | llwarns << "Error opening TCP control socket, socket() returned " << handle << llendl; | ||
490 | return -1; | ||
491 | } | ||
492 | |||
493 | struct sockaddr_in address; | ||
494 | address.sin_port = htons(host.getPort()); | ||
495 | address.sin_family = AF_INET; | ||
496 | address.sin_addr.s_addr = host.getAddress(); | ||
497 | |||
498 | // Set the socket to non blocking for the connect() | ||
499 | int flags = fcntl(handle, F_GETFL, 0); | ||
500 | fcntl(handle, F_SETFL, flags | O_NONBLOCK); | ||
501 | |||
502 | S32 error = connect(handle, (sockaddr*)&address, sizeof(address)); | ||
503 | if (error && (errno != EINPROGRESS)) | ||
504 | { | ||
505 | llwarns << "Unable to open TCP channel, error code: " << errno << llendl; | ||
506 | return -1; | ||
507 | } | ||
508 | |||
509 | struct timeval timeout; | ||
510 | timeout.tv_sec = 5; // Maximum time to wait for the connect() to complete | ||
511 | timeout.tv_usec = 0; | ||
512 | fd_set fds; | ||
513 | FD_ZERO(&fds); | ||
514 | FD_SET(handle, &fds); | ||
515 | |||
516 | // See if we have connectde or time out after 5 seconds | ||
517 | U32 rc = select(sizeof(fds)*8, NULL, &fds, NULL, &timeout); | ||
518 | |||
519 | if (rc != 1) // we require exactly one descriptor to be set | ||
520 | { | ||
521 | llwarns << "Unable to open TCP channel" << llendl; | ||
522 | return -1; | ||
523 | } | ||
524 | |||
525 | // Return the socket to blocking operations | ||
526 | fcntl(handle, F_SETFL, flags); | ||
527 | |||
528 | return handle; | ||
529 | } | ||
530 | |||
531 | void tcp_close_channel(S32 handle) | ||
532 | { | ||
533 | close(handle); | ||
534 | } | ||
535 | |||
380 | // Create socket, make non-blocking | 536 | // Create socket, make non-blocking |
381 | S32 start_net(S32& socket_out, int& nPort) | 537 | S32 start_net(S32& socket_out, int& nPort) |
382 | { | 538 | { |
diff --git a/linden/indra/llmessage/net.h b/linden/indra/llmessage/net.h index 45b07a0..531b5c3 100644 --- a/linden/indra/llmessage/net.h +++ b/linden/indra/llmessage/net.h | |||
@@ -64,6 +64,9 @@ U32 ip_string_to_u32(const char* ip_string); // Wrapper for inet_addr() | |||
64 | 64 | ||
65 | extern const char* LOOPBACK_ADDRESS_STRING; | 65 | extern const char* LOOPBACK_ADDRESS_STRING; |
66 | 66 | ||
67 | void tcp_close_channel(S32 handle); | ||
68 | S32 tcp_open_channel(LLHost host); | ||
69 | int tcp_handshake(S32 handle, char * dataout, int outlen, char * datain, int maxinlen); | ||
67 | 70 | ||
68 | // useful MTU consts | 71 | // useful MTU consts |
69 | 72 | ||
diff --git a/linden/indra/llrender/llimagegl.cpp b/linden/indra/llrender/llimagegl.cpp index 7cd4dd7..c63d7ad 100644 --- a/linden/indra/llrender/llimagegl.cpp +++ b/linden/indra/llrender/llimagegl.cpp | |||
@@ -375,45 +375,54 @@ LLImageGL::~LLImageGL() | |||
375 | 375 | ||
376 | void LLImageGL::init(BOOL usemipmaps) | 376 | void LLImageGL::init(BOOL usemipmaps) |
377 | { | 377 | { |
378 | #ifdef DEBUG_MISS | 378 | // keep these members in the same order as declared in llimagehl.h |
379 | mMissed = FALSE; | 379 | // so that it is obvious by visual inspection if we forgot to |
380 | #endif | 380 | // init a field. |
381 | 381 | ||
382 | mPickMask = NULL; | 382 | mTextureMemory = 0; |
383 | mPickMaskSize = 0; | 383 | mLastBindTime = 0.f; |
384 | mTextureState = NO_DELETE ; | 384 | |
385 | mTextureMemory = 0; | 385 | mPickMask = NULL; |
386 | mLastBindTime = 0.f; | 386 | mPickMaskSize = 0; |
387 | mUseMipMaps = usemipmaps; | ||
388 | mHasExplicitFormat = FALSE; | ||
389 | mAutoGenMips = FALSE; | ||
390 | |||
391 | mIsMask = FALSE; | ||
392 | |||
393 | mGLTextureCreated = false; | ||
394 | mTexName = 0; | ||
395 | mWidth = 0; | ||
396 | mHeight = 0; | ||
397 | mCurrentDiscardLevel = -1; | ||
387 | 398 | ||
388 | mTarget = GL_TEXTURE_2D; | 399 | mTarget = GL_TEXTURE_2D; |
389 | mBindTarget = LLTexUnit::TT_TEXTURE; | 400 | mBindTarget = LLTexUnit::TT_TEXTURE; |
390 | mUseMipMaps = usemipmaps; | ||
391 | mHasMipMaps = false; | 401 | mHasMipMaps = false; |
392 | mAutoGenMips = FALSE; | 402 | |
393 | mTexName = 0; | 403 | mIsResident = 0; |
394 | mIsResident = 0; | 404 | |
405 | mComponents = 0; | ||
406 | mMaxDiscardLevel = MAX_DISCARD_LEVEL; | ||
395 | 407 | ||
396 | mTexOptionsDirty = true; | 408 | mTexOptionsDirty = true; |
397 | mAddressMode = LLTexUnit::TAM_WRAP; | 409 | mAddressMode = LLTexUnit::TAM_WRAP; |
398 | mFilterOption = LLTexUnit::TFO_ANISOTROPIC; | 410 | mFilterOption = LLTexUnit::TFO_ANISOTROPIC; |
399 | mWidth = 0; | ||
400 | mHeight = 0; | ||
401 | mComponents = 0; | ||
402 | |||
403 | mMaxDiscardLevel = MAX_DISCARD_LEVEL; | ||
404 | mCurrentDiscardLevel = -1; | ||
405 | mDontDiscard = FALSE; | ||
406 | 411 | ||
407 | mFormatInternal = -1; | 412 | mFormatInternal = -1; |
408 | mFormatPrimary = (LLGLenum) 0; | 413 | mFormatPrimary = (LLGLenum) 0; |
409 | mFormatType = GL_UNSIGNED_BYTE; | 414 | mFormatType = GL_UNSIGNED_BYTE; |
410 | mFormatSwapBytes = FALSE; | 415 | mFormatSwapBytes = FALSE; |
411 | mHasExplicitFormat = FALSE; | ||
412 | 416 | ||
413 | mGLTextureCreated = FALSE ; | 417 | #ifdef DEBUG_MISS |
418 | mMissed = FALSE; | ||
419 | #endif | ||
414 | 420 | ||
415 | mIsMask = FALSE; | ||
416 | mCategory = -1 ; | 421 | mCategory = -1 ; |
422 | |||
423 | //LLTexture stuff | ||
424 | mDontDiscard = FALSE; | ||
425 | mTextureState = NO_DELETE ; | ||
417 | } | 426 | } |
418 | 427 | ||
419 | void LLImageGL::cleanup() | 428 | void LLImageGL::cleanup() |
diff --git a/linden/indra/llui/llcombobox.cpp b/linden/indra/llui/llcombobox.cpp index a93dc9b..f3ef83e 100644 --- a/linden/indra/llui/llcombobox.cpp +++ b/linden/indra/llui/llcombobox.cpp | |||
@@ -591,6 +591,13 @@ void LLComboBox::updateLayout() | |||
591 | } | 591 | } |
592 | } | 592 | } |
593 | 593 | ||
594 | |||
595 | void LLComboBox::getAllData(std::vector<LLScrollListItem*>& item_list) const | ||
596 | { | ||
597 | item_list = mList->getAllData(); | ||
598 | } | ||
599 | |||
600 | |||
594 | void* LLComboBox::getCurrentUserdata() | 601 | void* LLComboBox::getCurrentUserdata() |
595 | { | 602 | { |
596 | LLScrollListItem* item = mList->getFirstSelected(); | 603 | LLScrollListItem* item = mList->getFirstSelected(); |
diff --git a/linden/indra/llui/llcombobox.h b/linden/indra/llui/llcombobox.h index 596f659..f92fe44 100644 --- a/linden/indra/llui/llcombobox.h +++ b/linden/indra/llui/llcombobox.h | |||
@@ -169,6 +169,7 @@ public: | |||
169 | 169 | ||
170 | //======================================================================== | 170 | //======================================================================== |
171 | 171 | ||
172 | void getAllData(std::vector<LLScrollListItem*>& item_list) const; | ||
172 | void* getCurrentUserdata(); | 173 | void* getCurrentUserdata(); |
173 | 174 | ||
174 | void setPrearrangeCallback( void (*cb)(LLUICtrl*,void*) ) { mPrearrangeCallback = cb; } | 175 | void setPrearrangeCallback( void (*cb)(LLUICtrl*,void*) ) { mPrearrangeCallback = cb; } |
diff --git a/linden/indra/llui/lllineeditor.cpp b/linden/indra/llui/lllineeditor.cpp index a21ad5d..453bb50 100644 --- a/linden/indra/llui/lllineeditor.cpp +++ b/linden/indra/llui/lllineeditor.cpp | |||
@@ -55,17 +55,24 @@ | |||
55 | #include "llui.h" | 55 | #include "llui.h" |
56 | #include "lluictrlfactory.h" | 56 | #include "lluictrlfactory.h" |
57 | #include "llclipboard.h" | 57 | #include "llclipboard.h" |
58 | #include "llmemberlistener.h" | ||
58 | 59 | ||
59 | #include "../newview/lgghunspell_wrapper.h" | 60 | #include "../newview/lgghunspell_wrapper.h" |
60 | #include "../newview/lltranslate.h" | 61 | #include "../newview/lltranslate.h" |
61 | #include "../newview/llviewercontrol.h" | 62 | #include "../newview/llviewercontrol.h" |
62 | #include "../newview/lggautocorrect.h" | 63 | #include "../newview/lggautocorrect.h" |
63 | 64 | ||
65 | |||
64 | // | 66 | // |
65 | // Imported globals | 67 | // Imported globals |
66 | // | 68 | // |
67 | 69 | ||
68 | // | 70 | // |
71 | // Globals | ||
72 | |||
73 | |||
74 | |||
75 | // | ||
69 | // Constants | 76 | // Constants |
70 | // | 77 | // |
71 | 78 | ||
@@ -90,6 +97,8 @@ static LLRegisterWidget<LLLineEditor> r1("line_editor"); | |||
90 | 97 | ||
91 | /* static */ LLPointer<LLUIImage> LLLineEditor::sImage; | 98 | /* static */ LLPointer<LLUIImage> LLLineEditor::sImage; |
92 | 99 | ||
100 | typedef LLMemberListener<LLView> text_edit_listener_t; | ||
101 | |||
93 | // | 102 | // |
94 | // Member functions | 103 | // Member functions |
95 | // | 104 | // |
@@ -214,46 +223,18 @@ LLLineEditor::LLLineEditor(const std::string& name, const LLRect& rect, | |||
214 | } | 223 | } |
215 | mImage = sImage; | 224 | mImage = sImage; |
216 | 225 | ||
217 | // make the popup menu available | 226 | |
218 | //LLMenuGL* menu = LLUICtrlFactory::getInstance()->buildMenu("menu_texteditor.xml", parent_view); | 227 | LLMenuGL* menu = LLUICtrlFactory::getInstance()->buildMenu("menu_rightclick_text.xml",this); |
219 | LLMenuGL* menu = new LLMenuGL("wot"); | 228 | if (!menu) |
220 | /*if (!menu) | 229 | { |
221 | { | 230 | menu = new LLMenuGL(LLStringUtil::null); |
222 | menu = new LLMenuGL(LLStringUtil::null); | 231 | } |
223 | }*/ | 232 | |
224 | 233 | defineMenuCallbacks(menu); | |
225 | menu->append(new LLMenuItemCallGL("Cut", context_cut, context_enable_cut, this)); | ||
226 | menu->append(new LLMenuItemCallGL("Copy", context_copy, context_enable_copy, this)); | ||
227 | menu->append(new LLMenuItemCallGL("Paste", context_paste, context_enable_paste, this)); | ||
228 | menu->append(new LLMenuItemCallGL("Delete", context_delete, context_enable_delete, this)); | ||
229 | menu->append(new LLMenuItemCallGL("Select All", context_selectall, context_enable_selectall, this)); | ||
230 | |||
231 | menu->appendSeparator("Transep"); | ||
232 | LLMenuGL* translatemenu = new LLMenuGL("Translate To"); | ||
233 | translatemenu->setCanTearOff(FALSE); | ||
234 | translatemenu->append(new LLMenuItemCallGL("en", "English", context_translate, context_enable_translate, this)); | ||
235 | translatemenu->append(new LLMenuItemCallGL("da", "Danish", context_translate, context_enable_translate, this)); | ||
236 | translatemenu->append(new LLMenuItemCallGL("de", "Deutsch(German)", context_translate, context_enable_translate, this)); | ||
237 | translatemenu->append(new LLMenuItemCallGL("es", "Spanish", context_translate, context_enable_translate, this)); | ||
238 | translatemenu->append(new LLMenuItemCallGL("fr", "French", context_translate, context_enable_translate, this)); | ||
239 | translatemenu->append(new LLMenuItemCallGL("it", "Italian", context_translate, context_enable_translate, this)); | ||
240 | translatemenu->append(new LLMenuItemCallGL("hu", "Hungarian", context_translate, context_enable_translate, this)); | ||
241 | translatemenu->append(new LLMenuItemCallGL("nl", "Dutch", context_translate, context_enable_translate, this)); | ||
242 | translatemenu->append(new LLMenuItemCallGL("pl", "Polish", context_translate, context_enable_translate, this)); | ||
243 | translatemenu->append(new LLMenuItemCallGL("pt", "Portugese", context_translate, context_enable_translate, this)); | ||
244 | translatemenu->append(new LLMenuItemCallGL("ru", "Russian", context_translate, context_enable_translate, this)); | ||
245 | translatemenu->append(new LLMenuItemCallGL("tr", "Turkish", context_translate, context_enable_translate, this)); | ||
246 | translatemenu->append(new LLMenuItemCallGL("uk", "Ukrainian", context_translate, context_enable_translate, this)); | ||
247 | translatemenu->append(new LLMenuItemCallGL("zh", "Chinese", context_translate, context_enable_translate, this)); | ||
248 | translatemenu->append(new LLMenuItemCallGL("ja", "Japanese", context_translate, context_enable_translate, this)); | ||
249 | translatemenu->append(new LLMenuItemCallGL("ko", "Korean", context_translate, context_enable_translate, this)); | ||
250 | |||
251 | menu->appendMenu(translatemenu); | ||
252 | menu->appendSeparator("Spelsep"); | ||
253 | //menu->setBackgroundColor(gColors.getColor("MenuPopupBgColor")); | ||
254 | menu->setCanTearOff(FALSE); | ||
255 | menu->setVisible(FALSE); | ||
256 | mPopupMenuHandle = menu->getHandle(); | 234 | mPopupMenuHandle = menu->getHandle(); |
235 | menu->setBorderColor(gColors.getColor("MenuItemDisabledColor")); | ||
236 | menu->setBackgroundColor(gColors.getColor("MenuPopupBgColor")); | ||
237 | |||
257 | } | 238 | } |
258 | 239 | ||
259 | 240 | ||
@@ -556,7 +537,7 @@ void LLLineEditor::context_translate(void * data) | |||
556 | { | 537 | { |
557 | LLLineEditor* line = (LLLineEditor*)data; | 538 | LLLineEditor* line = (LLLineEditor*)data; |
558 | LLMenuGL* menu = line ? (LLMenuGL*)(line->mPopupMenuHandle.get()) : NULL; | 539 | LLMenuGL* menu = line ? (LLMenuGL*)(line->mPopupMenuHandle.get()) : NULL; |
559 | LLMenuGL* translate_menu = menu ? menu->getChildMenuByName("Translate To", TRUE) : NULL; | 540 | LLMenuGL* translate_menu = menu ? menu->getChildMenuByName("Translation Options", TRUE) : NULL; |
560 | if (!translate_menu) | 541 | if (!translate_menu) |
561 | { | 542 | { |
562 | return; | 543 | return; |
@@ -599,9 +580,9 @@ void LLLineEditor::spell_show(void * data) | |||
599 | } | 580 | } |
600 | } | 581 | } |
601 | 582 | ||
602 | std::vector<S32> LLLineEditor::getMisspelledWordsPositions() | 583 | void LLLineEditor::getMisspelledWordsPositions(std::vector<S32>& misspell_positions) |
603 | { | 584 | { |
604 | std::vector<S32> thePosesOfBadWords; | 585 | misspell_positions.clear(); |
605 | const LLWString& text = mText.getWString(); | 586 | const LLWString& text = mText.getWString(); |
606 | 587 | ||
607 | //llinfos << "end of box is at " << cursorloc << " and end of text is at " << text.length() << llendl; | 588 | //llinfos << "end of box is at " << cursorloc << " and end of text is at " << text.length() << llendl; |
@@ -623,26 +604,28 @@ std::vector<S32> LLLineEditor::getMisspelledWordsPositions() | |||
623 | { | 604 | { |
624 | wordEnd++; | 605 | wordEnd++; |
625 | } | 606 | } |
626 | //got a word :D | ||
627 | std::string selectedWord(std::string(text.begin(), | ||
628 | text.end()).substr(wordStart,wordEnd-wordStart)); | ||
629 | 607 | ||
630 | if(!glggHunSpell->isSpelledRight(selectedWord)) | 608 | //got a word? -- MC |
631 | { | 609 | if (wordStart != wordEnd) |
632 | //misspelled word here, and you have just right clicked on it! | 610 | { |
633 | //get the center of this word.. | 611 | std::string selectedWord(std::string(text.begin(), |
634 | //S32 center = llround( (wordEnd-wordStart)/2 ) + wordStart; | 612 | text.end()).substr(wordStart,wordEnd-wordStart)); |
635 | //turn this cursor position into a pixel pos | 613 | |
636 | //center = findPixelNearestPos(center-getCursor()); | 614 | if(!selectedWord.empty() && !glggHunSpell->isSpelledRight(selectedWord)) |
615 | { | ||
616 | //misspelled word here, and you have just right clicked on it! | ||
617 | //get the center of this word.. | ||
618 | //S32 center = llround( (wordEnd-wordStart)/2 ) + wordStart; | ||
619 | //turn this cursor position into a pixel pos | ||
620 | //center = findPixelNearestPos(center-getCursor()); | ||
637 | 621 | ||
638 | thePosesOfBadWords.push_back( | 622 | misspell_positions.push_back(wordStart); |
639 | wordStart); | 623 | misspell_positions.push_back(wordEnd); |
640 | thePosesOfBadWords.push_back(wordEnd); | 624 | } |
641 | } | 625 | } |
642 | } | 626 | } |
643 | wordEnd++; | 627 | wordEnd++; |
644 | } | 628 | } |
645 | return thePosesOfBadWords; | ||
646 | } | 629 | } |
647 | 630 | ||
648 | void LLLineEditor::spell_add(void* data) | 631 | void LLLineEditor::spell_add(void* data) |
@@ -1318,6 +1301,67 @@ BOOL LLLineEditor::canCut() const | |||
1318 | return !mReadOnly && !mDrawAsterixes && hasSelection(); | 1301 | return !mReadOnly && !mDrawAsterixes && hasSelection(); |
1319 | } | 1302 | } |
1320 | 1303 | ||
1304 | // method to define the associated callbacks | ||
1305 | void LLLineEditor::defineMenuCallbacks(LLMenuGL* menu) { | ||
1306 | |||
1307 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_ENABLE, | ||
1308 | "Cut Text", | ||
1309 | this, | ||
1310 | (void*)context_enable_cut); | ||
1311 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_CLICK, | ||
1312 | "Cut Text", | ||
1313 | this, | ||
1314 | (void*)context_cut); | ||
1315 | |||
1316 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_ENABLE, | ||
1317 | "Copy Text", | ||
1318 | this, | ||
1319 | (void*)context_enable_copy); | ||
1320 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_CLICK, | ||
1321 | "Copy Text", | ||
1322 | this, | ||
1323 | (void*)context_copy); | ||
1324 | |||
1325 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_ENABLE, | ||
1326 | "Paste Text", | ||
1327 | this, | ||
1328 | (void*)context_enable_paste); | ||
1329 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_CLICK, | ||
1330 | "Paste Text", | ||
1331 | this, | ||
1332 | (void*)context_paste); | ||
1333 | |||
1334 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_ENABLE, | ||
1335 | "Delete Text", | ||
1336 | this, | ||
1337 | (void*)context_enable_delete); | ||
1338 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_CLICK, | ||
1339 | "Delete Text", | ||
1340 | this, | ||
1341 | (void*)context_delete); | ||
1342 | |||
1343 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_ENABLE, | ||
1344 | "Select All Text", | ||
1345 | this, | ||
1346 | (void*)context_enable_selectall); | ||
1347 | menu->setCtrlResponse(1+LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_CLICK, | ||
1348 | "Select All Text", | ||
1349 | this, | ||
1350 | (void*)context_selectall); | ||
1351 | |||
1352 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_ENABLE, | ||
1353 | "Translate Text", | ||
1354 | this, | ||
1355 | (void*)context_enable_translate); | ||
1356 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_TRANSLATE, | ||
1357 | "Translate Text", | ||
1358 | this, | ||
1359 | (void*)context_translate); | ||
1360 | |||
1361 | |||
1362 | |||
1363 | } | ||
1364 | |||
1321 | // cut selection to clipboard | 1365 | // cut selection to clipboard |
1322 | void LLLineEditor::cut() | 1366 | void LLLineEditor::cut() |
1323 | { | 1367 | { |
@@ -1994,7 +2038,7 @@ void LLLineEditor::autoCorrectText() | |||
1994 | } | 2038 | } |
1995 | } | 2039 | } |
1996 | 2040 | ||
1997 | void LLLineEditor::drawMisspelled(LLRect background) | 2041 | void LLLineEditor::drawMisspelled(const LLRect& background) |
1998 | { | 2042 | { |
1999 | if (!mReadOnly && mSpellCheckable) | 2043 | if (!mReadOnly && mSpellCheckable) |
2000 | { | 2044 | { |
@@ -2010,16 +2054,16 @@ void LLLineEditor::drawMisspelled(LLRect background) | |||
2010 | mStartSpellHere = newStartSpellHere; | 2054 | mStartSpellHere = newStartSpellHere; |
2011 | mEndSpellHere = newStopSpellHere; | 2055 | mEndSpellHere = newStopSpellHere; |
2012 | resetSpellDirty(); | 2056 | resetSpellDirty(); |
2013 | misspellLocations=getMisspelledWordsPositions(); | 2057 | getMisspelledWordsPositions(mMisspellLocations); |
2014 | } | 2058 | } |
2015 | } | 2059 | } |
2016 | 2060 | ||
2017 | if (glggHunSpell->getSpellCheckHighlight()) | 2061 | if (!mMisspellLocations.empty() && glggHunSpell->getSpellCheckHighlight()) |
2018 | { | 2062 | { |
2019 | for (int i =0; i<(int)misspellLocations.size(); i++) | 2063 | for (int i =0; i<(int)mMisspellLocations.size(); i++) |
2020 | { | 2064 | { |
2021 | S32 wstart =findPixelNearestPos( misspellLocations[i]-getCursor()); | 2065 | S32 wstart =findPixelNearestPos( mMisspellLocations[i]-getCursor()); |
2022 | S32 wend = findPixelNearestPos(misspellLocations[++i]-getCursor()); | 2066 | S32 wend = findPixelNearestPos(mMisspellLocations[++i]-getCursor()); |
2023 | S32 maxw = getRect().getWidth(); | 2067 | S32 maxw = getRect().getWidth(); |
2024 | 2068 | ||
2025 | if (wend > maxw) | 2069 | if (wend > maxw) |
diff --git a/linden/indra/llui/lllineeditor.h b/linden/indra/llui/lllineeditor.h index 43ce869..b3e21ce 100644 --- a/linden/indra/llui/lllineeditor.h +++ b/linden/indra/llui/lllineeditor.h | |||
@@ -55,6 +55,7 @@ | |||
55 | class LLFontGL; | 55 | class LLFontGL; |
56 | class LLLineEditorRollback; | 56 | class LLLineEditorRollback; |
57 | class LLButton; | 57 | class LLButton; |
58 | class LLMenuGL; | ||
58 | 59 | ||
59 | typedef BOOL (*LLLinePrevalidateFunc)(const LLWString &wstr); | 60 | typedef BOOL (*LLLinePrevalidateFunc)(const LLWString &wstr); |
60 | 61 | ||
@@ -112,7 +113,8 @@ public: | |||
112 | virtual BOOL canTranslate() const; | 113 | virtual BOOL canTranslate() const; |
113 | virtual void insert(std::string what,S32 wher); | 114 | virtual void insert(std::string what,S32 wher); |
114 | 115 | ||
115 | // LLEditMenuHandler overrides | 116 | // LLEditMenuHandler overrides and menu set up methods. |
117 | void defineMenuCallbacks(LLMenuGL* menu); | ||
116 | virtual void cut(); | 118 | virtual void cut(); |
117 | virtual BOOL canCut() const; | 119 | virtual BOOL canCut() const; |
118 | 120 | ||
@@ -152,11 +154,12 @@ public: | |||
152 | static void spell_show(void* data); | 154 | static void spell_show(void* data); |
153 | static void spell_add(void* data); | 155 | static void spell_add(void* data); |
154 | 156 | ||
155 | std::vector<S32> getMisspelledWordsPositions(); | 157 | void getMisspelledWordsPositions(std::vector<S32>& misspell_positions); |
158 | |||
156 | // view overrides | 159 | // view overrides |
157 | virtual void draw(); | 160 | virtual void draw(); |
158 | void autoCorrectText(); | 161 | void autoCorrectText(); |
159 | void drawMisspelled(LLRect background); | 162 | void drawMisspelled(const LLRect& background); |
160 | virtual void reshape(S32 width,S32 height,BOOL called_from_parent=TRUE); | 163 | virtual void reshape(S32 width,S32 height,BOOL called_from_parent=TRUE); |
161 | virtual void onFocusReceived(); | 164 | virtual void onFocusReceived(); |
162 | virtual void onFocusLost(); | 165 | virtual void onFocusLost(); |
@@ -303,7 +306,7 @@ protected: | |||
303 | std::string mPrevText; // Saved string for 'ESC' revert | 306 | std::string mPrevText; // Saved string for 'ESC' revert |
304 | LLUIString mLabel; // text label that is visible when no user text provided | 307 | LLUIString mLabel; // text label that is visible when no user text provided |
305 | std::string mPrevSpelledText; // saved string so we know whether to respell or not | 308 | std::string mPrevSpelledText; // saved string so we know whether to respell or not |
306 | std::vector<S32> misspellLocations; // where all the mispelled words are | 309 | std::vector<S32> mMisspellLocations; // where all the mispelled words are |
307 | S32 mStartSpellHere; // the position of the first char on the screen, stored so we know when to update | 310 | S32 mStartSpellHere; // the position of the first char on the screen, stored so we know when to update |
308 | S32 mEndSpellHere; // the location of the last char on the screen | 311 | S32 mEndSpellHere; // the location of the last char on the screen |
309 | BOOL mSpellCheckable; // set in xui as "spell_check". Default value for a field | 312 | BOOL mSpellCheckable; // set in xui as "spell_check". Default value for a field |
@@ -468,4 +471,6 @@ private: | |||
468 | 471 | ||
469 | }; | 472 | }; |
470 | 473 | ||
474 | |||
475 | |||
471 | #endif // LL_LINEEDITOR_ | 476 | #endif // LL_LINEEDITOR_ |
diff --git a/linden/indra/llui/llmenugl.cpp b/linden/indra/llui/llmenugl.cpp index 91bb581..d5e1186 100644 --- a/linden/indra/llui/llmenugl.cpp +++ b/linden/indra/llui/llmenugl.cpp | |||
@@ -149,6 +149,18 @@ LLMenuItemGL::LLMenuItemGL( const std::string& name, const std::string& label, K | |||
149 | setLabel( label ); | 149 | setLabel( label ); |
150 | } | 150 | } |
151 | 151 | ||
152 | LLMenuItemGL::~LLMenuItemGL() { | ||
153 | |||
154 | // Delete all the entries in the mFutureCallbackRequests vector | ||
155 | for(std::vector<LLCallbackInformation*>::iterator iter= mFutureCallbackRequests.begin(); | ||
156 | iter!=mFutureCallbackRequests.end(); | ||
157 | ++iter) { | ||
158 | delete (*iter); | ||
159 | } | ||
160 | |||
161 | } | ||
162 | |||
163 | |||
152 | // virtual | 164 | // virtual |
153 | LLXMLNodePtr LLMenuItemGL::getXML(bool save_children) const | 165 | LLXMLNodePtr LLMenuItemGL::getXML(bool save_children) const |
154 | { | 166 | { |
@@ -517,6 +529,18 @@ BOOL LLMenuItemGL::setLabelArg( const std::string& key, const LLStringExplicit& | |||
517 | return TRUE; | 529 | return TRUE; |
518 | } | 530 | } |
519 | 531 | ||
532 | |||
533 | void LLMenuItemGL::addCallbackType(U8 theType, | ||
534 | const std::string& name, | ||
535 | const std::string& userdata) { | ||
536 | |||
537 | // Add the new callback information to the list of callbacks that are being tracked. | ||
538 | mFutureCallbackRequests.push_back(new LLCallbackInformation(theType,name,userdata)); | ||
539 | |||
540 | } | ||
541 | |||
542 | |||
543 | |||
520 | //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 544 | //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
521 | // Class LLMenuItemSeparatorGL | 545 | // Class LLMenuItemSeparatorGL |
522 | // | 546 | // |
@@ -541,6 +565,12 @@ public: | |||
541 | virtual BOOL handleHover(S32 x, S32 y, MASK mask); | 565 | virtual BOOL handleHover(S32 x, S32 y, MASK mask); |
542 | 566 | ||
543 | virtual U32 getNominalHeight( void ) const { return SEPARATOR_HEIGHT_PIXELS; } | 567 | virtual U32 getNominalHeight( void ) const { return SEPARATOR_HEIGHT_PIXELS; } |
568 | |||
569 | virtual BOOL setCtrlResponse(U8 llMenuItemCallType, | ||
570 | const std::string& name, | ||
571 | void* user_data, | ||
572 | void *callback_fcn) { return FALSE; } ; | ||
573 | |||
544 | }; | 574 | }; |
545 | 575 | ||
546 | LLMenuItemSeparatorGL::LLMenuItemSeparatorGL( const std::string &name ) : | 576 | LLMenuItemSeparatorGL::LLMenuItemSeparatorGL( const std::string &name ) : |
@@ -726,6 +756,11 @@ public: | |||
726 | } | 756 | } |
727 | virtual void doIt( void ) {} | 757 | virtual void doIt( void ) {} |
728 | virtual void draw( void ) {} | 758 | virtual void draw( void ) {} |
759 | virtual BOOL setCtrlResponse(U8 llMenuItemCallType, | ||
760 | const std::string& name, | ||
761 | void* user_data, | ||
762 | void *callback_fcn) { return FALSE; } ; | ||
763 | |||
729 | }; | 764 | }; |
730 | 765 | ||
731 | 766 | ||
@@ -805,6 +840,8 @@ LLMenuItemCallGL::LLMenuItemCallGL(const std::string& name, | |||
805 | if(!enabled) setEnabled(FALSE); | 840 | if(!enabled) setEnabled(FALSE); |
806 | } | 841 | } |
807 | 842 | ||
843 | |||
844 | |||
808 | void LLMenuItemCallGL::setEnabledControl(std::string enabled_control, LLView *context) | 845 | void LLMenuItemCallGL::setEnabledControl(std::string enabled_control, LLView *context) |
809 | { | 846 | { |
810 | // Register new listener | 847 | // Register new listener |
@@ -921,6 +958,53 @@ BOOL LLMenuItemCallGL::handleAcceleratorKey( KEY key, MASK mask ) | |||
921 | return LLMenuItemGL::handleAcceleratorKey(key, mask); | 958 | return LLMenuItemGL::handleAcceleratorKey(key, mask); |
922 | } | 959 | } |
923 | 960 | ||
961 | |||
962 | |||
963 | // Method to add a callback function for the given type and name. | ||
964 | BOOL LLMenuItemCallGL::setCtrlResponse(U8 llMenuItemCallType, | ||
965 | const std::string& name, | ||
966 | void* user_data, | ||
967 | void *callback_fcn) { | ||
968 | |||
969 | // Loop through all of the menu items and check to see which ones | ||
970 | // match the name and callback type given. | ||
971 | BOOL result = FALSE; | ||
972 | std::vector<LLCallbackInformation*>::iterator item_iter; | ||
973 | for (item_iter = mFutureCallbackRequests.begin(); | ||
974 | item_iter != mFutureCallbackRequests.end(); | ||
975 | ++item_iter) | ||
976 | { | ||
977 | if( ((*item_iter)->getTypeOfCallback()==llMenuItemCallType) && | ||
978 | ((*item_iter)->getCallbackName()==name)) { | ||
979 | |||
980 | // Found a match. Set the user data and then determine what type it is. | ||
981 | setUserData(user_data); | ||
982 | |||
983 | if(llMenuItemCallType == LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_CLICK) | ||
984 | { | ||
985 | setMenuCallback((menu_callback)callback_fcn,user_data); | ||
986 | } | ||
987 | |||
988 | else if (llMenuItemCallType == LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_ENABLE) | ||
989 | { | ||
990 | setEnabledCallback((enabled_callback)callback_fcn); | ||
991 | } | ||
992 | |||
993 | else if (llMenuItemCallType == LLCallbackInformation::LL_MENU_ITEM_CALL_GL_TRANSLATE) { | ||
994 | setName((*item_iter)->getCallbackUserData()); | ||
995 | setMenuCallback((menu_callback)callback_fcn,user_data); | ||
996 | } | ||
997 | |||
998 | } | ||
999 | } | ||
1000 | |||
1001 | |||
1002 | return result; | ||
1003 | |||
1004 | } | ||
1005 | |||
1006 | |||
1007 | |||
924 | ///============================================================================ | 1008 | ///============================================================================ |
925 | /// Class LLMenuItemCheckGL | 1009 | /// Class LLMenuItemCheckGL |
926 | ///============================================================================ | 1010 | ///============================================================================ |
@@ -1379,6 +1463,17 @@ void LLMenuItemBranchGL::openMenu() | |||
1379 | } | 1463 | } |
1380 | 1464 | ||
1381 | 1465 | ||
1466 | BOOL LLMenuItemBranchGL::setCtrlResponse(U8 llMenuItemCallType, | ||
1467 | const std::string& name, | ||
1468 | void* user_data, | ||
1469 | void *callback_fcn) { | ||
1470 | |||
1471 | // Get the menu branch and set the callback functions on all its children. | ||
1472 | return(getBranch()->setCtrlResponse(llMenuItemCallType,name,user_data,callback_fcn)); | ||
1473 | |||
1474 | } | ||
1475 | |||
1476 | |||
1382 | //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 1477 | //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
1383 | // Class LLMenuItemBranchDownGL | 1478 | // Class LLMenuItemBranchDownGL |
1384 | // | 1479 | // |
@@ -1982,13 +2077,31 @@ void LLMenuGL::parseChildXML(LLXMLNodePtr child, LLView *parent, LLUICtrlFactory | |||
1982 | 2077 | ||
1983 | LLSimpleListener* callback = parent->getListenerByName(callback_name); | 2078 | LLSimpleListener* callback = parent->getListenerByName(callback_name); |
1984 | 2079 | ||
1985 | if (!callback) | 2080 | if (callback) |
1986 | { | 2081 | { |
1987 | lldebugs << "Ignoring \"on_click\" \"" << item_name << "\" because \"" << callback_name << "\" is not registered" << llendl; | 2082 | new_item->addListener(callback, "on_click", callback_data); |
1988 | continue; | 2083 | } |
2084 | else { | ||
2085 | |||
2086 | // A callback for this item has not yet been | ||
2087 | // specified. Add it to the list of options | ||
2088 | // that do not yet have callbacks. | ||
2089 | if (call_child->hasAttribute("translate")) | ||
2090 | { | ||
2091 | new_item->addCallbackType | ||
2092 | (LLCallbackInformation::LL_MENU_ITEM_CALL_GL_TRANSLATE, | ||
2093 | item_name, | ||
2094 | callback_data); | ||
2095 | } | ||
2096 | |||
2097 | else | ||
2098 | { | ||
2099 | new_item->addCallbackType | ||
2100 | (LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_CLICK, | ||
2101 | item_name, | ||
2102 | callback_data); | ||
2103 | } | ||
1989 | } | 2104 | } |
1990 | |||
1991 | new_item->addListener(callback, "on_click", callback_data); | ||
1992 | } | 2105 | } |
1993 | if (call_child->hasName("on_enable")) | 2106 | if (call_child->hasName("on_enable")) |
1994 | { | 2107 | { |
@@ -2016,13 +2129,22 @@ void LLMenuGL::parseChildXML(LLXMLNodePtr child, LLView *parent, LLUICtrlFactory | |||
2016 | 2129 | ||
2017 | LLSimpleListener* callback = parent->getListenerByName(callback_name); | 2130 | LLSimpleListener* callback = parent->getListenerByName(callback_name); |
2018 | 2131 | ||
2019 | if (!callback) | 2132 | if (callback) |
2020 | { | 2133 | { |
2021 | lldebugs << "Ignoring \"on_enable\" \"" << item_name << "\" because \"" << callback_name << "\" is not registered" << llendl; | 2134 | new_item->addListener(callback, "on_build", userdata); |
2022 | continue; | 2135 | } else { |
2136 | |||
2137 | // A callback for this item has not yet been | ||
2138 | // specified. Add it to the list of options | ||
2139 | // that do not yet have callbacks. | ||
2140 | |||
2141 | new_item->addCallbackType | ||
2142 | (LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_ENABLE, | ||
2143 | item_name, | ||
2144 | callback_data); | ||
2023 | } | 2145 | } |
2024 | 2146 | ||
2025 | new_item->addListener(callback, "on_build", userdata); | 2147 | |
2026 | } | 2148 | } |
2027 | else if (call_child->hasAttribute("control")) | 2149 | else if (call_child->hasAttribute("control")) |
2028 | { | 2150 | { |
@@ -2188,7 +2310,7 @@ LLView* LLMenuGL::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *fa | |||
2188 | LLColor4 color(0,0,0,1); | 2310 | LLColor4 color(0,0,0,1); |
2189 | if (opaque && LLUICtrlFactory::getAttributeColor(node,"color", color)) | 2311 | if (opaque && LLUICtrlFactory::getAttributeColor(node,"color", color)) |
2190 | { | 2312 | { |
2191 | menu->setBackgroundColor(color); | 2313 | menu->setBackgroundColor(color); |
2192 | } | 2314 | } |
2193 | 2315 | ||
2194 | BOOL create_jump_keys = FALSE; | 2316 | BOOL create_jump_keys = FALSE; |
@@ -2977,7 +3099,8 @@ void LLMenuGL::draw( void ) | |||
2977 | 3099 | ||
2978 | if( mBgVisible ) | 3100 | if( mBgVisible ) |
2979 | { | 3101 | { |
2980 | gl_rect_2d( 0, getRect().getHeight(), getRect().getWidth(), 0, mBackgroundColor ); | 3102 | gl_rect_2d( -1, getRect().getHeight()+2, getRect().getWidth()+2, -2, mBorderColor,FALSE); |
3103 | gl_rect_2d( 0, getRect().getHeight(), getRect().getWidth(), 0, mBackgroundColor ); | ||
2981 | } | 3104 | } |
2982 | LLView::draw(); | 3105 | LLView::draw(); |
2983 | } | 3106 | } |
@@ -3033,6 +3156,41 @@ LLMenuGL* LLMenuGL::getChildMenuByName(const std::string& name, BOOL recurse) co | |||
3033 | return NULL; | 3156 | return NULL; |
3034 | } | 3157 | } |
3035 | 3158 | ||
3159 | |||
3160 | void LLMenuGL::setBackgroundColor( const LLColor4& color ) { | ||
3161 | |||
3162 | mBackgroundColor = color; | ||
3163 | item_list_t::iterator item_iter; | ||
3164 | for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter) | ||
3165 | { | ||
3166 | if((*item_iter)->getType()=="menu") | ||
3167 | { | ||
3168 | LLMenuItemBranchGL *menuBranchItem = (LLMenuItemBranchGL*)(*item_iter); | ||
3169 | menuBranchItem->getBranch()->setBackgroundColor(color); | ||
3170 | } | ||
3171 | } | ||
3172 | |||
3173 | |||
3174 | } | ||
3175 | |||
3176 | |||
3177 | void LLMenuGL::setBorderColor( const LLColor4& color ) { | ||
3178 | |||
3179 | mBorderColor = color; | ||
3180 | item_list_t::iterator item_iter; | ||
3181 | for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter) | ||
3182 | { | ||
3183 | if((*item_iter)->getType()=="menu") | ||
3184 | { | ||
3185 | LLMenuItemBranchGL *menuBranchItem = (LLMenuItemBranchGL*)(*item_iter); | ||
3186 | menuBranchItem->getBranch()->setBorderColor(color); | ||
3187 | } | ||
3188 | } | ||
3189 | |||
3190 | |||
3191 | } | ||
3192 | |||
3193 | |||
3036 | BOOL LLMenuGL::clearHoverItem() | 3194 | BOOL LLMenuGL::clearHoverItem() |
3037 | { | 3195 | { |
3038 | for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it) | 3196 | for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it) |
@@ -3098,6 +3256,26 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y) | |||
3098 | menu->getParent()->sendChildToFront(menu); | 3256 | menu->getParent()->sendChildToFront(menu); |
3099 | } | 3257 | } |
3100 | 3258 | ||
3259 | |||
3260 | BOOL LLMenuGL::setCtrlResponse(U8 llMenuItemCallType, | ||
3261 | const std::string& name, | ||
3262 | void* user_data, | ||
3263 | void *callback_fcn) | ||
3264 | { | ||
3265 | |||
3266 | // Go through all of the children on this menu and set the callback function. | ||
3267 | BOOL result = FALSE; | ||
3268 | item_list_t::iterator item_iter; | ||
3269 | for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter) | ||
3270 | { | ||
3271 | result |= (*item_iter)->setCtrlResponse(llMenuItemCallType,name,user_data,callback_fcn); | ||
3272 | } | ||
3273 | |||
3274 | return result; | ||
3275 | } | ||
3276 | |||
3277 | |||
3278 | |||
3101 | //----------------------------------------------------------------------------- | 3279 | //----------------------------------------------------------------------------- |
3102 | // class LLPieMenuBranch | 3280 | // class LLPieMenuBranch |
3103 | // A branch to another pie menu | 3281 | // A branch to another pie menu |
@@ -3117,6 +3295,12 @@ public: | |||
3117 | 3295 | ||
3118 | LLPieMenu* getBranch() { return mBranch; } | 3296 | LLPieMenu* getBranch() { return mBranch; } |
3119 | 3297 | ||
3298 | virtual BOOL setCtrlResponse(U8 llMenuItemCallType, | ||
3299 | const std::string& name, | ||
3300 | void* user_data, | ||
3301 | void *callback_fcn) { return FALSE; } ; | ||
3302 | |||
3303 | |||
3120 | protected: | 3304 | protected: |
3121 | LLPieMenu* mBranch; | 3305 | LLPieMenu* mBranch; |
3122 | }; | 3306 | }; |
@@ -4581,3 +4765,16 @@ void LLTearOffMenu::onClose(bool app_quitting) | |||
4581 | destroy(); | 4765 | destroy(); |
4582 | } | 4766 | } |
4583 | 4767 | ||
4768 | |||
4769 | ///============================================================================ | ||
4770 | /// Class LLCallbackInformation | ||
4771 | ///============================================================================ | ||
4772 | |||
4773 | LLCallbackInformation::LLCallbackInformation(U8 theType, | ||
4774 | const std::string& theName, | ||
4775 | const std::string& userData) | ||
4776 | : callbackName(theName), | ||
4777 | callbackUserData(userData) | ||
4778 | { | ||
4779 | setTypeOfCallback(theType); | ||
4780 | } | ||
diff --git a/linden/indra/llui/llmenugl.h b/linden/indra/llui/llmenugl.h index 63f9d55..9a9d1b0 100644 --- a/linden/indra/llui/llmenugl.h +++ b/linden/indra/llui/llmenugl.h | |||
@@ -70,6 +70,57 @@ typedef BOOL (*check_callback)(void*); | |||
70 | // contents. Put the contents of the label in the provided parameter. | 70 | // contents. Put the contents of the label in the provided parameter. |
71 | typedef void (*label_callback)(std::string&,void*); | 71 | typedef void (*label_callback)(std::string&,void*); |
72 | 72 | ||
73 | |||
74 | |||
75 | //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
76 | // Class LLCallbackInformation | ||
77 | // | ||
78 | // The LLCallbackInformation class is used to keep track of callback | ||
79 | // information for menus that might be requested at a future time. | ||
80 | //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
81 | |||
82 | class LLCallbackInformation | ||
83 | { | ||
84 | |||
85 | public : | ||
86 | |||
87 | // Constants used for keeping track of what type of callback is required. | ||
88 | static const U8 LL_MENU_ITEM_CALL_GL_NONE = 0; | ||
89 | static const U8 LL_MENU_ITEM_CALL_GL_ON_CLICK = 1; | ||
90 | static const U8 LL_MENU_ITEM_CALL_GL_ON_ENABLE = 2; | ||
91 | static const U8 LL_MENU_ITEM_CALL_GL_TRANSLATE = 3; | ||
92 | |||
93 | |||
94 | LLCallbackInformation(U8 theType=LLCallbackInformation::LL_MENU_ITEM_CALL_GL_NONE, | ||
95 | const std::string& theName = LLStringUtil::null, | ||
96 | const std::string& userData = LLStringUtil::null); | ||
97 | ~LLCallbackInformation() {}; | ||
98 | |||
99 | void setTypeOfCallback(U8 theType) {typeOfCallback = theType; } | ||
100 | void setCallbackName(const std::string& name) {callbackName = name; } | ||
101 | void setCallbackUserData(const std::string& userdata) {callbackUserData = userdata; } | ||
102 | |||
103 | U8 getTypeOfCallback() {return(typeOfCallback); } | ||
104 | const std::string& getCallbackName() {return(callbackName); } | ||
105 | const std::string& getCallbackUserData() {return(callbackUserData); } | ||
106 | |||
107 | BOOL isTypeMatch(U8 type) { return(type == typeOfCallback);} | ||
108 | BOOL isNameMatch(const std::string& name) { return(name == callbackName);} | ||
109 | |||
110 | protected: | ||
111 | |||
112 | private: | ||
113 | |||
114 | U8 typeOfCallback; | ||
115 | std::string callbackName; | ||
116 | std::string callbackUserData; | ||
117 | |||
118 | }; | ||
119 | |||
120 | |||
121 | |||
122 | |||
123 | |||
73 | //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 124 | //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
74 | // Class LLMenuItemGL | 125 | // Class LLMenuItemGL |
75 | // | 126 | // |
@@ -79,6 +130,7 @@ typedef void (*label_callback)(std::string&,void*); | |||
79 | class LLMenuItemGL : public LLView | 130 | class LLMenuItemGL : public LLView |
80 | { | 131 | { |
81 | public: | 132 | public: |
133 | |||
82 | // static functions to control the global color scheme. | 134 | // static functions to control the global color scheme. |
83 | static void setEnabledColor( const LLColor4& color ) { sEnabledColor = color; } | 135 | static void setEnabledColor( const LLColor4& color ) { sEnabledColor = color; } |
84 | static const LLColor4& getEnabledColor() { return sEnabledColor; } | 136 | static const LLColor4& getEnabledColor() { return sEnabledColor; } |
@@ -90,7 +142,7 @@ public: | |||
90 | static const LLColor4& getHighlightFGColor() { return sHighlightForeground; } | 142 | static const LLColor4& getHighlightFGColor() { return sHighlightForeground; } |
91 | 143 | ||
92 | LLMenuItemGL( const std::string& name, const std::string& label, KEY key = KEY_NONE, MASK = MASK_NONE ); | 144 | LLMenuItemGL( const std::string& name, const std::string& label, KEY key = KEY_NONE, MASK = MASK_NONE ); |
93 | virtual ~LLMenuItemGL() {}; | 145 | virtual ~LLMenuItemGL(); |
94 | 146 | ||
95 | virtual void setValue(const LLSD& value) { setLabel(value.asString()); } | 147 | virtual void setValue(const LLSD& value) { setLabel(value.asString()); } |
96 | 148 | ||
@@ -174,6 +226,14 @@ public: | |||
174 | void setDrawTextDisabled(BOOL disabled) { mDrawTextDisabled = disabled; } | 226 | void setDrawTextDisabled(BOOL disabled) { mDrawTextDisabled = disabled; } |
175 | BOOL getDrawTextDisabled() const { return mDrawTextDisabled; } | 227 | BOOL getDrawTextDisabled() const { return mDrawTextDisabled; } |
176 | 228 | ||
229 | // functionality for adding callbacks after the menu is constucted | ||
230 | void addCallbackType(U8 theType,const std::string& name,const std::string& userdata); | ||
231 | |||
232 | virtual BOOL setCtrlResponse(U8 llMenuItemCallType, | ||
233 | const std::string& name, | ||
234 | void* user_data, | ||
235 | void *callback_fcn) = 0; | ||
236 | |||
177 | protected: | 237 | protected: |
178 | void setHover(BOOL hover) { mGotHover = hover; } | 238 | void setHover(BOOL hover) { mGotHover = hover; } |
179 | 239 | ||
@@ -194,6 +254,11 @@ protected: | |||
194 | LLUIString mDrawBranchLabel; | 254 | LLUIString mDrawBranchLabel; |
195 | 255 | ||
196 | BOOL mHighlight; | 256 | BOOL mHighlight; |
257 | |||
258 | // variables used for tracking callback types that will be | ||
259 | // requested after the widget is in place. | ||
260 | std::vector<LLCallbackInformation*> mFutureCallbackRequests; | ||
261 | |||
197 | private: | 262 | private: |
198 | static LLColor4 sEnabledColor; | 263 | static LLColor4 sEnabledColor; |
199 | static LLColor4 sDisabledColor; | 264 | static LLColor4 sDisabledColor; |
@@ -214,6 +279,7 @@ private: | |||
214 | BOOL mDrawTextDisabled; | 279 | BOOL mDrawTextDisabled; |
215 | 280 | ||
216 | KEY mJumpKey; | 281 | KEY mJumpKey; |
282 | |||
217 | }; | 283 | }; |
218 | 284 | ||
219 | 285 | ||
@@ -262,6 +328,7 @@ public: | |||
262 | KEY key = KEY_NONE, MASK mask = MASK_NONE, | 328 | KEY key = KEY_NONE, MASK mask = MASK_NONE, |
263 | BOOL enabled = TRUE, | 329 | BOOL enabled = TRUE, |
264 | on_disabled_callback on_disabled_c = NULL); | 330 | on_disabled_callback on_disabled_c = NULL); |
331 | |||
265 | virtual LLXMLNodePtr getXML(bool save_children = true) const; | 332 | virtual LLXMLNodePtr getXML(bool save_children = true) const; |
266 | 333 | ||
267 | virtual std::string getType() const { return "call"; } | 334 | virtual std::string getType() const { return "call"; } |
@@ -288,6 +355,13 @@ public: | |||
288 | 355 | ||
289 | //virtual void draw(); | 356 | //virtual void draw(); |
290 | 357 | ||
358 | // Functionality for tracking callback types for setting after widget is in place. | ||
359 | virtual BOOL setCtrlResponse(U8 llMenuItemCallType, | ||
360 | const std::string& name, | ||
361 | void* user_data, | ||
362 | void *callback_fcn); | ||
363 | |||
364 | |||
291 | 365 | ||
292 | private: | 366 | private: |
293 | menu_callback mCallback; | 367 | menu_callback mCallback; |
@@ -382,6 +456,12 @@ public: | |||
382 | // LLView Functionality | 456 | // LLView Functionality |
383 | //virtual void draw( void ); | 457 | //virtual void draw( void ); |
384 | 458 | ||
459 | virtual BOOL setCtrlResponse(U8 llMenuItemCallType, | ||
460 | const std::string& name, | ||
461 | void* user_data, | ||
462 | void *callback_fcn) { return FALSE; } ; | ||
463 | |||
464 | |||
385 | private: | 465 | private: |
386 | BOOL* mToggle; | 466 | BOOL* mToggle; |
387 | }; | 467 | }; |
@@ -434,8 +514,10 @@ public: | |||
434 | 514 | ||
435 | // background colors | 515 | // background colors |
436 | static void setDefaultBackgroundColor( const LLColor4& color ) { sDefaultBackgroundColor = color; } | 516 | static void setDefaultBackgroundColor( const LLColor4& color ) { sDefaultBackgroundColor = color; } |
437 | void setBackgroundColor( const LLColor4& color ) { mBackgroundColor = color; } | 517 | void setBackgroundColor( const LLColor4& color ); |
518 | void setBorderColor( const LLColor4& color ); | ||
438 | const LLColor4& getBackgroundColor() const { return mBackgroundColor; } | 519 | const LLColor4& getBackgroundColor() const { return mBackgroundColor; } |
520 | const LLColor4& getBorderColor() const { return mBorderColor; } | ||
439 | void setBackgroundVisible( BOOL b ) { mBgVisible = b; } | 521 | void setBackgroundVisible( BOOL b ) { mBgVisible = b; } |
440 | void setCanTearOff(BOOL tear_off, LLHandle<LLFloater> parent_floater_handle = LLHandle<LLFloater>()); | 522 | void setCanTearOff(BOOL tear_off, LLHandle<LLFloater> parent_floater_handle = LLHandle<LLFloater>()); |
441 | 523 | ||
@@ -525,6 +607,8 @@ public: | |||
525 | static BOOL getKeyboardMode() { return sKeyboardMode; } | 607 | static BOOL getKeyboardMode() { return sKeyboardMode; } |
526 | 608 | ||
527 | static class LLMenuHolderGL* sMenuContainer; | 609 | static class LLMenuHolderGL* sMenuContainer; |
610 | |||
611 | BOOL setCtrlResponse(U8 llMenuItemCallType,const std::string& name,void* user_data,void *callback_fcn); | ||
528 | 612 | ||
529 | protected: | 613 | protected: |
530 | void createSpilloverBranch(); | 614 | void createSpilloverBranch(); |
@@ -547,6 +631,7 @@ private: | |||
547 | static BOOL sKeyboardMode; | 631 | static BOOL sKeyboardMode; |
548 | 632 | ||
549 | LLColor4 mBackgroundColor; | 633 | LLColor4 mBackgroundColor; |
634 | LLColor4 mBorderColor; | ||
550 | BOOL mBgVisible; | 635 | BOOL mBgVisible; |
551 | LLMenuItemGL* mParentMenuItem; | 636 | LLMenuItemGL* mParentMenuItem; |
552 | LLUIString mLabel; | 637 | LLUIString mLabel; |
@@ -623,6 +708,12 @@ public: | |||
623 | 708 | ||
624 | virtual LLView* getChildView(const std::string& name, BOOL recurse = TRUE, BOOL create_if_missing = TRUE) const; | 709 | virtual LLView* getChildView(const std::string& name, BOOL recurse = TRUE, BOOL create_if_missing = TRUE) const; |
625 | 710 | ||
711 | virtual BOOL setCtrlResponse(U8 llMenuItemCallType, | ||
712 | const std::string& name, | ||
713 | void* user_data, | ||
714 | void *callback_fcn); | ||
715 | |||
716 | |||
626 | private: | 717 | private: |
627 | LLHandle<LLView> mBranch; | 718 | LLHandle<LLView> mBranch; |
628 | }; // end class LLMenuItemBranchGL | 719 | }; // end class LLMenuItemBranchGL |
@@ -668,6 +759,12 @@ public: | |||
668 | void show(S32 x, S32 y, BOOL mouse_down); | 759 | void show(S32 x, S32 y, BOOL mouse_down); |
669 | void hide(BOOL item_selected); | 760 | void hide(BOOL item_selected); |
670 | 761 | ||
762 | virtual BOOL setCtrlResponse(U8 llMenuItemCallType, | ||
763 | const std::string& name, | ||
764 | void* user_data, | ||
765 | void *callback_fcn) { return FALSE; } ; | ||
766 | |||
767 | |||
671 | private: | 768 | private: |
672 | LLMenuItemGL *pieItemFromXY(S32 x, S32 y); | 769 | LLMenuItemGL *pieItemFromXY(S32 x, S32 y); |
673 | S32 pieItemIndexFromXY(S32 x, S32 y); | 770 | S32 pieItemIndexFromXY(S32 x, S32 y); |
@@ -729,6 +826,12 @@ public: | |||
729 | 826 | ||
730 | void resetMenuTrigger() { mAltKeyTrigger = FALSE; } | 827 | void resetMenuTrigger() { mAltKeyTrigger = FALSE; } |
731 | 828 | ||
829 | virtual BOOL setCtrlResponse(U8 llMenuItemCallType, | ||
830 | const std::string& name, | ||
831 | void* user_data, | ||
832 | void *callback_fcn) { return FALSE; } ; | ||
833 | |||
834 | |||
732 | private: | 835 | private: |
733 | void checkMenuTrigger(); | 836 | void checkMenuTrigger(); |
734 | 837 | ||
@@ -814,6 +917,12 @@ public: | |||
814 | virtual void draw(void); | 917 | virtual void draw(void); |
815 | virtual U32 getNominalHeight() const; | 918 | virtual U32 getNominalHeight() const; |
816 | 919 | ||
920 | virtual BOOL setCtrlResponse(U8 llMenuItemCallType, | ||
921 | const std::string& name, | ||
922 | void* user_data, | ||
923 | void *callback_fcn) { return FALSE; } ; | ||
924 | |||
925 | |||
817 | private: | 926 | private: |
818 | LLHandle<LLFloater> mParentHandle; | 927 | LLHandle<LLFloater> mParentHandle; |
819 | }; | 928 | }; |
@@ -832,4 +941,5 @@ private: | |||
832 | LLEditMenuHandlerMgr() {}; | 941 | LLEditMenuHandlerMgr() {}; |
833 | }; | 942 | }; |
834 | 943 | ||
944 | |||
835 | #endif // LL_LLMENUGL_H | 945 | #endif // LL_LLMENUGL_H |
diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index 40dafcd..28859b1 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp | |||
@@ -385,43 +385,18 @@ LLTextEditor::LLTextEditor( | |||
385 | mHTML.clear(); | 385 | mHTML.clear(); |
386 | 386 | ||
387 | // make the popup menu available | 387 | // make the popup menu available |
388 | //LLMenuGL* menu = LLUICtrlFactory::getInstance()->buildMenu("menu_texteditor.xml", parent_view); | 388 | |
389 | LLMenuGL* menu = new LLMenuGL("wot"); | 389 | LLMenuGL* menu = LLUICtrlFactory::getInstance()->buildMenu("menu_rightclick_text.xml",this); |
390 | /*if (!menu) | 390 | if (!menu) |
391 | { | 391 | { |
392 | menu = new LLMenuGL(LLStringUtil::null); | 392 | menu = new LLMenuGL(LLStringUtil::null); |
393 | }*/ | 393 | } |
394 | menu->append(new LLMenuItemCallGL("Cut", context_cut, context_enable_cut, this)); | 394 | |
395 | menu->append(new LLMenuItemCallGL("Copy", context_copy, context_enable_copy, this)); | 395 | defineMenuCallbacks(menu); |
396 | menu->append(new LLMenuItemCallGL("Paste", context_paste, context_enable_paste, this)); | ||
397 | menu->append(new LLMenuItemCallGL("Delete", context_delete, context_enable_delete, this)); | ||
398 | menu->append(new LLMenuItemCallGL("Select All", context_selectall, context_enable_selectall, this)); | ||
399 | menu->appendSeparator("Transep"); | ||
400 | LLMenuGL* translatemenu = new LLMenuGL("Translate To"); | ||
401 | translatemenu->setCanTearOff(FALSE); | ||
402 | translatemenu->append(new LLMenuItemCallGL("en", "English", context_translate, context_enable_translate, this)); | ||
403 | translatemenu->append(new LLMenuItemCallGL("da", "Danish", context_translate, context_enable_translate, this)); | ||
404 | translatemenu->append(new LLMenuItemCallGL("de", "Deutsch(German)", context_translate, context_enable_translate, this)); | ||
405 | translatemenu->append(new LLMenuItemCallGL("es", "Spanish", context_translate, context_enable_translate, this)); | ||
406 | translatemenu->append(new LLMenuItemCallGL("fr", "French", context_translate, context_enable_translate, this)); | ||
407 | translatemenu->append(new LLMenuItemCallGL("it", "Italian", context_translate, context_enable_translate, this)); | ||
408 | translatemenu->append(new LLMenuItemCallGL("hu", "Hungarian", context_translate, context_enable_translate, this)); | ||
409 | translatemenu->append(new LLMenuItemCallGL("nl", "Dutch", context_translate, context_enable_translate, this)); | ||
410 | translatemenu->append(new LLMenuItemCallGL("pl", "Polish", context_translate, context_enable_translate, this)); | ||
411 | translatemenu->append(new LLMenuItemCallGL("pt", "Portugese", context_translate, context_enable_translate, this)); | ||
412 | translatemenu->append(new LLMenuItemCallGL("ru", "Russian", context_translate, context_enable_translate, this)); | ||
413 | translatemenu->append(new LLMenuItemCallGL("tr", "Turkish", context_translate, context_enable_translate, this)); | ||
414 | translatemenu->append(new LLMenuItemCallGL("uk", "Ukrainian", context_translate, context_enable_translate, this)); | ||
415 | translatemenu->append(new LLMenuItemCallGL("zh", "Chinese", context_translate, context_enable_translate, this)); | ||
416 | translatemenu->append(new LLMenuItemCallGL("ja", "Japanese", context_translate, context_enable_translate, this)); | ||
417 | translatemenu->append(new LLMenuItemCallGL("ko", "Korean", context_translate, context_enable_translate, this)); | ||
418 | |||
419 | menu->appendMenu(translatemenu); | ||
420 | menu->appendSeparator("Spelsep"); | ||
421 | //menu->setBackgroundColor(gColors.getColor("MenuPopupBgColor")); | ||
422 | menu->setCanTearOff(FALSE); | ||
423 | menu->setVisible(FALSE); | ||
424 | mPopupMenuHandle = menu->getHandle(); | 396 | mPopupMenuHandle = menu->getHandle(); |
397 | menu->setBorderColor(gColors.getColor("MenuItemDisabledColor")); | ||
398 | menu->setBackgroundColor(gColors.getColor("MenuPopupBgColor")); | ||
399 | |||
425 | } | 400 | } |
426 | 401 | ||
427 | LLTextEditor::~LLTextEditor() | 402 | LLTextEditor::~LLTextEditor() |
@@ -476,7 +451,7 @@ void LLTextEditor::context_translate(void * data) | |||
476 | { | 451 | { |
477 | LLTextEditor* line = (LLTextEditor*)data; | 452 | LLTextEditor* line = (LLTextEditor*)data; |
478 | LLMenuGL* menu = line ? (LLMenuGL*)(line->mPopupMenuHandle.get()) : NULL; | 453 | LLMenuGL* menu = line ? (LLMenuGL*)(line->mPopupMenuHandle.get()) : NULL; |
479 | LLMenuGL* translate_menu = menu ? menu->getChildMenuByName("Translate To", TRUE) : NULL; | 454 | LLMenuGL* translate_menu = menu ? menu->getChildMenuByName("Translation Options", TRUE) : NULL; |
480 | if (!translate_menu) | 455 | if (!translate_menu) |
481 | { | 456 | { |
482 | return; | 457 | return; |
@@ -530,10 +505,10 @@ void LLTextEditor::spell_show(void * data) | |||
530 | } | 505 | } |
531 | } | 506 | } |
532 | 507 | ||
533 | std::vector<S32> LLTextEditor::getMisspelledWordsPositions() | 508 | void LLTextEditor::getMisspelledWordsPositions(std::vector<S32>& misspell_positions) |
534 | { | 509 | { |
535 | resetSpellDirty(); | 510 | resetSpellDirty(); |
536 | std::vector<S32> thePosesOfBadWords; | 511 | misspell_positions.clear(); |
537 | LLWString& text = mWText; | 512 | LLWString& text = mWText; |
538 | S32 wordStart=0; | 513 | S32 wordStart=0; |
539 | S32 wordEnd=spellStart;//start at the scroll start | 514 | S32 wordEnd=spellStart;//start at the scroll start |
@@ -552,23 +527,26 @@ std::vector<S32> LLTextEditor::getMisspelledWordsPositions() | |||
552 | { | 527 | { |
553 | wordEnd++; | 528 | wordEnd++; |
554 | } | 529 | } |
555 | //got a word :D | ||
556 | |||
557 | std::string regText(text.begin(),text.end()); | ||
558 | std::string selectedWord(regText.substr(wordStart,wordEnd-wordStart)); | ||
559 | 530 | ||
560 | if(!glggHunSpell->isSpelledRight(selectedWord)) | 531 | //got a word? -- MC |
561 | { | 532 | if (wordStart != wordEnd) |
562 | //misspelled word here, and you have just right clicked on it | 533 | { |
534 | std::string regText(text.begin(),text.end()); | ||
535 | std::string selectedWord(regText.substr(wordStart,wordEnd-wordStart)); | ||
536 | |||
537 | if(!selectedWord.empty() && !glggHunSpell->isSpelledRight(selectedWord)) | ||
538 | { | ||
539 | //misspelled word here, and you have just right clicked on it | ||
563 | 540 | ||
564 | thePosesOfBadWords.push_back(wordStart); | 541 | misspell_positions.push_back(wordStart); |
565 | thePosesOfBadWords.push_back(wordEnd); | 542 | misspell_positions.push_back(wordEnd); |
543 | } | ||
566 | } | 544 | } |
567 | } | 545 | } |
568 | wordEnd++; | 546 | wordEnd++; |
569 | } | 547 | } |
570 | return thePosesOfBadWords; | ||
571 | } | 548 | } |
549 | |||
572 | void LLTextEditor::spell_add(void* data) | 550 | void LLTextEditor::spell_add(void* data) |
573 | { | 551 | { |
574 | SpellMenuBind* tempBind = (SpellMenuBind*)data; | 552 | SpellMenuBind* tempBind = (SpellMenuBind*)data; |
@@ -615,6 +593,68 @@ void LLTextEditor::context_selectall(void* data) | |||
615 | if(line)line->selectAll(); | 593 | if(line)line->selectAll(); |
616 | } | 594 | } |
617 | 595 | ||
596 | // method to define the associated callbacks | ||
597 | void LLTextEditor::defineMenuCallbacks(LLMenuGL* menu) { | ||
598 | |||
599 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_ENABLE, | ||
600 | "Cut Text", | ||
601 | this, | ||
602 | (void*)context_enable_cut); | ||
603 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_CLICK, | ||
604 | "Cut Text", | ||
605 | this, | ||
606 | (void*)context_cut); | ||
607 | |||
608 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_ENABLE, | ||
609 | "Copy Text", | ||
610 | this, | ||
611 | (void*)context_enable_copy); | ||
612 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_CLICK, | ||
613 | "Copy Text", | ||
614 | this, | ||
615 | (void*)context_copy); | ||
616 | |||
617 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_ENABLE, | ||
618 | "Paste Text", | ||
619 | this, | ||
620 | (void*)context_enable_paste); | ||
621 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_CLICK, | ||
622 | "Paste Text", | ||
623 | this, | ||
624 | (void*)context_paste); | ||
625 | |||
626 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_ENABLE, | ||
627 | "Delete Text", | ||
628 | this, | ||
629 | (void*)context_enable_delete); | ||
630 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_CLICK, | ||
631 | "Delete Text", | ||
632 | this, | ||
633 | (void*)context_delete); | ||
634 | |||
635 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_ENABLE, | ||
636 | "Select All Text", | ||
637 | this, | ||
638 | (void*)context_enable_selectall); | ||
639 | menu->setCtrlResponse(1+LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_CLICK, | ||
640 | "Select All Text", | ||
641 | this, | ||
642 | (void*)context_selectall); | ||
643 | |||
644 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_ON_ENABLE, | ||
645 | "Translate Text", | ||
646 | this, | ||
647 | (void*)context_enable_translate); | ||
648 | menu->setCtrlResponse(LLCallbackInformation::LL_MENU_ITEM_CALL_GL_TRANSLATE, | ||
649 | "Translate Text", | ||
650 | this, | ||
651 | (void*)context_translate); | ||
652 | |||
653 | |||
654 | |||
655 | } | ||
656 | |||
657 | |||
618 | void LLTextEditor::setTrackColor( const LLColor4& color ) | 658 | void LLTextEditor::setTrackColor( const LLColor4& color ) |
619 | { | 659 | { |
620 | mScrollbar->setTrackColor(color); | 660 | mScrollbar->setTrackColor(color); |
@@ -3240,16 +3280,16 @@ void LLTextEditor::drawMisspelled() | |||
3240 | { | 3280 | { |
3241 | spellEnd = newSpellEnd; | 3281 | spellEnd = newSpellEnd; |
3242 | spellStart = newSpellStart; | 3282 | spellStart = newSpellStart; |
3243 | misspellLocations = getMisspelledWordsPositions(); | 3283 | getMisspelledWordsPositions(mMisspellLocations); |
3244 | } | 3284 | } |
3245 | } | 3285 | } |
3246 | //draw | 3286 | //draw |
3247 | if (glggHunSpell->getSpellCheckHighlight()) | 3287 | if (!mMisspellLocations.empty() && glggHunSpell->getSpellCheckHighlight()) |
3248 | { | 3288 | { |
3249 | for (int i = 0; i<(int)misspellLocations.size() ;i++) | 3289 | for (int i = 0; i<(int)mMisspellLocations.size() ;i++) |
3250 | { | 3290 | { |
3251 | S32 wstart = misspellLocations[i]; | 3291 | S32 wstart = mMisspellLocations[i]; |
3252 | S32 wend = misspellLocations[++i]; | 3292 | S32 wend = mMisspellLocations[++i]; |
3253 | //start curor code mod | 3293 | //start curor code mod |
3254 | const LLWString &text = mWText; | 3294 | const LLWString &text = mWText; |
3255 | const S32 text_len = getLength(); | 3295 | const S32 text_len = getLength(); |
diff --git a/linden/indra/llui/lltexteditor.h b/linden/indra/llui/lltexteditor.h index f2a831b..759cd69 100644 --- a/linden/indra/llui/lltexteditor.h +++ b/linden/indra/llui/lltexteditor.h | |||
@@ -166,7 +166,10 @@ public: | |||
166 | static void spell_correct(void* data); | 166 | static void spell_correct(void* data); |
167 | static void spell_add(void* data); | 167 | static void spell_add(void* data); |
168 | static void spell_show(void* data); | 168 | static void spell_show(void* data); |
169 | std::vector<S32> getMisspelledWordsPositions(); | 169 | |
170 | void getMisspelledWordsPositions(std::vector<S32>& misspell_positions); | ||
171 | |||
172 | void defineMenuCallbacks(LLMenuGL* menu); | ||
170 | 173 | ||
171 | void selectNext(const std::string& search_text_in, BOOL case_insensitive, BOOL wrap = TRUE); | 174 | void selectNext(const std::string& search_text_in, BOOL case_insensitive, BOOL wrap = TRUE); |
172 | BOOL replaceText(const std::string& search_text, const std::string& replace_text, BOOL case_insensitive, BOOL wrap = TRUE); | 175 | BOOL replaceText(const std::string& search_text, const std::string& replace_text, BOOL case_insensitive, BOOL wrap = TRUE); |
@@ -534,7 +537,7 @@ private: | |||
534 | LLWString mPrevSpelledText; // saved string so we know whether to respell or not | 537 | LLWString mPrevSpelledText; // saved string so we know whether to respell or not |
535 | S32 spellStart; | 538 | S32 spellStart; |
536 | S32 spellEnd; | 539 | S32 spellEnd; |
537 | std::vector<S32> misspellLocations; // where all the mispelled words are | 540 | std::vector<S32> mMisspellLocations; // where all the mispelled words are |
538 | BOOL mSpellCheckable; // set in xui as "spell_check". Default value for a field | 541 | BOOL mSpellCheckable; // set in xui as "spell_check". Default value for a field |
539 | BOOL mAllowTranslate; // set in xui as "allow_translate". | 542 | BOOL mAllowTranslate; // set in xui as "allow_translate". |
540 | 543 | ||
diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt index f4c3755..3127299 100644 --- a/linden/indra/newview/CMakeLists.txt +++ b/linden/indra/newview/CMakeLists.txt | |||
@@ -154,6 +154,7 @@ set(viewer_SOURCE_FILES | |||
154 | llfloaterassetbrowser.cpp | 154 | llfloaterassetbrowser.cpp |
155 | llfloaterauction.cpp | 155 | llfloaterauction.cpp |
156 | llfloateravatarinfo.cpp | 156 | llfloateravatarinfo.cpp |
157 | llfloateravatarlist.cpp | ||
157 | llfloateravatarpicker.cpp | 158 | llfloateravatarpicker.cpp |
158 | llfloateravatartextures.cpp | 159 | llfloateravatartextures.cpp |
159 | llfloaterbeacons.cpp | 160 | llfloaterbeacons.cpp |
@@ -616,6 +617,7 @@ set(viewer_HEADER_FILES | |||
616 | llfloaterassetbrowser.h | 617 | llfloaterassetbrowser.h |
617 | llfloaterauction.h | 618 | llfloaterauction.h |
618 | llfloateravatarinfo.h | 619 | llfloateravatarinfo.h |
620 | llfloateravatarlist.h | ||
619 | llfloateravatarpicker.h | 621 | llfloateravatarpicker.h |
620 | llfloateravatartextures.h | 622 | llfloateravatartextures.h |
621 | llfloaterbeacons.h | 623 | llfloaterbeacons.h |
diff --git a/linden/indra/newview/app_settings/cloud.xml b/linden/indra/newview/app_settings/cloud.xml index e62bcf1..fdc420a 100644 --- a/linden/indra/newview/app_settings/cloud.xml +++ b/linden/indra/newview/app_settings/cloud.xml | |||
@@ -49,8 +49,9 @@ | |||
49 | <key>ParticleMaxAge</key><!-- how long a single particle can live with 0 forever --> | 49 | <key>ParticleMaxAge</key><!-- how long a single particle can live with 0 forever --> |
50 | <real>4</real> | 50 | <real>4</real> |
51 | 51 | ||
52 | <key>PartImageID</key> <!--This setting is ignored for the cloud, used instead for now is the hardcoded --> | 52 | <key>PartImageID</key> |
53 | <string>0000000000000-0000-0000-000000000000</string><!-- skins/default/textures/cloud-particle.j2c --> | 53 | <!--if this is a NULL UUID the hardcoded skins/default/textures/cloud-particle.j2c is used--> |
54 | <string>0000000000000-0000-0000-000000000000</string> | ||
54 | 55 | ||
55 | <key>StartColor</key><!-- RGBA --> | 56 | <key>StartColor</key><!-- RGBA --> |
56 | <array> | 57 | <array> |
diff --git a/linden/indra/newview/app_settings/default_grids.xml b/linden/indra/newview/app_settings/default_grids.xml index c6360d4..bea272d 100644 --- a/linden/indra/newview/app_settings/default_grids.xml +++ b/linden/indra/newview/app_settings/default_grids.xml | |||
@@ -1,7 +1,7 @@ | |||
1 | <llsd> | 1 | <llsd> |
2 | <array> | 2 | <array> |
3 | <map> | 3 | <map> |
4 | <key>default_grids_version</key><string>32</string> | 4 | <key>default_grids_version</key><string>33</string> |
5 | </map> | 5 | </map> |
6 | 6 | ||
7 | <!-- Second Life --> | 7 | <!-- Second Life --> |
@@ -191,17 +191,17 @@ | |||
191 | 191 | ||
192 | <!-- InWorldz --> | 192 | <!-- InWorldz --> |
193 | <map> | 193 | <map> |
194 | <key>gridname</key> <string>Inworldz</string> | 194 | <key>gridname</key> <string>InWorldz</string> |
195 | <key>gridnick</key> <string>inworldz</string> | 195 | <key>gridnick</key> <string>inworldz</string> |
196 | <key>platform</key> <string>OpenSim</string> | 196 | <key>platform</key> <string>OpenSim</string> |
197 | <key>loginuri</key> <string>http://inworldz.com:8002/</string> | 197 | <key>loginuri</key> <string>http://inworldz.com:8002/</string> |
198 | <key>loginpage</key> <string>http://inworldz.com/loginscreen.php</string> | 198 | <key>loginpage</key> <string>http://inworldz.com/loginscreen.php</string> |
199 | <key>helperuri</key> <string>http://inworldz.com/</string> | 199 | <key>helperuri</key> <string>http://inworldz.com/</string> |
200 | <key>password</key> <string>http://inworldz.com/wpassword</string> | 200 | <key>password</key> <string>http://inworldz.com/loginerror.php?error=2</string> |
201 | <key>register</key> <string>http://inworldz.com/register</string> | 201 | <key>register</key> <string>http://inworldz.com/register.php</string> |
202 | <key>support</key> <string>http://inworldz.com/help</string> | 202 | <key>support</key> <string>http://inworldz.com/support.php</string> |
203 | <key>website</key> <string>http://inworldz.com/about/</string> | 203 | <key>website</key> <string>http://inworldz.com/</string> |
204 | <key>version</key> <string>1</string> | 204 | <key>version</key> <string>2</string> |
205 | </map> | 205 | </map> |
206 | 206 | ||
207 | <!-- meta 7 --> | 207 | <!-- meta 7 --> |
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index d0b8108..833f191 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml | |||
@@ -2,7 +2,9 @@ | |||
2 | <llsd> | 2 | <llsd> |
3 | <map> | 3 | <map> |
4 | 4 | ||
5 | <!-- for Aurora Sim --> | 5 | <!-- BEGIN IMPRUDENCE-SPECIFIC SETTINGS --> |
6 | |||
7 | <!-- begin Aurora-specific settings --> | ||
6 | 8 | ||
7 | <key>TimeOffset</key> | 9 | <key>TimeOffset</key> |
8 | <map> | 10 | <map> |
@@ -48,7 +50,8 @@ | |||
48 | <key>Value</key> | 50 | <key>Value</key> |
49 | <string>SLVoice</string> | 51 | <string>SLVoice</string> |
50 | </map> | 52 | </map> |
51 | <!-- Imprudence-specific settings --> | 53 | |
54 | <!-- end Aurora-specific settings --> | ||
52 | 55 | ||
53 | <key>AllowEditingOfTrees</key> | 56 | <key>AllowEditingOfTrees</key> |
54 | <map> | 57 | <map> |
@@ -135,6 +138,17 @@ | |||
135 | <real>1</real> | 138 | <real>1</real> |
136 | </array> | 139 | </array> |
137 | </map> | 140 | </map> |
141 | <key>HeadFollowsMouse</key> | ||
142 | <map> | ||
143 | <key>Comment</key> | ||
144 | <string>IF your avatars head follows your mouse movements (then the extend is defined in YawFromMousePosition and PitchFromMousePosition</string> | ||
145 | <key>Persist</key> | ||
146 | <integer>1</integer> | ||
147 | <key>Type</key> | ||
148 | <string>Boolean</string> | ||
149 | <key>Value</key> | ||
150 | <integer>0</integer> | ||
151 | </map> | ||
138 | <key>HighlightOwnNameInChat</key> | 152 | <key>HighlightOwnNameInChat</key> |
139 | <map> | 153 | <map> |
140 | <key>Comment</key> | 154 | <key>Comment</key> |
@@ -913,6 +927,17 @@ | |||
913 | <key>Value</key> | 927 | <key>Value</key> |
914 | <integer>1</integer> | 928 | <integer>1</integer> |
915 | </map> | 929 | </map> |
930 | <key>PreviewAvatarAsCloud</key> | ||
931 | <map> | ||
932 | <key>Comment</key> | ||
933 | <string>Turns your avatar into the paricle clud if true</string> | ||
934 | <key>Persist</key> | ||
935 | <integer>0</integer> | ||
936 | <key>Type</key> | ||
937 | <string>Boolean</string> | ||
938 | <key>Value</key> | ||
939 | <integer>0</integer> | ||
940 | </map> | ||
916 | <key>PrivateLookAtTarget</key> | 941 | <key>PrivateLookAtTarget</key> |
917 | <map> | 942 | <map> |
918 | <key>Comment</key> | 943 | <key>Comment</key> |
@@ -946,6 +971,17 @@ | |||
946 | <key>Value</key> | 971 | <key>Value</key> |
947 | <real>0.0</real> | 972 | <real>0.0</real> |
948 | </map> | 973 | </map> |
974 | <key>SaveSearchResults</key> | ||
975 | <map> | ||
976 | <key>Comment</key> | ||
977 | <string>Saves search results when closing search window rather than clearing resources</string> | ||
978 | <key>Persist</key> | ||
979 | <integer>1</integer> | ||
980 | <key>Type</key> | ||
981 | <string>Boolean</string> | ||
982 | <key>Value</key> | ||
983 | <integer>0</integer> | ||
984 | </map> | ||
949 | <key>ShowLookAtNames</key> | 985 | <key>ShowLookAtNames</key> |
950 | <map> | 986 | <map> |
951 | <key>Comment</key> | 987 | <key>Comment</key> |
@@ -1667,6 +1703,23 @@ | |||
1667 | </map> | 1703 | </map> |
1668 | 1704 | ||
1669 | <!-- Begin: Client Name Tag --> | 1705 | <!-- Begin: Client Name Tag --> |
1706 | |||
1707 | <key>ImprudenceTagColor</key> | ||
1708 | <map> | ||
1709 | <key>Comment</key> | ||
1710 | <string>Color of Imprudence tags (displayed only locally)</string> | ||
1711 | <key>Persist</key> | ||
1712 | <integer>1</integer> | ||
1713 | <key>Type</key> | ||
1714 | <string>Color4</string> | ||
1715 | <key>Value</key> | ||
1716 | <array> | ||
1717 | <real>0.79</real> | ||
1718 | <real>0.44</real> | ||
1719 | <real>0.88</real> | ||
1720 | <real>1</real> | ||
1721 | </array> | ||
1722 | </map> | ||
1670 | <key>ShowClientColor</key> | 1723 | <key>ShowClientColor</key> |
1671 | <map> | 1724 | <map> |
1672 | <key>Comment</key> | 1725 | <key>Comment</key> |
@@ -2069,6 +2122,8 @@ | |||
2069 | </map> | 2122 | </map> |
2070 | 2123 | ||
2071 | <!-- End: Spellcheck & Translation --> | 2124 | <!-- End: Spellcheck & Translation --> |
2125 | |||
2126 | <!-- Begin: RLVa --> | ||
2072 | 2127 | ||
2073 | <key>RestrainedLove</key> | 2128 | <key>RestrainedLove</key> |
2074 | <map> | 2129 | <map> |
@@ -2246,6 +2301,224 @@ | |||
2246 | <key>Value</key> | 2301 | <key>Value</key> |
2247 | <integer>1</integer> | 2302 | <integer>1</integer> |
2248 | </map> | 2303 | </map> |
2304 | |||
2305 | <!-- End: RLVa --> | ||
2306 | |||
2307 | <!-- Begin: socks5 --> | ||
2308 | |||
2309 | <key>Socks5ProxyEnabled</key> | ||
2310 | <map> | ||
2311 | <key>Comment</key> | ||
2312 | <string>Use Socks5 Proxy</string> | ||
2313 | <key>Persist</key> | ||
2314 | <integer>1</integer> | ||
2315 | <key>Type</key> | ||
2316 | <string>Boolean</string> | ||
2317 | <key>Value</key> | ||
2318 | <integer>0</integer> | ||
2319 | </map> | ||
2320 | <key>Socks5HttpProxyType</key> | ||
2321 | <map> | ||
2322 | <key>Comment</key> | ||
2323 | <string>Proxy type to use for HTTP operations</string> | ||
2324 | <key>Persist</key> | ||
2325 | <integer>1</integer> | ||
2326 | <key>Type</key> | ||
2327 | <string>String</string> | ||
2328 | <key>Value</key> | ||
2329 | <integer>None</integer> | ||
2330 | </map> | ||
2331 | <key>Socks5ProxyHost</key> | ||
2332 | <map> | ||
2333 | <key>Comment</key> | ||
2334 | <string>Socks 5 Proxy Host</string> | ||
2335 | <key>Persist</key> | ||
2336 | <integer>1</integer> | ||
2337 | <key>Type</key> | ||
2338 | <string>String</string> | ||
2339 | <key>Value</key> | ||
2340 | <string /> | ||
2341 | </map> | ||
2342 | <key>Socks5ProxyPort</key> | ||
2343 | <map> | ||
2344 | <key>Comment</key> | ||
2345 | <string>Socks 5 Proxy Port</string> | ||
2346 | <key>Persist</key> | ||
2347 | <integer>1</integer> | ||
2348 | <key>Type</key> | ||
2349 | <string>U32</string> | ||
2350 | <key>Value</key> | ||
2351 | <integer>1080</integer> | ||
2352 | </map> | ||
2353 | <key>Socks5Username</key> | ||
2354 | <map> | ||
2355 | <key>Comment</key> | ||
2356 | <string>Socks 5 Username</string> | ||
2357 | <key>Persist</key> | ||
2358 | <integer>1</integer> | ||
2359 | <key>Type</key> | ||
2360 | <string>String</string> | ||
2361 | <key>Value</key> | ||
2362 | <string></string> | ||
2363 | </map> | ||
2364 | <key>Socks5Password</key> | ||
2365 | <map> | ||
2366 | <key>Comment</key> | ||
2367 | <string>Socks 5 Password</string> | ||
2368 | <key>Persist</key> | ||
2369 | <integer>1</integer> | ||
2370 | <key>Type</key> | ||
2371 | <string>String</string> | ||
2372 | <key>Value</key> | ||
2373 | <string></string> | ||
2374 | </map> | ||
2375 | <key>Socks5AuthType</key> | ||
2376 | <map> | ||
2377 | <key>Comment</key> | ||
2378 | <string>Selected Auth mechanism for Socks5</string> | ||
2379 | <key>Persist</key> | ||
2380 | <integer>1</integer> | ||
2381 | <key>Type</key> | ||
2382 | <string>String</string> | ||
2383 | <key>Value</key> | ||
2384 | <string>None</string> | ||
2385 | </map> | ||
2386 | |||
2387 | <!-- End: socks5 --> | ||
2388 | |||
2389 | <!-- Begin: full radar (Advanced menu) --> | ||
2390 | |||
2391 | <key>ShowRadar</key> | ||
2392 | <map> | ||
2393 | <key>Comment</key> | ||
2394 | <string>Show the radar floater</string> | ||
2395 | <key>Persist</key> | ||
2396 | <integer>1</integer> | ||
2397 | <key>Type</key> | ||
2398 | <string>Boolean</string> | ||
2399 | <key>Value</key> | ||
2400 | <integer>0</integer> | ||
2401 | </map> | ||
2402 | <key>FloaterRadarRect</key> | ||
2403 | <map> | ||
2404 | <key>Comment</key> | ||
2405 | <string>Rectangle for Radar</string> | ||
2406 | <key>Persist</key> | ||
2407 | <integer>1</integer> | ||
2408 | <key>Type</key> | ||
2409 | <string>Rect</string> | ||
2410 | <key>Value</key> | ||
2411 | <array> | ||
2412 | <integer>0</integer> | ||
2413 | <integer>400</integer> | ||
2414 | <integer>200</integer> | ||
2415 | <integer>0</integer> | ||
2416 | </array> | ||
2417 | </map> | ||
2418 | <key>RadarKeepOpen</key> | ||
2419 | <map> | ||
2420 | <key>Comment</key> | ||
2421 | <string>Keeps radar updates running in background</string> | ||
2422 | <key>Persist</key> | ||
2423 | <integer>1</integer> | ||
2424 | <key>Type</key> | ||
2425 | <string>Boolean</string> | ||
2426 | <key>Value</key> | ||
2427 | <integer>0</integer> | ||
2428 | </map> | ||
2429 | <key>RadarUpdateRate</key> | ||
2430 | <map> | ||
2431 | <key>Comment</key> | ||
2432 | <string>Radar update rate (0 = high, 1 = medium, 2 = low)</string> | ||
2433 | <key>Persist</key> | ||
2434 | <integer>1</integer> | ||
2435 | <key>Type</key> | ||
2436 | <string>U32</string> | ||
2437 | <key>Value</key> | ||
2438 | <integer>1</integer> | ||
2439 | </map> | ||
2440 | <key>RadarAlertSim</key> | ||
2441 | <map> | ||
2442 | <key>Comment</key> | ||
2443 | <string>Whether the radar emits chat alerts for avatars entering/exiting sim</string> | ||
2444 | <key>Persist</key> | ||
2445 | <integer>1</integer> | ||
2446 | <key>Type</key> | ||
2447 | <string>Boolean</string> | ||
2448 | <key>Value</key> | ||
2449 | <integer>0</integer> | ||
2450 | </map> | ||
2451 | <key>RadarAlertDraw</key> | ||
2452 | <map> | ||
2453 | <key>Comment</key> | ||
2454 | <string>Whether the radar emits chat alerts for avatars entering/exiting draw distance</string> | ||
2455 | <key>Persist</key> | ||
2456 | <integer>1</integer> | ||
2457 | <key>Type</key> | ||
2458 | <string>Boolean</string> | ||
2459 | <key>Value</key> | ||
2460 | <integer>0</integer> | ||
2461 | </map> | ||
2462 | <key>RadarAlertShoutRange</key> | ||
2463 | <map> | ||
2464 | <key>Comment</key> | ||
2465 | <string>Whether the radar emits chat alerts for avatars entering/exiting shout range</string> | ||
2466 | <key>Persist</key> | ||
2467 | <integer>1</integer> | ||
2468 | <key>Type</key> | ||
2469 | <string>Boolean</string> | ||
2470 | <key>Value</key> | ||
2471 | <integer>0</integer> | ||
2472 | </map> | ||
2473 | <key>RadarAlertChatRange</key> | ||
2474 | <map> | ||
2475 | <key>Comment</key> | ||
2476 | <string>Whether the radar emits chat alerts for avatars entering/exiting chat range</string> | ||
2477 | <key>Persist</key> | ||
2478 | <integer>1</integer> | ||
2479 | <key>Type</key> | ||
2480 | <string>Boolean</string> | ||
2481 | <key>Value</key> | ||
2482 | <integer>1</integer> | ||
2483 | </map> | ||
2484 | <key>RadarChatAlerts</key> | ||
2485 | <map> | ||
2486 | <key>Comment</key> | ||
2487 | <string>Whether the radar emits chat alerts regarding the status of avatars it displays</string> | ||
2488 | <key>Persist</key> | ||
2489 | <integer>1</integer> | ||
2490 | <key>Type</key> | ||
2491 | <string>Boolean</string> | ||
2492 | <key>Value</key> | ||
2493 | <integer>0</integer> | ||
2494 | </map> | ||
2495 | <key>RadarChatKeys</key> | ||
2496 | <map> | ||
2497 | <key>Comment</key> | ||
2498 | <string>Enable private chat alerts for avatars entering the region</string> | ||
2499 | <key>Persist</key> | ||
2500 | <integer>1</integer> | ||
2501 | <key>Type</key> | ||
2502 | <string>Boolean</string> | ||
2503 | <key>Value</key> | ||
2504 | <integer>0</integer> | ||
2505 | </map> | ||
2506 | <key>RadarChatKeysChannel</key> | ||
2507 | <map> | ||
2508 | <key>Comment</key> | ||
2509 | <string>Private channel used to broadcast the key of incoming avatars</string> | ||
2510 | <key>Persist</key> | ||
2511 | <integer>1</integer> | ||
2512 | <key>Type</key> | ||
2513 | <string>S32</string> | ||
2514 | <key>Value</key> | ||
2515 | <integer>-8888888</integer> | ||
2516 | </map> | ||
2517 | |||
2518 | <!-- End: full radar (Advanced menu) --> | ||
2519 | |||
2520 | <!-- END IMPRUDENCE-SPECIFIC SETTINGS --> | ||
2521 | |||
2249 | <key>AFKTimeout</key> | 2522 | <key>AFKTimeout</key> |
2250 | <map> | 2523 | <map> |
2251 | <key>Comment</key> | 2524 | <key>Comment</key> |
@@ -3002,7 +3275,7 @@ | |||
3002 | <key>BrowserProxyAddress</key> | 3275 | <key>BrowserProxyAddress</key> |
3003 | <map> | 3276 | <map> |
3004 | <key>Comment</key> | 3277 | <key>Comment</key> |
3005 | <string>Address for the Web Proxy]</string> | 3278 | <string>Address for the Web Proxy</string> |
3006 | <key>Persist</key> | 3279 | <key>Persist</key> |
3007 | <integer>1</integer> | 3280 | <integer>1</integer> |
3008 | <key>Type</key> | 3281 | <key>Type</key> |
@@ -5619,17 +5892,6 @@ | |||
5619 | <key>Value</key> | 5892 | <key>Value</key> |
5620 | <integer>1</integer> | 5893 | <integer>1</integer> |
5621 | </map> | 5894 | </map> |
5622 | <key>FirstName</key> | ||
5623 | <map> | ||
5624 | <key>Comment</key> | ||
5625 | <string>Login first name</string> | ||
5626 | <key>Persist</key> | ||
5627 | <integer>1</integer> | ||
5628 | <key>Type</key> | ||
5629 | <string>String</string> | ||
5630 | <key>Value</key> | ||
5631 | <string /> | ||
5632 | </map> | ||
5633 | <key>FirstPersonAvatarVisible</key> | 5895 | <key>FirstPersonAvatarVisible</key> |
5634 | <map> | 5896 | <map> |
5635 | <key>Comment</key> | 5897 | <key>Comment</key> |
@@ -7530,17 +7792,6 @@ | |||
7530 | <key>Value</key> | 7792 | <key>Value</key> |
7531 | <string>find_all_panel</string> | 7793 | <string>find_all_panel</string> |
7532 | </map> | 7794 | </map> |
7533 | <key>LastName</key> | ||
7534 | <map> | ||
7535 | <key>Comment</key> | ||
7536 | <string>Login last name</string> | ||
7537 | <key>Persist</key> | ||
7538 | <integer>1</integer> | ||
7539 | <key>Type</key> | ||
7540 | <string>String</string> | ||
7541 | <key>Value</key> | ||
7542 | <string /> | ||
7543 | </map> | ||
7544 | <key>LastPrefTab</key> | 7795 | <key>LastPrefTab</key> |
7545 | <map> | 7796 | <map> |
7546 | <key>Comment</key> | 7797 | <key>Comment</key> |
@@ -7915,17 +8166,6 @@ | |||
7915 | <key>Value</key> | 8166 | <key>Value</key> |
7916 | <integer>1</integer> | 8167 | <integer>1</integer> |
7917 | </map> | 8168 | </map> |
7918 | <key>Marker</key> | ||
7919 | <map> | ||
7920 | <key>Comment</key> | ||
7921 | <string>[NOT USED]</string> | ||
7922 | <key>Persist</key> | ||
7923 | <integer>1</integer> | ||
7924 | <key>Type</key> | ||
7925 | <string>String</string> | ||
7926 | <key>Value</key> | ||
7927 | <string /> | ||
7928 | </map> | ||
7929 | <key>MaxDragDistance</key> | 8169 | <key>MaxDragDistance</key> |
7930 | <map> | 8170 | <map> |
7931 | <key>Comment</key> | 8171 | <key>Comment</key> |
diff --git a/linden/indra/newview/app_settings/viewerversion.xml b/linden/indra/newview/app_settings/viewerversion.xml index a220cf2..051f2a3 100644 --- a/linden/indra/newview/app_settings/viewerversion.xml +++ b/linden/indra/newview/app_settings/viewerversion.xml | |||
@@ -20,6 +20,6 @@ need to be changed manually - MC | |||
20 | <viewer version_patch="0" /> | 20 | <viewer version_patch="0" /> |
21 | 21 | ||
22 | <!--string--> | 22 | <!--string--> |
23 | <viewer version_test="Experimental 2011.04.02" /> | 23 | <viewer version_test="Experimental 2011.04.19" /> |
24 | 24 | ||
25 | </viewer_version> | 25 | </viewer_version> |
diff --git a/linden/indra/newview/chatbar_as_cmdline.cpp b/linden/indra/newview/chatbar_as_cmdline.cpp index b5a7e8c..9777114 100644 --- a/linden/indra/newview/chatbar_as_cmdline.cpp +++ b/linden/indra/newview/chatbar_as_cmdline.cpp | |||
@@ -367,7 +367,10 @@ bool cmd_line_chat(std::string revised_text, EChatType type) | |||
367 | { | 367 | { |
368 | gOverlayBar->toggleMusicPlay(gOverlayBar); | 368 | gOverlayBar->toggleMusicPlay(gOverlayBar); |
369 | } | 369 | } |
370 | gAudioStream->startInternetStream(status); | 370 | if (gAudioStream) |
371 | { | ||
372 | gAudioStream->startInternetStream(status); | ||
373 | } | ||
371 | return false; | 374 | return false; |
372 | } | 375 | } |
373 | } | 376 | } |
diff --git a/linden/indra/newview/floatergriddefault.cpp b/linden/indra/newview/floatergriddefault.cpp index 6a2526d..b89674f 100644 --- a/linden/indra/newview/floatergriddefault.cpp +++ b/linden/indra/newview/floatergriddefault.cpp | |||
@@ -49,26 +49,7 @@ FloaterGridDefault::~FloaterGridDefault() | |||
49 | BOOL FloaterGridDefault::postBuild() | 49 | BOOL FloaterGridDefault::postBuild() |
50 | { | 50 | { |
51 | // populate the grid chooser | 51 | // populate the grid chooser |
52 | LLScrollListCtrl* grid_list = getChild<LLScrollListCtrl>("grid_list"); | 52 | refreshGridList(); |
53 | grid_list->deleteAllItems(); | ||
54 | |||
55 | LLSD element; | ||
56 | |||
57 | for (HippoGridManager::GridIterator it = gHippoGridManager->beginGrid(); it != gHippoGridManager->endGrid(); ++it) | ||
58 | { | ||
59 | std::string grid_nick = it->second->getGridNick(); | ||
60 | // There's no reason why empty grids nicks should be in this list, ugh | ||
61 | if (!grid_nick.empty()) | ||
62 | { | ||
63 | element["id"] = grid_nick; | ||
64 | element["columns"][0]["column"] = "grid"; | ||
65 | element["columns"][0]["type"] = "text"; | ||
66 | element["columns"][0]["value"] = grid_nick; | ||
67 | grid_list->addElement(element, ADD_BOTTOM); | ||
68 | } | ||
69 | } | ||
70 | |||
71 | grid_list->setFocus(TRUE); | ||
72 | 53 | ||
73 | childSetAction("btn_ok", onClickOK, this); | 54 | childSetAction("btn_ok", onClickOK, this); |
74 | childSetAction("btn_cancel", onClickCancel, this); | 55 | childSetAction("btn_cancel", onClickCancel, this); |
@@ -99,3 +80,39 @@ void FloaterGridDefault::onClickCancel(void* userdata) | |||
99 | FloaterGridDefault* self = (FloaterGridDefault*)userdata; | 80 | FloaterGridDefault* self = (FloaterGridDefault*)userdata; |
100 | self->close(); | 81 | self->close(); |
101 | } | 82 | } |
83 | |||
84 | // static | ||
85 | void FloaterGridDefault::refreshGridList() | ||
86 | { | ||
87 | LLScrollListCtrl* grid_list = FloaterGridDefault::getInstance()->getChild<LLScrollListCtrl>("grid_list"); | ||
88 | if (grid_list) | ||
89 | { | ||
90 | grid_list->deleteAllItems(); | ||
91 | |||
92 | LLSD element; | ||
93 | |||
94 | for (HippoGridManager::GridIterator it = gHippoGridManager->beginGrid(); | ||
95 | it != gHippoGridManager->endGrid(); ++it) | ||
96 | { | ||
97 | std::string grid_nick = it->second->getGridNick(); | ||
98 | // There's no reason why empty grids nicks should be in this list... | ||
99 | if (grid_nick.empty()) | ||
100 | { | ||
101 | continue; | ||
102 | } | ||
103 | else | ||
104 | { | ||
105 | element["id"] = grid_nick; | ||
106 | element["columns"][0]["column"] = "grid_nick"; | ||
107 | element["columns"][0]["type"] = "text"; | ||
108 | element["columns"][0]["value"] = grid_nick; | ||
109 | element["columns"][1]["column"] = "grid_name"; | ||
110 | element["columns"][1]["type"] = "text"; | ||
111 | element["columns"][1]["value"] = it->second->getGridName(); | ||
112 | grid_list->addElement(element, ADD_BOTTOM); | ||
113 | } | ||
114 | } | ||
115 | |||
116 | grid_list->setFocus(TRUE); | ||
117 | } | ||
118 | } | ||
diff --git a/linden/indra/newview/floatergriddefault.h b/linden/indra/newview/floatergriddefault.h index 009e23f..5c07efe 100644 --- a/linden/indra/newview/floatergriddefault.h +++ b/linden/indra/newview/floatergriddefault.h | |||
@@ -41,6 +41,9 @@ public: | |||
41 | 41 | ||
42 | /*virtual*/ BOOL postBuild(); | 42 | /*virtual*/ BOOL postBuild(); |
43 | 43 | ||
44 | // refresh the default grid list selection. Steals focus | ||
45 | void refreshGridList(); | ||
46 | |||
44 | private: | 47 | private: |
45 | static void onClickOK(void* userdata); | 48 | static void onClickOK(void* userdata); |
46 | static void onClickCancel(void* userdata); | 49 | static void onClickCancel(void* userdata); |
diff --git a/linden/indra/newview/floatergridmanager.cpp b/linden/indra/newview/floatergridmanager.cpp index 298fe35..257c210 100644 --- a/linden/indra/newview/floatergridmanager.cpp +++ b/linden/indra/newview/floatergridmanager.cpp | |||
@@ -1,54 +1,66 @@ | |||
1 | /* | 1 | /** |
2 | * floatergridmanager.cpp | 2 | * @file floatergridmanager.cpp |
3 | * This is Meerkats grid manager. | 3 | * @brief UI for managing grid information |
4 | * -Patrick Sapinski (Monday, August 17, 2009) | 4 | * |
5 | * | 5 | * $LicenseInfo:firstyear=2011&license=viewergpl$ |
6 | * Modified by McCabe Maxsted for Imprudence | 6 | * |
7 | */ | 7 | * Copyright (c) 2011, McCabe Maxsted |
8 | * based on Meerkat's grid manager by Patrick Sapinski | ||
9 | * | ||
10 | * Imprudence Viewer Source Code | ||
11 | * The source code in this file ("Source Code") is provided to you | ||
12 | * under the terms of the GNU General Public License, version 2.0 | ||
13 | * ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in | ||
14 | * this distribution, or online at | ||
15 | * http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
16 | * | ||
17 | * There are special exceptions to the terms and conditions of the GPL as | ||
18 | * it is applied to this Source Code. View the full text of the exception | ||
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | ||
22 | * By copying, modifying or distributing this software, you acknowledge | ||
23 | * that you have read and understood your obligations described above, | ||
24 | * and agree to abide by those obligations. | ||
25 | * | ||
26 | * ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO | ||
27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
28 | * COMPLETENESS OR PERFORMANCE. | ||
29 | * $/LicenseInfo$ | ||
30 | */ | ||
8 | 31 | ||
9 | #include "llviewerprecompiledheaders.h" | 32 | #include "llviewerprecompiledheaders.h" |
10 | 33 | ||
11 | #include "floatergridmanager.h" | 34 | #include "floatergridmanager.h" |
12 | 35 | ||
13 | #include <boost/algorithm/string.hpp> | 36 | #include <boost/algorithm/string.hpp> |
37 | #include "floatergriddefault.h" | ||
14 | #include "llviewercontrol.h" | 38 | #include "llviewercontrol.h" |
15 | #include "llcombobox.h" | 39 | #include "llcombobox.h" |
16 | #include "llscrolllistctrl.h" | 40 | #include "llscrolllistctrl.h" |
17 | #include "llmd5.h" | 41 | #include "llmd5.h" |
42 | #include "llnotifications.h" | ||
18 | #include "llurlsimstring.h" | 43 | #include "llurlsimstring.h" |
19 | #include "lluictrlfactory.h" | 44 | #include "lluictrlfactory.h" |
20 | #include "hippogridmanager.h" | 45 | #include "hippogridmanager.h" |
21 | #include "llviewernetwork.h" | 46 | #include "llviewernetwork.h" |
22 | #include "llpanellogin.h" | 47 | #include "llpanellogin.h" |
23 | 48 | ||
24 | #define PASSWORD_FILLER "123456789!123456" | 49 | const std::string PASSWORD_FILLER = "123456789!123456"; |
25 | |||
26 | LoginController* FloaterGridManager::sController = NULL; | ||
27 | bool FloaterGridManager::sIsInitialLogin; | ||
28 | std::string FloaterGridManager::sGrid; | ||
29 | 50 | ||
30 | FloaterGridManager::FloaterGridManager(const LLSD& key) | 51 | FloaterGridManager::FloaterGridManager(const LLSD& key) |
31 | : mState(NORMAL), | 52 | : |
32 | mCurGrid(gHippoGridManager->getCurrentGridNick()), | 53 | mState(GRID_STATE_NORMAL), |
33 | mIncomingPassword(""), | 54 | mCurGrid("") |
34 | mMungedPassword("") | ||
35 | { | 55 | { |
36 | llinfos << "Opening grid manager" << llendl; | 56 | llinfos << "Opening grid manager" << llendl; |
37 | 57 | ||
38 | LLUICtrlFactory::getInstance()->buildFloater(this, "floater_grid_manager.xml"); | 58 | LLUICtrlFactory::getInstance()->buildFloater(this, "floater_grid_manager.xml"); |
39 | center(); | 59 | center(); |
40 | |||
41 | LLLineEditor* edit = getChild<LLLineEditor>("avatar_password_edit"); | ||
42 | if (edit) | ||
43 | { | ||
44 | edit->setDrawAsterixes(TRUE); | ||
45 | } | ||
46 | } | 60 | } |
47 | 61 | ||
48 | |||
49 | FloaterGridManager::~FloaterGridManager() | 62 | FloaterGridManager::~FloaterGridManager() |
50 | { | 63 | { |
51 | FloaterGridManager::sController = NULL; | ||
52 | } | 64 | } |
53 | 65 | ||
54 | BOOL FloaterGridManager::postBuild() | 66 | BOOL FloaterGridManager::postBuild() |
@@ -64,105 +76,117 @@ BOOL FloaterGridManager::postBuild() | |||
64 | childSetAction("btn_copy", onClickCopy, this); | 76 | childSetAction("btn_copy", onClickCopy, this); |
65 | childSetAction("btn_ok", onClickOk, this); | 77 | childSetAction("btn_ok", onClickOk, this); |
66 | childSetAction("btn_apply", onClickApply, this); | 78 | childSetAction("btn_apply", onClickApply, this); |
67 | // childSetAction("set_default", onClickDefault, this); // We use the last selected grid as the default | ||
68 | childSetAction("btn_cancel", onClickCancel, this); | 79 | childSetAction("btn_cancel", onClickCancel, this); |
69 | childSetAction("btn_clear", onClickClear, this); | 80 | childSetAction("btn_clear", onClickClear, this); |
70 | childSetAction("btn_gridinfo", onClickGridInfo, this); | 81 | childSetAction("btn_gridinfo", onClickGridInfo, this); |
71 | // childSetAction("btn_help_render_compat", onClickHelpRenderCompat, this); // Ugly ugly ugly | ||
72 | 82 | ||
73 | childSetCommitCallback("grid_selector", onSelectGrid, this); | 83 | childSetCommitCallback("grid_selector", onSelectGrid, this); |
74 | LLScrollListCtrl* combo = getChild<LLScrollListCtrl>("grid_selector"); | 84 | LLScrollListCtrl* combo = getChild<LLScrollListCtrl>("grid_selector"); |
75 | combo->setFocus(TRUE); | 85 | combo->setFocus(TRUE); |
76 | 86 | ||
87 | clearGridInfo(true); | ||
88 | |||
77 | refreshGrids(); | 89 | refreshGrids(); |
78 | 90 | ||
79 | return TRUE; | 91 | // We use the last selected grid as the default |
80 | } | 92 | HippoGridInfo* first_selected = gHippoGridManager->getGrid(mCurGrid); |
93 | if (first_selected) | ||
94 | { | ||
95 | getChild<LLLineEditor>("first_name")->setVisible(!first_selected->isUsernameCompat()); | ||
96 | getChild<LLLineEditor>("last_name")->setVisible(!first_selected->isUsernameCompat()); | ||
97 | getChild<LLLineEditor>("username")->setVisible(first_selected->isUsernameCompat()); | ||
98 | } | ||
99 | getChild<LLLineEditor>("gridnick")->setEnabled(false); | ||
81 | 100 | ||
82 | void FloaterGridManager::clearInfo() | 101 | return TRUE; |
83 | { | ||
84 | //getChild<LLScrollListCtrl>("grid_selector")->clear(); | ||
85 | //getChild<LLLineEditor>("gridnick")->clear(); | ||
86 | //getChild<LLLineEditor>("gridname")->clear(); | ||
87 | //getChild<LLLineEditor>("loginuri")->clear(); | ||
88 | getChild<LLLineEditor>("loginpage")->clear(); | ||
89 | getChild<LLLineEditor>("helperuri")->clear(); | ||
90 | getChild<LLLineEditor>("website")->clear(); | ||
91 | getChild<LLLineEditor>("support")->clear(); | ||
92 | getChild<LLLineEditor>("register")->clear(); | ||
93 | getChild<LLLineEditor>("password")->clear(); | ||
94 | //getChild<LLLineEditor>("first_name")->clear(); | ||
95 | //getChild<LLLineEditor>("last_name")->clear(); | ||
96 | //getChild<LLLineEditor>("avatar_password")->clear(); | ||
97 | getChild<LLLineEditor>("search")->clear(); | ||
98 | //getChild<LLButton>("btn_delete"); | ||
99 | //getChild<LLButton>("btn_add") | ||
100 | //getChild<LLButton>("btn_copy"); | ||
101 | //getChild<LLButton>("set_default")->setEnabled(FALSE); | ||
102 | getChild<LLButton>("btn_gridinfo")->setEnabled(TRUE); | ||
103 | //getChild<LLButton>("btn_clear"); | ||
104 | //getChild<LLButton>("btn_help_render_compat")->setEnabled(FALSE); | ||
105 | } | 102 | } |
106 | 103 | ||
107 | void FloaterGridManager::draw() | 104 | void FloaterGridManager::draw() |
108 | { | 105 | { |
109 | refresh(); | 106 | refresh(); |
110 | |||
111 | LLFloater::draw(); | 107 | LLFloater::draw(); |
112 | } | 108 | } |
113 | 109 | ||
114 | void FloaterGridManager::refresh() | 110 | void FloaterGridManager::refresh() |
115 | { | 111 | { |
116 | //TODO: these should just be set in a prompt | 112 | //TODO: new grid creation should just be set in a popup |
117 | bool can_edit = (!getChild<LLLineEditor>("gridnick")->getText().empty() && | 113 | bool can_edit = (!(getChild<LLLineEditor>("gridnick")->getText().empty()) && |
118 | !getChild<LLLineEditor>("loginuri")->getText().empty() && | 114 | !(getChild<LLLineEditor>("gridname")->getText().empty()) && |
119 | getChild<LLLineEditor>("gridnick")->getText() != "<required>" && | 115 | !(getChild<LLLineEditor>("loginuri")->getText().empty())); |
120 | getChild<LLLineEditor>("loginuri")->getText() != "<required>"); | ||
121 | 116 | ||
122 | //getChild<LLLineEditor>("gridname"); | ||
123 | getChild<LLLineEditor>("loginpage")->setEnabled(can_edit); | 117 | getChild<LLLineEditor>("loginpage")->setEnabled(can_edit); |
124 | getChild<LLLineEditor>("helperuri")->setEnabled(can_edit); | 118 | getChild<LLLineEditor>("helperuri")->setEnabled(can_edit); |
125 | getChild<LLLineEditor>("website")->setEnabled(can_edit); | 119 | getChild<LLLineEditor>("website")->setEnabled(can_edit); |
126 | getChild<LLLineEditor>("support")->setEnabled(can_edit); | 120 | getChild<LLLineEditor>("support")->setEnabled(can_edit); |
127 | getChild<LLLineEditor>("register")->setEnabled(can_edit); | 121 | getChild<LLLineEditor>("register")->setEnabled(can_edit); |
128 | getChild<LLLineEditor>("password")->setEnabled(can_edit); | 122 | getChild<LLLineEditor>("password")->setEnabled(can_edit); |
129 | //getChild<LLLineEditor>("first_name")->setEnabled(can_edit); | 123 | getChild<LLLineEditor>("first_name")->setEnabled(can_edit); |
130 | //getChild<LLLineEditor>("last_name")->setEnabled(can_edit); | 124 | getChild<LLLineEditor>("last_name")->setEnabled(can_edit); |
131 | //getChild<LLLineEditor>("avatar_password")->setEnabled(can_edit); | 125 | getChild<LLLineEditor>("username")->setEnabled(can_edit); |
126 | getChild<LLLineEditor>("avatar_password")->setEnabled(can_edit); | ||
132 | getChild<LLLineEditor>("search")->setEnabled(can_edit); | 127 | getChild<LLLineEditor>("search")->setEnabled(can_edit); |
133 | getChild<LLButton>("btn_delete")->setEnabled(can_edit); | 128 | getChild<LLButton>("btn_delete")->setEnabled(can_edit); |
134 | //getChild<LLButton>("btn_add") | ||
135 | //getChild<LLButton>("btn_copy")->setEnabled(can_edit); | 129 | //getChild<LLButton>("btn_copy")->setEnabled(can_edit); |
136 | //getChild<LLButton>("set_default")->setEnabled(can_dit); | ||
137 | getChild<LLButton>("btn_gridinfo")->setEnabled(can_edit); | 130 | getChild<LLButton>("btn_gridinfo")->setEnabled(can_edit); |
138 | getChild<LLButton>("btn_clear")->setEnabled(can_edit); | 131 | getChild<LLButton>("btn_clear")->setEnabled(can_edit); |
139 | //getChild<LLButton>("btn_help_render_compat")->setEnabled(can_edit); | 132 | |
133 | getChild<LLTextBox>("loginpage_text")->setEnabled(can_edit); | ||
134 | getChild<LLTextBox>("helperuri_text")->setEnabled(can_edit); | ||
135 | getChild<LLTextBox>("website_text")->setEnabled(can_edit); | ||
136 | getChild<LLTextBox>("support_text")->setEnabled(can_edit); | ||
137 | getChild<LLTextBox>("register_text")->setEnabled(can_edit); | ||
138 | getChild<LLTextBox>("password_text")->setEnabled(can_edit); | ||
139 | getChild<LLTextBox>("first_name_text")->setEnabled(can_edit); | ||
140 | getChild<LLTextBox>("last_name_text")->setEnabled(can_edit); | ||
141 | getChild<LLTextBox>("username_text")->setEnabled(can_edit); | ||
142 | getChild<LLTextBox>("avatar_password_text")->setEnabled(can_edit); | ||
143 | getChild<LLTextBox>("search_text")->setEnabled(can_edit); | ||
140 | } | 144 | } |
141 | 145 | ||
142 | void FloaterGridManager::refreshGrids() | 146 | void FloaterGridManager::refreshGrids() |
143 | { | 147 | { |
144 | LLScrollListCtrl *grids = FloaterGridManager::getInstance()->getChild<LLScrollListCtrl>("grid_selector"); | 148 | // no need to update the list while editing |
149 | if (FloaterGridManager::getInstance()->getGridState() >= GRID_STATE_NEW) | ||
150 | { | ||
151 | return; | ||
152 | } | ||
153 | |||
154 | LLScrollListCtrl* grid_list = FloaterGridManager::getInstance()->getChild<LLScrollListCtrl>("grid_selector"); | ||
145 | std::string lastSelectedItem; | 155 | std::string lastSelectedItem; |
146 | LLSD element; | 156 | LLSD element; |
147 | 157 | ||
148 | if (grids->getFirstSelected()) | 158 | if (grid_list->getFirstSelected()) |
149 | { | 159 | { |
150 | lastSelectedItem = grids->getFirstSelected()->getValue().asString(); | 160 | // grid NICK |
161 | lastSelectedItem = grid_list->getFirstSelected()->getColumn(0)->getValue().asString(); | ||
151 | } | 162 | } |
152 | 163 | ||
153 | grids->deleteAllItems(); | 164 | grid_list->deleteAllItems(); |
154 | 165 | ||
155 | for (HippoGridManager::GridIterator it = gHippoGridManager->beginGrid(); it != gHippoGridManager->endGrid(); ++it) | 166 | // Grids should really have UUIDs, but we'll use their nicks to keep track of 'em instead |
167 | for (HippoGridManager::GridIterator it = gHippoGridManager->beginGrid(); | ||
168 | it != gHippoGridManager->endGrid(); ++it) | ||
156 | { | 169 | { |
157 | std::string grid_nick = it->second->getGridNick(); | 170 | std::string grid_nick = it->second->getGridNick(); |
158 | // There's no reason why empty grids nicks should be in this list, ugh | 171 | |
159 | if (!grid_nick.empty() && grid_nick != gHippoGridManager->getCurrentGridNick()) | 172 | if (grid_nick.empty()) |
173 | { | ||
174 | // shouldn't ever happen | ||
175 | continue; | ||
176 | } | ||
177 | |||
178 | // Note: default sorted by grid NAME in the XUI | ||
179 | if (grid_nick != gHippoGridManager->getCurrentGridNick()) | ||
160 | { | 180 | { |
161 | element["id"] = grid_nick; | 181 | element["id"] = grid_nick; |
162 | element["columns"][0]["column"] = "grid"; | 182 | element["columns"][0]["column"] = "grid_nick"; |
163 | element["columns"][0]["type"] = "text"; | 183 | element["columns"][0]["type"] = "text"; |
164 | element["columns"][0]["value"] = grid_nick; | 184 | element["columns"][0]["value"] = grid_nick; |
165 | grids->addElement(element, ADD_BOTTOM); | 185 | element["columns"][1]["column"] = "grid_name"; |
186 | element["columns"][1]["type"] = "text"; | ||
187 | element["columns"][1]["value"] = it->second->getGridName(); | ||
188 | |||
189 | grid_list->addElement(element, ADD_BOTTOM); | ||
166 | } | 190 | } |
167 | } | 191 | } |
168 | 192 | ||
@@ -172,368 +196,367 @@ void FloaterGridManager::refreshGrids() | |||
172 | if (!gHippoGridManager->getCurrentGridNick().empty()) | 196 | if (!gHippoGridManager->getCurrentGridNick().empty()) |
173 | { | 197 | { |
174 | element["id"] = gHippoGridManager->getCurrentGridNick(); | 198 | element["id"] = gHippoGridManager->getCurrentGridNick(); |
175 | element["columns"][0]["column"] = "grid"; | 199 | element["columns"][0]["column"] = "grid_nick"; |
176 | element["columns"][0]["type"] = "text"; | 200 | element["columns"][0]["type"] = "text"; |
177 | element["columns"][0]["font-style"] = "BOLD"; | 201 | element["columns"][0]["font-style"] = "BOLD"; |
178 | element["columns"][0]["value"] = gHippoGridManager->getCurrentGridNick(); | 202 | element["columns"][0]["value"] = gHippoGridManager->getCurrentGridNick(); |
179 | grids->addElement(element, ADD_TOP); | 203 | element["columns"][1]["column"] = "grid_name"; |
204 | element["columns"][1]["type"] = "text"; | ||
205 | element["columns"][1]["value"] = gHippoGridManager->getCurrentGrid()->getGridName(); | ||
206 | |||
207 | grid_list->addElement(element, ADD_TOP); | ||
180 | } | 208 | } |
181 | 209 | ||
182 | // Reselect the item if we had one selected | 210 | // Reselect the item if we had one selected |
183 | if (lastSelectedItem.empty()) | 211 | if (lastSelectedItem.empty()) |
184 | { | 212 | { |
185 | grids->selectItemByLabel(gHippoGridManager->getCurrentGridNick()); | 213 | grid_list->selectItemByLabel(gHippoGridManager->getCurrentGridNick()); |
214 | FloaterGridManager::getInstance()->setCurGrid(gHippoGridManager->getCurrentGridNick()); | ||
186 | } | 215 | } |
187 | else | 216 | else |
188 | { | 217 | { |
189 | grids->selectItemByLabel(lastSelectedItem); | 218 | grid_list->selectItemByLabel(lastSelectedItem); |
190 | } | 219 | FloaterGridManager::getInstance()->setCurGrid(lastSelectedItem); |
191 | |||
192 | // TODO: get rid of all this state junk | ||
193 | if ((FloaterGridManager::getInstance()->getState() == ADD_NEW) || (FloaterGridManager::getInstance()->getState() == ADD_COPY)) | ||
194 | { | ||
195 | grids->addElement("<new>", ADD_BOTTOM); | ||
196 | } | 220 | } |
197 | 221 | ||
198 | //if (selectIndex >= 0) | 222 | //if (selectIndex >= 0) |
199 | //{ | 223 | //{ |
200 | // grids->setCurrentByIndex(selectIndex); | 224 | // grid_list->setCurrentByIndex(selectIndex); |
201 | //} | 225 | //} |
202 | //else | 226 | //else |
203 | //{ | 227 | //{ |
204 | // grids->setLabel(LLStringExplicit("")); // LLComboBox::removeall() does not clear the label | 228 | // grid_list->setLabel(LLStringExplicit("")); // LLComboBox::removeall() does not clear the label |
205 | //} | 229 | //} |
206 | |||
207 | // FloaterGridManager::getInstance()->childSetTextArg("default_grid", "[DEFAULT]", (defaultGrid != "")? defaultGrid: " "); | ||
208 | 230 | ||
209 | FloaterGridManager::getInstance()->childSetEnabled("btn_delete", grids->getItemCount() > 0); | 231 | FloaterGridManager::getInstance()->childSetEnabled("btn_delete", grid_list->getItemCount() > 0); |
232 | FloaterGridManager::getInstance()->childSetEnabled("btn_copy", grid_list->getItemCount() > 0); | ||
210 | 233 | ||
211 | FloaterGridManager::getInstance()->childSetEnabled("btn_copy", (FloaterGridManager::getInstance()->getState() == NORMAL) && (grids->getItemCount() > 0)); | 234 | HippoGridInfo *gridInfo = gHippoGridManager->getGrid(FloaterGridManager::getInstance()->mCurGrid); |
212 | // FloaterGridManager::getInstance()->childSetEnabled("set_default", (FloaterGridManager::getInstance()->getState() == NORMAL) && (grids->getItemCount() > 0)); | 235 | if (gridInfo) |
213 | FloaterGridManager::getInstance()->childSetEnabled("gridnick", (FloaterGridManager::getInstance()->getState() == ADD_NEW) || (FloaterGridManager::getInstance()->getState() == ADD_COPY)); | ||
214 | |||
215 | if (FloaterGridManager::getInstance()->getState() == NORMAL) | ||
216 | { | 236 | { |
217 | HippoGridInfo *gridInfo = gHippoGridManager->getGrid(FloaterGridManager::getInstance()->getCurGrid()); | 237 | // Remember: NEVER let users change an existing grid's nick. Bad juju awaits if you do |
218 | if (gridInfo) | 238 | FloaterGridManager::getInstance()->getChild<LLLineEditor>("gridnick")->setText(gridInfo->getGridNick()); |
239 | FloaterGridManager::getInstance()->getChild<LLLineEditor>("gridname")->setText(gridInfo->getGridName()); | ||
240 | |||
241 | FloaterGridManager::getInstance()->getChild<LLLineEditor>("loginuri")->setText(gridInfo->getLoginURI()); | ||
242 | FloaterGridManager::getInstance()->getChild<LLLineEditor>("loginpage")->setText(gridInfo->getLoginPage()); | ||
243 | FloaterGridManager::getInstance()->getChild<LLLineEditor>("helperuri")->setText(gridInfo->getHelperURI()); | ||
244 | FloaterGridManager::getInstance()->getChild<LLLineEditor>("website")->setText(gridInfo->getWebSite()); | ||
245 | FloaterGridManager::getInstance()->getChild<LLLineEditor>("support")->setText(gridInfo->getSupportURL()); | ||
246 | FloaterGridManager::getInstance()->getChild<LLLineEditor>("register")->setText(gridInfo->getRegisterURL()); | ||
247 | FloaterGridManager::getInstance()->getChild<LLLineEditor>("password")->setText(gridInfo->getPasswordURL()); | ||
248 | FloaterGridManager::getInstance()->getChild<LLLineEditor>("first_name")->setText(gridInfo->getFirstName()); | ||
249 | FloaterGridManager::getInstance()->getChild<LLLineEditor>("last_name")->setText(gridInfo->getLastName()); | ||
250 | FloaterGridManager::getInstance()->getChild<LLLineEditor>("username")->setText(gridInfo->getUsername()); | ||
251 | |||
252 | if (gridInfo->getPassword().empty()) | ||
219 | { | 253 | { |
220 | FloaterGridManager::getInstance()->childSetText("gridnick", gridInfo->getGridNick()); | 254 | FloaterGridManager::getInstance()->getChild<LLLineEditor>("avatar_password")->setText(LLStringExplicit("")); |
221 | //FloaterGridManager::getInstance()->childSetText("grid_name", gridInfo->getGridName()); | 255 | } |
222 | FloaterGridManager::getInstance()->childSetText("loginuri", gridInfo->getLoginUri()); | 256 | else |
223 | FloaterGridManager::getInstance()->childSetText("loginpage", gridInfo->getLoginPage()); | ||
224 | FloaterGridManager::getInstance()->childSetText("helperuri", gridInfo->getHelperUri()); | ||
225 | FloaterGridManager::getInstance()->childSetText("website", gridInfo->getWebSite()); | ||
226 | FloaterGridManager::getInstance()->childSetText("support", gridInfo->getSupportUrl()); | ||
227 | FloaterGridManager::getInstance()->childSetText("register", gridInfo->getRegisterUrl()); | ||
228 | FloaterGridManager::getInstance()->childSetText("password", gridInfo->getPasswordUrl()); | ||
229 | |||
230 | // FloaterGridManager::getInstance()->childSetText("first_name", gridInfo->getFirstName()); | ||
231 | // FloaterGridManager::getInstance()->childSetText("last_name", gridInfo->getLastName()); | ||
232 | // if(gridInfo->getAvatarPassword().length() == 32) | ||
233 | // FloaterGridManager::getInstance()->childSetText("avatar_password", std::string(PASSWORD_FILLER)); | ||
234 | // else if(gridInfo->getPasswordUrl().empty()) | ||
235 | // FloaterGridManager::getInstance()->childSetText("avatar_password", std::string("")); | ||
236 | |||
237 | if (gridInfo->getPlatform() == HippoGridInfo::PLATFORM_SECONDLIFE) | ||
238 | { | ||
239 | FloaterGridManager::getInstance()->childSetEnabled("search", false); | ||
240 | FloaterGridManager::getInstance()->childSetText("search", LLStringUtil::null); | ||
241 | //childSetEnabled("render_compat", false); | ||
242 | //childSetValue("render_compat", false); | ||
243 | } | ||
244 | else | ||
245 | { | ||
246 | FloaterGridManager::getInstance()->childSetEnabled("search", true); | ||
247 | FloaterGridManager::getInstance()->childSetText("search", gridInfo->getSearchUrl()); | ||
248 | //childSetEnabled("render_compat", true); | ||
249 | //childSetValue("render_compat", gridInfo->isRenderCompat()); | ||
250 | } | ||
251 | |||
252 | } | ||
253 | else | ||
254 | { | 257 | { |
255 | FloaterGridManager::getInstance()->childSetText("gridnick", LLStringUtil::null); | 258 | FloaterGridManager::getInstance()->getChild<LLLineEditor>("avatar_password")->setText(PASSWORD_FILLER); |
256 | FloaterGridManager::getInstance()->childSetText("gridname", LLStringUtil::null); | ||
257 | FloaterGridManager::getInstance()->childSetText("loginuri", LLStringUtil::null); | ||
258 | FloaterGridManager::getInstance()->childSetText("loginpage", LLStringUtil::null); | ||
259 | FloaterGridManager::getInstance()->childSetText("helperuri", LLStringUtil::null); | ||
260 | FloaterGridManager::getInstance()->childSetText("website", LLStringUtil::null); | ||
261 | FloaterGridManager::getInstance()->childSetText("support", LLStringUtil::null); | ||
262 | FloaterGridManager::getInstance()->childSetText("register", LLStringUtil::null); | ||
263 | FloaterGridManager::getInstance()->childSetText("password", LLStringUtil::null); | ||
264 | // FloaterGridManager::getInstance()->childSetText("first_name", LLStringUtil::null); | ||
265 | // FloaterGridManager::getInstance()->childSetText("last_name", LLStringUtil::null); | ||
266 | // FloaterGridManager::getInstance()->childSetText("avatar_password", LLStringUtil::null); | ||
267 | FloaterGridManager::getInstance()->childSetText("search", LLStringUtil::null); | ||
268 | } | 259 | } |
269 | } | 260 | |
270 | else if (FloaterGridManager::getInstance()->getState() == ADD_NEW) | 261 | FloaterGridManager::getInstance()->getChild<LLLineEditor>("first_name")->setVisible(!gridInfo->isUsernameCompat()); |
271 | { | 262 | FloaterGridManager::getInstance()->getChild<LLTextBox>("first_name_text")->setVisible(!gridInfo->isUsernameCompat()); |
272 | llinfos << "mState == ADD_NEW" << llendl; | 263 | FloaterGridManager::getInstance()->getChild<LLLineEditor>("last_name")->setVisible(!gridInfo->isUsernameCompat()); |
273 | std::string required = "<required>"; | 264 | FloaterGridManager::getInstance()->getChild<LLTextBox>("last_name_text")->setVisible(!gridInfo->isUsernameCompat()); |
274 | FloaterGridManager::getInstance()->childSetText("gridnick", required); | 265 | FloaterGridManager::getInstance()->getChild<LLLineEditor>("username")->setVisible(gridInfo->isUsernameCompat()); |
275 | FloaterGridManager::getInstance()->childSetText("gridname", LLStringUtil::null); | 266 | FloaterGridManager::getInstance()->getChild<LLTextBox>("username_text")->setVisible(gridInfo->isUsernameCompat()); |
276 | FloaterGridManager::getInstance()->childSetText("loginuri", required); | 267 | |
277 | FloaterGridManager::getInstance()->childSetText("loginpage", LLStringUtil::null); | 268 | if (gridInfo->getPlatform() == HippoGridInfo::PLATFORM_SECONDLIFE) |
278 | FloaterGridManager::getInstance()->childSetText("helperuri", LLStringUtil::null); | 269 | { |
279 | FloaterGridManager::getInstance()->childSetText("website", LLStringUtil::null); | 270 | FloaterGridManager::getInstance()->childSetEnabled("search", false); |
280 | FloaterGridManager::getInstance()->childSetText("support", LLStringUtil::null); | 271 | FloaterGridManager::getInstance()->getChild<LLLineEditor>("search")->setText(LLStringExplicit("")); |
281 | FloaterGridManager::getInstance()->childSetText("register", LLStringUtil::null); | 272 | } |
282 | FloaterGridManager::getInstance()->childSetText("password", LLStringUtil::null); | 273 | else |
283 | // FloaterGridManager::getInstance()->childSetText("first_name", LLStringUtil::null); | 274 | { |
284 | // FloaterGridManager::getInstance()->childSetText("last_name", LLStringUtil::null); | 275 | FloaterGridManager::getInstance()->childSetEnabled("search", true); |
285 | // FloaterGridManager::getInstance()->childSetText("avatar_password", LLStringUtil::null); | 276 | FloaterGridManager::getInstance()->getChild<LLLineEditor>("search")->setText(gridInfo->getSearchURL()); |
286 | //childSetEnabled("search", true); | 277 | } |
287 | FloaterGridManager::getInstance()->childSetText("search", LLStringUtil::null); | 278 | } |
288 | } | ||
289 | else if (FloaterGridManager::getInstance()->getState() == ADD_COPY) | ||
290 | { | ||
291 | llinfos << "mState == ADD_COPY" << llendl; | ||
292 | FloaterGridManager::getInstance()->childSetText("gridnick", LLStringExplicit("<required>")); | ||
293 | } | ||
294 | else | 279 | else |
295 | { | 280 | { |
296 | llwarns << "Illegal state " << FloaterGridManager::getInstance()->getState() << llendl; | 281 | // should never happen, but if so default to creating a new entry |
282 | FloaterGridManager::getInstance()->setupNewGridEntry(); | ||
297 | } | 283 | } |
298 | return; | 284 | } |
299 | } | ||
300 | 285 | ||
301 | void FloaterGridManager::update() | 286 | void FloaterGridManager::update() |
302 | { | 287 | { |
303 | setState(NORMAL); | 288 | // no need to update the list until we need to |
304 | setCurGrid(gHippoGridManager->getCurrentGridNick()); | 289 | if (getGridState() >= GRID_STATE_NEW) |
290 | { | ||
291 | return; | ||
292 | } | ||
305 | refreshGrids(); | 293 | refreshGrids(); |
306 | //KOW gHippoLimits->setLimits(); | ||
307 | } | 294 | } |
308 | 295 | ||
309 | void FloaterGridManager::applyChanges() | 296 | void FloaterGridManager::applyChanges() |
310 | { | 297 | { |
311 | HippoGridInfo* gridInfo = gHippoGridManager->getGrid(mCurGrid); | 298 | // When we apply changes, we update based on the state |
312 | if (gridInfo) | 299 | // of the UI. This is ugly and could really be improved |
300 | |||
301 | // Note: nick and loginuri are required | ||
302 | std::string grid_nick = childGetValue("gridnick").asString(); | ||
303 | if (grid_nick.empty()) | ||
304 | { | ||
305 | LLNotifications::instance().add("GridsNoNick"); | ||
306 | return; | ||
307 | } | ||
308 | |||
309 | if (childGetValue("loginuri").asString().empty()) | ||
313 | { | 310 | { |
314 | if (gridInfo->getGridNick() == childGetValue("gridnick").asString()) | 311 | LLSD args; |
312 | args["[NAME]"] = grid_nick; | ||
313 | LLNotifications::instance().add("GridsNoLoginURI", args); | ||
314 | return ; | ||
315 | } | ||
316 | |||
317 | HippoGridInfo* grid = NULL; | ||
318 | |||
319 | // Note: we disable the scroll list during grid creation to prevent conflicts | ||
320 | if (getGridState() == GRID_STATE_NEW || getGridState() == GRID_STATE_COPY) | ||
321 | { | ||
322 | if (gHippoGridManager->hasGridNick(grid_nick)) | ||
315 | { | 323 | { |
316 | gridInfo->setGridName(childGetValue("gridname")); | 324 | LLSD args; |
317 | gridInfo->setLoginUri(childGetValue("loginuri")); | 325 | args["[NAME]"] = grid_nick; |
318 | gridInfo->setLoginPage(childGetValue("loginpage")); | 326 | LLNotifications::instance().add("GridExists", args); |
319 | gridInfo->setHelperUri(childGetValue("helperuri")); | 327 | return; |
320 | gridInfo->setWebSite(childGetValue("website")); | 328 | } |
321 | gridInfo->setSupportUrl(childGetValue("support")); | 329 | else |
322 | gridInfo->setRegisterUrl(childGetValue("register")); | ||
323 | gridInfo->setPasswordUrl(childGetValue("password")); | ||
324 | gridInfo->setSearchUrl(childGetValue("search")); | ||
325 | gridInfo->setRenderCompat(childGetValue("render_compat")); | ||
326 | |||
327 | // gridInfo->setFirstName(childGetValue("first_name")); | ||
328 | // gridInfo->setLastName(childGetValue("last_name")); | ||
329 | // if(childGetValue("avatar_password").asString().empty()) | ||
330 | // gridInfo->setAvatarPassword(std::string("")); | ||
331 | // else if(childGetValue("avatar_password").asString() != std::string(PASSWORD_FILLER)) | ||
332 | // { | ||
333 | // // store account authentication data | ||
334 | // std::string auth_password = childGetValue("avatar_password"); | ||
335 | // std::string hashed_password; | ||
336 | // hashPassword(auth_password, hashed_password); | ||
337 | // gridInfo->setAvatarPassword(hashed_password); | ||
338 | // } | ||
339 | |||
340 | //this bug was a feature -Patrick Sapinski (Friday, August 21, 2009) | ||
341 | //LLPanelLogin::setFields(gridInfo->getFirstName(), gridInfo->getLastName(), | ||
342 | // gridInfo->getAvatarPassword(), true); | ||
343 | } | ||
344 | else | ||
345 | { | 330 | { |
346 | llwarns << "Grid nickname mismatch, ignoring changes." << llendl; | 331 | grid = new HippoGridInfo(grid_nick); |
332 | } | ||
333 | } | ||
334 | else // updating grid | ||
335 | { | ||
336 | if (!gHippoGridManager->hasGridNick(grid_nick)) | ||
337 | { | ||
338 | llwarns << "Can't update info for a grid we don't know, ignoring changes." << llendl; | ||
339 | return; | ||
340 | } | ||
341 | else | ||
342 | { | ||
343 | grid = gHippoGridManager->getGrid(grid_nick); | ||
347 | } | 344 | } |
348 | } | 345 | } |
349 | } | ||
350 | 346 | ||
347 | grid->setGridName(childGetValue("gridname")); | ||
348 | grid->setLoginURI(childGetValue("loginuri")); | ||
349 | grid->setLoginPage(childGetValue("loginpage")); | ||
350 | grid->setHelperURI(childGetValue("helperuri")); | ||
351 | grid->setWebSite(childGetValue("website")); | ||
352 | grid->setSupportURL(childGetValue("support")); | ||
353 | grid->setRegisterURL(childGetValue("register")); | ||
354 | grid->setPasswordURL(childGetValue("password")); | ||
355 | grid->setSearchURL(childGetValue("search")); | ||
356 | grid->setFirstName(childGetValue("first_name")); | ||
357 | grid->setLastName(childGetValue("last_name")); | ||
358 | grid->setUsername(childGetValue("username")); | ||
359 | |||
360 | // don't allow users to set their password as PASSWORD_FILLER | ||
361 | // would be nice to get grid-specific rules on password formatting, too | ||
362 | // passwords are remembered by default when entered in the grid manager (good default?) | ||
363 | std::string password_new = childGetValue("avatar_password").asString(); | ||
364 | std::string password_old = grid->getPassword(); // initialized to "" | ||
365 | if (password_new != PASSWORD_FILLER && password_new != password_old) | ||
366 | { | ||
367 | // store account authentication data | ||
368 | grid->setPassword(password_new); | ||
369 | } | ||
351 | 370 | ||
352 | bool FloaterGridManager::createNewGrid() | 371 | FloaterGridManager::getInstance()->getChild<LLScrollListCtrl>("grid_selector")->setEnabled(true); |
353 | { | 372 | FloaterGridManager::getInstance()->getChild<LLLineEditor>("gridnick")->setEnabled(false); |
354 | // check nickname | 373 | |
355 | std::string gridnick = childGetValue("gridnick"); | 374 | if (getGridState() == GRID_STATE_NEW || getGridState() == GRID_STATE_COPY) |
356 | if (gridnick == "<required>") | ||
357 | { | 375 | { |
358 | gridnick = ""; | 376 | gHippoGridManager->addGrid(grid); |
377 | refreshGrids(); | ||
378 | FloaterGridManager::getInstance()->getChild<LLScrollListCtrl>("grid_selector")->selectByValue(LLSD(grid_nick)); | ||
359 | } | 379 | } |
360 | 380 | ||
361 | if (gridnick.empty()) | 381 | // just in case |
382 | gHippoGridManager->setCurrentGrid(grid_nick); | ||
383 | |||
384 | // should this be settable? | ||
385 | if (grid->isUsernameCompat()) | ||
362 | { | 386 | { |
363 | LLNotifications::instance().add("GridsNoNick"); | 387 | LLPanelLogin::setFields(grid->getUsername(), grid->getPassword()); |
364 | return false; | ||
365 | } | 388 | } |
366 | 389 | else | |
367 | if (gHippoGridManager->getGrid(gridnick)) | ||
368 | { | 390 | { |
369 | LLSD args; | 391 | LLPanelLogin::setFields(grid->getFirstName(), grid->getLastName(), grid->getPassword()); |
370 | args["[NAME]"] = gridnick; | ||
371 | LLNotifications::instance().add("GridExists", args); | ||
372 | return false; | ||
373 | } | 392 | } |
374 | 393 | ||
375 | // check login URI | 394 | if (FloaterGridDefault::instanceVisible()) |
376 | std::string loginuri = childGetValue("loginuri"); | ||
377 | if ((loginuri.empty()) || (loginuri == "<required>")) | ||
378 | { | 395 | { |
379 | LLSD args; | 396 | FloaterGridDefault::getInstance()->refreshGridList(); |
380 | args["[NAME]"] = gridnick; | ||
381 | LLNotifications::instance().add("GridsNoLoginUri", args); | ||
382 | return false; | ||
383 | } | 397 | } |
384 | 398 | ||
385 | // create new grid | 399 | setGridState(GRID_STATE_NORMAL); |
386 | HippoGridInfo* grid = new HippoGridInfo(gridnick); | ||
387 | grid->setGridName(childGetValue("gridname")); | ||
388 | grid->setLoginUri(loginuri); | ||
389 | grid->setLoginPage(childGetValue("loginpage")); | ||
390 | grid->setHelperUri(childGetValue("helperuri")); | ||
391 | grid->setWebSite(childGetValue("website")); | ||
392 | grid->setSupportUrl(childGetValue("support")); | ||
393 | grid->setRegisterUrl(childGetValue("register")); | ||
394 | grid->setPasswordUrl(childGetValue("password")); | ||
395 | grid->setSearchUrl(childGetValue("search")); | ||
396 | grid->setRenderCompat(childGetValue("render_compat")); | ||
397 | gHippoGridManager->addGrid(grid); | ||
398 | |||
399 | // grid->setFirstName(childGetValue("first_name")); | ||
400 | // grid->setLastName(childGetValue("last_name")); | ||
401 | // if(childGetValue("avatar_password").asString().empty()) | ||
402 | // grid->setAvatarPassword(std::string("")); | ||
403 | // else | ||
404 | // { | ||
405 | // std::string hashed_password; | ||
406 | // hashPassword(childGetValue("avatar_password"), hashed_password); | ||
407 | // grid->setAvatarPassword(hashed_password); | ||
408 | // } | ||
409 | |||
410 | setCurGrid(gridnick); | ||
411 | return true; | ||
412 | } | 400 | } |
413 | 401 | ||
414 | void FloaterGridManager::retrieveGridInfo() | 402 | void FloaterGridManager::clearGridInfo(bool clear_all) |
415 | { | 403 | { |
416 | std::string loginuri = childGetValue("loginuri"); | 404 | if (clear_all) |
417 | if ((loginuri == "") || (loginuri == "<required>")) | 405 | { |
418 | { | 406 | getChild<LLLineEditor>("gridnick")->clear(); |
419 | LLNotifications::instance().add("GridInfoNoLoginUri"); | 407 | getChild<LLLineEditor>("gridname")->clear(); |
420 | return; | 408 | getChild<LLLineEditor>("loginuri")->clear(); |
409 | getChild<LLLineEditor>("password")->clear(); | ||
410 | getChild<LLLineEditor>("first_name")->clear(); | ||
411 | getChild<LLLineEditor>("last_name")->clear(); | ||
412 | getChild<LLLineEditor>("username")->clear(); | ||
413 | getChild<LLLineEditor>("avatar_password")->clear(); | ||
421 | } | 414 | } |
422 | 415 | ||
423 | HippoGridInfo* grid = 0; | 416 | getChild<LLLineEditor>("loginpage")->clear(); |
424 | bool cleanupGrid = false; | 417 | getChild<LLLineEditor>("helperuri")->clear(); |
418 | getChild<LLLineEditor>("website")->clear(); | ||
419 | getChild<LLLineEditor>("support")->clear(); | ||
420 | getChild<LLLineEditor>("register")->clear(); | ||
421 | getChild<LLLineEditor>("search")->clear(); | ||
422 | |||
423 | getChild<LLButton>("btn_gridinfo")->setEnabled(TRUE); | ||
424 | } | ||
425 | 425 | ||
426 | if (mState == NORMAL) | 426 | void FloaterGridManager::createNewGrid() |
427 | { | ||
428 | // warn us if anything's dirty | ||
429 | if (getChild<LLLineEditor>("gridnick")->isDirty() || | ||
430 | getChild<LLLineEditor>("gridname")->isDirty() || | ||
431 | getChild<LLLineEditor>("loginuri")->isDirty() || | ||
432 | getChild<LLLineEditor>("loginpage")->isDirty() || | ||
433 | getChild<LLLineEditor>("helperuri")->isDirty() || | ||
434 | getChild<LLLineEditor>("website")->isDirty() || | ||
435 | getChild<LLLineEditor>("support")->isDirty() || | ||
436 | getChild<LLLineEditor>("register")->isDirty() || | ||
437 | getChild<LLLineEditor>("password")->isDirty() || | ||
438 | getChild<LLLineEditor>("first_name")->isDirty() || | ||
439 | getChild<LLLineEditor>("last_name")->isDirty() || | ||
440 | getChild<LLLineEditor>("username")->isDirty() || | ||
441 | getChild<LLLineEditor>("avatar_password")->isDirty() || | ||
442 | getChild<LLLineEditor>("search")->isDirty()) | ||
443 | { | ||
444 | LLNotifications::instance().add("GridInfoDirty", LLSD(), LLSD(), newGridCreationCallback); | ||
445 | } | ||
446 | else | ||
427 | { | 447 | { |
428 | grid = gHippoGridManager->getGrid(mCurGrid); | 448 | // This clears the form. Until an entry is entered, we keep the UI open and blank |
429 | } | 449 | // This is clearly undesirable if you want to cancel, but redoing this window is |
430 | else if ((mState == ADD_NEW) || (mState == ADD_COPY)) | 450 | // a WIP -- MC |
451 | setupNewGridEntry(); | ||
452 | } | ||
453 | } | ||
454 | |||
455 | void FloaterGridManager::setupNewGridEntry() | ||
456 | { | ||
457 | // disable scroll list until we can use it again | ||
458 | getChild<LLScrollListCtrl>("grid_selector")->setEnabled(false); | ||
459 | |||
460 | getChild<LLLineEditor>("gridnick")->setEnabled(true); | ||
461 | clearGridInfo(true); | ||
462 | |||
463 | setGridState(GRID_STATE_NEW); | ||
464 | } | ||
465 | |||
466 | bool FloaterGridManager::newGridCreationCallback(const LLSD& notification, const LLSD& response) | ||
467 | { | ||
468 | S32 option = LLNotification::getSelectedOption(notification, response); | ||
469 | if (option == 0) | ||
431 | { | 470 | { |
432 | grid = new HippoGridInfo(""); | 471 | FloaterGridManager::getInstance()->setupNewGridEntry(); |
433 | cleanupGrid = true; | 472 | } |
434 | } | 473 | return false; |
435 | else | 474 | } |
475 | |||
476 | void FloaterGridManager::setupCopyGridEntry() | ||
477 | { | ||
478 | // disable scroll list until we can use it again | ||
479 | getChild<LLScrollListCtrl>("grid_selector")->setEnabled(false); | ||
480 | |||
481 | getChild<LLLineEditor>("gridnick")->setEnabled(true); | ||
482 | getChild<LLLineEditor>("gridnick")->clear(); | ||
483 | getChild<LLLineEditor>("gridname")->clear(); | ||
484 | getChild<LLLineEditor>("loginuri")->clear(); | ||
485 | |||
486 | setGridState(GRID_STATE_COPY); | ||
487 | } | ||
488 | |||
489 | void FloaterGridManager::retrieveGridInfo() | ||
490 | { | ||
491 | std::string loginuri = childGetValue("loginuri"); | ||
492 | if (loginuri.empty()) | ||
436 | { | 493 | { |
437 | llerrs << "Illegal state " << mState << '.' << llendl; | 494 | LLNotifications::instance().add("GridInfoNoLoginURI"); |
438 | return; | 495 | return; |
439 | } | 496 | } |
497 | |||
498 | // this can be clicked even for grids we haven't saved yet | ||
499 | HippoGridInfo* grid = gHippoGridManager->getGrid(childGetValue("gridnick")); | ||
500 | bool del_temp_grid = false; | ||
440 | if (!grid) | 501 | if (!grid) |
441 | { | 502 | { |
442 | llerrs << "Internal error retrieving grid info." << llendl; | 503 | // easier than fixing the hippo grid manager |
443 | return; | 504 | HippoGridInfo* temp = new HippoGridInfo(""); |
505 | if (temp) | ||
506 | { | ||
507 | del_temp_grid = true; | ||
508 | grid = temp; | ||
509 | } | ||
444 | } | 510 | } |
445 | 511 | ||
446 | grid->setLoginUri(loginuri); | 512 | grid->setLoginURI(loginuri); |
447 | if (grid->retrieveGridInfo()) | 513 | if (grid->retrieveGridInfo()) |
448 | { | 514 | { |
449 | if (grid->getGridNick() != "") childSetText("gridnick", grid->getGridNick()); | 515 | // just in case |
450 | if (grid->getGridName() != "") childSetText("gridname", grid->getGridName()); | 516 | if (!(grid->getGridNick().empty())) |
451 | if (grid->getLoginUri() != "") childSetText("loginuri", grid->getLoginUri()); | 517 | getChild<LLLineEditor>("gridnick")->setText(grid->getGridNick()); |
452 | if (grid->getLoginPage() != "") childSetText("loginpage", grid->getLoginPage()); | 518 | if (!(grid->getLoginURI().empty())) |
453 | if (grid->getHelperUri() != "") childSetText("helperuri", grid->getHelperUri()); | 519 | getChild<LLLineEditor>("loginuri")->setText(grid->getLoginURI()); |
454 | if (grid->getWebSite() != "") childSetText("website", grid->getWebSite()); | 520 | getChild<LLLineEditor>("gridname")->setText(grid->getGridName()); |
455 | if (grid->getSupportUrl() != "") childSetText("support", grid->getSupportUrl()); | 521 | getChild<LLLineEditor>("loginpage")->setText(grid->getLoginPage()); |
456 | if (grid->getRegisterUrl() != "") childSetText("register", grid->getRegisterUrl()); | 522 | getChild<LLLineEditor>("helperuri")->setText(grid->getHelperURI()); |
457 | if (grid->getPasswordUrl() != "") childSetText("password", grid->getPasswordUrl()); | 523 | getChild<LLLineEditor>("website")->setText(grid->getWebSite()); |
458 | if (grid->getSearchUrl() != "") childSetText("search", grid->getSearchUrl()); | 524 | getChild<LLLineEditor>("support")->setText(grid->getSupportURL()); |
459 | } | 525 | getChild<LLLineEditor>("register")->setText(grid->getRegisterURL()); |
460 | else | 526 | getChild<LLLineEditor>("password")->setText(grid->getPasswordURL()); |
527 | getChild<LLLineEditor>("search")->setText(grid->getSearchURL()); | ||
528 | } | ||
529 | else | ||
461 | { | 530 | { |
462 | LLNotifications::instance().add("GridInfoError"); | 531 | LLNotifications::instance().add("GridInfoError"); |
463 | } | 532 | } |
464 | 533 | ||
465 | if (cleanupGrid) delete grid; | 534 | if (del_temp_grid) |
535 | { | ||
536 | delete grid; | ||
537 | } | ||
466 | } | 538 | } |
467 | 539 | ||
468 | void FloaterGridManager::apply() | 540 | void FloaterGridManager::apply() |
469 | { | 541 | { |
470 | if (mState == NORMAL) | 542 | // where all the magic happens! |
471 | { | 543 | applyChanges(); |
472 | applyChanges(); | 544 | |
473 | } | ||
474 | else if ((mState == ADD_NEW) || (mState == ADD_COPY)) | ||
475 | { | ||
476 | if (!createNewGrid()) return; | ||
477 | } | ||
478 | else | ||
479 | { | ||
480 | llwarns << "Illegal state " << mState << '.' << llendl; | ||
481 | return; | ||
482 | } | ||
483 | //gHippoGridManager->setCurrentGrid(mCurGrid); | ||
484 | //gHippoGridManager->setDefaultGrid(mCurGrid); | ||
485 | gHippoGridManager->saveFile(); | 545 | gHippoGridManager->saveFile(); |
486 | LLPanelLogin::addServer(LLViewerLogin::getInstance()->getGridLabel()); | 546 | LLPanelLogin::addServer(LLViewerLogin::getInstance()->getGridLabel()); |
547 | LLPanelLogin::loadLoginForm(); | ||
548 | LLPanelLogin::loadLoginPage(); | ||
487 | } | 549 | } |
488 | 550 | ||
489 | //void FloaterGridManager::setDefault() | 551 | // static |
490 | //{ | ||
491 | // if (mState == NORMAL) | ||
492 | // { | ||
493 | // applyChanges(); | ||
494 | // } | ||
495 | // else if ((mState == ADD_NEW) || (mState == ADD_COPY)) | ||
496 | // { | ||
497 | // if (!createNewGrid()) return; | ||
498 | // } | ||
499 | // else | ||
500 | // { | ||
501 | // llwarns << "Illegal state " << mState << '.' << llendl; | ||
502 | // return; | ||
503 | // } | ||
504 | // gHippoGridManager->setCurrentGrid(mCurGrid); | ||
505 | // gHippoGridManager->setDefaultGrid(mCurGrid); | ||
506 | // gHippoGridManager->saveFile(); | ||
507 | // LLPanelLogin::addServer(LLViewerLogin::getInstance()->getGridLabel()); | ||
508 | //} | ||
509 | |||
510 | void FloaterGridManager::onSelectGrid(LLUICtrl* ctrl, void* data) | 552 | void FloaterGridManager::onSelectGrid(LLUICtrl* ctrl, void* data) |
511 | { | 553 | { |
512 | FloaterGridManager* self = (FloaterGridManager*)data; | 554 | FloaterGridManager* self = (FloaterGridManager*)data; |
513 | if (self->getState() == NORMAL) | 555 | if (self) |
514 | { | ||
515 | self->applyChanges(); | ||
516 | } | ||
517 | else if ((self->getState() == ADD_NEW) || (self->getState() == ADD_COPY)) | ||
518 | { | 556 | { |
519 | if (self->createNewGrid()) | 557 | self->setCurGrid(ctrl->getValue().asString()); |
520 | { | 558 | self->refreshGrids(); |
521 | self->setState(NORMAL); | ||
522 | } | ||
523 | else | ||
524 | { | ||
525 | //LLScrollListCtrl *grids = self->getChild<LLScrollListCtrl>("grid_selector"); | ||
526 | //grids->setCurrentByIndex(grids->getItemCount() - 1); | ||
527 | return; | ||
528 | } | ||
529 | } | ||
530 | else | ||
531 | { | ||
532 | llwarns << "Illegal state " << self->getState() << llendl; | ||
533 | return; | ||
534 | } | 559 | } |
535 | self->setCurGrid(ctrl->getValue().asString()); | ||
536 | self->refreshGrids(); | ||
537 | } | 560 | } |
538 | 561 | ||
539 | //static | 562 | //static |
@@ -541,7 +564,7 @@ void FloaterGridManager::onClickDelete(void* data) | |||
541 | { | 564 | { |
542 | //llinfos << "onClickDelete" << llendl; | 565 | //llinfos << "onClickDelete" << llendl; |
543 | FloaterGridManager* self = (FloaterGridManager*)data; | 566 | FloaterGridManager* self = (FloaterGridManager*)data; |
544 | if (self->getState() == NORMAL) | 567 | if (self) |
545 | { | 568 | { |
546 | gHippoGridManager->deleteGrid(self->getCurGrid()); | 569 | gHippoGridManager->deleteGrid(self->getCurGrid()); |
547 | } | 570 | } |
@@ -553,71 +576,80 @@ void FloaterGridManager::onClickAdd(void* data) | |||
553 | { | 576 | { |
554 | //llinfos << "onClickAdd" << llendl; | 577 | //llinfos << "onClickAdd" << llendl; |
555 | FloaterGridManager* self = (FloaterGridManager*)data; | 578 | FloaterGridManager* self = (FloaterGridManager*)data; |
556 | self->setState(ADD_NEW); | 579 | if (self) |
557 | self->refreshGrids(); | 580 | { |
581 | self->createNewGrid(); | ||
582 | } | ||
558 | } | 583 | } |
559 | 584 | ||
560 | 585 | ||
561 | //static | 586 | //static |
562 | void FloaterGridManager::onClickCopy(void* data) | 587 | void FloaterGridManager::onClickCopy(void* data) |
563 | { | 588 | { |
564 | //llinfos << "onClickCopy" << llendl; | ||
565 | FloaterGridManager* self = (FloaterGridManager*)data; | 589 | FloaterGridManager* self = (FloaterGridManager*)data; |
566 | self->setState(ADD_COPY); | 590 | if (self) |
567 | self->refreshGrids(); | 591 | { |
592 | self->setupCopyGridEntry(); | ||
593 | } | ||
568 | } | 594 | } |
569 | 595 | ||
570 | // static | 596 | // static |
571 | void FloaterGridManager::onClickOk(void* data) | 597 | void FloaterGridManager::onClickOk(void* data) |
572 | { | 598 | { |
573 | FloaterGridManager::getInstance()->apply(); | 599 | FloaterGridManager* self = (FloaterGridManager*)data; |
574 | FloaterGridManager::getInstance()->close(); | 600 | if (self) |
601 | { | ||
602 | self->apply(); | ||
603 | self->close(); | ||
604 | } | ||
575 | } | 605 | } |
576 | 606 | ||
577 | //static | 607 | //static |
578 | void FloaterGridManager::onClickApply(void* data) | 608 | void FloaterGridManager::onClickApply(void* data) |
579 | { | 609 | { |
580 | FloaterGridManager::getInstance()->apply(); | 610 | FloaterGridManager* self = (FloaterGridManager*)data; |
611 | if (self) | ||
612 | { | ||
613 | self->apply(); | ||
614 | } | ||
581 | refreshGrids(); | 615 | refreshGrids(); |
582 | } | 616 | } |
583 | 617 | ||
584 | // static | 618 | // static |
585 | void FloaterGridManager::onClickClear(void* data) | 619 | void FloaterGridManager::onClickClear(void* data) |
586 | { | 620 | { |
587 | FloaterGridManager::getInstance()->clearInfo(); | 621 | FloaterGridManager* self = (FloaterGridManager*)data; |
622 | if (self) | ||
623 | { | ||
624 | self->clearGridInfo(false); | ||
625 | } | ||
588 | } | 626 | } |
589 | 627 | ||
590 | //static | 628 | //static |
591 | //void FloaterGridManager::onClickDefault(void* data) | ||
592 | //{ | ||
593 | // FloaterGridManager::getInstance()->setDefault(); | ||
594 | // FloaterGridManager::getInstance()->refreshGrids(); | ||
595 | //} | ||
596 | |||
597 | //static | ||
598 | void FloaterGridManager::onClickGridInfo(void* data) | 629 | void FloaterGridManager::onClickGridInfo(void* data) |
599 | { | 630 | { |
600 | //HippoPanelGrids* self = (HippoPanelGrids*)data; | 631 | FloaterGridManager* self = (FloaterGridManager*)data; |
601 | FloaterGridManager::getInstance()->retrieveGridInfo(); | 632 | if (self) |
633 | { | ||
634 | self->retrieveGridInfo(); | ||
635 | } | ||
602 | } | 636 | } |
603 | 637 | ||
604 | //static | 638 | //static |
605 | void FloaterGridManager::onClickCancel(void* data) | 639 | void FloaterGridManager::onClickCancel(void* data) |
606 | { | 640 | { |
607 | FloaterGridManager::getInstance()->close(); | 641 | FloaterGridManager* self = (FloaterGridManager*)data; |
642 | if (self) | ||
643 | { | ||
644 | self->close(); | ||
645 | } | ||
608 | } | 646 | } |
609 | 647 | ||
610 | //void FloaterGridManager::setAlwaysRefresh(bool refresh) | 648 | //void FloaterGridManager::refreshLocation(bool force_visible) |
611 | //{ | ||
612 | // // wargames 2: dead code, LLPanelLogin compatibility | ||
613 | // return; | ||
614 | //} | ||
615 | |||
616 | //void FloaterGridManager::refreshLocation( bool force_visible ) | ||
617 | //{ | 649 | //{ |
618 | // llinfos << "refreshLocation called" << llendl; | 650 | // llinfos << "refreshLocation called" << llendl; |
619 | // | 651 | // |
620 | // if (!FloaterGridManager::getInstance()) | 652 | // if (!FloaterGridManager::instanceVisible()) |
621 | // { | 653 | // { |
622 | // return; | 654 | // return; |
623 | // } | 655 | // } |
@@ -645,41 +677,10 @@ void FloaterGridManager::onClickCancel(void* data) | |||
645 | //FloaterGridManager::getInstance()->childSetVisible("server_combo", TRUE); | 677 | //FloaterGridManager::getInstance()->childSetVisible("server_combo", TRUE); |
646 | //} | 678 | //} |
647 | 679 | ||
648 | //void FloaterGridManager::setFocus(BOOL b) | ||
649 | //{ | ||
650 | // if(b != hasFocus()) | ||
651 | // { | ||
652 | // if(b) | ||
653 | // { | ||
654 | // FloaterGridManager::giveFocus(); | ||
655 | // } | ||
656 | // else | ||
657 | // { | ||
658 | // LLPanel::setFocus(b); | ||
659 | // } | ||
660 | // } | ||
661 | //} | ||
662 | // | ||
663 | //void FloaterGridManager::giveFocus() | ||
664 | //{ | ||
665 | // LLScrollListCtrl *combo = NULL; | ||
666 | // | ||
667 | // if (!FloaterGridManager::getInstance()) | ||
668 | // { | ||
669 | // llinfos << "giveFocus has no FloaterGridManager instance. FloaterGridManager::getInstance()=" << FloaterGridManager::getInstance() << llendl; | ||
670 | // return; | ||
671 | // } | ||
672 | // | ||
673 | // // for our combo box approach, selecting the combo box is almost always | ||
674 | // // the right thing to do on the floater receiving focus | ||
675 | // combo = FloaterGridManager::getInstance()->getChild<LLScrollListCtrl>("grid_selector"); | ||
676 | // combo->setFocus(TRUE); | ||
677 | //} | ||
678 | |||
679 | BOOL FloaterGridManager::isGridComboDirty() | 680 | BOOL FloaterGridManager::isGridComboDirty() |
680 | { | 681 | { |
681 | BOOL user_picked = FALSE; | 682 | BOOL user_picked = FALSE; |
682 | if (!FloaterGridManager::getInstance()) | 683 | if (!FloaterGridManager::instanceVisible()) |
683 | { | 684 | { |
684 | llwarns << "Attempted getServer with no login view shown" << llendl; | 685 | llwarns << "Attempted getServer with no login view shown" << llendl; |
685 | } | 686 | } |
@@ -691,78 +692,14 @@ BOOL FloaterGridManager::isGridComboDirty() | |||
691 | return user_picked; | 692 | return user_picked; |
692 | } | 693 | } |
693 | 694 | ||
694 | void FloaterGridManager::getLocation(std::string &location) | 695 | //void FloaterGridManager::getLocation(std::string& location) |
695 | { | ||
696 | if (!FloaterGridManager::getInstance()) | ||
697 | { | ||
698 | llwarns << "Attempted getLocation with no login view shown" << llendl; | ||
699 | return; | ||
700 | } | ||
701 | |||
702 | LLComboBox* combo = FloaterGridManager::getInstance()->getChild<LLComboBox>("start_location_combo"); | ||
703 | location = combo->getValue().asString(); | ||
704 | } | ||
705 | |||
706 | std::string& FloaterGridManager::getPassword() | ||
707 | { | ||
708 | return mMungedPassword; | ||
709 | } | ||
710 | |||
711 | void FloaterGridManager::setPassword(std::string &password) | ||
712 | { | ||
713 | mMungedPassword = password; | ||
714 | } | ||
715 | |||
716 | bool FloaterGridManager::isSamePassword(std::string &password) | ||
717 | { | ||
718 | return mMungedPassword == password; | ||
719 | } | ||
720 | |||
721 | //void FloaterGridManager::addServer(const std::string& server, S32 domain_name) | ||
722 | //{ | 696 | //{ |
723 | // if (!FloaterGridManager::getInstance()) | 697 | // if (!FloaterGridManager::instanceVisible()) |
724 | // { | 698 | // { |
725 | // llwarns << "Attempted addServer with no login view shown" << llendl; | 699 | // llwarns << "Attempted getLocation with no login view shown" << llendl; |
726 | // return; | 700 | // return; |
727 | // } | 701 | // } |
728 | // | 702 | // |
729 | // /*LLComboBox* combo = FloaterGridManager::getInstance()->getChild<LLComboBox>("server_combo"); | 703 | // LLComboBox* combo = FloaterGridManager::getInstance()->getChild<LLComboBox>("start_location_combo"); |
730 | // combo->add(server, LLSD(domain_name) ); | 704 | // location = combo->getValue().asString(); |
731 | // combo->setCurrentByIndex(0);*/ | ||
732 | //} | 705 | //} |
733 | |||
734 | //void FloaterGridManager::cancel_old() | ||
735 | //{ | ||
736 | // if (!FloaterGridManager::getInstance()) | ||
737 | // { | ||
738 | // return; | ||
739 | // } | ||
740 | // | ||
741 | // if (FloaterGridManager::getInstance()->sIsInitialLogin) | ||
742 | // { | ||
743 | // // send a callback that indicates we're quitting or closing | ||
744 | // if (FloaterGridManager::getInstance()->mCallback) | ||
745 | // FloaterGridManager::getInstance()->mCallback(LOGIN_OPTION_QUIT, FloaterGridManager::getInstance()->mCallbackData); | ||
746 | // return; | ||
747 | // } | ||
748 | // | ||
749 | // FloaterGridManager::getInstance()->close(); | ||
750 | //} | ||
751 | |||
752 | void FloaterGridManager::hashPassword(const std::string& password, std::string& hashedPassword) | ||
753 | { | ||
754 | // Max "actual" password length is 16 characters. | ||
755 | // Hex digests are always 32 characters. | ||
756 | if (password.length() == 32) | ||
757 | { | ||
758 | hashedPassword = password; | ||
759 | } | ||
760 | else | ||
761 | { | ||
762 | // this is a normal text password | ||
763 | LLMD5 pass((unsigned char *)password.c_str()); | ||
764 | char munged_password[MD5HEX_STR_SIZE]; | ||
765 | pass.hex_digest(munged_password); | ||
766 | hashedPassword = munged_password; | ||
767 | } | ||
768 | } | ||
diff --git a/linden/indra/newview/floatergridmanager.h b/linden/indra/newview/floatergridmanager.h index 55517f5..985a905 100644 --- a/linden/indra/newview/floatergridmanager.h +++ b/linden/indra/newview/floatergridmanager.h | |||
@@ -1,22 +1,39 @@ | |||
1 | /* | 1 | /** |
2 | * floatergridmanager.h | 2 | * @file floatergridmanager.h |
3 | * This is Meerkats grid manager. | 3 | * @brief UI for managing grid information |
4 | * -Patrick Sapinski (Monday, August 17, 2009) | 4 | * |
5 | * | 5 | * $LicenseInfo:firstyear=2011&license=viewergpl$ |
6 | * Modified by McCabe Maxsted for Imprudence | 6 | * |
7 | */ | 7 | * Copyright (c) 2011, McCabe Maxsted |
8 | * based on Meerkat's grid manager by Patrick Sapinski | ||
9 | * | ||
10 | * Imprudence Viewer Source Code | ||
11 | * The source code in this file ("Source Code") is provided to you | ||
12 | * under the terms of the GNU General Public License, version 2.0 | ||
13 | * ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in | ||
14 | * this distribution, or online at | ||
15 | * http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
16 | * | ||
17 | * There are special exceptions to the terms and conditions of the GPL as | ||
18 | * it is applied to this Source Code. View the full text of the exception | ||
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | ||
22 | * By copying, modifying or distributing this software, you acknowledge | ||
23 | * that you have read and understood your obligations described above, | ||
24 | * and agree to abide by those obligations. | ||
25 | * | ||
26 | * ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO | ||
27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
28 | * COMPLETENESS OR PERFORMANCE. | ||
29 | * $/LicenseInfo$ | ||
30 | */ | ||
8 | 31 | ||
9 | #ifndef PL_floaterlogin_H | 32 | #ifndef PL_floaterlogin_H |
10 | #define PL_floaterlogin_H | 33 | #define PL_floaterlogin_H |
11 | 34 | ||
12 | #define LOGIN_OPTION_CONNECT 0 | ||
13 | #define LOGIN_OPTION_QUIT 1 | ||
14 | |||
15 | #include "llfloater.h" | 35 | #include "llfloater.h" |
16 | 36 | ||
17 | class LoginController; | ||
18 | class AuthenticationModel; | ||
19 | |||
20 | class FloaterGridManager : public LLFloater, public LLFloaterSingleton<FloaterGridManager> | 37 | class FloaterGridManager : public LLFloater, public LLFloaterSingleton<FloaterGridManager> |
21 | { | 38 | { |
22 | public: | 39 | public: |
@@ -27,57 +44,40 @@ public: | |||
27 | 44 | ||
28 | static void refreshGrids(); | 45 | static void refreshGrids(); |
29 | void apply(); | 46 | void apply(); |
30 | //void setDefault(); | ||
31 | void cancel(); | 47 | void cancel(); |
32 | 48 | ||
33 | void clearInfo(); | ||
34 | |||
35 | virtual void draw(); | 49 | virtual void draw(); |
36 | 50 | ||
37 | void refresh(); | 51 | void refresh(); |
38 | 52 | ||
39 | // new-style login methods | 53 | // clears either the loginuri fetched info or all the info in the grid manager |
40 | virtual std::string& getPassword(); | 54 | void clearGridInfo(bool clear_all); |
41 | virtual void setPassword(std::string &password); | ||
42 | virtual bool isSamePassword(std::string &password); | ||
43 | static void getFields(std::string &loginname, std::string &password, | ||
44 | BOOL &remember); | ||
45 | static void setFields(const std::string &loginname, const std::string &password, | ||
46 | BOOL remember); | ||
47 | 55 | ||
48 | // LLLoginPanel compatibility | 56 | //static void getLocation(std::string &location); |
49 | /*static void setAlwaysRefresh(bool refresh); | 57 | //void refreshLocation(bool force_visible) |
50 | static void refreshLocation(bool force_visible); | ||
51 | virtual void setFocus(BOOL b); | ||
52 | static void giveFocus();*/ | ||
53 | static void getLocation(std::string &location); | ||
54 | static BOOL isGridComboDirty(); | 58 | static BOOL isGridComboDirty(); |
55 | //static void addServer(const std::string& server, S32 domain_name); | 59 | |
56 | static void hashPassword(const std::string& password, std::string& hashedPassword); | ||
57 | protected: | ||
58 | static bool sIsInitialLogin; | ||
59 | static std::string sGrid; | ||
60 | private: | 60 | private: |
61 | enum State | 61 | |
62 | enum EGridState | ||
62 | { | 63 | { |
63 | NORMAL, | 64 | GRID_STATE_NORMAL, |
64 | ADD_NEW, | 65 | GRID_STATE_NEW, |
65 | ADD_COPY | 66 | GRID_STATE_COPY |
66 | }; | 67 | }; |
67 | 68 | ||
68 | State mState; | 69 | void setGridState(EGridState state) { mState = state; } |
69 | void setState(const State& state) { mState = state; } | 70 | EGridState getGridState() { return mState; } |
70 | State getState() { return mState; } | 71 | EGridState mState; |
71 | |||
72 | std::string mCurGrid; | 72 | std::string mCurGrid; |
73 | void setCurGrid(const std::string& grid) { mCurGrid = grid; } | ||
74 | std::string getCurGrid() { return mCurGrid; } | ||
75 | 73 | ||
76 | std::string mIncomingPassword; | 74 | void setCurGrid(std::string grid) { mCurGrid = grid; } |
77 | std::string mMungedPassword; | 75 | std::string getCurGrid() { return mCurGrid; } |
78 | 76 | ||
79 | void applyChanges(); | 77 | void applyChanges(); |
80 | bool createNewGrid(); | 78 | void createNewGrid(); |
79 | void setupNewGridEntry(); | ||
80 | void setupCopyGridEntry(); | ||
81 | void update(); | 81 | void update(); |
82 | void retrieveGridInfo(); | 82 | void retrieveGridInfo(); |
83 | 83 | ||
@@ -87,13 +87,11 @@ private: | |||
87 | static void onClickCopy(void* data); | 87 | static void onClickCopy(void* data); |
88 | static void onClickOk(void* data); | 88 | static void onClickOk(void* data); |
89 | static void onClickApply(void* data); | 89 | static void onClickApply(void* data); |
90 | static void onClickDefault(void* data); | ||
91 | static void onClickGridInfo(void* data); | 90 | static void onClickGridInfo(void* data); |
92 | static void onClickCancel(void* data); | 91 | static void onClickCancel(void* data); |
93 | static void onClickClear(void* data); | 92 | static void onClickClear(void* data); |
94 | 93 | ||
95 | static LoginController* sController; | 94 | static bool newGridCreationCallback(const LLSD& notification, const LLSD& response); |
96 | static AuthenticationModel* sModel; | ||
97 | }; | 95 | }; |
98 | 96 | ||
99 | #endif // PL_floaterlogin_H | 97 | #endif // PL_floaterlogin_H |
diff --git a/linden/indra/newview/floatervoicelicense.cpp b/linden/indra/newview/floatervoicelicense.cpp index 5397590..d422f7a 100644 --- a/linden/indra/newview/floatervoicelicense.cpp +++ b/linden/indra/newview/floatervoicelicense.cpp | |||
@@ -128,8 +128,16 @@ BOOL FloaterVoiceLicense::postBuild() | |||
128 | // start to observe it so we see navigate complete events | 128 | // start to observe it so we see navigate complete events |
129 | web_browser->addObserver( this ); | 129 | web_browser->addObserver( this ); |
130 | 130 | ||
131 | gResponsePtr = LLIamHereVoice::build( this ); | 131 | std::string url = getString( "real_url" ); |
132 | LLHTTPClient::get( getString( "real_url" ), gResponsePtr ); | 132 | if (url.substr(0,4) == "http") |
133 | { | ||
134 | gResponsePtr = LLIamHereVoice::build( this ); | ||
135 | LLHTTPClient::get( url, gResponsePtr ); | ||
136 | } | ||
137 | else | ||
138 | { | ||
139 | setSiteIsAlive(false); | ||
140 | } | ||
133 | } | 141 | } |
134 | 142 | ||
135 | return TRUE; | 143 | return TRUE; |
diff --git a/linden/indra/newview/hippogridmanager.cpp b/linden/indra/newview/hippogridmanager.cpp index c08709d..6f28d87 100644 --- a/linden/indra/newview/hippogridmanager.cpp +++ b/linden/indra/newview/hippogridmanager.cpp | |||
@@ -1,4 +1,33 @@ | |||
1 | // Ported to Imprudence from the Hippo OpenSim Viewer by Jacek Antonelli | 1 | /** |
2 | * @file hippogridmanager.cpp | ||
3 | * @brief stores grid information | ||
4 | * | ||
5 | * $LicenseInfo:firstyear=2011&license=viewergpl$ | ||
6 | * | ||
7 | * Copyright (c) 2011 | ||
8 | * Ported to Imprudence from the Hippo OpenSim Viewer by Jacek Antonelli | ||
9 | * | ||
10 | * Imprudence Viewer Source Code | ||
11 | * The source code in this file ("Source Code") is provided to you | ||
12 | * under the terms of the GNU General Public License, version 2.0 | ||
13 | * ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in | ||
14 | * this distribution, or online at | ||
15 | * http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
16 | * | ||
17 | * There are special exceptions to the terms and conditions of the GPL as | ||
18 | * it is applied to this Source Code. View the full text of the exception | ||
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | ||
22 | * By copying, modifying or distributing this software, you acknowledge | ||
23 | * that you have read and understood your obligations described above, | ||
24 | * and agree to abide by those obligations. | ||
25 | * | ||
26 | * ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO | ||
27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
28 | * COMPLETENESS OR PERFORMANCE. | ||
29 | * $/LicenseInfo$ | ||
30 | */ | ||
2 | 31 | ||
3 | #include "llviewerprecompiledheaders.h" | 32 | #include "llviewerprecompiledheaders.h" |
4 | 33 | ||
@@ -12,10 +41,14 @@ | |||
12 | #include <llerror.h> | 41 | #include <llerror.h> |
13 | #include <llfile.h> | 42 | #include <llfile.h> |
14 | #include <llhttpclient.h> | 43 | #include <llhttpclient.h> |
44 | #include "llmd5.h" | ||
15 | #include <llsdserialize.h> | 45 | #include <llsdserialize.h> |
46 | |||
16 | #include "lltrans.h" | 47 | #include "lltrans.h" |
17 | #include "llviewercontrol.h" | 48 | #include "llviewercontrol.h" |
49 | #include "llviewernetwork.h" // gMacAddress | ||
18 | #include "llweb.h" | 50 | #include "llweb.h" |
51 | #include "llxorcipher.h" // saved password, MAC address | ||
19 | 52 | ||
20 | #include "hipporestrequest.h" | 53 | #include "hipporestrequest.h" |
21 | 54 | ||
@@ -43,150 +76,41 @@ HippoGridInfo::HippoGridInfo(const std::string& gridNick) : | |||
43 | mPlatform(PLATFORM_OPENSIM), | 76 | mPlatform(PLATFORM_OPENSIM), |
44 | mGridNick(gridNick), | 77 | mGridNick(gridNick), |
45 | mGridName(LLStringUtil::null), | 78 | mGridName(LLStringUtil::null), |
46 | mLoginUri(LLStringUtil::null), | 79 | mLoginURI(LLStringUtil::null), |
47 | mLoginPage(LLStringUtil::null), | 80 | mLoginPage(LLStringUtil::null), |
48 | mHelperUri(LLStringUtil::null), | 81 | mHelperURI(LLStringUtil::null), |
49 | mWebSite(LLStringUtil::null), | 82 | mWebSite(LLStringUtil::null), |
50 | mSupportUrl(LLStringUtil::null), | 83 | mSupportURL(LLStringUtil::null), |
51 | mRegisterUrl(LLStringUtil::null), | 84 | mRegisterURL(LLStringUtil::null), |
52 | mPasswordUrl(LLStringUtil::null), | 85 | mPasswordURL(LLStringUtil::null), |
53 | mSearchUrl(LLStringUtil::null), | 86 | mSearchURL(LLStringUtil::null), |
54 | mFirstName(LLStringUtil::null), | 87 | mFirstName(LLStringUtil::null), |
55 | mLastName(LLStringUtil::null), | 88 | mLastName(LLStringUtil::null), |
56 | mAvatarPassword(LLStringUtil::null), | 89 | mPasswordAvatar(LLStringUtil::null), |
57 | mXmlState(XML_VOID), | 90 | mXmlState(XML_VOID), |
58 | mVoiceConnector("SLVoice"), | 91 | mVoiceConnector("SLVoice"), |
59 | mRenderCompat(true), | 92 | mRenderCompat(true), |
60 | mMaxAgentGroups(-1), | 93 | mMaxAgentGroups(-1), |
61 | mCurrencySymbol("OS$"), | 94 | mCurrencySymbol("OS$"), |
62 | mRealCurrencySymbol("US$"), | 95 | mRealCurrencySymbol("US$"), |
63 | mDirectoryFee(30) | 96 | mDirectoryFee(30), |
97 | mUsername(LLStringUtil::null), | ||
98 | mUsernameCompat(false) | ||
64 | { | 99 | { |
65 | std::string nick = gridNick; | 100 | std::string nick = gridNick; |
66 | mGridNick = sanitizeGridNick( nick ); | 101 | mGridNick = sanitizeGridNick(nick); |
67 | } | ||
68 | |||
69 | |||
70 | // ******************************************************************** | ||
71 | // Getters | ||
72 | |||
73 | HippoGridInfo::Platform HippoGridInfo::getPlatform() | ||
74 | { | ||
75 | return mPlatform; | ||
76 | } | ||
77 | |||
78 | bool HippoGridInfo::isOpenSimulator() const | ||
79 | { | ||
80 | return (mPlatform == HippoGridInfo::PLATFORM_OPENSIM); | ||
81 | } | ||
82 | |||
83 | bool HippoGridInfo::isSecondLife() const | ||
84 | { | ||
85 | return (mPlatform == HippoGridInfo::PLATFORM_SECONDLIFE); | ||
86 | } | ||
87 | |||
88 | const std::string& HippoGridInfo::getGridNick() const | ||
89 | { | ||
90 | return mGridNick; | ||
91 | } | ||
92 | |||
93 | const std::string& HippoGridInfo::getGridName() const | ||
94 | { | ||
95 | return mGridName; | ||
96 | } | ||
97 | |||
98 | const std::string& HippoGridInfo::getLoginUri() const | ||
99 | { | ||
100 | return mLoginUri; | ||
101 | } | ||
102 | |||
103 | const std::string& HippoGridInfo::getLoginPage() const | ||
104 | { | ||
105 | return mLoginPage; | ||
106 | } | ||
107 | |||
108 | const std::string& HippoGridInfo::getHelperUri() const | ||
109 | { | ||
110 | return mHelperUri; | ||
111 | } | ||
112 | |||
113 | const std::string& HippoGridInfo::getWebSite() const | ||
114 | { | ||
115 | return mWebSite; | ||
116 | } | ||
117 | |||
118 | const std::string& HippoGridInfo::getSupportUrl() const | ||
119 | { | ||
120 | return mSupportUrl; | ||
121 | } | ||
122 | |||
123 | const std::string& HippoGridInfo::getRegisterUrl() const | ||
124 | { | ||
125 | return mRegisterUrl; | ||
126 | } | ||
127 | |||
128 | const std::string& HippoGridInfo::getPasswordUrl() const | ||
129 | { | ||
130 | return mPasswordUrl; | ||
131 | } | ||
132 | |||
133 | const std::string& HippoGridInfo::getSearchUrl() const | ||
134 | { | ||
135 | return mSearchUrl; | ||
136 | } | ||
137 | |||
138 | const std::string& HippoGridInfo::getFirstName() const | ||
139 | { | ||
140 | return mFirstName; | ||
141 | } | ||
142 | |||
143 | const std::string& HippoGridInfo::getLastName() const | ||
144 | { | ||
145 | return mLastName; | ||
146 | } | ||
147 | |||
148 | const std::string& HippoGridInfo::getAvatarPassword() const | ||
149 | { | ||
150 | return mAvatarPassword; | ||
151 | } | ||
152 | |||
153 | bool HippoGridInfo::isRenderCompat() const | ||
154 | { | ||
155 | return mRenderCompat; | ||
156 | } | 102 | } |
157 | 103 | ||
158 | const std::string& HippoGridInfo::getCurrencySymbol() const | ||
159 | { | ||
160 | return mCurrencySymbol; | ||
161 | } | ||
162 | |||
163 | const std::string& HippoGridInfo::getRealCurrencySymbol() const | ||
164 | { | ||
165 | return mRealCurrencySymbol; | ||
166 | } | ||
167 | |||
168 | bool HippoGridInfo::isUsernameCompat() const | ||
169 | { | ||
170 | // currently only SecondLife grids support username-style logins | ||
171 | // but Aurora is working on implementing it -- MC | ||
172 | return (mPlatform == HippoGridInfo::PLATFORM_SECONDLIFE); | ||
173 | } | ||
174 | |||
175 | |||
176 | |||
177 | // ******************************************************************** | ||
178 | // Setters | ||
179 | |||
180 | void HippoGridInfo::setPlatform(Platform platform) | 104 | void HippoGridInfo::setPlatform(Platform platform) |
181 | { | 105 | { |
182 | mPlatform = platform; | 106 | mPlatform = platform; |
183 | if (mPlatform == PLATFORM_SECONDLIFE) | 107 | if (mPlatform == PLATFORM_SECONDLIFE) |
184 | { | 108 | { |
185 | mCurrencySymbol = "L$"; | 109 | mCurrencySymbol = "L$"; |
110 | mUsernameCompat = true; | ||
186 | } | 111 | } |
187 | } | 112 | } |
188 | 113 | ||
189 | |||
190 | void HippoGridInfo::setPlatform(const std::string& platform) | 114 | void HippoGridInfo::setPlatform(const std::string& platform) |
191 | { | 115 | { |
192 | std::string tmp = platform; | 116 | std::string tmp = platform; |
@@ -208,96 +132,25 @@ void HippoGridInfo::setPlatform(const std::string& platform) | |||
208 | } | 132 | } |
209 | } | 133 | } |
210 | 134 | ||
211 | void HippoGridInfo::setGridName(const std::string& gridName) | 135 | void HippoGridInfo::setLoginURI(const std::string& loginURI) |
212 | { | ||
213 | mGridName = gridName; | ||
214 | } | ||
215 | |||
216 | void HippoGridInfo::setLoginUri(const std::string& loginUri) | ||
217 | { | ||
218 | std::string uri = loginUri; | ||
219 | mLoginUri = sanitizeUri(uri); | ||
220 | } | ||
221 | |||
222 | void HippoGridInfo::setLoginPage(const std::string& loginPage) | ||
223 | { | 136 | { |
224 | mLoginPage = loginPage; | 137 | std::string uri = loginURI; |
138 | mLoginURI = sanitizeURI(uri); | ||
225 | } | 139 | } |
226 | 140 | ||
227 | void HippoGridInfo::setHelperUri(const std::string& helperUri) | 141 | void HippoGridInfo::setHelperURI(const std::string& helperURI) |
228 | { | 142 | { |
229 | std::string uri = helperUri; | 143 | std::string uri = helperURI; |
230 | mHelperUri = sanitizeUri(uri); | 144 | mHelperURI = sanitizeURI(uri); |
231 | } | 145 | } |
232 | 146 | ||
233 | void HippoGridInfo::setWebSite(const std::string& website) | ||
234 | { | ||
235 | mWebSite = website; | ||
236 | } | ||
237 | |||
238 | void HippoGridInfo::setSupportUrl(const std::string& url) | ||
239 | { | ||
240 | mSupportUrl = url; | ||
241 | } | ||
242 | |||
243 | void HippoGridInfo::setRegisterUrl(const std::string& url) | ||
244 | { | ||
245 | mRegisterUrl = url; | ||
246 | } | ||
247 | |||
248 | void HippoGridInfo::setPasswordUrl(const std::string& url) | ||
249 | { | ||
250 | mPasswordUrl = url; | ||
251 | } | ||
252 | |||
253 | void HippoGridInfo::setSearchUrl(const std::string& url) | ||
254 | { | ||
255 | mSearchUrl = url; | ||
256 | } | ||
257 | |||
258 | void HippoGridInfo::setFirstName(const std::string& firstName) | ||
259 | { | ||
260 | mFirstName = firstName; | ||
261 | } | ||
262 | |||
263 | void HippoGridInfo::setLastName(const std::string& lastName) | ||
264 | { | ||
265 | mLastName = lastName; | ||
266 | } | ||
267 | |||
268 | void HippoGridInfo::setAvatarPassword(const std::string& avatarPassword) | ||
269 | { | ||
270 | mAvatarPassword = avatarPassword; | ||
271 | } | ||
272 | |||
273 | void HippoGridInfo::setRenderCompat(bool compat) | ||
274 | { | ||
275 | mRenderCompat = compat; | ||
276 | } | ||
277 | |||
278 | void HippoGridInfo::setCurrencySymbol(const std::string& sym) | ||
279 | { | ||
280 | mCurrencySymbol = sym.substr(0, 3); | ||
281 | } | ||
282 | |||
283 | void HippoGridInfo::setRealCurrencySymbol(const std::string& sym) | ||
284 | { | ||
285 | mRealCurrencySymbol = sym.substr(0, 3); | ||
286 | } | ||
287 | |||
288 | void HippoGridInfo::setDirectoryFee(int fee) | ||
289 | { | ||
290 | mDirectoryFee = fee; | ||
291 | } | ||
292 | |||
293 | |||
294 | 147 | ||
295 | // ******************************************************************** | 148 | // ******************************************************************** |
296 | // Grid Info | 149 | // Grid Info |
297 | 150 | ||
298 | std::string HippoGridInfo::getSearchUrl(SearchType ty, bool is_web) const | 151 | std::string HippoGridInfo::getSearchURL(SearchType ty, bool is_web) const |
299 | { | 152 | { |
300 | // Don't worry about whether or not mSearchUrl is empty here anymore -- MC | 153 | // Don't worry about whether or not mSearchURL is empty here anymore -- MC |
301 | if (is_web) | 154 | if (is_web) |
302 | { | 155 | { |
303 | if (mPlatform == PLATFORM_SECONDLIFE) | 156 | if (mPlatform == PLATFORM_SECONDLIFE) |
@@ -321,16 +174,16 @@ std::string HippoGridInfo::getSearchUrl(SearchType ty, bool is_web) const | |||
321 | return ""; | 174 | return ""; |
322 | } | 175 | } |
323 | } | 176 | } |
324 | else if (!mSearchUrl.empty()) | 177 | else if (!mSearchURL.empty()) |
325 | { | 178 | { |
326 | // Search url sent to us in the login response | 179 | // Search url sent to us in the login response |
327 | if (ty == SEARCH_ALL_EMPTY) | 180 | if (ty == SEARCH_ALL_EMPTY) |
328 | { | 181 | { |
329 | return (mSearchUrl); | 182 | return (mSearchURL); |
330 | } | 183 | } |
331 | else if (ty == SEARCH_ALL_QUERY) | 184 | else if (ty == SEARCH_ALL_QUERY) |
332 | { | 185 | { |
333 | return (mSearchUrl + "q=[QUERY]&s=[COLLECTION]&"); | 186 | return (mSearchURL + "q=[QUERY]&s=[COLLECTION]&"); |
334 | } | 187 | } |
335 | else if (ty == SEARCH_ALL_TEMPLATE) | 188 | else if (ty == SEARCH_ALL_TEMPLATE) |
336 | { | 189 | { |
@@ -369,11 +222,11 @@ std::string HippoGridInfo::getSearchUrl(SearchType ty, bool is_web) const | |||
369 | // Use the old search all | 222 | // Use the old search all |
370 | if (ty == SEARCH_ALL_EMPTY) | 223 | if (ty == SEARCH_ALL_EMPTY) |
371 | { | 224 | { |
372 | return (mSearchUrl + "panel=All&"); | 225 | return (mSearchURL + "panel=All&"); |
373 | } | 226 | } |
374 | else if (ty == SEARCH_ALL_QUERY) | 227 | else if (ty == SEARCH_ALL_QUERY) |
375 | { | 228 | { |
376 | return (mSearchUrl + "q=[QUERY]&s=[COLLECTION]&"); | 229 | return (mSearchURL + "q=[QUERY]&s=[COLLECTION]&"); |
377 | } | 230 | } |
378 | else if (ty == SEARCH_ALL_TEMPLATE) | 231 | else if (ty == SEARCH_ALL_TEMPLATE) |
379 | { | 232 | { |
@@ -424,7 +277,7 @@ void HippoGridInfo::onXmlElementEnd(void* userData, const XML_Char* name) | |||
424 | } | 277 | } |
425 | 278 | ||
426 | //static | 279 | //static |
427 | void HippoGridInfo::onXmlCharacterData(void* userData, const XML_Char* s, int len) | 280 | void HippoGridInfo::onXmlCharacterData(void* userData, const XML_Char* s, S32 len) |
428 | { | 281 | { |
429 | HippoGridInfo* self = (HippoGridInfo*)userData; | 282 | HippoGridInfo* self = (HippoGridInfo*)userData; |
430 | switch (self->mXmlState) | 283 | switch (self->mXmlState) |
@@ -446,30 +299,30 @@ void HippoGridInfo::onXmlCharacterData(void* userData, const XML_Char* s, int le | |||
446 | case XML_LOGINURI: | 299 | case XML_LOGINURI: |
447 | { | 300 | { |
448 | std::string loginuri(s, len); | 301 | std::string loginuri(s, len); |
449 | self->mLoginUri = sanitizeUri( loginuri ); | 302 | self->mLoginURI = sanitizeURI( loginuri ); |
450 | break; | 303 | break; |
451 | } | 304 | } |
452 | 305 | ||
453 | case XML_HELPERURI: | 306 | case XML_HELPERURI: |
454 | { | 307 | { |
455 | std::string helperuri(s, len); | 308 | std::string helperuri(s, len); |
456 | self->mHelperUri = sanitizeUri( helperuri ); | 309 | self->mHelperURI = sanitizeURI( helperuri ); |
457 | break; | 310 | break; |
458 | } | 311 | } |
459 | 312 | ||
460 | case XML_SEARCH: | 313 | case XML_SEARCH: |
461 | { | 314 | { |
462 | self->mSearchUrl.assign(s, len); | 315 | self->mSearchURL.assign(s, len); |
463 | //sanitizeQueryUrl(mSearchUrl); | 316 | //sanitizeQueryURL(mSearchURL); |
464 | break; | 317 | break; |
465 | } | 318 | } |
466 | 319 | ||
467 | case XML_GRIDNAME: self->mGridName.assign(s, len); break; | 320 | case XML_GRIDNAME: self->mGridName.assign(s, len); break; |
468 | case XML_LOGINPAGE: self->mLoginPage.assign(s, len); break; | 321 | case XML_LOGINPAGE: self->mLoginPage.assign(s, len); break; |
469 | case XML_WEBSITE: self->mWebSite.assign(s, len); break; | 322 | case XML_WEBSITE: self->mWebSite.assign(s, len); break; |
470 | case XML_SUPPORT: self->mSupportUrl.assign(s, len); break; | 323 | case XML_SUPPORT: self->mSupportURL.assign(s, len); break; |
471 | case XML_REGISTER: self->mRegisterUrl.assign(s, len); break; | 324 | case XML_REGISTER: self->mRegisterURL.assign(s, len); break; |
472 | case XML_PASSWORD: self->mPasswordUrl.assign(s, len); break; | 325 | case XML_PASSWORD: self->mPasswordURL.assign(s, len); break; |
473 | 326 | ||
474 | case XML_VOID: break; | 327 | case XML_VOID: break; |
475 | } | 328 | } |
@@ -478,16 +331,16 @@ void HippoGridInfo::onXmlCharacterData(void* userData, const XML_Char* s, int le | |||
478 | 331 | ||
479 | bool HippoGridInfo::retrieveGridInfo() | 332 | bool HippoGridInfo::retrieveGridInfo() |
480 | { | 333 | { |
481 | if (mLoginUri == "") return false; | 334 | if (mLoginURI == "") return false; |
482 | 335 | ||
483 | // If last character in uri is not "/" | 336 | // If last character in uri is not "/" |
484 | std::string uri = mLoginUri; | 337 | std::string uri = mLoginURI; |
485 | if (uri.compare(uri.length()-1, 1, "/") != 0) | 338 | if (uri.compare(uri.length()-1, 1, "/") != 0) |
486 | { | 339 | { |
487 | uri += '/'; | 340 | uri += '/'; |
488 | } | 341 | } |
489 | std::string reply; | 342 | std::string reply; |
490 | int result = HippoRestRequest::getBlocking(uri + "get_grid_info", &reply); | 343 | S32 result = HippoRestRequest::getBlocking(uri + "get_grid_info", &reply); |
491 | if (result != 200) return false; | 344 | if (result != 200) return false; |
492 | 345 | ||
493 | llinfos << "Received: " << reply << llendl; | 346 | llinfos << "Received: " << reply << llendl; |
@@ -508,6 +361,14 @@ bool HippoGridInfo::retrieveGridInfo() | |||
508 | return success; | 361 | return success; |
509 | } | 362 | } |
510 | 363 | ||
364 | const std::string& HippoGridInfo::getGridName() const | ||
365 | { | ||
366 | if (mGridName.empty()) | ||
367 | { | ||
368 | return mGridNick; | ||
369 | } | ||
370 | return mGridName; | ||
371 | } | ||
511 | 372 | ||
512 | std::string HippoGridInfo::getUploadFee() const | 373 | std::string HippoGridInfo::getUploadFee() const |
513 | { | 374 | { |
@@ -531,7 +392,7 @@ std::string HippoGridInfo::getDirectoryFee() const | |||
531 | return fee; | 392 | return fee; |
532 | } | 393 | } |
533 | 394 | ||
534 | void HippoGridInfo::formatFee(std::string &fee, int cost, bool showFree) const | 395 | void HippoGridInfo::formatFee(std::string &fee, S32 cost, bool showFree) const |
535 | { | 396 | { |
536 | if (showFree && (cost == 0)) | 397 | if (showFree && (cost == 0)) |
537 | { | 398 | { |
@@ -544,6 +405,92 @@ void HippoGridInfo::formatFee(std::string &fee, int cost, bool showFree) const | |||
544 | } | 405 | } |
545 | 406 | ||
546 | 407 | ||
408 | void HippoGridInfo::setPassword(const std::string& unhashed_password) | ||
409 | { | ||
410 | if (unhashed_password.empty()) | ||
411 | { | ||
412 | mPasswordAvatar = ""; | ||
413 | return; | ||
414 | } | ||
415 | |||
416 | if (unhashed_password == mPasswordAvatar) | ||
417 | { | ||
418 | return; | ||
419 | } | ||
420 | |||
421 | std::string hashed_password(""); | ||
422 | |||
423 | // Max "actual" password length is 16 characters. | ||
424 | // Hex digests are always 32 characters. | ||
425 | if (unhashed_password.length() == 32) | ||
426 | { | ||
427 | hashed_password = unhashed_password; | ||
428 | } | ||
429 | else | ||
430 | { | ||
431 | // this is a user-entered plaintext password | ||
432 | LLMD5 pass((unsigned char *)unhashed_password.c_str()); | ||
433 | char munged_password[MD5HEX_STR_SIZE]; | ||
434 | pass.hex_digest(munged_password); | ||
435 | hashed_password = munged_password; | ||
436 | } | ||
437 | |||
438 | // need to fix the bug in this | ||
439 | /* | ||
440 | |||
441 | // Encipher with MAC address | ||
442 | const S32 HASHED_LENGTH = 32; | ||
443 | U8 buffer[HASHED_LENGTH+1]; | ||
444 | |||
445 | LLStringUtil::copy((char*)buffer, hashed_password.c_str(), HASHED_LENGTH+1); | ||
446 | |||
447 | LLXORCipher cipher(gMACAddress, 6); | ||
448 | cipher.encrypt(buffer, HASHED_LENGTH); | ||
449 | |||
450 | mPasswordAvatar.assign((char*)buffer); | ||
451 | */ | ||
452 | mPasswordAvatar.assign(hashed_password); | ||
453 | } | ||
454 | |||
455 | |||
456 | std::string HippoGridInfo::getPassword() const | ||
457 | { | ||
458 | // need to fix the bug in this | ||
459 | /* | ||
460 | if (mPasswordAvatar.empty() || mPasswordAvatar.length() == 32) | ||
461 | { | ||
462 | return mPasswordAvatar; | ||
463 | } | ||
464 | |||
465 | std::string hashed_password(""); | ||
466 | |||
467 | // UUID is 16 bytes, written into ASCII is 32 characters | ||
468 | // without trailing \0 | ||
469 | const S32 HASHED_LENGTH = 32; | ||
470 | U8 buffer[HASHED_LENGTH+1]; | ||
471 | |||
472 | LLStringUtil::copy((char*)buffer, mPasswordAvatar.c_str(), HASHED_LENGTH+1); | ||
473 | |||
474 | // Decipher with MAC address | ||
475 | LLXORCipher cipher(gMACAddress, 6); | ||
476 | cipher.decrypt(buffer, HASHED_LENGTH); | ||
477 | |||
478 | buffer[HASHED_LENGTH] = '\0'; | ||
479 | |||
480 | // Check to see if the mac address generated a bad hashed | ||
481 | // password. It should be a hex-string or else the mac adress has | ||
482 | // changed. This is a security feature to make sure that if you | ||
483 | // get someone's grid_info.xml file, you cannot hack their account. | ||
484 | if (is_hex_string(buffer, HASHED_LENGTH)) | ||
485 | { | ||
486 | hashed_password.assign((char*)buffer); | ||
487 | } | ||
488 | |||
489 | return hashed_password; | ||
490 | */ | ||
491 | return mPasswordAvatar; | ||
492 | } | ||
493 | |||
547 | // ******************************************************************** | 494 | // ******************************************************************** |
548 | // Static Helpers | 495 | // Static Helpers |
549 | 496 | ||
@@ -556,7 +503,9 @@ const char* HippoGridInfo::getPlatformString(Platform platform) | |||
556 | }; | 503 | }; |
557 | 504 | ||
558 | if ((platform < PLATFORM_OTHER) || (platform >= PLATFORM_LAST)) | 505 | if ((platform < PLATFORM_OTHER) || (platform >= PLATFORM_LAST)) |
506 | { | ||
559 | platform = PLATFORM_OTHER; | 507 | platform = PLATFORM_OTHER; |
508 | } | ||
560 | return platformStrings[platform]; | 509 | return platformStrings[platform]; |
561 | } | 510 | } |
562 | 511 | ||
@@ -565,8 +514,8 @@ const char* HippoGridInfo::getPlatformString(Platform platform) | |||
565 | std::string HippoGridInfo::sanitizeGridNick(std::string &gridnick) | 514 | std::string HippoGridInfo::sanitizeGridNick(std::string &gridnick) |
566 | { | 515 | { |
567 | std::string tmp; | 516 | std::string tmp; |
568 | int size = gridnick.size(); | 517 | S32 size = gridnick.size(); |
569 | for (int i=0; i<size; i++) | 518 | for (S32 i=0; i<size; i++) |
570 | { | 519 | { |
571 | char c = gridnick[i]; | 520 | char c = gridnick[i]; |
572 | if ((c == '_') || isalnum(c)) | 521 | if ((c == '_') || isalnum(c)) |
@@ -582,8 +531,10 @@ std::string HippoGridInfo::sanitizeGridNick(std::string &gridnick) | |||
582 | } | 531 | } |
583 | 532 | ||
584 | // static | 533 | // static |
585 | std::string HippoGridInfo::sanitizeUri(std::string &uri) | 534 | std::string HippoGridInfo::sanitizeURI(std::string &uri) |
586 | { | 535 | { |
536 | // Why don't we do this anymore? -- MC | ||
537 | |||
587 | // if (uri.empty()) { | 538 | // if (uri.empty()) { |
588 | // return ""; | 539 | // return ""; |
589 | // } | 540 | // } |
@@ -603,8 +554,8 @@ void HippoGridInfo::initFallback() | |||
603 | FALLBACK_GRIDINFO.mGridNick = "localhost"; | 554 | FALLBACK_GRIDINFO.mGridNick = "localhost"; |
604 | FALLBACK_GRIDINFO.setPlatform(PLATFORM_OPENSIM); | 555 | FALLBACK_GRIDINFO.setPlatform(PLATFORM_OPENSIM); |
605 | FALLBACK_GRIDINFO.setGridName("Local Host"); | 556 | FALLBACK_GRIDINFO.setGridName("Local Host"); |
606 | FALLBACK_GRIDINFO.setLoginUri("http://127.0.0.1:9000/"); | 557 | FALLBACK_GRIDINFO.setLoginURI("http://127.0.0.1:9000/"); |
607 | FALLBACK_GRIDINFO.setHelperUri("http://127.0.0.1:9000/"); | 558 | FALLBACK_GRIDINFO.setHelperURI("http://127.0.0.1:9000/"); |
608 | } | 559 | } |
609 | 560 | ||
610 | 561 | ||
@@ -683,7 +634,7 @@ HippoGridInfo* HippoGridManager::getGrid(const std::string& grid) const | |||
683 | 634 | ||
684 | HippoGridInfo* HippoGridManager::getConnectedGrid() const | 635 | HippoGridInfo* HippoGridManager::getConnectedGrid() const |
685 | { | 636 | { |
686 | return (mConnectedGrid)? mConnectedGrid: getCurrentGrid(); | 637 | return (mConnectedGrid) ? mConnectedGrid : getCurrentGrid(); |
687 | } | 638 | } |
688 | 639 | ||
689 | 640 | ||
@@ -700,11 +651,6 @@ HippoGridInfo* HippoGridManager::getCurrentGrid() const | |||
700 | } | 651 | } |
701 | } | 652 | } |
702 | 653 | ||
703 | const std::string& HippoGridManager::getDefaultGridNick() const | ||
704 | { | ||
705 | return mDefaultGrid; | ||
706 | } | ||
707 | |||
708 | const std::string& HippoGridManager::getCurrentGridNick() const | 654 | const std::string& HippoGridManager::getCurrentGridNick() const |
709 | { | 655 | { |
710 | if (mCurrentGrid.empty()) | 656 | if (mCurrentGrid.empty()) |
@@ -714,12 +660,6 @@ const std::string& HippoGridManager::getCurrentGridNick() const | |||
714 | return mCurrentGrid; | 660 | return mCurrentGrid; |
715 | } | 661 | } |
716 | 662 | ||
717 | void HippoGridManager::setCurrentGridAsConnected() | ||
718 | { | ||
719 | mConnectedGrid = getCurrentGrid(); | ||
720 | } | ||
721 | |||
722 | |||
723 | void HippoGridManager::addGrid(HippoGridInfo* grid) | 663 | void HippoGridManager::addGrid(HippoGridInfo* grid) |
724 | { | 664 | { |
725 | if (!grid) return; | 665 | if (!grid) return; |
@@ -743,17 +683,25 @@ void HippoGridManager::addGrid(HippoGridInfo* grid) | |||
743 | void HippoGridManager::deleteGrid(const std::string& grid) | 683 | void HippoGridManager::deleteGrid(const std::string& grid) |
744 | { | 684 | { |
745 | GridIterator it = mGridInfo.find(grid); | 685 | GridIterator it = mGridInfo.find(grid); |
746 | if (it == mGridInfo.end()) { | 686 | if (it == mGridInfo.end()) |
687 | { | ||
747 | llwarns << "Trying to delete non-existing grid " << grid << '.' << llendl; | 688 | llwarns << "Trying to delete non-existing grid " << grid << '.' << llendl; |
748 | return; | 689 | return; |
749 | } | 690 | } |
691 | |||
750 | mGridInfo.erase(it); | 692 | mGridInfo.erase(it); |
693 | |||
751 | llinfos << "Number of grids now: " << mGridInfo.size() << llendl; | 694 | llinfos << "Number of grids now: " << mGridInfo.size() << llendl; |
695 | |||
752 | if (mGridInfo.empty()) llinfos << "Grid info map is empty." << llendl; | 696 | if (mGridInfo.empty()) llinfos << "Grid info map is empty." << llendl; |
753 | if (grid == mDefaultGrid) | 697 | if (grid == mDefaultGrid) |
698 | { | ||
754 | setDefaultGrid(LLStringUtil::null); // sets first grid, if map not empty | 699 | setDefaultGrid(LLStringUtil::null); // sets first grid, if map not empty |
700 | } | ||
755 | if (grid == mCurrentGrid) | 701 | if (grid == mCurrentGrid) |
702 | { | ||
756 | mCurrentGrid = mDefaultGrid; | 703 | mCurrentGrid = mDefaultGrid; |
704 | } | ||
757 | } | 705 | } |
758 | 706 | ||
759 | 707 | ||
@@ -796,6 +744,18 @@ void HippoGridManager::setCurrentGrid(const std::string& grid) | |||
796 | } | 744 | } |
797 | } | 745 | } |
798 | 746 | ||
747 | bool HippoGridManager::hasGridNick(const std::string& grid_nick) | ||
748 | { | ||
749 | for (GridIterator it = beginGrid(); it != endGrid(); ++it) | ||
750 | { | ||
751 | if (grid_nick == it->second->getGridNick()) | ||
752 | { | ||
753 | return true; | ||
754 | } | ||
755 | } | ||
756 | return false; | ||
757 | } | ||
758 | |||
799 | 759 | ||
800 | // ******************************************************************** | 760 | // ******************************************************************** |
801 | // Persistent Store | 761 | // Persistent Store |
@@ -813,7 +773,7 @@ void HippoGridManager::loadFromFile() | |||
813 | std::string update_list = gSavedSettings.getString("GridUpdateList"); | 773 | std::string update_list = gSavedSettings.getString("GridUpdateList"); |
814 | if (!update_list.empty()) | 774 | if (!update_list.empty()) |
815 | { | 775 | { |
816 | parseUrl(update_list, !mGridInfo.empty()); | 776 | parseURL(update_list, !mGridInfo.empty()); |
817 | } | 777 | } |
818 | else | 778 | else |
819 | { | 779 | { |
@@ -828,7 +788,7 @@ void HippoGridManager::loadFromFile() | |||
828 | } | 788 | } |
829 | 789 | ||
830 | 790 | ||
831 | void HippoGridManager::parseUrl(const std::string url, bool mergeIfNewer) | 791 | void HippoGridManager::parseURL(const std::string url, bool mergeIfNewer) |
832 | { | 792 | { |
833 | llinfos << "Loading grid info from '" << url << "'." << llendl; | 793 | llinfos << "Loading grid info from '" << url << "'." << llendl; |
834 | 794 | ||
@@ -882,7 +842,7 @@ void HippoGridManager::parseData(LLSD &gridInfo, bool mergeIfNewer) | |||
882 | LLSD gridMap = *it; | 842 | LLSD gridMap = *it; |
883 | if (gridMap.has("default_grids_version")) | 843 | if (gridMap.has("default_grids_version")) |
884 | { | 844 | { |
885 | int version = gridMap["default_grids_version"]; | 845 | S32 version = gridMap["default_grids_version"]; |
886 | if (version <= mDefaultGridsVersion) return; | 846 | if (version <= mDefaultGridsVersion) return; |
887 | else break; | 847 | else break; |
888 | } | 848 | } |
@@ -920,20 +880,22 @@ void HippoGridManager::parseData(LLSD &gridInfo, bool mergeIfNewer) | |||
920 | // update existing grid info | 880 | // update existing grid info |
921 | grid = it->second; | 881 | grid = it->second; |
922 | } | 882 | } |
923 | grid->setLoginUri(gridMap["loginuri"]); | 883 | grid->setLoginURI(gridMap["loginuri"]); |
924 | if (gridMap.has("platform")) grid->setPlatform(gridMap["platform"]); | 884 | if (gridMap.has("platform")) grid->setPlatform(gridMap["platform"]); |
925 | if (gridMap.has("gridname")) grid->setGridName(gridMap["gridname"]); | 885 | if (gridMap.has("gridname")) grid->setGridName(gridMap["gridname"]); |
926 | if (gridMap.has("loginpage")) grid->setLoginPage(gridMap["loginpage"]); | 886 | if (gridMap.has("loginpage")) grid->setLoginPage(gridMap["loginpage"]); |
927 | if (gridMap.has("helperuri")) grid->setHelperUri(gridMap["helperuri"]); | 887 | if (gridMap.has("helperuri")) grid->setHelperURI(gridMap["helperuri"]); |
928 | if (gridMap.has("website")) grid->setWebSite(gridMap["website"]); | 888 | if (gridMap.has("website")) grid->setWebSite(gridMap["website"]); |
929 | if (gridMap.has("support")) grid->setSupportUrl(gridMap["support"]); | 889 | if (gridMap.has("support")) grid->setSupportURL(gridMap["support"]); |
930 | if (gridMap.has("register")) grid->setRegisterUrl(gridMap["register"]); | 890 | if (gridMap.has("register")) grid->setRegisterURL(gridMap["register"]); |
931 | if (gridMap.has("password")) grid->setPasswordUrl(gridMap["password"]); | 891 | if (gridMap.has("password")) grid->setPasswordURL(gridMap["password"]); |
932 | if (gridMap.has("search")) grid->setSearchUrl(gridMap["search"]); | 892 | if (gridMap.has("search")) grid->setSearchURL(gridMap["search"]); |
933 | if (gridMap.has("render_compat")) grid->setRenderCompat(gridMap["render_compat"]); | 893 | if (gridMap.has("render_compat")) grid->setRenderCompat(gridMap["render_compat"]); |
934 | // if (gridMap.has("firstname")) grid->setFirstName(gridMap["firstname"]); | 894 | if (gridMap.has("firstname")) grid->setFirstName(gridMap["firstname"]); |
935 | // if (gridMap.has("lastname")) grid->setLastName(gridMap["lastname"]); | 895 | if (gridMap.has("lastname")) grid->setLastName(gridMap["lastname"]); |
936 | // if (gridMap.has("avatarpassword")) grid->setAvatarPassword(gridMap["avatarpassword"]); | 896 | if (gridMap.has("avatarpassword")) grid->setPassword(gridMap["avatarpassword"]); |
897 | if (gridMap.has("username")) grid->setUsername(gridMap["username"]); | ||
898 | if (gridMap.has("username_compat")) grid->setUsernameCompat(gridMap["username_compat"]); | ||
937 | if (newGrid) addGrid(grid); | 899 | if (newGrid) addGrid(grid); |
938 | } | 900 | } |
939 | } | 901 | } |
@@ -958,19 +920,22 @@ void HippoGridManager::saveFile() | |||
958 | gridInfo[i]["gridnick"] = grid->getGridNick(); | 920 | gridInfo[i]["gridnick"] = grid->getGridNick(); |
959 | gridInfo[i]["platform"] = HippoGridInfo::getPlatformString(grid->getPlatform()); | 921 | gridInfo[i]["platform"] = HippoGridInfo::getPlatformString(grid->getPlatform()); |
960 | gridInfo[i]["gridname"] = grid->getGridName(); | 922 | gridInfo[i]["gridname"] = grid->getGridName(); |
961 | gridInfo[i]["loginuri"] = grid->getLoginUri(); | 923 | gridInfo[i]["loginuri"] = grid->getLoginURI(); |
962 | gridInfo[i]["loginpage"] = grid->getLoginPage(); | 924 | gridInfo[i]["loginpage"] = grid->getLoginPage(); |
963 | gridInfo[i]["helperuri"] = grid->getHelperUri(); | 925 | gridInfo[i]["helperuri"] = grid->getHelperURI(); |
964 | gridInfo[i]["website"] = grid->getWebSite(); | 926 | gridInfo[i]["website"] = grid->getWebSite(); |
965 | gridInfo[i]["support"] = grid->getSupportUrl(); | 927 | gridInfo[i]["support"] = grid->getSupportURL(); |
966 | gridInfo[i]["register"] = grid->getRegisterUrl(); | 928 | gridInfo[i]["register"] = grid->getRegisterURL(); |
967 | gridInfo[i]["password"] = grid->getPasswordUrl(); | 929 | gridInfo[i]["password"] = grid->getPasswordURL(); |
968 | // gridInfo[i]["firstname"] = grid->getFirstName(); | 930 | gridInfo[i]["firstname"] = grid->getFirstName(); |
969 | // gridInfo[i]["lastname"] = grid->getLastName(); | 931 | gridInfo[i]["lastname"] = grid->getLastName(); |
970 | // gridInfo[i]["avatarpassword"] = grid->getAvatarPassword(); | 932 | gridInfo[i]["avatarpassword"] = grid->getPassword(); |
971 | 933 | ||
972 | gridInfo[i]["search"] = grid->getSearchUrl(); | 934 | gridInfo[i]["search"] = grid->getSearchURL(); |
973 | gridInfo[i]["render_compat"] = grid->isRenderCompat(); | 935 | gridInfo[i]["render_compat"] = grid->isRenderCompat(); |
936 | |||
937 | gridInfo[i]["username"] = grid->getUsername(); | ||
938 | gridInfo[i]["username_compat"] = grid->isUsernameCompat(); | ||
974 | } | 939 | } |
975 | 940 | ||
976 | // write client grid info file | 941 | // write client grid info file |
diff --git a/linden/indra/newview/hippogridmanager.h b/linden/indra/newview/hippogridmanager.h index 1b6fbc5..c983c9d 100644 --- a/linden/indra/newview/hippogridmanager.h +++ b/linden/indra/newview/hippogridmanager.h | |||
@@ -1,3 +1,34 @@ | |||
1 | /** | ||
2 | * @file hippogridmanager.h | ||
3 | * @brief stores grid information | ||
4 | * | ||
5 | * $LicenseInfo:firstyear=2011&license=viewergpl$ | ||
6 | * | ||
7 | * Copyright (c) 2011 | ||
8 | * Ported to Imprudence from the Hippo OpenSim Viewer by Jacek Antonelli | ||
9 | * | ||
10 | * Imprudence Viewer Source Code | ||
11 | * The source code in this file ("Source Code") is provided to you | ||
12 | * under the terms of the GNU General Public License, version 2.0 | ||
13 | * ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in | ||
14 | * this distribution, or online at | ||
15 | * http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
16 | * | ||
17 | * There are special exceptions to the terms and conditions of the GPL as | ||
18 | * it is applied to this Source Code. View the full text of the exception | ||
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | ||
22 | * By copying, modifying or distributing this software, you acknowledge | ||
23 | * that you have read and understood your obligations described above, | ||
24 | * and agree to abide by those obligations. | ||
25 | * | ||
26 | * ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO | ||
27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
28 | * COMPLETENESS OR PERFORMANCE. | ||
29 | * $/LicenseInfo$ | ||
30 | */ | ||
31 | |||
1 | #ifndef __HIPPO_GRID_MANAGER_H__ | 32 | #ifndef __HIPPO_GRID_MANAGER_H__ |
2 | #define __HIPPO_GRID_MANAGER_H__ | 33 | #define __HIPPO_GRID_MANAGER_H__ |
3 | 34 | ||
@@ -35,57 +66,61 @@ public: | |||
35 | 66 | ||
36 | explicit HippoGridInfo(const std::string& gridNick); | 67 | explicit HippoGridInfo(const std::string& gridNick); |
37 | 68 | ||
38 | Platform getPlatform(); | 69 | Platform getPlatform() { return mPlatform; } |
39 | bool isOpenSimulator() const; | 70 | bool isOpenSimulator() const { return (mPlatform == PLATFORM_OPENSIM); } |
40 | bool isSecondLife() const; | 71 | bool isSecondLife() const { return (mPlatform == PLATFORM_SECONDLIFE); } |
41 | const std::string& getGridNick() const; | 72 | bool isRenderCompat() const { return mRenderCompat; } |
42 | const std::string& getGridName() const; | 73 | // currently only SecondLife grids support username-style logins but Aurora is working on implementing it |
43 | const std::string& getLoginUri() const; | 74 | bool isUsernameCompat() const { return mUsernameCompat; } |
44 | const std::string& getLoginPage() const; | 75 | |
45 | const std::string& getHelperUri() const; | 76 | const std::string& getGridNick() const { return mGridNick; } |
46 | const std::string& getWebSite() const; | 77 | // returns grid nick if no grid name is available |
47 | const std::string& getSupportUrl() const; | 78 | const std::string& getGridName() const; |
48 | const std::string& getRegisterUrl() const; | 79 | const std::string& getLoginURI() const { return mLoginURI; } |
49 | const std::string& getPasswordUrl() const; | 80 | const std::string& getLoginPage() const { return mLoginPage; } |
81 | const std::string& getHelperURI() const { return mHelperURI; } | ||
82 | const std::string& getWebSite() const { return mWebSite; } | ||
83 | const std::string& getSupportURL() const { return mSupportURL; } | ||
84 | const std::string& getRegisterURL() const { return mRegisterURL; } | ||
85 | const std::string& getPasswordURL() const { return mPasswordURL; } | ||
50 | // Returns the url base used for the Web Search tab | 86 | // Returns the url base used for the Web Search tab |
51 | const std::string& getSearchUrl() const; | 87 | const std::string& getSearchURL() const { return mSearchURL; } |
52 | const std::string& getFirstName() const; | 88 | const std::string& getFirstName() const { return mFirstName; } |
53 | const std::string& getLastName() const; | 89 | const std::string& getLastName() const { return mLastName; } |
54 | const std::string& getAvatarPassword() const; | 90 | const std::string& getUsername() const { return mUsername; } |
55 | const std::string& getVoiceConnector() const { return mVoiceConnector; } | 91 | std::string getPassword() const; |
56 | std::string getSearchUrl(SearchType ty, bool is_web) const; | 92 | const std::string& getVoiceConnector() const { return mVoiceConnector; } |
57 | bool isRenderCompat() const; | 93 | S32 getMaxAgentGroups() const { return mMaxAgentGroups; } |
58 | bool isUsernameCompat() const; | 94 | const std::string& getCurrencySymbol() const { return mCurrencySymbol; } |
59 | int getMaxAgentGroups() const { return mMaxAgentGroups; } | 95 | const std::string& getRealCurrencySymbol() const { return mRealCurrencySymbol; } |
60 | 96 | std::string getUploadFee() const; | |
61 | const std::string& getCurrencySymbol() const; | 97 | std::string getGroupCreationFee() const; |
62 | const std::string& getRealCurrencySymbol() const; | 98 | std::string getDirectoryFee() const; |
63 | std::string getUploadFee() const; | 99 | std::string getSearchURL(SearchType ty, bool is_web) const; |
64 | std::string getGroupCreationFee() const; | ||
65 | std::string getDirectoryFee() const; | ||
66 | 100 | ||
67 | void setPlatform (const std::string& platform); | 101 | void setPlatform (const std::string& platform); |
68 | void setPlatform (Platform platform); | 102 | void setPlatform (Platform platform); |
69 | void setGridName (const std::string& gridName); | 103 | void setGridName (const std::string& gridName) { mGridName = gridName; } |
70 | void setLoginUri (const std::string& loginUri); | 104 | void setLoginURI (const std::string& loginURI); |
71 | void setLoginPage(const std::string& loginPage); | 105 | void setLoginPage(const std::string& loginPage) { mLoginPage = loginPage; } |
72 | void setHelperUri(const std::string& helperUri); | 106 | void setHelperURI(const std::string& helperURI); |
73 | void setWebSite (const std::string& website); | 107 | void setWebSite (const std::string& website) { mWebSite = website; } |
74 | void setSupportUrl(const std::string& url); | 108 | void setSupportURL(const std::string& url) { mSupportURL = url; } |
75 | void setRegisterUrl(const std::string& url); | 109 | void setRegisterURL(const std::string& url) { mRegisterURL = url; } |
76 | void setPasswordUrl(const std::string& url); | 110 | void setPasswordURL(const std::string& url) { mPasswordURL = url; } |
77 | // sets the url base used for the Web Search tab | 111 | // sets the url base used for the Web Search tab |
78 | void setSearchUrl(const std::string& url); | 112 | void setSearchURL(const std::string& url) { mSearchURL = url; } |
79 | void setRenderCompat(bool compat); | 113 | void setRenderCompat(bool compat) { mRenderCompat = compat; } |
80 | void setMaxAgentGroups(int max) { mMaxAgentGroups = max; } | 114 | void setMaxAgentGroups(S32 max) { mMaxAgentGroups = max; } |
81 | void setFirstName(const std::string& firstName); | 115 | void setFirstName(const std::string& firstName) { mFirstName = firstName; } |
82 | void setLastName(const std::string& lastName); | 116 | void setLastName(const std::string& lastName) { mLastName = lastName; } |
83 | void setAvatarPassword(const std::string& avatarPassword); | 117 | void setPassword(const std::string& unhashed_password); |
84 | void setVoiceConnector(const std::string& vc) { mVoiceConnector = vc; } | 118 | void setVoiceConnector(const std::string& vc) { mVoiceConnector = vc; } |
85 | 119 | void setCurrencySymbol(const std::string& sym) { mCurrencySymbol = sym.substr(0, 3); } | |
86 | void setCurrencySymbol(const std::string& sym); | 120 | void setRealCurrencySymbol(const std::string& sym) { mRealCurrencySymbol = sym.substr(0, 3); } |
87 | void setRealCurrencySymbol(const std::string& sym); | 121 | void setDirectoryFee(U32 fee) { mDirectoryFee = fee; } |
88 | void setDirectoryFee(int fee); | 122 | void setUsername(const std::string& username) { mUsername = username; } |
123 | void setUsernameCompat(bool compat) { mUsernameCompat = compat; } | ||
89 | 124 | ||
90 | bool retrieveGridInfo(); | 125 | bool retrieveGridInfo(); |
91 | 126 | ||
@@ -96,27 +131,30 @@ public: | |||
96 | static void initFallback(); | 131 | static void initFallback(); |
97 | 132 | ||
98 | private: | 133 | private: |
99 | Platform mPlatform; | 134 | Platform mPlatform; |
100 | std::string mGridNick; | 135 | std::string mGridNick; |
101 | std::string mGridName; | 136 | std::string mGridName; |
102 | std::string mLoginUri; | 137 | std::string mLoginURI; |
103 | std::string mLoginPage; | 138 | std::string mLoginPage; |
104 | std::string mHelperUri; | 139 | std::string mHelperURI; |
105 | std::string mWebSite; | 140 | std::string mWebSite; |
106 | std::string mSupportUrl; | 141 | std::string mSupportURL; |
107 | std::string mRegisterUrl; | 142 | std::string mRegisterURL; |
108 | std::string mPasswordUrl; | 143 | std::string mPasswordURL; |
109 | std::string mSearchUrl; | 144 | std::string mSearchURL; |
110 | std::string mVoiceConnector; | 145 | std::string mVoiceConnector; |
111 | std::string mFirstName; | 146 | std::string mFirstName; |
112 | std::string mLastName; | 147 | std::string mLastName; |
113 | std::string mAvatarPassword; | 148 | std::string mPasswordAvatar; |
114 | bool mRenderCompat; | 149 | bool mRenderCompat; |
115 | int mMaxAgentGroups; | 150 | S32 mMaxAgentGroups; |
151 | |||
152 | std::string mUsername; | ||
153 | bool mUsernameCompat; | ||
116 | 154 | ||
117 | std::string mCurrencySymbol; | 155 | std::string mCurrencySymbol; |
118 | std::string mRealCurrencySymbol; | 156 | std::string mRealCurrencySymbol; |
119 | int mDirectoryFee; | 157 | U32 mDirectoryFee; |
120 | 158 | ||
121 | // for parsing grid info XML | 159 | // for parsing grid info XML |
122 | enum XmlState | 160 | enum XmlState |
@@ -127,12 +165,12 @@ private: | |||
127 | }; | 165 | }; |
128 | XmlState mXmlState; | 166 | XmlState mXmlState; |
129 | 167 | ||
130 | static std::string sanitizeUri(std::string &uri); | 168 | static std::string sanitizeURI(std::string &uri); |
131 | void formatFee(std::string &fee, int cost, bool showFree) const; | 169 | void formatFee(std::string &fee, S32 cost, bool showFree) const; |
132 | 170 | ||
133 | static void onXmlElementStart(void* userData, const XML_Char* name, const XML_Char** atts); | 171 | static void onXmlElementStart(void* userData, const XML_Char* name, const XML_Char** atts); |
134 | static void onXmlElementEnd(void* userData, const XML_Char* name); | 172 | static void onXmlElementEnd(void* userData, const XML_Char* name); |
135 | static void onXmlCharacterData(void* userData, const XML_Char* s, int len); | 173 | static void onXmlCharacterData(void* userData, const XML_Char* s, S32 len); |
136 | }; | 174 | }; |
137 | 175 | ||
138 | 176 | ||
@@ -149,31 +187,34 @@ public: | |||
149 | HippoGridInfo* getGrid(const std::string& grid) const; | 187 | HippoGridInfo* getGrid(const std::string& grid) const; |
150 | HippoGridInfo* getConnectedGrid() const; | 188 | HippoGridInfo* getConnectedGrid() const; |
151 | HippoGridInfo* getCurrentGrid() const; | 189 | HippoGridInfo* getCurrentGrid() const; |
152 | const std::string& getDefaultGridNick() const; | 190 | const std::string& getDefaultGridNick() const { return mDefaultGrid; } |
153 | const std::string& getCurrentGridNick() const; | 191 | const std::string& getCurrentGridNick() const; |
154 | 192 | ||
155 | void setDefaultGrid(const std::string& grid); | 193 | void setDefaultGrid(const std::string& grid); |
156 | void setCurrentGrid(const std::string& grid); | 194 | void setCurrentGrid(const std::string& grid); |
157 | void setCurrentGridAsConnected(); | 195 | void setCurrentGridAsConnected() { mConnectedGrid = getCurrentGrid(); } |
158 | 196 | ||
159 | void addGrid(HippoGridInfo* grid); | 197 | void addGrid(HippoGridInfo* grid); |
160 | void deleteGrid(const std::string& grid); | 198 | void deleteGrid(const std::string& grid); |
161 | 199 | ||
162 | typedef std::map<std::string, HippoGridInfo*>::iterator GridIterator; | 200 | typedef std::map<std::string, HippoGridInfo*>::iterator GridIterator; |
163 | GridIterator beginGrid() { return mGridInfo.begin(); } | 201 | GridIterator beginGrid() { return mGridInfo.begin(); } |
164 | GridIterator endGrid() { return mGridInfo.end(); } | 202 | GridIterator endGrid() { return mGridInfo.end(); } |
203 | |||
204 | // returns true if the grid manager knows of a nickname | ||
205 | bool hasGridNick(const std::string& grid_nick); | ||
165 | 206 | ||
166 | private: | 207 | private: |
167 | std::map<std::string, HippoGridInfo*> mGridInfo; | 208 | std::map<std::string, HippoGridInfo*> mGridInfo; |
168 | std::string mDefaultGrid; | 209 | std::string mDefaultGrid; |
169 | std::string mCurrentGrid; | 210 | std::string mCurrentGrid; |
170 | HippoGridInfo* mConnectedGrid; | 211 | HippoGridInfo* mConnectedGrid; |
171 | int mDefaultGridsVersion; | 212 | S32 mDefaultGridsVersion; |
172 | 213 | ||
173 | void cleanup(); | 214 | void cleanup(); |
174 | void loadFromFile(); | 215 | void loadFromFile(); |
175 | void parseFile(const std::string& fileName, bool mergeIfNewer); | 216 | void parseFile(const std::string& fileName, bool mergeIfNewer); |
176 | void parseUrl(const std::string url, bool mergeIfNewer); | 217 | void parseURL(const std::string url, bool mergeIfNewer); |
177 | void parseData(LLSD &gridInfo, bool mergeIfNewer); | 218 | void parseData(LLSD &gridInfo, bool mergeIfNewer); |
178 | }; | 219 | }; |
179 | 220 | ||
diff --git a/linden/indra/newview/installers/windows/imprudence_installer_script_experimental.iss b/linden/indra/newview/installers/windows/imprudence_installer_script_experimental.iss index d89a074..398c26d 100644 --- a/linden/indra/newview/installers/windows/imprudence_installer_script_experimental.iss +++ b/linden/indra/newview/installers/windows/imprudence_installer_script_experimental.iss | |||
@@ -8,11 +8,11 @@ | |||
8 | 8 | ||
9 | ; These will change | 9 | ; These will change |
10 | AppId={{1B3E68BC-13EB-4277-9439-CB5FF9259460} | 10 | AppId={{1B3E68BC-13EB-4277-9439-CB5FF9259460} |
11 | AppName=Imprudence Viewer Experimental Release | 11 | AppName=Imprudence Viewer Experimental |
12 | AppVerName=Imprudence Viewer 1.4.0 Experimental 2011.03.20 | 12 | AppVerName=Imprudence Viewer 1.4.0 Experimental 2011.03.20 |
13 | DefaultDirName={pf}\ImprudenceExperimental | 13 | DefaultDirName={pf}\ImprudenceExperimental |
14 | DefaultGroupName=Imprudence Viewer Experimental Release | 14 | DefaultGroupName=Imprudence Viewer Experimental |
15 | VersionInfoProductName=Imprudence Viewer Experimental Release | 15 | VersionInfoProductName=Imprudence Viewer Experimental |
16 | OutputBaseFilename=Imprudence-1.4.0-Experimental-2011.03.20-Setup | 16 | OutputBaseFilename=Imprudence-1.4.0-Experimental-2011.03.20-Setup |
17 | VersionInfoVersion=1.4.0 | 17 | VersionInfoVersion=1.4.0 |
18 | VersionInfoTextVersion=1.4.0 | 18 | VersionInfoTextVersion=1.4.0 |
diff --git a/linden/indra/newview/linux_tools/alsoft.conf b/linden/indra/newview/linux_tools/alsoft.conf new file mode 100644 index 0000000..7550ff0 --- /dev/null +++ b/linden/indra/newview/linux_tools/alsoft.conf | |||
@@ -0,0 +1,253 @@ | |||
1 | # OpenAL config file. Options that are not under a block or are under the | ||
2 | # [general] block are for general, non-backend-specific options. Blocks may | ||
3 | # appear multiple times, and duplicated options will take the last value | ||
4 | # specified. | ||
5 | # The system-wide settings can be put in /etc/openal/alsoft.conf and user- | ||
6 | # specific override settings in ~/.alsoftrc. | ||
7 | # For Windows, these settings should go into %AppData%\alsoft.ini | ||
8 | # The environment variable ALSOFT_CONF can be used to specify another config | ||
9 | # override | ||
10 | |||
11 | # Option and block names are case-insenstive. The supplied values are only | ||
12 | # hints and may not be honored (though generally it'll try to get as close as | ||
13 | # possible). Note: options that are left unset may default to app- or system- | ||
14 | # specified values. These are the current available settings: | ||
15 | |||
16 | ## format: | ||
17 | # Sets the output format. Can be one of: | ||
18 | # AL_FORMAT_MONO8 (8-bit mono) | ||
19 | # AL_FORMAT_STEREO8 (8-bit stereo) | ||
20 | # AL_FORMAT_QUAD8 (8-bit 4-channel) | ||
21 | # AL_FORMAT_51CHN8 (8-bit 5.1 output) | ||
22 | # AL_FORMAT_61CHN8 (8-bit 6.1 output) | ||
23 | # AL_FORMAT_71CHN8 (8-bit 7.1 output) | ||
24 | # AL_FORMAT_MONO16 (16-bit mono) | ||
25 | # AL_FORMAT_STEREO16 (16-bit stereo) | ||
26 | # AL_FORMAT_QUAD16 (16-bit 4-channel) | ||
27 | # AL_FORMAT_51CHN16 (16-bit 5.1 output) | ||
28 | # AL_FORMAT_61CHN16 (16-bit 6.1 output) | ||
29 | # AL_FORMAT_71CHN16 (16-bit 7.1 output) | ||
30 | # AL_FORMAT_MONO32 (32-bit float mono) | ||
31 | # AL_FORMAT_STEREO32 (32-bit float stereo) | ||
32 | # AL_FORMAT_QUAD32 (32-bit float 4-channel) | ||
33 | # AL_FORMAT_51CHN32 (32-bit float 5.1 output) | ||
34 | # AL_FORMAT_61CHN32 (32-bit float 6.1 output) | ||
35 | # AL_FORMAT_71CHN32 (32-bit float 7.1 output) | ||
36 | #format = AL_FORMAT_STEREO16 | ||
37 | |||
38 | ## cf_level: | ||
39 | # Sets the crossfeed level for stereo output. Valid values are: | ||
40 | # 0 - No crossfeed | ||
41 | # 1 - Low crossfeed | ||
42 | # 2 - Middle crossfeed | ||
43 | # 3 - High crossfeed (virtual speakers are closer to itself) | ||
44 | # 4 - Low easy crossfeed | ||
45 | # 5 - Middle easy crossfeed | ||
46 | # 6 - High easy crossfeed | ||
47 | # Users of headphones may want to try various settings. Has no effect on non- | ||
48 | # stereo modes. | ||
49 | #cf_level = 0 | ||
50 | |||
51 | ## head_dampen: | ||
52 | # Sets the amount of dampening on sounds emanating from behind the listener. | ||
53 | # This is used to simulate the natural occlusion of the head, which is | ||
54 | # typically missing with mono and stereo output, and as such, only works on | ||
55 | # mono and stereo output modes. Valid values range from 0 to 1 (inclusive), | ||
56 | # and higher values provide a stronger effect. | ||
57 | #head_dampen = 0.25 | ||
58 | |||
59 | ## frequency: | ||
60 | # Sets the output frequency. | ||
61 | #frequency = 44100 | ||
62 | |||
63 | ## resampler: | ||
64 | # Selects the resampler used when mixing sources. Valid values are: | ||
65 | # 0 - None (nearest sample, no interpolation) | ||
66 | # 1 - Linear (extrapolates samples using a linear slope between samples) | ||
67 | # 2 - Cubic (extrapolates samples using a Catmull-Rom spline) | ||
68 | # Specifying other values will result in using the default (linear). | ||
69 | #resampler = 1 | ||
70 | |||
71 | ## rt-prio: | ||
72 | # Sets real-time priority for the mixing thread. Not all drivers may use this | ||
73 | # (eg. PortAudio) as they already control the priority of the mixing thread. | ||
74 | # 0 and negative values will disable it. Note that this may constitute a | ||
75 | # security risk since a real-time priority thread can indefinitely block | ||
76 | # normal-priority threads if it fails to wait. As such, the default is | ||
77 | # disabled. | ||
78 | #rt-prio = 0 | ||
79 | |||
80 | ## period_size: | ||
81 | # Sets the update period size, in frames. This is the number of frames needed | ||
82 | # for each mixing update. | ||
83 | #period_size = 1024 | ||
84 | |||
85 | ## periods: | ||
86 | # Sets the number of update periods. Higher values create a larger mix ahead, | ||
87 | # which helps protect against skips when the CPU is under load, but increases | ||
88 | # the delay between a sound getting mixed and being heard. | ||
89 | #periods = 4 | ||
90 | |||
91 | ## sources: | ||
92 | # Sets the maximum number of allocatable sources. Lower values may help for | ||
93 | # systems with apps that try to play more sounds than the CPU can handle. | ||
94 | #sources = 256 | ||
95 | |||
96 | ## stereodup: | ||
97 | # Sets whether to duplicate stereo sounds on the rear and side speakers for 4+ | ||
98 | # channel output. This provides a "fuller" playback quality for 4+ channel | ||
99 | # output modes, although each individual speaker will have a slight reduction | ||
100 | # in volume to compensate for the extra output speakers. True, yes, on, and | ||
101 | # non-0 values will duplicate stereo sources. 0 and anything else will cause | ||
102 | # stereo sounds to only play out the front speakers. This only has an effect | ||
103 | # when a suitable output format is used (ie. those that contain side and/or | ||
104 | # rear speakers). | ||
105 | #stereodup = true | ||
106 | |||
107 | ## scalemix: | ||
108 | # Sets whether to scale the remixed output. When the final mix is written to | ||
109 | # the device, the multi-channel data is remixed so pure-virtual channels (eg. | ||
110 | # front-center on stereo output) are remixed and added to available channels | ||
111 | # (eg. front-left and front-right). Scaling helps ensure that no single source | ||
112 | # will put out more than 100% on a given physical channel. This can cause a | ||
113 | # noticeable reduction in overall volume, however, so it is off by default. | ||
114 | #scalemix = false | ||
115 | |||
116 | ## drivers: | ||
117 | # Sets the backend driver list order, comma-seperated. Unknown backends and | ||
118 | # duplicated names are ignored. Unlisted backends won't be considered for use | ||
119 | # unless the list is ended with a comma (eg. 'oss,' will list OSS first | ||
120 | # followed by all other available backends, while 'oss' will list OSS only). | ||
121 | # Backends prepended with - won't be available for use (eg. '-oss,' will allow | ||
122 | # all available backends except OSS). An empty list means the default. | ||
123 | #drivers = pulse,alsa,core,oss,solaris,dsound,winmm,port,null,wave | ||
124 | |||
125 | ## excludefx: | ||
126 | # Sets which effects to exclude, preventing apps from using them. This can | ||
127 | # help for apps that try to use effects which are too CPU intensive for the | ||
128 | # system to handle. Available effects are: eaxreverb,reverb,echo,modulator, | ||
129 | # dedicated | ||
130 | #excludefx = | ||
131 | |||
132 | ## slots: | ||
133 | # Sets the maximum number of Auxiliary Effect Slots an app can create. A slot | ||
134 | # can use a non-negligible amount of CPU time if an effect is set on it even | ||
135 | # if no sources are feeding it, so this may help when apps use more than the | ||
136 | # system can handle. | ||
137 | #slots = 4 | ||
138 | |||
139 | ## sends: | ||
140 | # Sets the number of auxiliary sends per source. When not specified (default), | ||
141 | # it allows the app to request how many it wants. The maximum value currently | ||
142 | # possible is 4. | ||
143 | #sends = | ||
144 | |||
145 | ## layout: | ||
146 | # Sets the virtual speaker layout. Values are specified in degrees, where 0 is | ||
147 | # straight in front, negative goes left, and positive goes right. Unspecified | ||
148 | # speakers will remain at their default positions (which are dependant on the | ||
149 | # output format). Available speakers are back-left(bl), side-left(sl), front- | ||
150 | # left(fl), front-center(fc), front-right(fr), side-right(sr), back-right(br), | ||
151 | # and back-center(bc). | ||
152 | #layout = | ||
153 | |||
154 | ## layout_*: | ||
155 | # Channel-specific layouts may be specified to override the layout option. The | ||
156 | # same speakers as the layout option are available, and the default settings | ||
157 | # are shown below. | ||
158 | #layout_STEREO = fl=-90, fr=90 | ||
159 | #layout_QUAD = fl=-45, fr=45, bl=-135, br=135 | ||
160 | #layout_51CHN = fl=-30, fr=30, fc=0, bl=-110, br=110 | ||
161 | #layout_61CHN = fl=-30, fr=30, fc=0, sl=-90, sr=90, bc=180 | ||
162 | #layout_71CHN = fl=-30, fr=30, fc=0, sl=-90, sr=90, bl=-150, br=150 | ||
163 | |||
164 | ## | ||
165 | ## ALSA backend stuff | ||
166 | ## | ||
167 | [alsa] | ||
168 | |||
169 | ## device: | ||
170 | # Sets the device name for the default playback device. | ||
171 | #device = default | ||
172 | |||
173 | ## capture: | ||
174 | # Sets the device name for the default capture device. | ||
175 | #capture = default | ||
176 | |||
177 | ## mmap: | ||
178 | # Sets whether to try using mmap mode (helps reduce latencies and CPU | ||
179 | # consumption). If mmap isn't available, it will automatically fall back to | ||
180 | # non-mmap mode. True, yes, on, and non-0 values will attempt to use mmap. 0 | ||
181 | # and anything else will force mmap off. | ||
182 | #mmap = true | ||
183 | |||
184 | ## | ||
185 | ## OSS backend stuff | ||
186 | ## | ||
187 | [oss] | ||
188 | |||
189 | ## device: | ||
190 | # Sets the device name for OSS output. | ||
191 | #device = /dev/dsp | ||
192 | |||
193 | ## capture: | ||
194 | # Sets the device name for OSS capture. | ||
195 | #capture = /dev/dsp | ||
196 | |||
197 | ## | ||
198 | ## Solaris backend stuff | ||
199 | ## | ||
200 | [solaris] | ||
201 | |||
202 | ## device: | ||
203 | # Sets the device name for Solaris output. | ||
204 | #device = /dev/audio | ||
205 | |||
206 | ## | ||
207 | ## DirectSound backend stuff | ||
208 | ## | ||
209 | [dsound] | ||
210 | |||
211 | ## | ||
212 | ## Windows Multimedia backend stuff | ||
213 | ## | ||
214 | [winmm] | ||
215 | |||
216 | ## | ||
217 | ## PortAudio backend stuff | ||
218 | ## | ||
219 | [port] | ||
220 | |||
221 | ## device: | ||
222 | # Sets the device index for output. Negative values will use the default as | ||
223 | # given by PortAudio itself. | ||
224 | #device = -1 | ||
225 | |||
226 | ## capture: | ||
227 | # Sets the device index for capture. Negative values will use the default as | ||
228 | # given by PortAudio itself. | ||
229 | #capture = -1 | ||
230 | |||
231 | ## | ||
232 | ## PulseAudio backend stuff | ||
233 | ## | ||
234 | [pulse] | ||
235 | |||
236 | ## spawn-server: | ||
237 | # Attempts to spawn a PulseAudio server when requesting to open a PulseAudio | ||
238 | # device. Note that some apps may open and probe all enumerated devices on | ||
239 | # startup, causing a server to spawn even if a PulseAudio device is not | ||
240 | # actually selected. Setting autospawn to false in Pulse's client.conf will | ||
241 | # still prevent autospawning even if this is set to true. | ||
242 | #spawn-server = false | ||
243 | |||
244 | ## | ||
245 | ## Wave File Writer stuff | ||
246 | ## | ||
247 | [wave] | ||
248 | |||
249 | ## file: | ||
250 | # Sets the filename of the wave file to write to. An empty name prevents the | ||
251 | # backend from opening, even when explicitly requested. | ||
252 | # THIS WILL OVERWRITE EXISTING FILES WITHOUT QUESTION! | ||
253 | #file = \ No newline at end of file | ||
diff --git a/linden/indra/newview/linux_tools/wrapper.sh b/linden/indra/newview/linux_tools/wrapper.sh index e590394..08ae537 100755 --- a/linden/indra/newview/linux_tools/wrapper.sh +++ b/linden/indra/newview/linux_tools/wrapper.sh | |||
@@ -4,17 +4,26 @@ | |||
4 | ## These options are for self-assisted troubleshooting during this beta | 4 | ## These options are for self-assisted troubleshooting during this beta |
5 | ## testing phase; you should not usually need to touch them. | 5 | ## testing phase; you should not usually need to touch them. |
6 | 6 | ||
7 | ## - Avoids using any OpenAL audio driver. | 7 | ## If the default configuration of openal-soft isn't working for you. |
8 | ## There are 3 places where it looks for a configuration file: | ||
9 | ## /etc/openal/alsoft.conf $HOME/.alsoftrc and ALSOFT_CONF | ||
10 | ## ALSOFT_CONF is the full path including the filename, like: /home/myuser/myconfigfile.txt | ||
11 | ## If none of them is set a hardcoded default is taken. | ||
12 | ## If you set several: ALSOFT_CONF 'wins' always, and $HOME/.alsoftrc 'wins' over /etc/openal/alsoft.conf | ||
13 | #export ALSOFT_CONF="$(pwd)/alsoft.conf" | ||
14 | |||
15 | ## - Avoids using the OpenAL audio driver; disables any inworld sound effects. | ||
16 | ## NOTE: - OpenAL is not used for any streaming audio in Imprudence. | ||
17 | ## - Other export LL_BAD_<driver> have no effect in Imprudence. | ||
8 | #export LL_BAD_OPENAL_DRIVER=x | 18 | #export LL_BAD_OPENAL_DRIVER=x |
9 | ## - Avoids using any FMOD audio driver. | ||
10 | #export LL_BAD_FMOD_DRIVER=x | ||
11 | 19 | ||
12 | ## - Avoids using the FMOD ESD audio driver. | 20 | ## If you have custom gstreamer plugins, |
13 | #export LL_BAD_FMOD_ESD=x | 21 | ## e.g. you want to use Imprudence-1.4.x with the gstreamer plugins of Imprudence-1.3.1: |
14 | ## - Avoids using the FMOD OSS audio driver. | 22 | ## Imprudence-1.3.1-Linux-x86/lib/gstreamer-plugins |
15 | #export LL_BAD_FMOD_OSS=x | 23 | ## respectively Imprudence-1.3.1-Linux-x86_64/lib64/gstreamer-plugins |
16 | ## - Avoids using the FMOD ALSA audio driver. | 24 | ## NOTE: *WAY* better is to install the gstreamer plugins that come with your distros package manager, |
17 | #export LL_BAD_FMOD_ALSA=x | 25 | ## thats why Imprudence-1.4.x comes without gstreamer plugins. |
26 | #export GST_PLUGIN_PATH="'${HOME}/Imprudence-1.3.1-Linux-x86/lib/gstreamer-plugins':'${GST_PLUGIN_PATH}'" | ||
18 | 27 | ||
19 | ## - Avoids the optional OpenGL extensions which have proven most problematic | 28 | ## - Avoids the optional OpenGL extensions which have proven most problematic |
20 | ## on some hardware. Disabling this option may cause BETTER PERFORMANCE but | 29 | ## on some hardware. Disabling this option may cause BETTER PERFORMANCE but |
@@ -48,7 +57,6 @@ | |||
48 | 57 | ||
49 | ## Everything below this line is just for advanced troubleshooters. | 58 | ## Everything below this line is just for advanced troubleshooters. |
50 | ##------------------------------------------------------------------- | 59 | ##------------------------------------------------------------------- |
51 | |||
52 | ## - For advanced debugging cases, you can run the viewer under the | 60 | ## - For advanced debugging cases, you can run the viewer under the |
53 | ## control of another program, such as strace, gdb, or valgrind. If | 61 | ## control of another program, such as strace, gdb, or valgrind. If |
54 | ## you're building your own viewer, bear in mind that the executable | 62 | ## you're building your own viewer, bear in mind that the executable |
@@ -127,7 +135,20 @@ if [ -n "$LL_RUN_ERR" ]; then | |||
127 | if [ "$LL_RUN_ERR" = "runerr" ]; then | 135 | if [ "$LL_RUN_ERR" = "runerr" ]; then |
128 | # generic error running the binary | 136 | # generic error running the binary |
129 | echo 'unexpected shutdown' | 137 | echo 'unexpected shutdown' |
130 | |||
131 | |||
132 | fi | 138 | fi |
133 | fi | 139 | fi |
140 | |||
141 | LOGS_PATH="${HOME}/.imprudence/logs" | ||
142 | if [ -f "${LOGS_PATH}/stack_trace.log" ]; then | ||
143 | LOG_PACKAGE_NAME="MAIL-THIS-CRASHLOG-PLEASE.$(date +%y%m%d%H%M).tar.bz2" | ||
144 | cp "${LOGS_PATH}/stack_trace.log" stack_trace.log | ||
145 | cp "${LOGS_PATH}/Imprudence.log" Imprudence.log | ||
146 | tar --numeric-owner -cjf ${LOG_PACKAGE_NAME} \ | ||
147 | stack_trace.log \ | ||
148 | Imprudence.log | ||
149 | rm stack_trace.log | ||
150 | rm Imprudence.log | ||
151 | echo "You find a crash log package to mail to Imprudence here:" | ||
152 | echo "${RUN_PATH}/${LOG_PACKAGE_NAME}" | ||
153 | echo "See where to send: http://wiki.kokuaviewer.org/wiki/Imprudence:Debug_Logs#Where_to_Send_Them" | ||
154 | fi | ||
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index 7bc57f8..85a1b36 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp | |||
@@ -56,6 +56,7 @@ | |||
56 | #include "llsdutil.h" | 56 | #include "llsdutil.h" |
57 | //#include "vmath.h" | 57 | //#include "vmath.h" |
58 | 58 | ||
59 | #include "hippogridmanager.h" | ||
59 | #include "imageids.h" | 60 | #include "imageids.h" |
60 | #include "llbox.h" | 61 | #include "llbox.h" |
61 | #include "llbutton.h" | 62 | #include "llbutton.h" |
@@ -2734,14 +2735,24 @@ void LLAgent::updateLookAt(const S32 mouse_x, const S32 mouse_y) | |||
2734 | } | 2735 | } |
2735 | else if (cameraThirdPerson()) | 2736 | else if (cameraThirdPerson()) |
2736 | { | 2737 | { |
2737 | // range from -.5 to .5 | 2738 | if (gSavedSettings.getBOOL("HeadFollowsMouse")) |
2738 | F32 x_from_center = | 2739 | { |
2739 | ((F32) mouse_x / (F32) gViewerWindow->getWindowWidth() ) - 0.5f; | 2740 | // range from -.5 to .5 |
2740 | F32 y_from_center = | 2741 | F32 x_from_center = |
2741 | ((F32) mouse_y / (F32) gViewerWindow->getWindowHeight() ) - 0.5f; | 2742 | ((F32) mouse_x / (F32) gViewerWindow->getWindowWidth() ) - 0.5f; |
2742 | 2743 | F32 y_from_center = | |
2743 | frameCamera.yaw( - x_from_center * gSavedSettings.getF32("YawFromMousePosition") * DEG_TO_RAD); | 2744 | ((F32) mouse_y / (F32) gViewerWindow->getWindowHeight() ) - 0.5f; |
2744 | frameCamera.pitch( - y_from_center * gSavedSettings.getF32("PitchFromMousePosition") * DEG_TO_RAD); | 2745 | |
2746 | frameCamera.yaw( - x_from_center * gSavedSettings.getF32("YawFromMousePosition") | ||
2747 | * DEG_TO_RAD); | ||
2748 | frameCamera.pitch( - y_from_center * gSavedSettings.getF32("PitchFromMousePosition") | ||
2749 | * DEG_TO_RAD); | ||
2750 | } | ||
2751 | else | ||
2752 | { | ||
2753 | frameCamera.yaw( 0.f ); | ||
2754 | frameCamera.pitch( 0.f ); | ||
2755 | } | ||
2745 | lookAtType = LOOKAT_TARGET_FREELOOK; | 2756 | lookAtType = LOOKAT_TARGET_FREELOOK; |
2746 | } | 2757 | } |
2747 | 2758 | ||
@@ -4772,6 +4783,116 @@ void LLAgent::lookAtLastChat() | |||
4772 | } | 4783 | } |
4773 | } | 4784 | } |
4774 | 4785 | ||
4786 | void LLAgent::lookAtObject(LLUUID object_id, ECameraPosition camera_pos) | ||
4787 | { | ||
4788 | // Block if camera is animating or not in normal third person camera mode | ||
4789 | if (mCameraAnimating || !cameraThirdPerson()) | ||
4790 | { | ||
4791 | return; | ||
4792 | } | ||
4793 | |||
4794 | LLViewerObject *chatter = gObjectList.findObject(object_id); | ||
4795 | if (chatter) | ||
4796 | { | ||
4797 | LLVector3 delta_pos; | ||
4798 | if (chatter->isAvatar()) | ||
4799 | { | ||
4800 | LLVOAvatar *chatter_av = (LLVOAvatar*)chatter; | ||
4801 | if (!mAvatarObject.isNull() && chatter_av->mHeadp) | ||
4802 | { | ||
4803 | delta_pos = chatter_av->mHeadp->getWorldPosition() - mAvatarObject->mHeadp->getWorldPosition(); | ||
4804 | } | ||
4805 | else | ||
4806 | { | ||
4807 | delta_pos = chatter->getPositionAgent() - getPositionAgent(); | ||
4808 | } | ||
4809 | delta_pos.normVec(); | ||
4810 | |||
4811 | setControlFlags(AGENT_CONTROL_STOP); | ||
4812 | |||
4813 | changeCameraToThirdPerson(); | ||
4814 | |||
4815 | LLVector3 new_camera_pos = mAvatarObject->mHeadp->getWorldPosition(); | ||
4816 | LLVector3 left = delta_pos % LLVector3::z_axis; | ||
4817 | left.normVec(); | ||
4818 | LLVector3 up = left % delta_pos; | ||
4819 | up.normVec(); | ||
4820 | new_camera_pos -= delta_pos * 0.4f; | ||
4821 | new_camera_pos += left * 0.3f; | ||
4822 | new_camera_pos += up * 0.2f; | ||
4823 | |||
4824 | F32 radius = chatter_av->getVObjRadius(); | ||
4825 | LLVector3d view_dist(radius, radius, 0.0f); | ||
4826 | |||
4827 | if (chatter_av->mHeadp) | ||
4828 | { | ||
4829 | setFocusGlobal(getPosGlobalFromAgent(chatter_av->mHeadp->getWorldPosition()), object_id); | ||
4830 | mCameraFocusOffsetTarget = getPosGlobalFromAgent(new_camera_pos) - gAgent.getPosGlobalFromAgent(chatter_av->mHeadp->getWorldPosition()); | ||
4831 | |||
4832 | switch(camera_pos) | ||
4833 | { | ||
4834 | case CAMERA_POSITION_SELF: | ||
4835 | mCameraFocusOffsetTarget = getPosGlobalFromAgent(new_camera_pos) - gAgent.getPosGlobalFromAgent(chatter_av->mHeadp->getWorldPosition()); | ||
4836 | break; | ||
4837 | case CAMERA_POSITION_OBJECT: | ||
4838 | mCameraFocusOffsetTarget = view_dist; | ||
4839 | break; | ||
4840 | } | ||
4841 | } | ||
4842 | else | ||
4843 | { | ||
4844 | setFocusGlobal(chatter->getPositionGlobal(), object_id); | ||
4845 | mCameraFocusOffsetTarget = getPosGlobalFromAgent(new_camera_pos) - chatter->getPositionGlobal(); | ||
4846 | |||
4847 | switch(camera_pos) | ||
4848 | { | ||
4849 | case CAMERA_POSITION_SELF: | ||
4850 | mCameraFocusOffsetTarget = getPosGlobalFromAgent(new_camera_pos) - chatter->getPositionGlobal(); | ||
4851 | break; | ||
4852 | case CAMERA_POSITION_OBJECT: | ||
4853 | mCameraFocusOffsetTarget = view_dist; | ||
4854 | break; | ||
4855 | } | ||
4856 | } | ||
4857 | setFocusOnAvatar(FALSE, TRUE); | ||
4858 | } | ||
4859 | else | ||
4860 | { | ||
4861 | delta_pos = chatter->getRenderPosition() - getPositionAgent(); | ||
4862 | delta_pos.normVec(); | ||
4863 | |||
4864 | setControlFlags(AGENT_CONTROL_STOP); | ||
4865 | |||
4866 | changeCameraToThirdPerson(); | ||
4867 | |||
4868 | LLVector3 new_camera_pos = mAvatarObject->mHeadp->getWorldPosition(); | ||
4869 | LLVector3 left = delta_pos % LLVector3::z_axis; | ||
4870 | left.normVec(); | ||
4871 | LLVector3 up = left % delta_pos; | ||
4872 | up.normVec(); | ||
4873 | new_camera_pos -= delta_pos * 0.4f; | ||
4874 | new_camera_pos += left * 0.3f; | ||
4875 | new_camera_pos += up * 0.2f; | ||
4876 | |||
4877 | setFocusGlobal(chatter->getPositionGlobal(), object_id); | ||
4878 | |||
4879 | switch(camera_pos) | ||
4880 | { | ||
4881 | case CAMERA_POSITION_SELF: | ||
4882 | mCameraFocusOffsetTarget = getPosGlobalFromAgent(new_camera_pos) - chatter->getPositionGlobal(); | ||
4883 | break; | ||
4884 | case CAMERA_POSITION_OBJECT: | ||
4885 | F32 radius = chatter->getVObjRadius(); | ||
4886 | LLVector3d view_dist(radius, radius, 0.0f); | ||
4887 | mCameraFocusOffsetTarget = view_dist; | ||
4888 | break; | ||
4889 | } | ||
4890 | |||
4891 | setFocusOnAvatar(FALSE, TRUE); | ||
4892 | } | ||
4893 | } | ||
4894 | } | ||
4895 | |||
4775 | const F32 SIT_POINT_EXTENTS = 0.2f; | 4896 | const F32 SIT_POINT_EXTENTS = 0.2f; |
4776 | 4897 | ||
4777 | void LLAgent::setStartPosition( U32 location_id ) | 4898 | void LLAgent::setStartPosition( U32 location_id ) |
@@ -5480,7 +5601,7 @@ void LLAgent::getName(std::string& name) | |||
5480 | } | 5601 | } |
5481 | else | 5602 | else |
5482 | { | 5603 | { |
5483 | name = gSavedSettings.getString("FirstName") + " " + gSavedSettings.getString("LastName"); | 5604 | name = gHippoGridManager->getCurrentGrid()->getFirstName() + " " + gHippoGridManager->getCurrentGrid()->getLastName(); |
5484 | } | 5605 | } |
5485 | } | 5606 | } |
5486 | 5607 | ||
diff --git a/linden/indra/newview/llagent.h b/linden/indra/newview/llagent.h index cea55fb..83490d3 100644 --- a/linden/indra/newview/llagent.h +++ b/linden/indra/newview/llagent.h | |||
@@ -82,6 +82,12 @@ typedef enum e_camera_modes | |||
82 | CAMERA_MODE_FOLLOW | 82 | CAMERA_MODE_FOLLOW |
83 | } ECameraMode; | 83 | } ECameraMode; |
84 | 84 | ||
85 | typedef enum e_camera_position | ||
86 | { | ||
87 | CAMERA_POSITION_SELF, /** Camera positioned at our position */ | ||
88 | CAMERA_POSITION_OBJECT /** Camera positioned at observed object's position */ | ||
89 | } ECameraPosition; | ||
90 | |||
85 | typedef enum e_anim_request | 91 | typedef enum e_anim_request |
86 | { | 92 | { |
87 | ANIM_REQUEST_START, | 93 | ANIM_REQUEST_START, |
@@ -214,6 +220,7 @@ public: | |||
214 | 220 | ||
215 | void heardChat(const LLUUID& id); | 221 | void heardChat(const LLUUID& id); |
216 | void lookAtLastChat(); | 222 | void lookAtLastChat(); |
223 | void lookAtObject(LLUUID avatar_id, ECameraPosition camera_pos); | ||
217 | F32 getTypingTime() { return mTypingTimer.getElapsedTimeF32(); } | 224 | F32 getTypingTime() { return mTypingTimer.getElapsedTimeF32(); } |
218 | 225 | ||
219 | void setAFK(); | 226 | void setAFK(); |
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index 18b65cc..d76b722 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp | |||
@@ -859,7 +859,7 @@ bool LLAppViewer::init() | |||
859 | minSpecs += "\n"; | 859 | minSpecs += "\n"; |
860 | unsupported = true; | 860 | unsupported = true; |
861 | } | 861 | } |
862 | if(gSysCPU.getMhz() < minCPU) | 862 | if(gSysCPU.getMHz() < minCPU) |
863 | { | 863 | { |
864 | minSpecs += LLNotifications::instance().getGlobalString("UnsupportedCPU"); | 864 | minSpecs += LLNotifications::instance().getGlobalString("UnsupportedCPU"); |
865 | minSpecs += "\n"; | 865 | minSpecs += "\n"; |
@@ -1267,6 +1267,19 @@ bool LLAppViewer::cleanup() | |||
1267 | 1267 | ||
1268 | LLCalc::cleanUp(); | 1268 | LLCalc::cleanUp(); |
1269 | 1269 | ||
1270 | // Quitting with "Remember Password" turned off should always stomp your | ||
1271 | // saved password, whether or not you successfully logged in. JC | ||
1272 | if (!gSavedSettings.getBOOL("RememberPassword")) | ||
1273 | { | ||
1274 | gHippoGridManager->getConnectedGrid()->setPassword(""); | ||
1275 | |||
1276 | // kill old password.dat file if it exists. We do this to keep setting compatibility with older versions -- MC | ||
1277 | std::string filepath = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "password.dat"); | ||
1278 | LLFile::remove(filepath); | ||
1279 | } | ||
1280 | |||
1281 | gHippoGridManager->saveFile(); | ||
1282 | |||
1270 | delete gHippoGridManager; | 1283 | delete gHippoGridManager; |
1271 | gHippoGridManager = NULL; | 1284 | gHippoGridManager = NULL; |
1272 | 1285 | ||
@@ -1418,13 +1431,6 @@ bool LLAppViewer::cleanup() | |||
1418 | // | 1431 | // |
1419 | LLVFile::cleanupClass(); | 1432 | LLVFile::cleanupClass(); |
1420 | llinfos << "VFS cleaned up" << llendflush; | 1433 | llinfos << "VFS cleaned up" << llendflush; |
1421 | |||
1422 | // Quitting with "Remember Password" turned off should always stomp your | ||
1423 | // saved password, whether or not you successfully logged in. JC | ||
1424 | if (!gSavedSettings.getBOOL("RememberPassword")) | ||
1425 | { | ||
1426 | LLStartUp::deletePasswordFromDisk(); | ||
1427 | } | ||
1428 | 1434 | ||
1429 | // Store the time of our current logoff | 1435 | // Store the time of our current logoff |
1430 | gSavedPerAccountSettings.setU32("LastLogoff", time_corrected()); | 1436 | gSavedPerAccountSettings.setU32("LastLogoff", time_corrected()); |
@@ -2467,7 +2473,7 @@ void LLAppViewer::writeSystemInfo() | |||
2467 | 2473 | ||
2468 | gDebugInfo["CPUInfo"]["CPUString"] = gSysCPU.getCPUString(); | 2474 | gDebugInfo["CPUInfo"]["CPUString"] = gSysCPU.getCPUString(); |
2469 | gDebugInfo["CPUInfo"]["CPUFamily"] = gSysCPU.getFamily(); | 2475 | gDebugInfo["CPUInfo"]["CPUFamily"] = gSysCPU.getFamily(); |
2470 | gDebugInfo["CPUInfo"]["CPUMhz"] = gSysCPU.getMhz(); | 2476 | gDebugInfo["CPUInfo"]["CPUMhz"] = gSysCPU.getMHz(); |
2471 | gDebugInfo["CPUInfo"]["CPUAltivec"] = gSysCPU.hasAltivec(); | 2477 | gDebugInfo["CPUInfo"]["CPUAltivec"] = gSysCPU.hasAltivec(); |
2472 | gDebugInfo["CPUInfo"]["CPUSSE"] = gSysCPU.hasSSE(); | 2478 | gDebugInfo["CPUInfo"]["CPUSSE"] = gSysCPU.hasSSE(); |
2473 | gDebugInfo["CPUInfo"]["CPUSSE2"] = gSysCPU.hasSSE2(); | 2479 | gDebugInfo["CPUInfo"]["CPUSSE2"] = gSysCPU.hasSSE2(); |
@@ -3261,10 +3267,10 @@ void LLAppViewer::badNetworkHandler() | |||
3261 | LLAppViewer::handleViewerCrash(); | 3267 | LLAppViewer::handleViewerCrash(); |
3262 | 3268 | ||
3263 | std::string grid_support_msg = ""; | 3269 | std::string grid_support_msg = ""; |
3264 | if (!gHippoGridManager->getCurrentGrid()->getSupportUrl().empty()) | 3270 | if (!gHippoGridManager->getCurrentGrid()->getSupportURL().empty()) |
3265 | { | 3271 | { |
3266 | grid_support_msg = "\n\nOr visit the gird support page at: \n " | 3272 | grid_support_msg = "\n\nOr visit the gird support page at: \n " |
3267 | + gHippoGridManager->getCurrentGrid()->getSupportUrl(); | 3273 | + gHippoGridManager->getCurrentGrid()->getSupportURL(); |
3268 | } | 3274 | } |
3269 | std::ostringstream message; | 3275 | std::ostringstream message; |
3270 | message << | 3276 | message << |
@@ -4196,6 +4202,11 @@ void LLAppViewer::disconnectViewer() | |||
4196 | 4202 | ||
4197 | saveNameCache(); | 4203 | saveNameCache(); |
4198 | 4204 | ||
4205 | { | ||
4206 | std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "cloud.xml"); | ||
4207 | LLVOAvatar::saveCloud(filename, LLVOAvatar::sCloud); | ||
4208 | } | ||
4209 | |||
4199 | // close inventory interface, close all windows | 4210 | // close inventory interface, close all windows |
4200 | LLInventoryView::cleanup(); | 4211 | LLInventoryView::cleanup(); |
4201 | // Don't cleanup menus on disconnect in order to avoid crashes -- MC | 4212 | // Don't cleanup menus on disconnect in order to avoid crashes -- MC |
diff --git a/linden/indra/newview/llfeaturemanager.cpp b/linden/indra/newview/llfeaturemanager.cpp index bf43fcf..25942e9 100644 --- a/linden/indra/newview/llfeaturemanager.cpp +++ b/linden/indra/newview/llfeaturemanager.cpp | |||
@@ -617,7 +617,7 @@ void LLFeatureManager::applyBaseMasks() | |||
617 | #error The 800 is hinky. Would something like a LL_MIN_MHZ make more sense here? | 617 | #error The 800 is hinky. Would something like a LL_MIN_MHZ make more sense here? |
618 | if (gSysCPU.getMhz() < 800) | 618 | if (gSysCPU.getMhz() < 800) |
619 | #else | 619 | #else |
620 | if (gSysCPU.getMhz() < 1100) | 620 | if (gSysCPU.getMHz() < 1100) |
621 | #endif | 621 | #endif |
622 | { | 622 | { |
623 | maskFeatures("CPUSlow"); | 623 | maskFeatures("CPUSlow"); |
diff --git a/linden/indra/newview/llfloateravatarlist.cpp b/linden/indra/newview/llfloateravatarlist.cpp new file mode 100644 index 0000000..2346e94 --- /dev/null +++ b/linden/indra/newview/llfloateravatarlist.cpp | |||
@@ -0,0 +1,1471 @@ | |||
1 | /** | ||
2 | * @file llfloateravatarlist.cpp | ||
3 | * @brief Avatar list/radar floater | ||
4 | * | ||
5 | * @author Dale Glass <dale@daleglass.net>, (C) 2007 | ||
6 | */ | ||
7 | |||
8 | /** | ||
9 | * Rewritten by jcool410 | ||
10 | * Removed usage of globals | ||
11 | * Removed TrustNET | ||
12 | * Added utilization of "minimap" data | ||
13 | * Heavily modified by Henri Beauchamp (the laggy spying tool becomes a true, | ||
14 | * low lag radar) | ||
15 | */ | ||
16 | |||
17 | #include "llviewerprecompiledheaders.h" | ||
18 | |||
19 | #include "llavatarconstants.h" | ||
20 | #include "llfloateravatarlist.h" | ||
21 | |||
22 | #include "llcachename.h" | ||
23 | #include "lluictrlfactory.h" | ||
24 | #include "llviewerwindow.h" | ||
25 | #include "llscrolllistctrl.h" | ||
26 | #include "llradiogroup.h" | ||
27 | #include "llviewercontrol.h" | ||
28 | |||
29 | #include "llvoavatar.h" | ||
30 | #include "llimview.h" | ||
31 | #include "llfloateravatarinfo.h" | ||
32 | #include "llregionflags.h" | ||
33 | #include "llfloaterreporter.h" | ||
34 | #include "llagent.h" | ||
35 | #include "llviewerregion.h" | ||
36 | #include "lltracker.h" | ||
37 | #include "llviewerstats.h" | ||
38 | #include "llerror.h" | ||
39 | #include "llchat.h" | ||
40 | #include "llfloaterchat.h" | ||
41 | #include "llviewermessage.h" | ||
42 | #include "llweb.h" | ||
43 | #include "llviewerobjectlist.h" | ||
44 | #include "llmutelist.h" | ||
45 | #include "llcallbacklist.h" | ||
46 | #include "llviewermenu.h" | ||
47 | |||
48 | #include <time.h> | ||
49 | #include <string.h> | ||
50 | |||
51 | #include <map> | ||
52 | |||
53 | |||
54 | #include "llworld.h" | ||
55 | |||
56 | #include "llsdutil.h" | ||
57 | |||
58 | /** | ||
59 | * @brief How long to keep people who are gone in the list and in memory. | ||
60 | */ | ||
61 | const F32 DEAD_KEEP_TIME = 10.0f; | ||
62 | |||
63 | extern U32 gFrameCount; | ||
64 | |||
65 | typedef enum e_radar_alert_type | ||
66 | { | ||
67 | ALERT_TYPE_SIM = 0, | ||
68 | ALERT_TYPE_DRAW = 1, | ||
69 | ALERT_TYPE_SHOUTRANGE = 2, | ||
70 | ALERT_TYPE_CHATRANGE = 3 | ||
71 | } ERadarAlertType; | ||
72 | |||
73 | void announce(std::string msg) | ||
74 | { | ||
75 | //llinfos << "Radar broadcasting key: " << key.asString() << " - on channel " << gSavedSettings.getS32("RadarChatKeysChannel") << llendl; | ||
76 | gMessageSystem->newMessage("ScriptDialogReply"); | ||
77 | gMessageSystem->nextBlock("AgentData"); | ||
78 | gMessageSystem->addUUID("AgentID", gAgent.getID()); | ||
79 | gMessageSystem->addUUID("SessionID", gAgent.getSessionID()); | ||
80 | gMessageSystem->nextBlock("Data"); | ||
81 | gMessageSystem->addUUID("ObjectID", gAgent.getID()); | ||
82 | gMessageSystem->addS32("ChatChannel", gSavedSettings.getS32("RadarChatKeysChannel")); | ||
83 | gMessageSystem->addS32("ButtonIndex", 1); | ||
84 | gMessageSystem->addString("ButtonLabel", msg); | ||
85 | gAgent.sendReliableMessage(); | ||
86 | } | ||
87 | |||
88 | void chat_avatar_status(std::string name, LLUUID key, ERadarAlertType type, bool entering) | ||
89 | { | ||
90 | if (gSavedSettings.getBOOL("RadarChatAlerts")) | ||
91 | { | ||
92 | LLChat chat; | ||
93 | switch(type) | ||
94 | { | ||
95 | case ALERT_TYPE_SIM: | ||
96 | if (gSavedSettings.getBOOL("MiniMapNotifySimRange")) | ||
97 | { | ||
98 | chat.mText = name+" has "+(entering ? "entered" : "left")+" the sim."; | ||
99 | } | ||
100 | break; | ||
101 | case ALERT_TYPE_DRAW: | ||
102 | if (gSavedSettings.getBOOL("RadarAlertDraw")) | ||
103 | { | ||
104 | chat.mText = name+" has "+(entering ? "entered" : "left")+" draw distance."; | ||
105 | } | ||
106 | break; | ||
107 | case ALERT_TYPE_SHOUTRANGE: | ||
108 | if (gSavedSettings.getBOOL("RadarAlertShoutRange")) | ||
109 | { | ||
110 | chat.mText = name+" has "+(entering ? "entered" : "left")+" shout range."; | ||
111 | } | ||
112 | break; | ||
113 | case ALERT_TYPE_CHATRANGE: | ||
114 | if (gSavedSettings.getBOOL("MiniMapNotifyChatRange")) | ||
115 | { | ||
116 | chat.mText = name+" has "+(entering ? "entered" : "left")+" chat range."; | ||
117 | } | ||
118 | break; | ||
119 | } | ||
120 | if (chat.mText != "") | ||
121 | { | ||
122 | chat.mSourceType = CHAT_SOURCE_SYSTEM; | ||
123 | LLFloaterChat::addChat(chat); | ||
124 | } | ||
125 | } | ||
126 | if (type == ALERT_TYPE_SIM && entering && gSavedSettings.getBOOL("RadarChatKeys")) | ||
127 | { | ||
128 | announce(key.asString()); | ||
129 | } | ||
130 | } | ||
131 | |||
132 | LLAvatarListEntry::LLAvatarListEntry(const LLUUID& id, const std::string &name, const LLVector3d &position) : | ||
133 | mID(id), mName(name), mDisplayName(name), mPosition(position), mDrawPosition(), mMarked(FALSE), | ||
134 | mFocused(FALSE), mUpdateTimer(), mFrame(gFrameCount), mInSimFrame(U32_MAX), mInDrawFrame(U32_MAX), | ||
135 | mInChatFrame(U32_MAX), mInShoutFrame(U32_MAX) | ||
136 | { | ||
137 | } | ||
138 | |||
139 | void LLAvatarListEntry::setPosition(LLVector3d position, bool this_sim, bool drawn, bool chatrange, bool shoutrange) | ||
140 | { | ||
141 | if (drawn) | ||
142 | { | ||
143 | mDrawPosition = position; | ||
144 | } | ||
145 | else if (mInDrawFrame == U32_MAX) | ||
146 | { | ||
147 | mDrawPosition.setZero(); | ||
148 | } | ||
149 | |||
150 | mPosition = position; | ||
151 | |||
152 | mFrame = gFrameCount; | ||
153 | if (this_sim) | ||
154 | { | ||
155 | if (mInSimFrame == U32_MAX) | ||
156 | { | ||
157 | chat_avatar_status(mName, mID, ALERT_TYPE_SIM, true); | ||
158 | } | ||
159 | mInSimFrame = mFrame; | ||
160 | } | ||
161 | if (drawn) | ||
162 | { | ||
163 | if (mInDrawFrame == U32_MAX) | ||
164 | { | ||
165 | chat_avatar_status(mName, mID, ALERT_TYPE_DRAW, true); | ||
166 | } | ||
167 | mInDrawFrame = mFrame; | ||
168 | } | ||
169 | if (shoutrange) | ||
170 | { | ||
171 | if (mInShoutFrame == U32_MAX) | ||
172 | { | ||
173 | chat_avatar_status(mName, mID, ALERT_TYPE_SHOUTRANGE, true); | ||
174 | } | ||
175 | mInShoutFrame = mFrame; | ||
176 | } | ||
177 | if (chatrange) | ||
178 | { | ||
179 | if (mInChatFrame == U32_MAX) | ||
180 | { | ||
181 | chat_avatar_status(mName, mID, ALERT_TYPE_CHATRANGE, true); | ||
182 | } | ||
183 | mInChatFrame = mFrame; | ||
184 | } | ||
185 | |||
186 | mUpdateTimer.start(); | ||
187 | } | ||
188 | |||
189 | bool LLAvatarListEntry::getAlive() | ||
190 | { | ||
191 | U32 current = gFrameCount; | ||
192 | if (mInSimFrame != U32_MAX && (current - mInSimFrame) >= 2) | ||
193 | { | ||
194 | mInSimFrame = U32_MAX; | ||
195 | chat_avatar_status(mName, mID, ALERT_TYPE_SIM, false); | ||
196 | } | ||
197 | if (mInDrawFrame != U32_MAX && (current - mInDrawFrame) >= 2) | ||
198 | { | ||
199 | mInDrawFrame = U32_MAX; | ||
200 | chat_avatar_status(mName, mID, ALERT_TYPE_DRAW, false); | ||
201 | } | ||
202 | if (mInShoutFrame != U32_MAX && (current - mInShoutFrame) >= 2) | ||
203 | { | ||
204 | mInShoutFrame = U32_MAX; | ||
205 | chat_avatar_status(mName, mID, ALERT_TYPE_SHOUTRANGE, false); | ||
206 | } | ||
207 | if (mInChatFrame != U32_MAX && (current - mInChatFrame) >= 2) | ||
208 | { | ||
209 | mInChatFrame = U32_MAX; | ||
210 | chat_avatar_status(mName, mID, ALERT_TYPE_CHATRANGE, false); | ||
211 | } | ||
212 | return ((current - mFrame) <= 2); | ||
213 | } | ||
214 | |||
215 | F32 LLAvatarListEntry::getEntryAgeSeconds() | ||
216 | { | ||
217 | return mUpdateTimer.getElapsedTimeF32(); | ||
218 | } | ||
219 | |||
220 | BOOL LLAvatarListEntry::isDead() | ||
221 | { | ||
222 | return getEntryAgeSeconds() > DEAD_KEEP_TIME; | ||
223 | } | ||
224 | |||
225 | LLFloaterAvatarList* LLFloaterAvatarList::sInstance = NULL; | ||
226 | |||
227 | LLFloaterAvatarList::LLFloaterAvatarList() : LLFloater(std::string("radar")) | ||
228 | { | ||
229 | llassert_always(sInstance == NULL); | ||
230 | sInstance = this; | ||
231 | mUpdateRate = gSavedSettings.getU32("RadarUpdateRate") * 3 + 3; | ||
232 | } | ||
233 | |||
234 | LLFloaterAvatarList::~LLFloaterAvatarList() | ||
235 | { | ||
236 | gIdleCallbacks.deleteFunction(LLFloaterAvatarList::callbackIdle); | ||
237 | sInstance = NULL; | ||
238 | } | ||
239 | |||
240 | //static | ||
241 | void LLFloaterAvatarList::toggle(void*) | ||
242 | { | ||
243 | #ifdef LL_RRINTERFACE_H //MK | ||
244 | if (gRRenabled && gAgent.mRRInterface.mContainsShownames) | ||
245 | { | ||
246 | if (sInstance && sInstance->getVisible()) | ||
247 | { | ||
248 | sInstance->close(false); | ||
249 | } | ||
250 | } | ||
251 | #endif //mk | ||
252 | if (sInstance) | ||
253 | { | ||
254 | if (sInstance->getVisible()) | ||
255 | { | ||
256 | sInstance->close(false); | ||
257 | } | ||
258 | else | ||
259 | { | ||
260 | sInstance->open(); | ||
261 | } | ||
262 | } | ||
263 | else | ||
264 | { | ||
265 | showInstance(); | ||
266 | } | ||
267 | } | ||
268 | |||
269 | //static | ||
270 | void LLFloaterAvatarList::showInstance() | ||
271 | { | ||
272 | #ifdef LL_RRINTERFACE_H //MK | ||
273 | if (gRRenabled && gAgent.mRRInterface.mContainsShownames) | ||
274 | { | ||
275 | return; | ||
276 | } | ||
277 | #endif //mk | ||
278 | if (sInstance) | ||
279 | { | ||
280 | if (!sInstance->getVisible()) | ||
281 | { | ||
282 | sInstance->open(); | ||
283 | } | ||
284 | } | ||
285 | else | ||
286 | { | ||
287 | sInstance = new LLFloaterAvatarList(); | ||
288 | LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_radar.xml"); | ||
289 | } | ||
290 | } | ||
291 | |||
292 | void LLFloaterAvatarList::draw() | ||
293 | { | ||
294 | LLFloater::draw(); | ||
295 | } | ||
296 | |||
297 | void LLFloaterAvatarList::onOpen() | ||
298 | { | ||
299 | gSavedSettings.setBOOL("ShowRadar", TRUE); | ||
300 | sInstance->setVisible(TRUE); | ||
301 | } | ||
302 | |||
303 | void LLFloaterAvatarList::onClose(bool app_quitting) | ||
304 | { | ||
305 | sInstance->setVisible(FALSE); | ||
306 | if (!app_quitting) | ||
307 | { | ||
308 | gSavedSettings.setBOOL("ShowRadar", FALSE); | ||
309 | } | ||
310 | if (!gSavedSettings.getBOOL("RadarKeepOpen") || app_quitting) | ||
311 | { | ||
312 | destroy(); | ||
313 | } | ||
314 | } | ||
315 | |||
316 | BOOL LLFloaterAvatarList::postBuild() | ||
317 | { | ||
318 | // Default values | ||
319 | mTracking = FALSE; | ||
320 | mUpdate = TRUE; | ||
321 | |||
322 | // Hide them until some other way is found | ||
323 | // Users may not expect to find a Ban feature on the Eject button | ||
324 | childSetVisible("estate_ban_btn", false); | ||
325 | |||
326 | // Set callbacks | ||
327 | childSetAction("profile_btn", onClickProfile, this); | ||
328 | childSetAction("im_btn", onClickIM, this); | ||
329 | childSetAction("offer_btn", onClickTeleportOffer, this); | ||
330 | childSetAction("track_btn", onClickTrack, this); | ||
331 | childSetAction("mark_btn", onClickMark, this); | ||
332 | childSetAction("focus_btn", onClickFocus, this); | ||
333 | childSetAction("prev_in_list_btn", onClickPrevInList, this); | ||
334 | childSetAction("next_in_list_btn", onClickNextInList, this); | ||
335 | childSetAction("prev_marked_btn", onClickPrevMarked, this); | ||
336 | childSetAction("next_marked_btn", onClickNextMarked, this); | ||
337 | |||
338 | childSetAction("get_key_btn", onClickGetKey, this); | ||
339 | |||
340 | childSetAction("freeze_btn", onClickFreeze, this); | ||
341 | childSetAction("eject_btn", onClickEject, this); | ||
342 | childSetAction("mute_btn", onClickMute, this); | ||
343 | childSetAction("ar_btn", onClickAR, this); | ||
344 | childSetAction("teleport_btn", onClickTeleport, this); | ||
345 | childSetAction("estate_eject_btn", onClickEjectFromEstate, this); | ||
346 | |||
347 | childSetAction("send_keys_btn", onClickSendKeys, this); | ||
348 | |||
349 | getChild<LLRadioGroup>("update_rate")->setSelectedIndex(gSavedSettings.getU32("RadarUpdateRate")); | ||
350 | childSetCommitCallback("update_rate", onCommitUpdateRate, this); | ||
351 | |||
352 | // Get a pointer to the scroll list from the interface | ||
353 | mAvatarList = getChild<LLScrollListCtrl>("avatar_list"); | ||
354 | mAvatarList->sortByColumn("distance", TRUE); | ||
355 | mAvatarList->setCommitOnSelectionChange(TRUE); | ||
356 | childSetCommitCallback("avatar_list", onSelectName, this); | ||
357 | refreshAvatarList(); | ||
358 | |||
359 | gIdleCallbacks.addFunction(LLFloaterAvatarList::callbackIdle); | ||
360 | |||
361 | return TRUE; | ||
362 | } | ||
363 | |||
364 | void LLFloaterAvatarList::updateAvatarList() | ||
365 | { | ||
366 | if (sInstance != this) return; | ||
367 | |||
368 | #ifdef LL_RRINTERFACE_H //MK | ||
369 | if (gRRenabled && gAgent.mRRInterface.mContainsShownames) | ||
370 | { | ||
371 | close(); | ||
372 | } | ||
373 | #endif //mk | ||
374 | |||
375 | //llinfos << "radar refresh: updating map" << llendl; | ||
376 | |||
377 | // Check whether updates are enabled | ||
378 | LLCheckboxCtrl* check = getChild<LLCheckboxCtrl>("update_enabled_cb"); | ||
379 | if (check && !check->getValue()) | ||
380 | { | ||
381 | mUpdate = FALSE; | ||
382 | refreshTracker(); | ||
383 | return; | ||
384 | } | ||
385 | else | ||
386 | { | ||
387 | mUpdate = TRUE; | ||
388 | } | ||
389 | |||
390 | LLVector3d mypos = gAgent.getPositionGlobal(); | ||
391 | |||
392 | { | ||
393 | std::vector<LLUUID> avatar_ids; | ||
394 | std::vector<LLUUID> sorted_avatar_ids; | ||
395 | std::vector<LLVector3d> positions; | ||
396 | |||
397 | LLWorld::instance().getAvatars(&avatar_ids, &positions, mypos, F32_MAX); | ||
398 | |||
399 | sorted_avatar_ids = avatar_ids; | ||
400 | std::sort(sorted_avatar_ids.begin(), sorted_avatar_ids.end()); | ||
401 | |||
402 | for (std::vector<LLCharacter*>::const_iterator iter = LLCharacter::sInstances.begin(); iter != LLCharacter::sInstances.end(); ++iter) | ||
403 | { | ||
404 | LLUUID avid = (*iter)->getID(); | ||
405 | |||
406 | if (!std::binary_search(sorted_avatar_ids.begin(), sorted_avatar_ids.end(), avid)) | ||
407 | { | ||
408 | avatar_ids.push_back(avid); | ||
409 | } | ||
410 | } | ||
411 | |||
412 | size_t i; | ||
413 | size_t count = avatar_ids.size(); | ||
414 | |||
415 | for (i = 0; i < count; ++i) | ||
416 | { | ||
417 | std::string name, first, last; | ||
418 | const LLUUID &avid = avatar_ids[i]; | ||
419 | |||
420 | LLVector3d position; | ||
421 | LLViewerObject *obj = gObjectList.findObject(avid); | ||
422 | |||
423 | if (obj) | ||
424 | { | ||
425 | LLVOAvatar* avatarp = dynamic_cast<LLVOAvatar*>(obj); | ||
426 | |||
427 | if (avatarp == NULL) | ||
428 | { | ||
429 | continue; | ||
430 | } | ||
431 | |||
432 | // Skip if avatar is dead(what's that?) | ||
433 | // or if the avatar is ourselves. | ||
434 | if (avatarp->isDead() || avatarp->isSelf()) | ||
435 | { | ||
436 | continue; | ||
437 | } | ||
438 | |||
439 | // Get avatar data | ||
440 | position = gAgent.getPosGlobalFromAgent(avatarp->getCharacterPosition()); | ||
441 | name = avatarp->getFullname(); | ||
442 | |||
443 | // Apparently, sometimes the name comes out empty, with a " " name. This is because | ||
444 | // getFullname concatenates first and last name with a " " in the middle. | ||
445 | // This code will avoid adding a nameless entry to the list until it acquires a name. | ||
446 | |||
447 | //duped for lower section | ||
448 | if (name.empty() || (name.compare(" ") == 0))// || (name.compare(gCacheName->getDefaultName()) == 0)) | ||
449 | { | ||
450 | if (gCacheName->getName(avid, first, last)) | ||
451 | { | ||
452 | name = first + " " + last; | ||
453 | } | ||
454 | else | ||
455 | { | ||
456 | continue; | ||
457 | } | ||
458 | } | ||
459 | |||
460 | #ifdef LL_DISPLAY_NAMES | ||
461 | std::string display_name = name; | ||
462 | if (LLAvatarName::sOmitResidentAsLastName) | ||
463 | { | ||
464 | LLStringUtil::replaceString(display_name, " Resident", ""); | ||
465 | } | ||
466 | if (LLAvatarNameCache::useDisplayNames()) | ||
467 | { | ||
468 | LLAvatarName avatar_name; | ||
469 | if (LLAvatarNameCache::get(avid, &avatar_name)) | ||
470 | { | ||
471 | if (LLAvatarNameCache::useDisplayNames() == 2) | ||
472 | { | ||
473 | display_name = avatar_name.mDisplayName; | ||
474 | } | ||
475 | else | ||
476 | { | ||
477 | display_name = avatar_name.getNames(); | ||
478 | } | ||
479 | } | ||
480 | } | ||
481 | #endif | ||
482 | |||
483 | if (avid.isNull()) | ||
484 | { | ||
485 | //llinfos << "Key empty for avatar " << name << llendl; | ||
486 | continue; | ||
487 | } | ||
488 | |||
489 | if (mAvatars.count(avid) > 0) | ||
490 | { | ||
491 | // Avatar already in list, update position | ||
492 | F32 dist = (F32)(position - mypos).magVec(); | ||
493 | mAvatars[avid].setPosition(position, (avatarp->getRegion() == gAgent.getRegion()), true, dist < 20.0, dist < 100.0); | ||
494 | } | ||
495 | else | ||
496 | { | ||
497 | // Avatar not there yet, add it | ||
498 | LLAvatarListEntry entry(avid, name, position); | ||
499 | mAvatars[avid] = entry; | ||
500 | } | ||
501 | #ifdef LL_DISPLAY_NAMES | ||
502 | // update avatar display name. | ||
503 | mAvatars[avid].setDisplayName(display_name); | ||
504 | #endif | ||
505 | } | ||
506 | else | ||
507 | { | ||
508 | if (i < positions.size()) | ||
509 | { | ||
510 | position = positions[i]; | ||
511 | } | ||
512 | else | ||
513 | { | ||
514 | continue; | ||
515 | } | ||
516 | |||
517 | if (gCacheName->getName(avid, first, last)) | ||
518 | { | ||
519 | name = first + " " + last; | ||
520 | } | ||
521 | else | ||
522 | { | ||
523 | //name = gCacheName->getDefaultName(); | ||
524 | continue; //prevent (Loading...) | ||
525 | } | ||
526 | |||
527 | #ifdef LL_DISPLAY_NAMES | ||
528 | std::string display_name = name; | ||
529 | if (LLAvatarName::sOmitResidentAsLastName) | ||
530 | { | ||
531 | LLStringUtil::replaceString(display_name, " Resident", ""); | ||
532 | } | ||
533 | if (LLAvatarNameCache::useDisplayNames()) | ||
534 | { | ||
535 | LLAvatarName avatar_name; | ||
536 | if (LLAvatarNameCache::get(avid, &avatar_name)) | ||
537 | { | ||
538 | if (LLAvatarNameCache::useDisplayNames() == 2) | ||
539 | { | ||
540 | display_name = avatar_name.mDisplayName; | ||
541 | } | ||
542 | else | ||
543 | { | ||
544 | display_name = avatar_name.getNames(); | ||
545 | } | ||
546 | } | ||
547 | } | ||
548 | #endif | ||
549 | |||
550 | if (mAvatars.count(avid) > 0) | ||
551 | { | ||
552 | // Avatar already in list, update position | ||
553 | F32 dist = (F32)(position - mypos).magVec(); | ||
554 | mAvatars[avid].setPosition(position, gAgent.getRegion()->pointInRegionGlobal(position), false, dist < 20.0, dist < 100.0); | ||
555 | } | ||
556 | else | ||
557 | { | ||
558 | // Avatar not there yet, add it | ||
559 | LLAvatarListEntry entry(avid, name, position); | ||
560 | mAvatars[avid] = entry; | ||
561 | } | ||
562 | #ifdef LL_DISPLAY_NAMES | ||
563 | // update avatar display name. | ||
564 | mAvatars[avid].setDisplayName(display_name); | ||
565 | #endif | ||
566 | } | ||
567 | } | ||
568 | } | ||
569 | |||
570 | // llinfos << "radar refresh: done" << llendl; | ||
571 | |||
572 | expireAvatarList(); | ||
573 | refreshAvatarList(); | ||
574 | refreshTracker(); | ||
575 | } | ||
576 | |||
577 | void LLFloaterAvatarList::expireAvatarList() | ||
578 | { | ||
579 | // llinfos << "radar: expiring" << llendl; | ||
580 | std::map<LLUUID, LLAvatarListEntry>::iterator iter; | ||
581 | std::queue<LLUUID> delete_queue; | ||
582 | |||
583 | for (iter = mAvatars.begin(); iter != mAvatars.end(); iter++) | ||
584 | { | ||
585 | LLAvatarListEntry *entry = &iter->second; | ||
586 | |||
587 | if (!entry->getAlive() && entry->isDead()) | ||
588 | { | ||
589 | //llinfos << "radar: expiring avatar " << entry->getDisplayName() << llendl; | ||
590 | LLUUID av_id = entry->getID(); | ||
591 | delete_queue.push(av_id); | ||
592 | if (av_id == mTrackedAvatar) | ||
593 | { | ||
594 | stopTracker(); | ||
595 | } | ||
596 | } | ||
597 | } | ||
598 | |||
599 | while (!delete_queue.empty()) | ||
600 | { | ||
601 | mAvatars.erase(delete_queue.front()); | ||
602 | delete_queue.pop(); | ||
603 | } | ||
604 | } | ||
605 | |||
606 | /** | ||
607 | * Redraws the avatar list | ||
608 | * Only does anything if the avatar list is visible. | ||
609 | * @author Dale Glass | ||
610 | */ | ||
611 | void LLFloaterAvatarList::refreshAvatarList() | ||
612 | { | ||
613 | // Don't update list when interface is hidden | ||
614 | if (!sInstance->getVisible()) return; | ||
615 | |||
616 | // We rebuild the list fully each time it's refreshed | ||
617 | // The assumption is that it's faster to refill it and sort than | ||
618 | // to rebuild the whole list. | ||
619 | LLDynamicArray<LLUUID> selected = mAvatarList->getSelectedIDs(); | ||
620 | S32 scrollpos = mAvatarList->getScrollPos(); | ||
621 | |||
622 | mAvatarList->deleteAllItems(); | ||
623 | |||
624 | LLVector3d mypos = gAgent.getPositionGlobal(); | ||
625 | LLVector3d posagent; | ||
626 | posagent.setVec(gAgent.getPositionAgent()); | ||
627 | LLVector3d simpos = mypos - posagent; | ||
628 | |||
629 | std::map<LLUUID, LLAvatarListEntry>::iterator iter; | ||
630 | for (iter = mAvatars.begin(); iter != mAvatars.end(); iter++) | ||
631 | { | ||
632 | LLSD element; | ||
633 | LLUUID av_id; | ||
634 | |||
635 | LLAvatarListEntry *entry = &iter->second; | ||
636 | |||
637 | // Skip if avatar hasn't been around | ||
638 | if (entry->isDead()) | ||
639 | { | ||
640 | continue; | ||
641 | } | ||
642 | |||
643 | av_id = entry->getID(); | ||
644 | |||
645 | LLVector3d position = entry->getPosition(); | ||
646 | BOOL UnknownAltitude = false; | ||
647 | |||
648 | LLVector3d delta = position - mypos; | ||
649 | F32 distance = (F32)delta.magVec(); | ||
650 | if (position.mdV[VZ] == 0.0) | ||
651 | { | ||
652 | UnknownAltitude = true; | ||
653 | distance = 9000.0; | ||
654 | } | ||
655 | delta.mdV[2] = 0.0f; | ||
656 | F32 side_distance = (F32)delta.magVec(); | ||
657 | |||
658 | // HACK: Workaround for an apparent bug: | ||
659 | // sometimes avatar entries get stuck, and are registered | ||
660 | // by the client as perpetually moving in the same direction. | ||
661 | // this makes sure they get removed from the visible list eventually | ||
662 | |||
663 | //jcool410 -- this fucks up seeing dueds thru minimap data > 1024m away, so, lets just say > 2048m to the side is bad | ||
664 | //aka 8 sims | ||
665 | if (side_distance > 2048.0f) | ||
666 | { | ||
667 | continue; | ||
668 | } | ||
669 | |||
670 | if (av_id.isNull()) | ||
671 | { | ||
672 | //llwarns << "Avatar with null key somehow got into the list!" << llendl; | ||
673 | continue; | ||
674 | } | ||
675 | |||
676 | element["id"] = av_id; | ||
677 | |||
678 | element["columns"][LIST_MARK]["column"] = "marked"; | ||
679 | element["columns"][LIST_MARK]["type"] = "text"; | ||
680 | if (entry->isMarked()) | ||
681 | { | ||
682 | element["columns"][LIST_MARK]["value"] = "X"; | ||
683 | element["columns"][LIST_MARK]["color"] = LLColor4::blue.getValue(); | ||
684 | element["columns"][LIST_MARK]["font-style"] = "BOLD"; | ||
685 | } | ||
686 | else | ||
687 | { | ||
688 | element["columns"][LIST_MARK]["value"] = ""; | ||
689 | } | ||
690 | |||
691 | element["columns"][LIST_AVATAR_NAME]["column"] = "avatar_name"; | ||
692 | element["columns"][LIST_AVATAR_NAME]["type"] = "text"; | ||
693 | element["columns"][LIST_AVATAR_NAME]["value"] = entry->getDisplayName().c_str(); | ||
694 | if (entry->getEntryAgeSeconds() > 1.0f) | ||
695 | { | ||
696 | element["columns"][LIST_AVATAR_NAME]["font-style"] = "ITALIC"; | ||
697 | } | ||
698 | else if (entry->isFocused()) | ||
699 | { | ||
700 | element["columns"][LIST_AVATAR_NAME]["font-style"] = "BOLD"; | ||
701 | } | ||
702 | if (LLMuteList::getInstance()->isMuted(av_id)) | ||
703 | { | ||
704 | element["columns"][LIST_AVATAR_NAME]["color"] = LLColor4::red2.getValue(); | ||
705 | } | ||
706 | else if (is_agent_friend(av_id)) | ||
707 | { | ||
708 | element["columns"][LIST_AVATAR_NAME]["color"] = LLColor4::green3.getValue(); | ||
709 | } | ||
710 | |||
711 | char temp[32]; | ||
712 | LLColor4 color = LLColor4::black; | ||
713 | element["columns"][LIST_DISTANCE]["column"] = "distance"; | ||
714 | element["columns"][LIST_DISTANCE]["type"] = "text"; | ||
715 | if (UnknownAltitude) | ||
716 | { | ||
717 | strcpy(temp, "?"); | ||
718 | if (entry->isDrawn()) | ||
719 | { | ||
720 | color = LLColor4::green2; | ||
721 | } | ||
722 | } | ||
723 | else | ||
724 | { | ||
725 | if (distance < 100.0) | ||
726 | { | ||
727 | snprintf(temp, sizeof(temp), "%.1f", distance); | ||
728 | if (distance > 20.0f) | ||
729 | { | ||
730 | color = LLColor4::yellow1; | ||
731 | } | ||
732 | else | ||
733 | { | ||
734 | color = LLColor4::red; | ||
735 | } | ||
736 | } | ||
737 | else | ||
738 | { | ||
739 | if (entry->isDrawn()) | ||
740 | { | ||
741 | color = LLColor4::green2; | ||
742 | } | ||
743 | snprintf(temp, sizeof(temp), "%d", (S32)distance); | ||
744 | } | ||
745 | } | ||
746 | element["columns"][LIST_DISTANCE]["value"] = temp; | ||
747 | element["columns"][LIST_DISTANCE]["color"] = color.getValue(); | ||
748 | |||
749 | position = position - simpos; | ||
750 | |||
751 | S32 x = (S32)position.mdV[VX]; | ||
752 | S32 y = (S32)position.mdV[VY]; | ||
753 | if (x >= 0 && x <= 256 && y >= 0 && y <= 256) | ||
754 | { | ||
755 | snprintf(temp, sizeof(temp), "%d, %d", x, y); | ||
756 | } | ||
757 | else | ||
758 | { | ||
759 | temp[0] = '\0'; | ||
760 | if (y < 0) | ||
761 | { | ||
762 | strcat(temp, "S"); | ||
763 | } | ||
764 | else if (y > 256) | ||
765 | { | ||
766 | strcat(temp, "N"); | ||
767 | } | ||
768 | if (x < 0) | ||
769 | { | ||
770 | strcat(temp, "W"); | ||
771 | } | ||
772 | else if (x > 256) | ||
773 | { | ||
774 | strcat(temp, "E"); | ||
775 | } | ||
776 | } | ||
777 | element["columns"][LIST_POSITION]["column"] = "position"; | ||
778 | element["columns"][LIST_POSITION]["type"] = "text"; | ||
779 | element["columns"][LIST_POSITION]["value"] = temp; | ||
780 | |||
781 | element["columns"][LIST_ALTITUDE]["column"] = "altitude"; | ||
782 | element["columns"][LIST_ALTITUDE]["type"] = "text"; | ||
783 | if (UnknownAltitude) | ||
784 | { | ||
785 | strcpy(temp, "?"); | ||
786 | } | ||
787 | else | ||
788 | { | ||
789 | snprintf(temp, sizeof(temp), "%d", (S32)position.mdV[VZ]); | ||
790 | } | ||
791 | element["columns"][LIST_ALTITUDE]["value"] = temp; | ||
792 | |||
793 | // Add to list | ||
794 | mAvatarList->addElement(element, ADD_BOTTOM); | ||
795 | } | ||
796 | |||
797 | // finish | ||
798 | mAvatarList->sortItems(); | ||
799 | mAvatarList->selectMultiple(selected); | ||
800 | mAvatarList->setScrollPos(scrollpos); | ||
801 | |||
802 | // llinfos << "radar refresh: done" << llendl; | ||
803 | |||
804 | } | ||
805 | |||
806 | // static | ||
807 | void LLFloaterAvatarList::onClickIM(void* userdata) | ||
808 | { | ||
809 | //llinfos << "LLFloaterFriends::onClickIM()" << llendl; | ||
810 | LLFloaterAvatarList *self = (LLFloaterAvatarList*)userdata; | ||
811 | |||
812 | LLDynamicArray<LLUUID> ids = self->mAvatarList->getSelectedIDs(); | ||
813 | if (ids.size() > 0) | ||
814 | { | ||
815 | if (ids.size() == 1) | ||
816 | { | ||
817 | // Single avatar | ||
818 | LLUUID agent_id = ids[0]; | ||
819 | |||
820 | char buffer[MAX_STRING]; | ||
821 | snprintf(buffer, MAX_STRING, "%s", self->mAvatars[agent_id].getName().c_str()); | ||
822 | gIMMgr->setFloaterOpen(TRUE); | ||
823 | gIMMgr->addSession(buffer, IM_NOTHING_SPECIAL, agent_id); | ||
824 | } | ||
825 | else | ||
826 | { | ||
827 | // Group IM | ||
828 | LLUUID session_id; | ||
829 | session_id.generate(); | ||
830 | gIMMgr->setFloaterOpen(TRUE); | ||
831 | gIMMgr->addSession("Avatars Conference", IM_SESSION_CONFERENCE_START, ids[0], ids); | ||
832 | } | ||
833 | } | ||
834 | } | ||
835 | |||
836 | void LLFloaterAvatarList::onClickTeleportOffer(void *userdata) | ||
837 | { | ||
838 | LLFloaterAvatarList *self = (LLFloaterAvatarList*)userdata; | ||
839 | |||
840 | LLDynamicArray<LLUUID> ids = self->mAvatarList->getSelectedIDs(); | ||
841 | if (ids.size() > 0) | ||
842 | { | ||
843 | handle_lure(ids); | ||
844 | } | ||
845 | } | ||
846 | |||
847 | void LLFloaterAvatarList::onClickTrack(void *userdata) | ||
848 | { | ||
849 | LLFloaterAvatarList *self = (LLFloaterAvatarList*)userdata; | ||
850 | |||
851 | LLScrollListItem *item = self->mAvatarList->getFirstSelected(); | ||
852 | if (!item) return; | ||
853 | |||
854 | LLUUID agent_id = item->getUUID(); | ||
855 | |||
856 | if (self->mTracking && self->mTrackedAvatar == agent_id) { | ||
857 | self->stopTracker(); | ||
858 | } | ||
859 | else | ||
860 | { | ||
861 | self->mTracking = TRUE; | ||
862 | self->mTrackedAvatar = agent_id; | ||
863 | // trackAvatar only works for friends allowing you to see them on map... | ||
864 | // LLTracker::trackAvatar(agent_id, self->mAvatars[agent_id].getDisplayName()); | ||
865 | std::string name = self->mAvatars[agent_id].getDisplayName(); | ||
866 | if (!self->mUpdate) | ||
867 | { | ||
868 | name += "\n(last known position)"; | ||
869 | } | ||
870 | LLTracker::trackLocation(self->mAvatars[agent_id].getPosition(), name, ""); | ||
871 | } | ||
872 | } | ||
873 | |||
874 | void LLFloaterAvatarList::stopTracker() | ||
875 | { | ||
876 | LLTracker::stopTracking(NULL); | ||
877 | mTracking = FALSE; | ||
878 | } | ||
879 | |||
880 | void LLFloaterAvatarList::refreshTracker() | ||
881 | { | ||
882 | if (!mTracking) return; | ||
883 | |||
884 | if (LLTracker::isTracking(NULL)) | ||
885 | { | ||
886 | LLVector3d pos; | ||
887 | if (mUpdate) | ||
888 | { | ||
889 | pos = mAvatars[mTrackedAvatar].getPosition(); | ||
890 | } | ||
891 | else | ||
892 | { | ||
893 | LLViewerObject *obj = gObjectList.findObject(mTrackedAvatar); | ||
894 | if (!obj) | ||
895 | { | ||
896 | stopTracker(); | ||
897 | return; | ||
898 | } | ||
899 | LLVOAvatar* avatarp = dynamic_cast<LLVOAvatar*>(obj); | ||
900 | if (!avatarp) | ||
901 | { | ||
902 | stopTracker(); | ||
903 | return; | ||
904 | } | ||
905 | pos = gAgent.getPosGlobalFromAgent(avatarp->getCharacterPosition()); | ||
906 | } | ||
907 | if (pos != LLTracker::getTrackedPositionGlobal()) | ||
908 | { | ||
909 | std::string name = mAvatars[mTrackedAvatar].getDisplayName(); | ||
910 | LLTracker::trackLocation(pos, name, ""); | ||
911 | } | ||
912 | } | ||
913 | else | ||
914 | { | ||
915 | stopTracker(); | ||
916 | } | ||
917 | } | ||
918 | |||
919 | LLAvatarListEntry * LLFloaterAvatarList::getAvatarEntry(LLUUID avatar) | ||
920 | { | ||
921 | if (avatar.isNull()) | ||
922 | { | ||
923 | return NULL; | ||
924 | } | ||
925 | |||
926 | std::map<LLUUID, LLAvatarListEntry>::iterator iter; | ||
927 | |||
928 | iter = mAvatars.find(avatar); | ||
929 | if (iter == mAvatars.end()) | ||
930 | { | ||
931 | return NULL; | ||
932 | } | ||
933 | |||
934 | return &iter->second; | ||
935 | } | ||
936 | |||
937 | //static | ||
938 | void LLFloaterAvatarList::onClickMark(void *userdata) | ||
939 | { | ||
940 | LLFloaterAvatarList *self = (LLFloaterAvatarList*)userdata; | ||
941 | LLDynamicArray<LLUUID> ids = self->mAvatarList->getSelectedIDs(); | ||
942 | |||
943 | for (LLDynamicArray<LLUUID>::iterator itr = ids.begin(); itr != ids.end(); ++itr) | ||
944 | { | ||
945 | LLUUID avid = *itr; | ||
946 | LLAvatarListEntry *entry = self->getAvatarEntry(avid); | ||
947 | if (entry != NULL) | ||
948 | { | ||
949 | entry->toggleMark(); | ||
950 | } | ||
951 | } | ||
952 | } | ||
953 | |||
954 | void LLFloaterAvatarList::onClickFocus(void *userdata) | ||
955 | { | ||
956 | LLFloaterAvatarList *self = (LLFloaterAvatarList*)userdata; | ||
957 | |||
958 | LLScrollListItem *item = self->mAvatarList->getFirstSelected(); | ||
959 | if (item) | ||
960 | { | ||
961 | self->mFocusedAvatar = item->getUUID(); | ||
962 | self->focusOnCurrent(); | ||
963 | } | ||
964 | } | ||
965 | |||
966 | void LLFloaterAvatarList::removeFocusFromAll() | ||
967 | { | ||
968 | std::map<LLUUID, LLAvatarListEntry>::iterator iter; | ||
969 | |||
970 | for (iter = mAvatars.begin(); iter != mAvatars.end(); iter++) | ||
971 | { | ||
972 | LLAvatarListEntry *entry = &iter->second; | ||
973 | entry->setFocus(FALSE); | ||
974 | } | ||
975 | } | ||
976 | |||
977 | void LLFloaterAvatarList::focusOnCurrent() | ||
978 | { | ||
979 | std::map<LLUUID, LLAvatarListEntry>::iterator iter; | ||
980 | LLAvatarListEntry *entry; | ||
981 | |||
982 | if (mAvatars.size() == 0) | ||
983 | { | ||
984 | return; | ||
985 | } | ||
986 | |||
987 | for (iter = mAvatars.begin(); iter != mAvatars.end(); iter++) | ||
988 | { | ||
989 | entry = &iter->second; | ||
990 | |||
991 | if (entry->isDead()) | ||
992 | continue; | ||
993 | |||
994 | if (entry->getID() == mFocusedAvatar) | ||
995 | { | ||
996 | removeFocusFromAll(); | ||
997 | entry->setFocus(TRUE); | ||
998 | gAgent.lookAtObject(mFocusedAvatar, CAMERA_POSITION_OBJECT); | ||
999 | return; | ||
1000 | } | ||
1001 | } | ||
1002 | } | ||
1003 | |||
1004 | void LLFloaterAvatarList::focusOnPrev(BOOL marked_only) | ||
1005 | { | ||
1006 | std::map<LLUUID, LLAvatarListEntry>::iterator iter; | ||
1007 | LLAvatarListEntry *prev = NULL; | ||
1008 | LLAvatarListEntry *entry; | ||
1009 | |||
1010 | if (mAvatars.size() == 0) | ||
1011 | { | ||
1012 | return; | ||
1013 | } | ||
1014 | |||
1015 | for (iter = mAvatars.begin(); iter != mAvatars.end(); iter++) | ||
1016 | { | ||
1017 | entry = &iter->second; | ||
1018 | |||
1019 | if (entry->isDead()) | ||
1020 | continue; | ||
1021 | |||
1022 | if (prev != NULL && entry->getID() == mFocusedAvatar) | ||
1023 | { | ||
1024 | break; | ||
1025 | } | ||
1026 | |||
1027 | if ((!marked_only && entry->isDrawn()) || entry->isMarked()) | ||
1028 | { | ||
1029 | prev = entry; | ||
1030 | } | ||
1031 | } | ||
1032 | |||
1033 | if (prev != NULL) | ||
1034 | { | ||
1035 | removeFocusFromAll(); | ||
1036 | prev->setFocus(TRUE); | ||
1037 | mFocusedAvatar = prev->getID(); | ||
1038 | gAgent.lookAtObject(mFocusedAvatar, CAMERA_POSITION_OBJECT); | ||
1039 | } | ||
1040 | } | ||
1041 | |||
1042 | void LLFloaterAvatarList::focusOnNext(BOOL marked_only) | ||
1043 | { | ||
1044 | std::map<LLUUID, LLAvatarListEntry>::iterator iter; | ||
1045 | BOOL found = FALSE; | ||
1046 | LLAvatarListEntry *next = NULL; | ||
1047 | LLAvatarListEntry *entry; | ||
1048 | |||
1049 | if (mAvatars.size() == 0) | ||
1050 | { | ||
1051 | return; | ||
1052 | } | ||
1053 | |||
1054 | for (iter = mAvatars.begin(); iter != mAvatars.end(); iter++) | ||
1055 | { | ||
1056 | entry = &iter->second; | ||
1057 | |||
1058 | if (entry->isDead()) | ||
1059 | continue; | ||
1060 | |||
1061 | if (next == NULL && ((!marked_only && entry->isDrawn()) || entry->isMarked())) | ||
1062 | { | ||
1063 | next = entry; | ||
1064 | } | ||
1065 | |||
1066 | if (found && ((!marked_only && entry->isDrawn()) || entry->isMarked())) | ||
1067 | { | ||
1068 | next = entry; | ||
1069 | break; | ||
1070 | } | ||
1071 | |||
1072 | if (entry->getID() == mFocusedAvatar) | ||
1073 | { | ||
1074 | found = TRUE; | ||
1075 | } | ||
1076 | } | ||
1077 | |||
1078 | if (next != NULL) | ||
1079 | { | ||
1080 | removeFocusFromAll(); | ||
1081 | next->setFocus(TRUE); | ||
1082 | mFocusedAvatar = next->getID(); | ||
1083 | gAgent.lookAtObject(mFocusedAvatar, CAMERA_POSITION_OBJECT); | ||
1084 | } | ||
1085 | } | ||
1086 | |||
1087 | //static | ||
1088 | void LLFloaterAvatarList::onClickPrevInList(void *userdata) | ||
1089 | { | ||
1090 | LLFloaterAvatarList *self = (LLFloaterAvatarList*)userdata; | ||
1091 | self->focusOnPrev(FALSE); | ||
1092 | } | ||
1093 | |||
1094 | //static | ||
1095 | void LLFloaterAvatarList::onClickNextInList(void *userdata) | ||
1096 | { | ||
1097 | LLFloaterAvatarList *self = (LLFloaterAvatarList*)userdata; | ||
1098 | self->focusOnNext(FALSE); | ||
1099 | } | ||
1100 | |||
1101 | //static | ||
1102 | void LLFloaterAvatarList::onClickPrevMarked(void *userdata) | ||
1103 | { | ||
1104 | LLFloaterAvatarList *self = (LLFloaterAvatarList*)userdata; | ||
1105 | self->focusOnPrev(TRUE); | ||
1106 | } | ||
1107 | |||
1108 | //static | ||
1109 | void LLFloaterAvatarList::onClickNextMarked(void *userdata) | ||
1110 | { | ||
1111 | LLFloaterAvatarList *self = (LLFloaterAvatarList*)userdata; | ||
1112 | self->focusOnNext(TRUE); | ||
1113 | } | ||
1114 | |||
1115 | //static | ||
1116 | void LLFloaterAvatarList::onClickGetKey(void *userdata) | ||
1117 | { | ||
1118 | LLFloaterAvatarList *self = (LLFloaterAvatarList*)userdata; | ||
1119 | LLScrollListItem *item = self->mAvatarList->getFirstSelected(); | ||
1120 | |||
1121 | if (NULL == item) return; | ||
1122 | |||
1123 | LLUUID agent_id = item->getUUID(); | ||
1124 | |||
1125 | char buffer[UUID_STR_LENGTH]; /*Flawfinder: ignore*/ | ||
1126 | agent_id.toString(buffer); | ||
1127 | |||
1128 | gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(buffer)); | ||
1129 | } | ||
1130 | |||
1131 | void LLFloaterAvatarList::onClickSendKeys(void *userdata) | ||
1132 | { | ||
1133 | LLFloaterAvatarList *self = (LLFloaterAvatarList*)userdata; | ||
1134 | std::map<LLUUID, LLAvatarListEntry>::iterator iter; | ||
1135 | LLAvatarListEntry *entry; | ||
1136 | |||
1137 | if (self->mAvatars.size() == 0) | ||
1138 | return; | ||
1139 | |||
1140 | for (iter = self->mAvatars.begin(); iter != self->mAvatars.end(); iter++) | ||
1141 | { | ||
1142 | entry = &iter->second; | ||
1143 | |||
1144 | if (!entry->isDead() && entry->isInSim()) | ||
1145 | announce(entry->getID().asString()); | ||
1146 | } | ||
1147 | } | ||
1148 | |||
1149 | static void send_freeze(const LLUUID& avatar_id, bool freeze) | ||
1150 | { | ||
1151 | U32 flags = 0x0; | ||
1152 | if (!freeze) | ||
1153 | { | ||
1154 | // unfreeze | ||
1155 | flags |= 0x1; | ||
1156 | } | ||
1157 | |||
1158 | LLMessageSystem* msg = gMessageSystem; | ||
1159 | LLViewerObject* avatar = gObjectList.findObject(avatar_id); | ||
1160 | |||
1161 | if (avatar) | ||
1162 | { | ||
1163 | msg->newMessage("FreezeUser"); | ||
1164 | msg->nextBlock("AgentData"); | ||
1165 | msg->addUUID("AgentID", gAgent.getID()); | ||
1166 | msg->addUUID("SessionID", gAgent.getSessionID()); | ||
1167 | msg->nextBlock("Data"); | ||
1168 | msg->addUUID("TargetID", avatar_id); | ||
1169 | msg->addU32("Flags", flags); | ||
1170 | msg->sendReliable( avatar->getRegion()->getHost()); | ||
1171 | } | ||
1172 | } | ||
1173 | |||
1174 | static void send_eject(const LLUUID& avatar_id, bool ban) | ||
1175 | { | ||
1176 | LLMessageSystem* msg = gMessageSystem; | ||
1177 | LLViewerObject* avatar = gObjectList.findObject(avatar_id); | ||
1178 | |||
1179 | if (avatar) | ||
1180 | { | ||
1181 | U32 flags = 0x0; | ||
1182 | if (ban) | ||
1183 | { | ||
1184 | // eject and add to ban list | ||
1185 | flags |= 0x1; | ||
1186 | } | ||
1187 | |||
1188 | msg->newMessage("EjectUser"); | ||
1189 | msg->nextBlock("AgentData"); | ||
1190 | msg->addUUID("AgentID", gAgent.getID()); | ||
1191 | msg->addUUID("SessionID", gAgent.getSessionID()); | ||
1192 | msg->nextBlock("Data"); | ||
1193 | msg->addUUID("TargetID", avatar_id); | ||
1194 | msg->addU32("Flags", flags); | ||
1195 | msg->sendReliable( avatar->getRegion()->getHost()); | ||
1196 | } | ||
1197 | } | ||
1198 | |||
1199 | static void send_estate_message( | ||
1200 | const char* request, | ||
1201 | const LLUUID &target) | ||
1202 | { | ||
1203 | |||
1204 | LLMessageSystem* msg = gMessageSystem; | ||
1205 | LLUUID invoice; | ||
1206 | |||
1207 | // This seems to provide an ID so that the sim can say which request it's | ||
1208 | // replying to. I think this can be ignored for now. | ||
1209 | invoice.generate(); | ||
1210 | |||
1211 | llinfos << "Sending estate request '" << request << "'" << llendl; | ||
1212 | msg->newMessage("EstateOwnerMessage"); | ||
1213 | msg->nextBlockFast(_PREHASH_AgentData); | ||
1214 | msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); | ||
1215 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | ||
1216 | msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used | ||
1217 | msg->nextBlock("MethodData"); | ||
1218 | msg->addString("Method", request); | ||
1219 | msg->addUUID("Invoice", invoice); | ||
1220 | |||
1221 | // Agent id | ||
1222 | msg->nextBlock("ParamList"); | ||
1223 | msg->addString("Parameter", gAgent.getID().asString().c_str()); | ||
1224 | |||
1225 | // Target | ||
1226 | msg->nextBlock("ParamList"); | ||
1227 | msg->addString("Parameter", target.asString().c_str()); | ||
1228 | |||
1229 | msg->sendReliable(gAgent.getRegion()->getHost()); | ||
1230 | } | ||
1231 | |||
1232 | static void cmd_freeze(const LLUUID& avatar, const std::string &name) { send_freeze(avatar, true); } | ||
1233 | static void cmd_unfreeze(const LLUUID& avatar, const std::string &name) { send_freeze(avatar, false); } | ||
1234 | static void cmd_eject(const LLUUID& avatar, const std::string &name) { send_eject(avatar, false); } | ||
1235 | static void cmd_ban(const LLUUID& avatar, const std::string &name) { send_eject(avatar, true); } | ||
1236 | static void cmd_profile(const LLUUID& avatar, const std::string &name) { LLFloaterAvatarInfo::showFromDirectory(avatar); } | ||
1237 | static void cmd_estate_eject(const LLUUID &avatar, const std::string &name){ send_estate_message("teleporthomeuser", avatar); } | ||
1238 | |||
1239 | void LLFloaterAvatarList::doCommand(void (*func)(const LLUUID &avatar, const std::string &name)) | ||
1240 | { | ||
1241 | LLDynamicArray<LLUUID> ids = mAvatarList->getSelectedIDs(); | ||
1242 | |||
1243 | for (LLDynamicArray<LLUUID>::iterator itr = ids.begin(); itr != ids.end(); ++itr) | ||
1244 | { | ||
1245 | LLUUID avid = *itr; | ||
1246 | LLAvatarListEntry *entry = getAvatarEntry(avid); | ||
1247 | if (entry != NULL) | ||
1248 | { | ||
1249 | llinfos << "Executing command on " << entry->getDisplayName() << llendl; | ||
1250 | func(avid, entry->getName()); | ||
1251 | } | ||
1252 | } | ||
1253 | } | ||
1254 | |||
1255 | std::string LLFloaterAvatarList::getSelectedNames(const std::string& separator) | ||
1256 | { | ||
1257 | std::string ret = ""; | ||
1258 | |||
1259 | LLDynamicArray<LLUUID> ids = mAvatarList->getSelectedIDs(); | ||
1260 | for (LLDynamicArray<LLUUID>::iterator itr = ids.begin(); itr != ids.end(); ++itr) | ||
1261 | { | ||
1262 | LLUUID avid = *itr; | ||
1263 | LLAvatarListEntry *entry = getAvatarEntry(avid); | ||
1264 | if (entry != NULL) | ||
1265 | { | ||
1266 | if (!ret.empty()) ret += separator; | ||
1267 | ret += entry->getName(); | ||
1268 | } | ||
1269 | } | ||
1270 | |||
1271 | return ret; | ||
1272 | } | ||
1273 | |||
1274 | std::string LLFloaterAvatarList::getSelectedName() | ||
1275 | { | ||
1276 | LLUUID id = getSelectedID(); | ||
1277 | LLAvatarListEntry *entry = getAvatarEntry(id); | ||
1278 | if (entry) | ||
1279 | { | ||
1280 | return entry->getName(); | ||
1281 | } | ||
1282 | return ""; | ||
1283 | } | ||
1284 | |||
1285 | LLUUID LLFloaterAvatarList::getSelectedID() | ||
1286 | { | ||
1287 | LLScrollListItem *item = mAvatarList->getFirstSelected(); | ||
1288 | if (item) return item->getUUID(); | ||
1289 | return LLUUID::null; | ||
1290 | } | ||
1291 | |||
1292 | //static | ||
1293 | void LLFloaterAvatarList::callbackFreeze(const LLSD& notification, const LLSD& response) | ||
1294 | { | ||
1295 | S32 option = LLNotification::getSelectedOption(notification, response); | ||
1296 | |||
1297 | LLFloaterAvatarList *self = LLFloaterAvatarList::sInstance; | ||
1298 | |||
1299 | if (option == 0) | ||
1300 | { | ||
1301 | self->doCommand(cmd_freeze); | ||
1302 | } | ||
1303 | else if (option == 1) | ||
1304 | { | ||
1305 | self->doCommand(cmd_unfreeze); | ||
1306 | } | ||
1307 | } | ||
1308 | |||
1309 | //static | ||
1310 | void LLFloaterAvatarList::callbackEject(const LLSD& notification, const LLSD& response) | ||
1311 | { | ||
1312 | S32 option = LLNotification::getSelectedOption(notification, response); | ||
1313 | |||
1314 | LLFloaterAvatarList *self = LLFloaterAvatarList::sInstance; | ||
1315 | |||
1316 | if (option == 0) | ||
1317 | { | ||
1318 | self->doCommand(cmd_eject); | ||
1319 | } | ||
1320 | else if (option == 1) | ||
1321 | { | ||
1322 | self->doCommand(cmd_ban); | ||
1323 | } | ||
1324 | } | ||
1325 | |||
1326 | //static | ||
1327 | void LLFloaterAvatarList::callbackEjectFromEstate(const LLSD& notification, const LLSD& response) | ||
1328 | { | ||
1329 | S32 option = LLNotification::getSelectedOption(notification, response); | ||
1330 | |||
1331 | LLFloaterAvatarList *self = LLFloaterAvatarList::sInstance; | ||
1332 | |||
1333 | if (option == 0) | ||
1334 | { | ||
1335 | self->doCommand(cmd_estate_eject); | ||
1336 | } | ||
1337 | } | ||
1338 | |||
1339 | //static | ||
1340 | void LLFloaterAvatarList::callbackIdle(void *userdata) { | ||
1341 | if (LLFloaterAvatarList::sInstance != NULL) | ||
1342 | { | ||
1343 | // Do not update at every frame: this would be insane ! | ||
1344 | if (gFrameCount % LLFloaterAvatarList::sInstance->mUpdateRate == 0) | ||
1345 | { | ||
1346 | LLFloaterAvatarList::sInstance->updateAvatarList(); | ||
1347 | } | ||
1348 | } | ||
1349 | } | ||
1350 | |||
1351 | void LLFloaterAvatarList::onClickFreeze(void *userdata) | ||
1352 | { | ||
1353 | LLSD args; | ||
1354 | LLSD payload; | ||
1355 | args["AVATAR_NAME"] = ((LLFloaterAvatarList*)userdata)->getSelectedNames(); | ||
1356 | LLNotifications::instance().add("FreezeAvatarFullname", args, payload, callbackFreeze); | ||
1357 | } | ||
1358 | |||
1359 | //static | ||
1360 | void LLFloaterAvatarList::onClickEject(void *userdata) | ||
1361 | { | ||
1362 | LLSD args; | ||
1363 | LLSD payload; | ||
1364 | args["AVATAR_NAME"] = ((LLFloaterAvatarList*)userdata)->getSelectedNames(); | ||
1365 | LLNotifications::instance().add("EjectAvatarFullname", args, payload, callbackEject); | ||
1366 | } | ||
1367 | |||
1368 | //static | ||
1369 | void LLFloaterAvatarList::onClickMute(void *userdata) | ||
1370 | { | ||
1371 | LLFloaterAvatarList *self = (LLFloaterAvatarList*)userdata; | ||
1372 | |||
1373 | LLDynamicArray<LLUUID> ids = self->mAvatarList->getSelectedIDs(); | ||
1374 | if (ids.size() > 0) | ||
1375 | { | ||
1376 | for (LLDynamicArray<LLUUID>::iterator itr = ids.begin(); itr != ids.end(); ++itr) | ||
1377 | { | ||
1378 | LLUUID agent_id = *itr; | ||
1379 | |||
1380 | std::string agent_name; | ||
1381 | if (gCacheName->getFullName(agent_id, agent_name)) | ||
1382 | { | ||
1383 | if (LLMuteList::getInstance()->isMuted(agent_id)) | ||
1384 | { | ||
1385 | LLMute mute(agent_id, agent_name, LLMute::AGENT); | ||
1386 | LLMuteList::getInstance()->remove(mute); | ||
1387 | } | ||
1388 | else | ||
1389 | { | ||
1390 | LLMute mute(agent_id, agent_name, LLMute::AGENT); | ||
1391 | LLMuteList::getInstance()->add(mute); | ||
1392 | } | ||
1393 | } | ||
1394 | } | ||
1395 | } | ||
1396 | } | ||
1397 | |||
1398 | //static | ||
1399 | void LLFloaterAvatarList::onClickEjectFromEstate(void *userdata) | ||
1400 | { | ||
1401 | LLSD args; | ||
1402 | LLSD payload; | ||
1403 | args["EVIL_USER"] = ((LLFloaterAvatarList*)userdata)->getSelectedNames(); | ||
1404 | LLNotifications::instance().add("EstateKickUser", args, payload, callbackEjectFromEstate); | ||
1405 | } | ||
1406 | |||
1407 | //static | ||
1408 | void LLFloaterAvatarList::onClickAR(void *userdata) | ||
1409 | { | ||
1410 | LLFloaterAvatarList *self = (LLFloaterAvatarList*)userdata; | ||
1411 | LLScrollListItem *item = self->mAvatarList->getFirstSelected(); | ||
1412 | if (item) | ||
1413 | { | ||
1414 | LLUUID agent_id = item->getUUID(); | ||
1415 | LLAvatarListEntry *entry = self->getAvatarEntry(agent_id); | ||
1416 | if (entry) | ||
1417 | { | ||
1418 | LLFloaterReporter::showFromObject(entry->getID()); | ||
1419 | } | ||
1420 | } | ||
1421 | } | ||
1422 | |||
1423 | // static | ||
1424 | void LLFloaterAvatarList::onClickProfile(void* userdata) | ||
1425 | { | ||
1426 | LLFloaterAvatarList *self = (LLFloaterAvatarList*)userdata; | ||
1427 | self->doCommand(cmd_profile); | ||
1428 | } | ||
1429 | |||
1430 | //static | ||
1431 | void LLFloaterAvatarList::onClickTeleport(void* userdata) | ||
1432 | { | ||
1433 | LLFloaterAvatarList *self = (LLFloaterAvatarList*)userdata; | ||
1434 | LLScrollListItem *item = self->mAvatarList->getFirstSelected(); | ||
1435 | if (item) | ||
1436 | { | ||
1437 | LLUUID agent_id = item->getUUID(); | ||
1438 | LLAvatarListEntry *entry = self->getAvatarEntry(agent_id); | ||
1439 | if (entry) | ||
1440 | { | ||
1441 | // llinfos << "Trying to teleport to " << entry->getDisplayName() << " at " << entry->getPosition() << llendl; | ||
1442 | gAgent.teleportViaLocation(entry->getPosition()); | ||
1443 | } | ||
1444 | } | ||
1445 | } | ||
1446 | |||
1447 | void LLFloaterAvatarList::onSelectName(LLUICtrl*, void* userdata) | ||
1448 | { | ||
1449 | LLFloaterAvatarList* self = (LLFloaterAvatarList*)userdata; | ||
1450 | |||
1451 | LLScrollListItem *item = self->mAvatarList->getFirstSelected(); | ||
1452 | if (item) | ||
1453 | { | ||
1454 | LLUUID agent_id = item->getUUID(); | ||
1455 | LLAvatarListEntry *entry = self->getAvatarEntry(agent_id); | ||
1456 | if (entry) | ||
1457 | { | ||
1458 | BOOL enabled = entry->isDrawn(); | ||
1459 | self->childSetEnabled("focus_btn", enabled); | ||
1460 | self->childSetEnabled("prev_in_list_btn", enabled); | ||
1461 | self->childSetEnabled("next_in_list_btn", enabled); | ||
1462 | } | ||
1463 | } | ||
1464 | } | ||
1465 | |||
1466 | void LLFloaterAvatarList::onCommitUpdateRate(LLUICtrl*, void* userdata) | ||
1467 | { | ||
1468 | LLFloaterAvatarList* self = (LLFloaterAvatarList*)userdata; | ||
1469 | |||
1470 | self->mUpdateRate = gSavedSettings.getU32("RadarUpdateRate") * 3 + 3; | ||
1471 | } | ||
diff --git a/linden/indra/newview/llfloateravatarlist.h b/linden/indra/newview/llfloateravatarlist.h new file mode 100644 index 0000000..75a95a7 --- /dev/null +++ b/linden/indra/newview/llfloateravatarlist.h | |||
@@ -0,0 +1,316 @@ | |||
1 | // | ||
2 | // C++ Interface: llfloateravatarlist | ||
3 | // | ||
4 | // Description: | ||
5 | // | ||
6 | // | ||
7 | // Original author: Dale Glass <dale@daleglass.net>, (C) 2007 | ||
8 | // Heavily modified by Henri Beauchamp 10/2009. | ||
9 | // | ||
10 | // Copyright: See COPYING file that comes with this distribution | ||
11 | // | ||
12 | // | ||
13 | #include "llfloater.h" | ||
14 | #include "llfloaterreporter.h" | ||
15 | #include "lluuid.h" | ||
16 | #include "lltimer.h" | ||
17 | #include "llscrolllistctrl.h" | ||
18 | |||
19 | #include <time.h> | ||
20 | #include <map> | ||
21 | #include <set> | ||
22 | |||
23 | class LLFloaterAvatarList; | ||
24 | |||
25 | /** | ||
26 | * @brief This class is used to hold data about avatars. | ||
27 | * We cache data about avatars to avoid repeating requests in this class. | ||
28 | * Instances are kept in a map<LLAvatarListEntry>. We keep track of the | ||
29 | * frame where the avatar was last seen. | ||
30 | */ | ||
31 | class LLAvatarListEntry { | ||
32 | |||
33 | public: | ||
34 | |||
35 | /** | ||
36 | * @brief Initializes a list entry | ||
37 | * @param id Avatar's key | ||
38 | * @param name Avatar's name | ||
39 | * @param position Avatar's current position | ||
40 | */ | ||
41 | LLAvatarListEntry(const LLUUID& id = LLUUID::null, const std::string &name = "", const LLVector3d &position = LLVector3d::zero); | ||
42 | |||
43 | /** | ||
44 | * Update world position. | ||
45 | * Affects age. | ||
46 | */ | ||
47 | void setPosition(LLVector3d position, bool this_sim, bool drawn, bool chatrange, bool shoutrange); | ||
48 | |||
49 | LLVector3d getPosition() { return mPosition; } | ||
50 | |||
51 | /** | ||
52 | * @brief Returns the age of this entry in frames | ||
53 | * | ||
54 | * This is only used for determining whether the avatar is still around. | ||
55 | * @see getEntryAgeSeconds | ||
56 | */ | ||
57 | bool getAlive(); | ||
58 | |||
59 | /** | ||
60 | * @brief Returns the age of this entry in seconds | ||
61 | */ | ||
62 | F32 getEntryAgeSeconds(); | ||
63 | |||
64 | /** | ||
65 | * @brief Returns the name of the avatar | ||
66 | */ | ||
67 | std::string getName() { return mName; } | ||
68 | |||
69 | /** | ||
70 | * @brief Sets the display name of the avatar | ||
71 | */ | ||
72 | void setDisplayName(std::string name) { mDisplayName = name; } | ||
73 | |||
74 | /** | ||
75 | * @brief Returns the display name of the avatar | ||
76 | */ | ||
77 | std::string getDisplayName() { return mDisplayName; } | ||
78 | |||
79 | /** | ||
80 | * @brief Returns the ID of the avatar | ||
81 | */ | ||
82 | LLUUID getID() { return mID; } | ||
83 | |||
84 | /** | ||
85 | * @brief Sets the 'focus' status on this entry (camera focused on this avatar) | ||
86 | */ | ||
87 | void setFocus(BOOL value) { mFocused = value; } | ||
88 | |||
89 | BOOL isFocused() { return mFocused; } | ||
90 | |||
91 | BOOL isMarked() { return mMarked; } | ||
92 | |||
93 | BOOL isDrawn() { return (mInDrawFrame != U32_MAX); } | ||
94 | |||
95 | BOOL isInSim() { return (mInSimFrame != U32_MAX); } | ||
96 | |||
97 | /** | ||
98 | * @brief Returns whether the item is dead and shouldn't appear in the list | ||
99 | * @returns TRUE if dead | ||
100 | */ | ||
101 | BOOL isDead(); | ||
102 | |||
103 | void toggleMark() { mMarked = !mMarked; } | ||
104 | |||
105 | private: | ||
106 | friend class LLFloaterAvatarList; | ||
107 | |||
108 | LLUUID mID; | ||
109 | std::string mName; | ||
110 | std::string mDisplayName; | ||
111 | LLVector3d mPosition; | ||
112 | LLVector3d mDrawPosition; | ||
113 | BOOL mMarked; | ||
114 | BOOL mFocused; | ||
115 | |||
116 | /** | ||
117 | * @brief Timer to keep track of whether avatars are still there | ||
118 | */ | ||
119 | LLTimer mUpdateTimer; | ||
120 | |||
121 | /** | ||
122 | * @brief Last frame when this avatar was updated | ||
123 | */ | ||
124 | U32 mFrame; | ||
125 | //last frame when this avatar was in sim | ||
126 | U32 mInSimFrame; | ||
127 | //last frame when this avatar was in draw | ||
128 | U32 mInDrawFrame; | ||
129 | //last frame when this avatar was in shout range | ||
130 | U32 mInShoutFrame; | ||
131 | //last frame when this avatar was in chat range | ||
132 | U32 mInChatFrame; | ||
133 | }; | ||
134 | |||
135 | |||
136 | /** | ||
137 | * @brief Avatar List | ||
138 | * Implements an avatar scanner in the client. | ||
139 | * | ||
140 | * This is my first attempt to modify the SL source. This code is intended | ||
141 | * to have a dual purpose: doing the task, and providing an example of how | ||
142 | * to do it. For that reason, it's going to be commented as exhaustively | ||
143 | * as possible. | ||
144 | * | ||
145 | * Since I'm very new to C++ any suggestions on coding, style, etc are very | ||
146 | * welcome. | ||
147 | */ | ||
148 | class LLFloaterAvatarList : public LLFloater | ||
149 | { | ||
150 | /** | ||
151 | * @brief Creates and initializes the LLFloaterAvatarList | ||
152 | * Here the interface is created, and callbacks are initialized. | ||
153 | */ | ||
154 | private: | ||
155 | LLFloaterAvatarList(); | ||
156 | public: | ||
157 | ~LLFloaterAvatarList(); | ||
158 | |||
159 | /*virtual*/ void onClose(bool app_quitting); | ||
160 | /*virtual*/ void onOpen(); | ||
161 | /*virtual*/ BOOL postBuild(); | ||
162 | /*virtual*/ void draw(); | ||
163 | |||
164 | /** | ||
165 | * @brief Toggles interface visibility | ||
166 | * There is only one instance of the avatar scanner at any time. | ||
167 | */ | ||
168 | static void toggle(void*); | ||
169 | |||
170 | static void showInstance(); | ||
171 | |||
172 | /** | ||
173 | * @brief Updates the internal avatar list with the currently present avatars. | ||
174 | */ | ||
175 | void updateAvatarList(); | ||
176 | |||
177 | /** | ||
178 | * @brief Refresh avatar list (display) | ||
179 | */ | ||
180 | void refreshAvatarList(); | ||
181 | |||
182 | /** | ||
183 | * @brief Returns the entry for an avatar, if preset | ||
184 | * @returns Pointer to avatar entry, NULL if not found. | ||
185 | */ | ||
186 | LLAvatarListEntry* getAvatarEntry(LLUUID avatar); | ||
187 | |||
188 | /** | ||
189 | * @brief Returns a string with the selected names in the list | ||
190 | */ | ||
191 | std::string getSelectedNames(const std::string& separator = ", "); | ||
192 | std::string getSelectedName(); | ||
193 | LLUUID getSelectedID(); | ||
194 | |||
195 | private: | ||
196 | static LLFloaterAvatarList* sInstance; | ||
197 | |||
198 | public: | ||
199 | static LLFloaterAvatarList* getInstance() { return sInstance; } | ||
200 | private: | ||
201 | // when a line editor loses keyboard focus, it is committed. | ||
202 | // commit callbacks are named onCommitWidgetName by convention. | ||
203 | //void onCommitBaz(LLUICtrl* ctrl, void *userdata); | ||
204 | |||
205 | enum AVATARS_COLUMN_ORDER | ||
206 | { | ||
207 | LIST_MARK, | ||
208 | LIST_AVATAR_NAME, | ||
209 | LIST_DISTANCE, | ||
210 | LIST_POSITION, | ||
211 | LIST_ALTITUDE | ||
212 | }; | ||
213 | |||
214 | typedef void (*avlist_command_t)(const LLUUID &avatar, const std::string &name); | ||
215 | |||
216 | /** | ||
217 | * @brief Removes focus status from all avatars in list | ||
218 | */ | ||
219 | void removeFocusFromAll(); | ||
220 | |||
221 | /** | ||
222 | * @brief Focus camera on current avatar | ||
223 | */ | ||
224 | void focusOnCurrent(); | ||
225 | |||
226 | /** | ||
227 | * @brief Focus camera on previous avatar | ||
228 | * @param marked_only Whether to choose only marked avatars | ||
229 | */ | ||
230 | void focusOnPrev(BOOL marked_only); | ||
231 | |||
232 | /** | ||
233 | * @brief Focus camera on next avatar | ||
234 | * @param marked_only Whether to choose only marked avatars | ||
235 | */ | ||
236 | void focusOnNext(BOOL marked_only); | ||
237 | |||
238 | /** | ||
239 | * @brief Handler for the "refresh" button click. | ||
240 | * I am unsure whether this is actually necessary at the time. | ||
241 | * | ||
242 | * LL: By convention, button callbacks are named onClickButtonLabel | ||
243 | * @param userdata Pointer to user data (LLFloaterAvatarList instance) | ||
244 | */ | ||
245 | |||
246 | static void onClickProfile(void *userdata); | ||
247 | static void onClickIM(void *userdata); | ||
248 | static void onClickTeleportOffer(void *userdata); | ||
249 | static void onClickTrack(void *userdata); | ||
250 | static void onClickMark(void *userdata); | ||
251 | static void onClickFocus(void *userdata); | ||
252 | |||
253 | static void onClickPrevInList(void *userdata); | ||
254 | static void onClickNextInList(void *userdata); | ||
255 | static void onClickPrevMarked(void *userdata); | ||
256 | static void onClickNextMarked(void *userdata); | ||
257 | static void onClickGetKey(void *userdata); | ||
258 | |||
259 | static void onClickFreeze(void *userdata); | ||
260 | static void onClickEject(void *userdata); | ||
261 | static void onClickMute(void *userdata); | ||
262 | static void onClickAR(void *userdata); | ||
263 | static void onClickTeleport(void *userdata); | ||
264 | static void onClickEjectFromEstate(void *userdata); | ||
265 | |||
266 | static void callbackFreeze(const LLSD& notification, const LLSD& response); | ||
267 | static void callbackEject(const LLSD& notification, const LLSD& response); | ||
268 | static void callbackAR(void *userdata); | ||
269 | static void callbackEjectFromEstate(const LLSD& notification, const LLSD& response); | ||
270 | |||
271 | static void onSelectName(LLUICtrl*, void *userdata); | ||
272 | |||
273 | static void onCommitUpdateRate(LLUICtrl*, void *userdata); | ||
274 | static void onClickSendKeys(void *userdata); | ||
275 | |||
276 | static void callbackIdle(void *userdata); | ||
277 | |||
278 | void doCommand(avlist_command_t cmd); | ||
279 | |||
280 | /** | ||
281 | * @brief Cleanup avatar list, removing dead entries from it. | ||
282 | * This lets dead entries remain for some time. This makes it possible | ||
283 | * to keep people passing by in the list long enough that it's possible | ||
284 | * to do something to them. | ||
285 | */ | ||
286 | void expireAvatarList(); | ||
287 | |||
288 | private: | ||
289 | /** | ||
290 | * @brief Pointer to the avatar scroll list | ||
291 | */ | ||
292 | LLScrollListCtrl* mAvatarList; | ||
293 | std::map<LLUUID, LLAvatarListEntry> mAvatars; | ||
294 | |||
295 | /** | ||
296 | * @brief TRUE when Updating | ||
297 | */ | ||
298 | BOOL mUpdate; | ||
299 | |||
300 | /** | ||
301 | * @brief Update rate (if min frames per update) | ||
302 | */ | ||
303 | U32 mUpdateRate; | ||
304 | |||
305 | void stopTracker(); | ||
306 | void refreshTracker(); | ||
307 | |||
308 | // tracking data | ||
309 | BOOL mTracking; // Tracking ? | ||
310 | LLUUID mTrackedAvatar; // Who we are tracking | ||
311 | |||
312 | /** | ||
313 | * @brief Avatar the camera is focused on | ||
314 | */ | ||
315 | LLUUID mFocusedAvatar; | ||
316 | }; | ||
diff --git a/linden/indra/newview/llfloaterchat.cpp b/linden/indra/newview/llfloaterchat.cpp index a28123e..4de7918 100644 --- a/linden/indra/newview/llfloaterchat.cpp +++ b/linden/indra/newview/llfloaterchat.cpp | |||
@@ -49,6 +49,7 @@ | |||
49 | #include "message.h" | 49 | #include "message.h" |
50 | 50 | ||
51 | // project include | 51 | // project include |
52 | #include "hippogridmanager.h" | ||
52 | #include "llagent.h" | 53 | #include "llagent.h" |
53 | #include "llbutton.h" | 54 | #include "llbutton.h" |
54 | #include "llcheckboxctrl.h" | 55 | #include "llcheckboxctrl.h" |
@@ -475,7 +476,7 @@ BOOL checkStringInText(const std::string &text_line, std::string textToMatch) | |||
475 | 476 | ||
476 | BOOL LLFloaterChat::isOwnNameInText(const std::string &text_line) | 477 | BOOL LLFloaterChat::isOwnNameInText(const std::string &text_line) |
477 | { | 478 | { |
478 | if (checkStringInText(text_line, gSavedSettings.getString("FirstName"))) | 479 | if (checkStringInText(text_line, gHippoGridManager->getConnectedGrid()->getFirstName())) |
479 | return TRUE; | 480 | return TRUE; |
480 | 481 | ||
481 | for (int i=1; i<=3; i++) | 482 | for (int i=1; i<=3; i++) |
diff --git a/linden/indra/newview/llfloaterdirectory.cpp b/linden/indra/newview/llfloaterdirectory.cpp index 7c8ddf1..23a9b81 100644 --- a/linden/indra/newview/llfloaterdirectory.cpp +++ b/linden/indra/newview/llfloaterdirectory.cpp | |||
@@ -466,9 +466,14 @@ void LLFloaterDirectory::setVisible(BOOL visible) | |||
466 | 466 | ||
467 | void LLFloaterDirectory::onClose(bool app_quitting) | 467 | void LLFloaterDirectory::onClose(bool app_quitting) |
468 | { | 468 | { |
469 | LLFloater::onClose(app_quitting); | 469 | if (gSavedSettings.getBOOL("SaveSearchResults")) |
470 | 470 | { | |
471 | //setVisible(FALSE); //meaning you hide 3 web browsers - one SLPlugin each | 471 | setVisible(FALSE); //meaning you hide 3 web browsers - one SLPlugin each |
472 | } | ||
473 | else | ||
474 | { | ||
475 | LLFloater::onClose(app_quitting); | ||
476 | } | ||
472 | } | 477 | } |
473 | 478 | ||
474 | // static | 479 | // static |
diff --git a/linden/indra/newview/llfloaterinspect.cpp b/linden/indra/newview/llfloaterinspect.cpp index 51c7835..e22b8f6 100644 --- a/linden/indra/newview/llfloaterinspect.cpp +++ b/linden/indra/newview/llfloaterinspect.cpp | |||
@@ -161,10 +161,44 @@ void LLFloaterInspect::onClickOwnerProfile(void* ctrl) | |||
161 | } | 161 | } |
162 | } | 162 | } |
163 | 163 | ||
164 | void LLFloaterInspect::onClickLastOwnerProfile(void* ctrl) | ||
165 | { | ||
166 | if(sInstance->mObjectList->getAllSelected().size() == 0) return; | ||
167 | LLScrollListItem* first_selected = | ||
168 | sInstance->mObjectList->getFirstSelected(); | ||
169 | |||
170 | if (first_selected) | ||
171 | { | ||
172 | LLUUID selected_id = first_selected->getUUID(); | ||
173 | struct f : public LLSelectedNodeFunctor | ||
174 | { | ||
175 | LLUUID obj_id; | ||
176 | f(const LLUUID& id) : obj_id(id) {} | ||
177 | virtual bool apply(LLSelectNode* node) | ||
178 | { | ||
179 | return (obj_id == node->getObject()->getID()); | ||
180 | } | ||
181 | } func(selected_id); | ||
182 | LLSelectNode* node = sInstance->mObjectSelection->getFirstNode(&func); | ||
183 | if(node) | ||
184 | { | ||
185 | const LLUUID& last_owner_id = node->mPermissions->getLastOwner(); | ||
186 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
187 | if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
188 | { | ||
189 | LLFloaterAvatarInfo::showFromDirectory(last_owner_id); | ||
190 | } | ||
191 | // [/RLVa:KB] | ||
192 | // LLFloaterAvatarInfo::showFromDirectory(owner_id); | ||
193 | } | ||
194 | } | ||
195 | } | ||
196 | |||
164 | BOOL LLFloaterInspect::postBuild() | 197 | BOOL LLFloaterInspect::postBuild() |
165 | { | 198 | { |
166 | mObjectList = getChild<LLScrollListCtrl>("object_list"); | 199 | mObjectList = getChild<LLScrollListCtrl>("object_list"); |
167 | childSetAction("button owner",onClickOwnerProfile, this); | 200 | childSetAction("button owner",onClickOwnerProfile, this); |
201 | childSetAction("button_last_owner",onClickLastOwnerProfile, this); | ||
168 | childSetAction("button creator",onClickCreatorProfile, this); | 202 | childSetAction("button creator",onClickCreatorProfile, this); |
169 | childSetCommitCallback("object_list", onSelectObject); | 203 | childSetCommitCallback("object_list", onSelectObject); |
170 | return TRUE; | 204 | return TRUE; |
@@ -175,8 +209,10 @@ void LLFloaterInspect::onSelectObject(LLUICtrl* ctrl, void* user_data) | |||
175 | if(LLFloaterInspect::getSelectedUUID() != LLUUID::null) | 209 | if(LLFloaterInspect::getSelectedUUID() != LLUUID::null) |
176 | { | 210 | { |
177 | //sInstance->childSetEnabled("button owner", true); | 211 | //sInstance->childSetEnabled("button owner", true); |
212 | //sInstance->childSetEnabled("button_last_owner", true); | ||
178 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-1.0.0e | 213 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-1.0.0e |
179 | sInstance->childSetEnabled("button owner", !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)); | 214 | sInstance->childSetEnabled("button owner", !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)); |
215 | sInstance->childSetEnabled("button_last_owner", !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)); | ||
180 | // [/RLVa:KB] | 216 | // [/RLVa:KB] |
181 | sInstance->childSetEnabled("button creator", true); | 217 | sInstance->childSetEnabled("button creator", true); |
182 | } | 218 | } |
@@ -205,6 +241,7 @@ void LLFloaterInspect::refresh() | |||
205 | std::string creator_name; | 241 | std::string creator_name; |
206 | S32 pos = mObjectList->getScrollPos(); | 242 | S32 pos = mObjectList->getScrollPos(); |
207 | childSetEnabled("button owner", false); | 243 | childSetEnabled("button owner", false); |
244 | childSetEnabled("button_last_owner", false); | ||
208 | childSetEnabled("button creator", false); | 245 | childSetEnabled("button creator", false); |
209 | LLUUID selected_uuid; | 246 | LLUUID selected_uuid; |
210 | S32 selected_index = mObjectList->getFirstSelectedIndex(); | 247 | S32 selected_index = mObjectList->getFirstSelectedIndex(); |
@@ -226,7 +263,7 @@ void LLFloaterInspect::refresh() | |||
226 | LLSelectNode* obj = *iter; | 263 | LLSelectNode* obj = *iter; |
227 | LLSD row; | 264 | LLSD row; |
228 | char time[MAX_STRING]; | 265 | char time[MAX_STRING]; |
229 | std::string owner_name, creator_name; | 266 | std::string owner_name, creator_name, last_owner_name; |
230 | 267 | ||
231 | if (obj->mCreationDate == 0) | 268 | if (obj->mCreationDate == 0) |
232 | { // Don't have valid information from the server, so skip this one | 269 | { // Don't have valid information from the server, so skip this one |
@@ -245,12 +282,13 @@ void LLFloaterInspect::refresh() | |||
245 | } | 282 | } |
246 | // [/RLVa:KB] | 283 | // [/RLVa:KB] |
247 | gCacheName->getFullName(obj->mPermissions->getCreator(), creator_name); | 284 | gCacheName->getFullName(obj->mPermissions->getCreator(), creator_name); |
285 | gCacheName->getFullName(obj->mPermissions->getLastOwner(), last_owner_name); | ||
248 | row["id"] = obj->getObject()->getID(); | 286 | row["id"] = obj->getObject()->getID(); |
249 | row["columns"][0]["column"] = "object_name"; | 287 | row["columns"][0]["column"] = "object_name"; |
250 | row["columns"][0]["type"] = "text"; | 288 | row["columns"][0]["type"] = "text"; |
251 | // make sure we're either at the top of the link chain | 289 | // make sure we're either at the top of the link chain |
252 | // or top of the editable chain, for attachments | 290 | // or top of the editable chain, for attachments |
253 | if(!(obj->getObject()->isRoot() || obj->getObject()->isRootEdit())) | 291 | if (!(obj->getObject()->isRoot() || obj->getObject()->isRootEdit())) |
254 | { | 292 | { |
255 | row["columns"][0]["value"] = std::string(" ") + obj->mName; | 293 | row["columns"][0]["value"] = std::string(" ") + obj->mName; |
256 | } | 294 | } |
@@ -258,18 +296,56 @@ void LLFloaterInspect::refresh() | |||
258 | { | 296 | { |
259 | row["columns"][0]["value"] = obj->mName; | 297 | row["columns"][0]["value"] = obj->mName; |
260 | } | 298 | } |
261 | row["columns"][1]["column"] = "owner_name"; | 299 | S32 i = 1; |
262 | row["columns"][1]["type"] = "text"; | 300 | row["columns"][i]["column"] = "owner_name"; |
263 | row["columns"][1]["value"] = owner_name; | 301 | row["columns"][i]["type"] = "text"; |
264 | row["columns"][2]["column"] = "creator_name"; | 302 | row["columns"][i]["value"] = owner_name; |
265 | row["columns"][2]["type"] = "text"; | 303 | ++i; |
266 | row["columns"][2]["value"] = creator_name; | 304 | row["columns"][i]["column"] = "last_owner_name"; |
267 | row["columns"][3]["column"] = "creation_date"; | 305 | row["columns"][i]["type"] = "text"; |
268 | row["columns"][3]["type"] = "text"; | 306 | row["columns"][i]["value"] = last_owner_name; |
269 | row["columns"][3]["value"] = time; | 307 | ++i; |
308 | row["columns"][i]["column"] = "creator_name"; | ||
309 | row["columns"][i]["type"] = "text"; | ||
310 | row["columns"][i]["value"] = creator_name; | ||
311 | ++i; | ||
312 | row["columns"][i]["column"] = "face_num"; | ||
313 | row["columns"][i]["type"] = "text"; | ||
314 | row["columns"][i]["value"] = llformat("%d", obj->getObject()->getNumFaces()); | ||
315 | ++i; | ||
316 | row["columns"][i]["column"] = "vertex_num"; | ||
317 | row["columns"][i]["type"] = "text"; | ||
318 | row["columns"][i]["value"] = llformat("%d", obj->getObject()->getNumVertices()); | ||
319 | ++i; | ||
320 | // inventory silliness | ||
321 | S32 scripts = 0; | ||
322 | S32 total_inv = 0; | ||
323 | std::map<LLUUID, std::pair<S32, S32> >::iterator itr = mInventoryNums.find(obj->getObject()->getID()); | ||
324 | if (itr != mInventoryNums.end()) | ||
325 | { | ||
326 | scripts = itr->second.first; | ||
327 | total_inv = itr->second.second; | ||
328 | } | ||
329 | else if (std::find(mQueue.begin(), mQueue.end(), obj->getObject()->getID()) == mQueue.end()) | ||
330 | { | ||
331 | mQueue.push_back(obj->getObject()->getID()); | ||
332 | registerVOInventoryListener(obj->getObject(), NULL); | ||
333 | requestVOInventory(); | ||
334 | } | ||
335 | row["columns"][i]["column"] = "script_num"; | ||
336 | row["columns"][i]["type"] = "text"; | ||
337 | row["columns"][i]["value"] = llformat("%d", scripts); | ||
338 | ++i; | ||
339 | row["columns"][i]["column"] = "inv_num"; | ||
340 | row["columns"][i]["type"] = "text"; | ||
341 | row["columns"][i]["value"] = llformat("%d", total_inv); | ||
342 | ++i; | ||
343 | row["columns"][i]["column"] = "creation_date"; | ||
344 | row["columns"][i]["type"] = "text"; | ||
345 | row["columns"][i]["value"] = time; | ||
270 | mObjectList->addElement(row, ADD_TOP); | 346 | mObjectList->addElement(row, ADD_TOP); |
271 | } | 347 | } |
272 | if(selected_index > -1 && mObjectList->getItemIndex(selected_uuid) == selected_index) | 348 | if (selected_index > -1 && mObjectList->getItemIndex(selected_uuid) == selected_index) |
273 | { | 349 | { |
274 | mObjectList->selectNthItem(selected_index); | 350 | mObjectList->selectNthItem(selected_index); |
275 | } | 351 | } |
@@ -281,6 +357,36 @@ void LLFloaterInspect::refresh() | |||
281 | mObjectList->setScrollPos(pos); | 357 | mObjectList->setScrollPos(pos); |
282 | } | 358 | } |
283 | 359 | ||
360 | void LLFloaterInspect::inventoryChanged(LLViewerObject* viewer_object, | ||
361 | InventoryObjectList* inv, | ||
362 | S32, | ||
363 | void* q_id) | ||
364 | { | ||
365 | if (viewer_object && inv && !mQueue.empty()) | ||
366 | { | ||
367 | std::vector<LLUUID>::iterator vIt = std::find(mQueue.begin(), mQueue.end(), viewer_object->getID()); | ||
368 | if (vIt != mQueue.end() ) | ||
369 | { | ||
370 | S32 scripts = 0; | ||
371 | S32 inv_size = (inv->empty()) ? 0 : inv->size(); | ||
372 | |||
373 | InventoryObjectList::const_iterator it = inv->begin(); | ||
374 | InventoryObjectList::const_iterator end = inv->end(); | ||
375 | for ( ; it != end; ++it) | ||
376 | { | ||
377 | if ((*it)->getType() == LLAssetType::AT_LSL_TEXT) | ||
378 | { | ||
379 | scripts++; | ||
380 | } | ||
381 | } | ||
382 | |||
383 | mInventoryNums[viewer_object->getID()] = std::make_pair(scripts, inv_size); | ||
384 | mQueue.erase(vIt); | ||
385 | mDirty = TRUE; | ||
386 | } | ||
387 | } | ||
388 | } | ||
389 | |||
284 | void LLFloaterInspect::onFocusReceived() | 390 | void LLFloaterInspect::onFocusReceived() |
285 | { | 391 | { |
286 | LLToolMgr::getInstance()->setTransientTool(LLToolCompInspect::getInstance()); | 392 | LLToolMgr::getInstance()->setTransientTool(LLToolCompInspect::getInstance()); |
@@ -291,6 +397,8 @@ void LLFloaterInspect::dirty() | |||
291 | { | 397 | { |
292 | if(sInstance) | 398 | if(sInstance) |
293 | { | 399 | { |
400 | sInstance->mInventoryNums.clear(); | ||
401 | sInstance->mQueue.clear(); | ||
294 | sInstance->setDirty(); | 402 | sInstance->setDirty(); |
295 | } | 403 | } |
296 | } | 404 | } |
diff --git a/linden/indra/newview/llfloaterinspect.h b/linden/indra/newview/llfloaterinspect.h index 57bba68..ae443f9 100644 --- a/linden/indra/newview/llfloaterinspect.h +++ b/linden/indra/newview/llfloaterinspect.h | |||
@@ -36,13 +36,14 @@ | |||
36 | #define LL_LLFLOATERINSPECT_H | 36 | #define LL_LLFLOATERINSPECT_H |
37 | 37 | ||
38 | #include "llfloater.h" | 38 | #include "llfloater.h" |
39 | #include "llvoinventorylistener.h" | ||
39 | 40 | ||
40 | //class LLTool; | 41 | //class LLTool; |
41 | class LLObjectSelection; | 42 | class LLObjectSelection; |
42 | class LLScrollListCtrl; | 43 | class LLScrollListCtrl; |
43 | class LLUICtrl; | 44 | class LLUICtrl; |
44 | 45 | ||
45 | class LLFloaterInspect : public LLFloater | 46 | class LLFloaterInspect : public LLFloater, public LLVOInventoryListener |
46 | { | 47 | { |
47 | public: | 48 | public: |
48 | virtual ~LLFloaterInspect(void); | 49 | virtual ~LLFloaterInspect(void); |
@@ -56,6 +57,7 @@ public: | |||
56 | virtual void onFocusReceived(); | 57 | virtual void onFocusReceived(); |
57 | static void onClickCreatorProfile(void* ctrl); | 58 | static void onClickCreatorProfile(void* ctrl); |
58 | static void onClickOwnerProfile(void* ctrl); | 59 | static void onClickOwnerProfile(void* ctrl); |
60 | static void onClickLastOwnerProfile(void* ctrl); | ||
59 | static void onSelectObject(LLUICtrl* ctrl, void* user_data); | 61 | static void onSelectObject(LLUICtrl* ctrl, void* user_data); |
60 | LLScrollListCtrl* mObjectList; | 62 | LLScrollListCtrl* mObjectList; |
61 | protected: | 63 | protected: |
@@ -63,12 +65,18 @@ protected: | |||
63 | LLFloaterInspect(); | 65 | LLFloaterInspect(); |
64 | void setDirty() { mDirty = TRUE; } | 66 | void setDirty() { mDirty = TRUE; } |
65 | bool mDirty; | 67 | bool mDirty; |
68 | /*virtual*/ void inventoryChanged(LLViewerObject* obj, | ||
69 | InventoryObjectList* inv, | ||
70 | S32 serial_num, | ||
71 | void* queue); | ||
66 | 72 | ||
67 | private: | 73 | private: |
68 | // static data | 74 | // static data |
69 | static LLFloaterInspect* sInstance; | 75 | static LLFloaterInspect* sInstance; |
70 | 76 | ||
71 | LLSafeHandle<LLObjectSelection> mObjectSelection; | 77 | LLSafeHandle<LLObjectSelection> mObjectSelection; |
78 | std::map<LLUUID, std::pair<S32, S32> > mInventoryNums; //<scripts, total> | ||
79 | std::vector<LLUUID> mQueue; | ||
72 | }; | 80 | }; |
73 | 81 | ||
74 | #endif //LL_LLFLOATERINSPECT_H | 82 | #endif //LL_LLFLOATERINSPECT_H |
diff --git a/linden/indra/newview/llfloaterpreference.cpp b/linden/indra/newview/llfloaterpreference.cpp index c99d75d..52192b8 100644 --- a/linden/indra/newview/llfloaterpreference.cpp +++ b/linden/indra/newview/llfloaterpreference.cpp | |||
@@ -402,6 +402,8 @@ BOOL LLFloaterPreference::postBuild() | |||
402 | 402 | ||
403 | mOKBtn = getChild<LLButton>("OK"); | 403 | mOKBtn = getChild<LLButton>("OK"); |
404 | mOKBtn->setClickedCallback(onBtnOK, this); | 404 | mOKBtn->setClickedCallback(onBtnOK, this); |
405 | |||
406 | childSetAction("reset_btn", onClickResetPrefs, this); | ||
405 | 407 | ||
406 | mPreferenceCore = new LLPreferenceCore( | 408 | mPreferenceCore = new LLPreferenceCore( |
407 | getChild<LLTabContainer>("pref core"), | 409 | getChild<LLTabContainer>("pref core"), |
diff --git a/linden/indra/newview/llfloatersettingsdebug.cpp b/linden/indra/newview/llfloatersettingsdebug.cpp index 0aa0607..9e4a04c 100644 --- a/linden/indra/newview/llfloatersettingsdebug.cpp +++ b/linden/indra/newview/llfloatersettingsdebug.cpp | |||
@@ -36,6 +36,8 @@ | |||
36 | #include "lluictrlfactory.h" | 36 | #include "lluictrlfactory.h" |
37 | #include "llfirstuse.h" | 37 | #include "llfirstuse.h" |
38 | #include "llcombobox.h" | 38 | #include "llcombobox.h" |
39 | #include "lllineeditor.h" | ||
40 | #include "llscrolllistctrl.h" | ||
39 | #include "llspinctrl.h" | 41 | #include "llspinctrl.h" |
40 | #include "llcolorswatch.h" | 42 | #include "llcolorswatch.h" |
41 | #include "llviewercontrol.h" | 43 | #include "llviewercontrol.h" |
@@ -58,7 +60,8 @@ LLFloaterSettingsDebug::~LLFloaterSettingsDebug() | |||
58 | 60 | ||
59 | BOOL LLFloaterSettingsDebug::postBuild() | 61 | BOOL LLFloaterSettingsDebug::postBuild() |
60 | { | 62 | { |
61 | LLComboBox* settings_combo = getChild<LLComboBox>("settings_combo"); | 63 | mSettingsNames.clear(); |
64 | mComboNames = getChild<LLComboBox>("settings_combo"); | ||
62 | 65 | ||
63 | struct f : public LLControlGroup::ApplyFunctor | 66 | struct f : public LLControlGroup::ApplyFunctor |
64 | { | 67 | { |
@@ -71,16 +74,16 @@ BOOL LLFloaterSettingsDebug::postBuild() | |||
71 | combo->add(name, (void*)control); | 74 | combo->add(name, (void*)control); |
72 | } | 75 | } |
73 | } | 76 | } |
74 | } func(settings_combo); | 77 | } func(mComboNames); |
75 | 78 | ||
76 | gSavedSettings.applyToAll(&func); | 79 | gSavedSettings.applyToAll(&func); |
77 | gSavedPerAccountSettings.applyToAll(&func); | 80 | gSavedPerAccountSettings.applyToAll(&func); |
78 | gColors.applyToAll(&func); | 81 | gColors.applyToAll(&func); |
79 | 82 | ||
80 | settings_combo->sortByName(); | 83 | mComboNames->sortByName(); |
81 | settings_combo->setCommitCallback(onSettingSelect); | 84 | mComboNames->setCommitCallback(onSettingSelect); |
82 | settings_combo->setCallbackUserData(this); | 85 | mComboNames->setCallbackUserData(this); |
83 | settings_combo->updateSelection(); | 86 | //mComboNames->updateSelection(); |
84 | 87 | ||
85 | childSetCommitCallback("val_spinner_1", onCommitSettings); | 88 | childSetCommitCallback("val_spinner_1", onCommitSettings); |
86 | childSetUserData("val_spinner_1", this); | 89 | childSetUserData("val_spinner_1", this); |
@@ -98,14 +101,23 @@ BOOL LLFloaterSettingsDebug::postBuild() | |||
98 | childSetUserData("color_swatch", this); | 101 | childSetUserData("color_swatch", this); |
99 | childSetAction("default_btn", onClickDefault, this); | 102 | childSetAction("default_btn", onClickDefault, this); |
100 | mComment = getChild<LLTextEditor>("comment_text"); | 103 | mComment = getChild<LLTextEditor>("comment_text"); |
104 | |||
105 | getChild<LLSearchEditor>("control_search")->setSearchCallback(onSearchEdit, this); | ||
106 | |||
107 | // There really are many better ways to do this, but laziness... she is powerful... -- MC | ||
108 | mComboNames->getAllData(mSettingsNames); | ||
109 | getChild<LLSearchEditor>("control_search")->setEnabled(!(mSettingsNames.empty())); | ||
110 | |||
101 | return TRUE; | 111 | return TRUE; |
102 | } | 112 | } |
103 | 113 | ||
104 | void LLFloaterSettingsDebug::draw() | 114 | void LLFloaterSettingsDebug::draw() |
105 | { | 115 | { |
106 | LLComboBox* settings_combo = getChild<LLComboBox>("settings_combo"); | 116 | if (mComboNames) |
107 | LLControlVariable* controlp = (LLControlVariable*)settings_combo->getCurrentUserdata(); | 117 | { |
108 | updateControl(controlp); | 118 | LLControlVariable* controlp = (LLControlVariable*)mComboNames->getCurrentUserdata(); |
119 | updateControl(controlp); | ||
120 | } | ||
109 | 121 | ||
110 | LLFloater::draw(); | 122 | LLFloater::draw(); |
111 | } | 123 | } |
@@ -134,11 +146,46 @@ void LLFloaterSettingsDebug::onSettingSelect(LLUICtrl* ctrl, void* user_data) | |||
134 | } | 146 | } |
135 | 147 | ||
136 | //static | 148 | //static |
149 | void LLFloaterSettingsDebug::onSearchEdit(const std::string& search_string, void* user_data) | ||
150 | { | ||
151 | if (search_string.empty()) | ||
152 | { | ||
153 | return; | ||
154 | } | ||
155 | |||
156 | LLFloaterSettingsDebug* self = (LLFloaterSettingsDebug*)user_data; | ||
157 | if (!self || !self->mComboNames) | ||
158 | { | ||
159 | return; | ||
160 | } | ||
161 | |||
162 | std::string search_text = search_string; | ||
163 | LLStringUtil::trim(search_text); | ||
164 | LLStringUtil::toUpper(search_text); | ||
165 | |||
166 | std::string settings_name(""); | ||
167 | size_t found; | ||
168 | for (std::vector<LLScrollListItem*>::iterator vIt = self->mSettingsNames.begin(); | ||
169 | vIt != self->mSettingsNames.end(); ++vIt) | ||
170 | { | ||
171 | settings_name = (*vIt)->getValue().asString(); | ||
172 | LLStringUtil::toUpper(settings_name); | ||
173 | found = settings_name.find(search_text); | ||
174 | if (found != std::string::npos) | ||
175 | { | ||
176 | // search and update combo on partial matches | ||
177 | self->mComboNames->selectByValue((*vIt)->getValue()); | ||
178 | break; | ||
179 | } | ||
180 | } | ||
181 | } | ||
182 | |||
183 | //static | ||
137 | void LLFloaterSettingsDebug::onCommitSettings(LLUICtrl* ctrl, void* user_data) | 184 | void LLFloaterSettingsDebug::onCommitSettings(LLUICtrl* ctrl, void* user_data) |
138 | { | 185 | { |
139 | LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data; | 186 | LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data; |
140 | 187 | ||
141 | LLComboBox* settings_combo = floaterp->getChild<LLComboBox>("settings_combo"); | 188 | LLComboBox* settings_combo = floaterp->mComboNames; |
142 | LLControlVariable* controlp = (LLControlVariable*)settings_combo->getCurrentUserdata(); | 189 | LLControlVariable* controlp = (LLControlVariable*)settings_combo->getCurrentUserdata(); |
143 | 190 | ||
144 | LLVector3 vector; | 191 | LLVector3 vector; |
@@ -212,7 +259,7 @@ void LLFloaterSettingsDebug::onCommitSettings(LLUICtrl* ctrl, void* user_data) | |||
212 | void LLFloaterSettingsDebug::onClickDefault(void* user_data) | 259 | void LLFloaterSettingsDebug::onClickDefault(void* user_data) |
213 | { | 260 | { |
214 | LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data; | 261 | LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data; |
215 | LLComboBox* settings_combo = floaterp->getChild<LLComboBox>("settings_combo"); | 262 | LLComboBox* settings_combo = floaterp->mComboNames; |
216 | LLControlVariable* controlp = (LLControlVariable*)settings_combo->getCurrentUserdata(); | 263 | LLControlVariable* controlp = (LLControlVariable*)settings_combo->getCurrentUserdata(); |
217 | 264 | ||
218 | if (controlp) | 265 | if (controlp) |
diff --git a/linden/indra/newview/llfloatersettingsdebug.h b/linden/indra/newview/llfloatersettingsdebug.h index e08e6b5..3e14eaa 100644 --- a/linden/indra/newview/llfloatersettingsdebug.h +++ b/linden/indra/newview/llfloatersettingsdebug.h | |||
@@ -37,6 +37,9 @@ | |||
37 | #include "llfloater.h" | 37 | #include "llfloater.h" |
38 | #include "lltexteditor.h" | 38 | #include "lltexteditor.h" |
39 | 39 | ||
40 | class LLComboBox; | ||
41 | class LLScrollListItem; | ||
42 | |||
40 | class LLFloaterSettingsDebug : public LLFloater | 43 | class LLFloaterSettingsDebug : public LLFloater |
41 | { | 44 | { |
42 | public: | 45 | public: |
@@ -56,6 +59,12 @@ public: | |||
56 | protected: | 59 | protected: |
57 | static LLFloaterSettingsDebug* sInstance; | 60 | static LLFloaterSettingsDebug* sInstance; |
58 | LLTextEditor* mComment; | 61 | LLTextEditor* mComment; |
62 | |||
63 | private: | ||
64 | LLComboBox* mComboNames; | ||
65 | std::vector<LLScrollListItem*> mSettingsNames; | ||
66 | |||
67 | static void onSearchEdit(const std::string& search_string, void* user_data); | ||
59 | }; | 68 | }; |
60 | 69 | ||
61 | #endif //LLFLOATERDEBUGSETTINGS_H | 70 | #endif //LLFLOATERDEBUGSETTINGS_H |
diff --git a/linden/indra/newview/llhudtext.cpp b/linden/indra/newview/llhudtext.cpp index 7c0c469..457249f 100644 --- a/linden/indra/newview/llhudtext.cpp +++ b/linden/indra/newview/llhudtext.cpp | |||
@@ -723,6 +723,21 @@ void LLHUDText::setDoFade(const BOOL do_fade) | |||
723 | mDoFade = do_fade; | 723 | mDoFade = do_fade; |
724 | } | 724 | } |
725 | 725 | ||
726 | std::string LLHUDText::getStringUTF8() | ||
727 | { | ||
728 | std::string out(""); | ||
729 | int t = mTextSegments.size(); | ||
730 | int i = 0; | ||
731 | for (std::vector<LLHUDTextSegment>::iterator segment_iter = mTextSegments.begin(); | ||
732 | segment_iter != mTextSegments.end(); ++segment_iter ) | ||
733 | { | ||
734 | out.append(wstring_to_utf8str((*segment_iter).getText())); | ||
735 | i++; | ||
736 | if(i < t) out.append("\n"); | ||
737 | } | ||
738 | return out; | ||
739 | } | ||
740 | |||
726 | void LLHUDText::updateVisibility() | 741 | void LLHUDText::updateVisibility() |
727 | { | 742 | { |
728 | if (mSourceObject) | 743 | if (mSourceObject) |
diff --git a/linden/indra/newview/llhudtext.h b/linden/indra/newview/llhudtext.h index 297e4d5..fbe984f 100644 --- a/linden/indra/newview/llhudtext.h +++ b/linden/indra/newview/llhudtext.h | |||
@@ -103,6 +103,7 @@ public: | |||
103 | void setZCompare(const BOOL zcompare); | 103 | void setZCompare(const BOOL zcompare); |
104 | void setDoFade(const BOOL do_fade); | 104 | void setDoFade(const BOOL do_fade); |
105 | void setVisibleOffScreen(BOOL visible) { mVisibleOffScreen = visible; } | 105 | void setVisibleOffScreen(BOOL visible) { mVisibleOffScreen = visible; } |
106 | std::string getStringUTF8(); | ||
106 | 107 | ||
107 | // mMaxLines of -1 means unlimited lines. | 108 | // mMaxLines of -1 means unlimited lines. |
108 | void setMaxLines(S32 max_lines) { mMaxLines = max_lines; } | 109 | void setMaxLines(S32 max_lines) { mMaxLines = max_lines; } |
diff --git a/linden/indra/newview/llloginhandler.cpp b/linden/indra/newview/llloginhandler.cpp index c35ba04..988ef2f 100644 --- a/linden/indra/newview/llloginhandler.cpp +++ b/linden/indra/newview/llloginhandler.cpp | |||
@@ -131,23 +131,29 @@ bool LLLoginHandler::handle(const LLSD& tokens, | |||
131 | 131 | ||
132 | if (password.substr(0,3) != "$1$") | 132 | if (password.substr(0,3) != "$1$") |
133 | { | 133 | { |
134 | LLMD5 pass((unsigned char*)password.c_str()); | 134 | // grids we try in order: loginhandler "grid", LastConnectedGrid, grid manager |
135 | char md5pass[33]; /* Flawfinder: ignore */ | 135 | // icky that we do this here and in LLStartUp |
136 | pass.hex_digest(md5pass); | 136 | std::string grid_nick = query_map["grid"].asString(); |
137 | std::string hashed_password = ll_safe_string(md5pass, 32); | 137 | if (grid_nick.empty()) grid_nick = gSavedSettings.getString("LastConnectedGrid"); |
138 | LLStartUp::savePasswordToDisk(hashed_password); | 138 | if (grid_nick.empty()) grid_nick = gHippoGridManager->getCurrentGridNick(); |
139 | HippoGridInfo* grid = gHippoGridManager->getGrid(grid_nick); | ||
140 | if (grid) grid->setPassword(password); | ||
139 | } | 141 | } |
140 | } | 142 | } |
141 | 143 | ||
142 | 144 | ||
143 | if (LLStartUp::getStartupState() < STATE_LOGIN_CLEANUP) //on splash page | 145 | if (LLStartUp::getStartupState() < STATE_LOGIN_CLEANUP) //on splash page |
144 | { | 146 | { |
145 | // if we ever support saving names based on grid, we'll have to support saving usernames too -- MC | ||
146 | LLPanelLogin::loadLoginForm(); | 147 | LLPanelLogin::loadLoginForm(); |
147 | 148 | ||
148 | if (!mFirstName.empty() || !mLastName.empty()) | 149 | if (!mFirstName.empty() || !mLastName.empty()) |
149 | { | 150 | { |
150 | // Fill in the name, and maybe the password | 151 | // Fill in the name, and the password if we can |
152 | if (password.empty()) | ||
153 | { | ||
154 | password = gHippoGridManager->getCurrentGrid()->getPassword(); | ||
155 | } | ||
156 | |||
151 | if (gHippoGridManager && gHippoGridManager->getCurrentGrid()->isUsernameCompat()) | 157 | if (gHippoGridManager && gHippoGridManager->getCurrentGrid()->isUsernameCompat()) |
152 | { | 158 | { |
153 | if (mLastName == "resident" || mLastName == "Resident") | 159 | if (mLastName == "resident" || mLastName == "Resident") |
diff --git a/linden/indra/newview/llpanelavatar.cpp b/linden/indra/newview/llpanelavatar.cpp index 7502c10..6a3a0bd 100644 --- a/linden/indra/newview/llpanelavatar.cpp +++ b/linden/indra/newview/llpanelavatar.cpp | |||
@@ -1951,9 +1951,9 @@ void LLPanelAvatar::processAvatarPropertiesReply(LLMessageSystem *msg, void**) | |||
1951 | self->mPanelSecondLife->childSetValue("acct", caption_text); | 1951 | self->mPanelSecondLife->childSetValue("acct", caption_text); |
1952 | 1952 | ||
1953 | //Chalice - Show avatar age in days. | 1953 | //Chalice - Show avatar age in days. |
1954 | int year; | 1954 | S32 year; |
1955 | int month; | 1955 | S32 month; |
1956 | int day; | 1956 | S32 day; |
1957 | sscanf(born_on.c_str(), "%d/%d/%d", &month, &day, &year); | 1957 | sscanf(born_on.c_str(), "%d/%d/%d", &month, &day, &year); |
1958 | time_t now = time(NULL); | 1958 | time_t now = time(NULL); |
1959 | struct tm * timeinfo; | 1959 | struct tm * timeinfo; |
@@ -1962,8 +1962,11 @@ void LLPanelAvatar::processAvatarPropertiesReply(LLMessageSystem *msg, void**) | |||
1962 | timeinfo->tm_year = year - 1900; | 1962 | timeinfo->tm_year = year - 1900; |
1963 | timeinfo->tm_mday = day; | 1963 | timeinfo->tm_mday = day; |
1964 | time_t birth = mktime(timeinfo); | 1964 | time_t birth = mktime(timeinfo); |
1965 | |||
1965 | std::stringstream numberString; | 1966 | std::stringstream numberString; |
1966 | numberString << (S32)(difftime(now, birth) / 86400); //(60*60*24) | 1967 | S32 days = difftime(now, birth) / 86400; //(60*60*24) |
1968 | if (days < 0) days = 0; // Happens for people on different timezones -- MC | ||
1969 | numberString << days; | ||
1967 | 1970 | ||
1968 | LLStringUtil::format_map_t targs; | 1971 | LLStringUtil::format_map_t targs; |
1969 | targs["[DAYS]"] = numberString.str(); | 1972 | targs["[DAYS]"] = numberString.str(); |
@@ -1984,15 +1987,38 @@ void LLPanelAvatar::processAvatarPropertiesReply(LLMessageSystem *msg, void**) | |||
1984 | { | 1987 | { |
1985 | image_ctrl->setImageAssetID(image_id); | 1988 | image_ctrl->setImageAssetID(image_id); |
1986 | } | 1989 | } |
1987 | self->childSetValue("about", about_text); | 1990 | LLTextEditor* about_field = self->mPanelSecondLife->getChild<LLTextEditor>("about"); |
1991 | if (about_field) | ||
1992 | { | ||
1993 | if (self->mAllowEdit && (self->mAvatarID == agent_id)) | ||
1994 | { | ||
1995 | about_field->setText(about_text); | ||
1996 | } | ||
1997 | else | ||
1998 | { | ||
1999 | about_field->setParseHTML(TRUE); | ||
2000 | about_field->appendColoredText(about_text, false, false, gColors.getColor("TextFgReadOnlyColor")); | ||
2001 | } | ||
2002 | } | ||
1988 | 2003 | ||
1989 | self->mPanelSecondLife->setPartnerID(partner_id); | 2004 | self->mPanelSecondLife->setPartnerID(partner_id); |
1990 | self->mPanelSecondLife->updatePartnerName(); | 2005 | self->mPanelSecondLife->updatePartnerName(); |
1991 | 2006 | ||
1992 | if (self->mPanelFirstLife) | 2007 | if (self->mPanelFirstLife) |
1993 | { | 2008 | { |
1994 | // Teens don't get these | 2009 | about_field = self->mPanelFirstLife->getChild<LLTextEditor>("about"); |
1995 | self->mPanelFirstLife->childSetValue("about", fl_about_text); | 2010 | if (about_field) |
2011 | { | ||
2012 | if (self->mAllowEdit && (self->mAvatarID == agent_id)) | ||
2013 | { | ||
2014 | } | ||
2015 | else | ||
2016 | { | ||
2017 | about_field->setParseHTML(TRUE); | ||
2018 | about_field->appendColoredText(fl_about_text, false, false, gColors.getColor("TextFgReadOnlyColor")); | ||
2019 | } | ||
2020 | } | ||
2021 | |||
1996 | LLTextureCtrl* image_ctrl = self->mPanelFirstLife->getChild<LLTextureCtrl>("img"); | 2022 | LLTextureCtrl* image_ctrl = self->mPanelFirstLife->getChild<LLTextureCtrl>("img"); |
1997 | if(image_ctrl) | 2023 | if(image_ctrl) |
1998 | { | 2024 | { |
diff --git a/linden/indra/newview/llpanelclassified.cpp b/linden/indra/newview/llpanelclassified.cpp index 99b6cf6..b2504dc 100644 --- a/linden/indra/newview/llpanelclassified.cpp +++ b/linden/indra/newview/llpanelclassified.cpp | |||
@@ -660,7 +660,15 @@ void LLPanelClassified::processClassifiedInfoReply(LLMessageSystem *msg, void ** | |||
660 | 660 | ||
661 | // Update UI controls | 661 | // Update UI controls |
662 | self->mNameEditor->setText(name); | 662 | self->mNameEditor->setText(name); |
663 | self->mDescEditor->setText(desc); | 663 | if (self->mCreatorID == gAgent.getID()) |
664 | { | ||
665 | self->mDescEditor->setText(desc); | ||
666 | } | ||
667 | else | ||
668 | { | ||
669 | self->mDescEditor->setParseHTML(TRUE); | ||
670 | self->mDescEditor->appendColoredText(desc, false, false, gColors.getColor("TextFgReadOnlyColor")); | ||
671 | } | ||
664 | self->mSnapshotCtrl->setImageAssetID(snapshot_id); | 672 | self->mSnapshotCtrl->setImageAssetID(snapshot_id); |
665 | self->mLocationEditor->setText(location_text); | 673 | self->mLocationEditor->setText(location_text); |
666 | self->mLocationChanged = false; | 674 | self->mLocationChanged = false; |
diff --git a/linden/indra/newview/llpaneldirfind.cpp b/linden/indra/newview/llpaneldirfind.cpp index 489d527..46f8979 100644 --- a/linden/indra/newview/llpaneldirfind.cpp +++ b/linden/indra/newview/llpaneldirfind.cpp | |||
@@ -270,7 +270,7 @@ void LLPanelDirFind::navigateToDefaultPage() | |||
270 | { | 270 | { |
271 | std::string start_url = ""; | 271 | std::string start_url = ""; |
272 | // Note: we use the web panel in OpenSim as well as Second Life -- MC | 272 | // Note: we use the web panel in OpenSim as well as Second Life -- MC |
273 | if (gHippoGridManager->getConnectedGrid()->getSearchUrl().empty() && | 273 | if (gHippoGridManager->getConnectedGrid()->getSearchURL().empty() && |
274 | !gHippoGridManager->getConnectedGrid()->isSecondLife()) | 274 | !gHippoGridManager->getConnectedGrid()->isSecondLife()) |
275 | { | 275 | { |
276 | // OS-based but doesn't have its own web search url -- MC | 276 | // OS-based but doesn't have its own web search url -- MC |
@@ -293,7 +293,7 @@ void LLPanelDirFind::navigateToDefaultPage() | |||
293 | else | 293 | else |
294 | { | 294 | { |
295 | // OS-based but has its own web search url -- MC | 295 | // OS-based but has its own web search url -- MC |
296 | start_url = gHippoGridManager->getConnectedGrid()->getSearchUrl(); | 296 | start_url = gHippoGridManager->getConnectedGrid()->getSearchURL(); |
297 | } | 297 | } |
298 | 298 | ||
299 | BOOL inc_pg = childGetValue("incpg").asBoolean(); | 299 | BOOL inc_pg = childGetValue("incpg").asBoolean(); |
@@ -323,7 +323,7 @@ std::string LLPanelDirFind::buildSearchURL(const std::string& search_text, const | |||
323 | std::string url; | 323 | std::string url; |
324 | if (search_text.empty()) | 324 | if (search_text.empty()) |
325 | { | 325 | { |
326 | url = gHippoGridManager->getConnectedGrid()->getSearchUrl(HippoGridInfo::SEARCH_ALL_EMPTY, is_web); | 326 | url = gHippoGridManager->getConnectedGrid()->getSearchURL(HippoGridInfo::SEARCH_ALL_EMPTY, is_web); |
327 | } | 327 | } |
328 | else | 328 | else |
329 | { | 329 | { |
@@ -348,7 +348,7 @@ std::string LLPanelDirFind::buildSearchURL(const std::string& search_text, const | |||
348 | "-._~$+!*'()"; | 348 | "-._~$+!*'()"; |
349 | std::string query = LLURI::escape(search_text_with_plus, allowed); | 349 | std::string query = LLURI::escape(search_text_with_plus, allowed); |
350 | 350 | ||
351 | url = gHippoGridManager->getConnectedGrid()->getSearchUrl(HippoGridInfo::SEARCH_ALL_QUERY, is_web); | 351 | url = gHippoGridManager->getConnectedGrid()->getSearchURL(HippoGridInfo::SEARCH_ALL_QUERY, is_web); |
352 | std::string substring = "[QUERY]"; | 352 | std::string substring = "[QUERY]"; |
353 | std::string::size_type where = url.find(substring); | 353 | std::string::size_type where = url.find(substring); |
354 | if (where != std::string::npos) | 354 | if (where != std::string::npos) |
@@ -373,13 +373,13 @@ std::string LLPanelDirFind::buildSearchURL(const std::string& search_text, const | |||
373 | // static | 373 | // static |
374 | std::string LLPanelDirFind::getSearchURLSuffix(bool inc_pg, bool inc_mature, bool inc_adult, bool is_web) | 374 | std::string LLPanelDirFind::getSearchURLSuffix(bool inc_pg, bool inc_mature, bool inc_adult, bool is_web) |
375 | { | 375 | { |
376 | std::string url = gHippoGridManager->getConnectedGrid()->getSearchUrl(HippoGridInfo::SEARCH_ALL_TEMPLATE, is_web); | 376 | std::string url = gHippoGridManager->getConnectedGrid()->getSearchURL(HippoGridInfo::SEARCH_ALL_TEMPLATE, is_web); |
377 | 377 | ||
378 | if (!url.empty()) | 378 | if (!url.empty()) |
379 | { | 379 | { |
380 | // Note: opensim's default template (SearchURLSuffixOpenSim) is currently empty -- MC | 380 | // Note: opensim's default template (SearchURLSuffixOpenSim) is currently empty -- MC |
381 | if (gHippoGridManager->getConnectedGrid()->isSecondLife() || | 381 | if (gHippoGridManager->getConnectedGrid()->isSecondLife() || |
382 | !gHippoGridManager->getConnectedGrid()->getSearchUrl().empty()) | 382 | !gHippoGridManager->getConnectedGrid()->getSearchURL().empty()) |
383 | { | 383 | { |
384 | // if the mature checkbox is unchecked, modify query to remove | 384 | // if the mature checkbox is unchecked, modify query to remove |
385 | // terms with given phrase from the result set | 385 | // terms with given phrase from the result set |
diff --git a/linden/indra/newview/llpanelgroupgeneral.cpp b/linden/indra/newview/llpanelgroupgeneral.cpp index 7ff25a7..8e61c60 100644 --- a/linden/indra/newview/llpanelgroupgeneral.cpp +++ b/linden/indra/newview/llpanelgroupgeneral.cpp | |||
@@ -56,6 +56,7 @@ | |||
56 | #include "lltextbox.h" | 56 | #include "lltextbox.h" |
57 | #include "lltexteditor.h" | 57 | #include "lltexteditor.h" |
58 | #include "lltexturectrl.h" | 58 | #include "lltexturectrl.h" |
59 | #include "llviewercontrol.h" | ||
59 | #include "llviewerwindow.h" | 60 | #include "llviewerwindow.h" |
60 | 61 | ||
61 | // consts | 62 | // consts |
@@ -813,7 +814,15 @@ void LLPanelGroupGeneral::update(LLGroupChange gc) | |||
813 | 814 | ||
814 | if (mEditCharter) | 815 | if (mEditCharter) |
815 | { | 816 | { |
816 | mEditCharter->setText(gdatap->mCharter); | 817 | if (mAllowEdit && can_change_ident) |
818 | { | ||
819 | mEditCharter->setText(gdatap->mCharter); | ||
820 | } | ||
821 | else | ||
822 | { | ||
823 | mEditCharter->setParseHTML(TRUE); | ||
824 | mEditCharter->appendColoredText(gdatap->mCharter, false, false, gColors.getColor("TextFgReadOnlyColor")); | ||
825 | } | ||
817 | mEditCharter->resetDirty(); | 826 | mEditCharter->resetDirty(); |
818 | } | 827 | } |
819 | 828 | ||
diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index cb61647..39df8b6 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp | |||
@@ -91,6 +91,7 @@ | |||
91 | 91 | ||
92 | const S32 BLACK_BORDER_HEIGHT = 160; | 92 | const S32 BLACK_BORDER_HEIGHT = 160; |
93 | const S32 MAX_PASSWORD = 16; | 93 | const S32 MAX_PASSWORD = 16; |
94 | const std::string PASSWORD_FILLER = "123456789!123456"; | ||
94 | 95 | ||
95 | LLPanelLogin *LLPanelLogin::sInstance = NULL; | 96 | LLPanelLogin *LLPanelLogin::sInstance = NULL; |
96 | BOOL LLPanelLogin::sCapslockDidNotification = FALSE; | 97 | BOOL LLPanelLogin::sCapslockDidNotification = FALSE; |
@@ -174,7 +175,8 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, | |||
174 | mLogoImage(), | 175 | mLogoImage(), |
175 | mCallback(callback), | 176 | mCallback(callback), |
176 | mCallbackData(cb_data), | 177 | mCallbackData(cb_data), |
177 | mHtmlAvailable( TRUE ) | 178 | mHtmlAvailable( TRUE ), |
179 | mActualPassword("") | ||
178 | { | 180 | { |
179 | setFocusRoot(TRUE); | 181 | setFocusRoot(TRUE); |
180 | 182 | ||
@@ -200,7 +202,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, | |||
200 | mLogoImage = LLUI::getUIImage("startup_logo.j2c"); | 202 | mLogoImage = LLUI::getUIImage("startup_logo.j2c"); |
201 | 203 | ||
202 | LLUICtrlFactory::getInstance()->buildPanel(this, "panel_login.xml"); | 204 | LLUICtrlFactory::getInstance()->buildPanel(this, "panel_login.xml"); |
203 | 205 | ||
204 | #if USE_VIEWER_AUTH | 206 | #if USE_VIEWER_AUTH |
205 | //leave room for the login menu bar | 207 | //leave room for the login menu bar |
206 | setRect(LLRect(0, rect.getHeight()-18, rect.getWidth(), 0)); | 208 | setRect(LLRect(0, rect.getHeight()-18, rect.getWidth(), 0)); |
@@ -212,7 +214,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, | |||
212 | childSetPrevalidate("last_name_edit", LLLineEditor::prevalidatePrintableNoSpace); | 214 | childSetPrevalidate("last_name_edit", LLLineEditor::prevalidatePrintableNoSpace); |
213 | childSetPrevalidate("username_edit", LLLineEditor::prevalidatePrintableSpace); | 215 | childSetPrevalidate("username_edit", LLLineEditor::prevalidatePrintableSpace); |
214 | 216 | ||
215 | childSetCommitCallback("password_edit", mungePassword); | 217 | childSetCommitCallback("password_edit", onPasswordChanged, this); |
216 | childSetKeystrokeCallback("password_edit", onPassKey, this); | 218 | childSetKeystrokeCallback("password_edit", onPassKey, this); |
217 | childSetUserData("password_edit", this); | 219 | childSetUserData("password_edit", this); |
218 | 220 | ||
@@ -364,22 +366,6 @@ void LLPanelLogin::setSiteIsAlive( bool alive ) | |||
364 | } | 366 | } |
365 | } | 367 | } |
366 | 368 | ||
367 | void LLPanelLogin::mungePassword(LLUICtrl* caller, void* user_data) | ||
368 | { | ||
369 | LLPanelLogin* self = (LLPanelLogin*)user_data; | ||
370 | LLLineEditor* editor = (LLLineEditor*)caller; | ||
371 | std::string password = editor->getText(); | ||
372 | |||
373 | // Re-md5 if we've changed at all | ||
374 | if (password != self->mIncomingPassword) | ||
375 | { | ||
376 | LLMD5 pass((unsigned char *)password.c_str()); | ||
377 | char munged_password[MD5HEX_STR_SIZE]; | ||
378 | pass.hex_digest(munged_password); | ||
379 | self->mMungedPassword = munged_password; | ||
380 | } | ||
381 | } | ||
382 | |||
383 | LLPanelLogin::~LLPanelLogin() | 369 | LLPanelLogin::~LLPanelLogin() |
384 | { | 370 | { |
385 | LLPanelLogin::sInstance = NULL; | 371 | LLPanelLogin::sInstance = NULL; |
@@ -598,6 +584,8 @@ void LLPanelLogin::setFields(const std::string& firstname, | |||
598 | // static | 584 | // static |
599 | void LLPanelLogin::setPassword(const std::string& password) | 585 | void LLPanelLogin::setPassword(const std::string& password) |
600 | { | 586 | { |
587 | // we check for sInstance before getting here | ||
588 | |||
601 | // Max "actual" password length is 16 characters. | 589 | // Max "actual" password length is 16 characters. |
602 | // Hex digests are always 32 characters. | 590 | // Hex digests are always 32 characters. |
603 | if (password.length() == 32) | 591 | if (password.length() == 32) |
@@ -606,21 +594,16 @@ void LLPanelLogin::setPassword(const std::string& password) | |||
606 | // We don't actually use the password input field, | 594 | // We don't actually use the password input field, |
607 | // fill it with MAX_PASSWORD characters so we get a | 595 | // fill it with MAX_PASSWORD characters so we get a |
608 | // nice row of asterixes. | 596 | // nice row of asterixes. |
609 | const std::string filler("123456789!123456"); | 597 | sInstance->childSetText("password_edit", PASSWORD_FILLER); |
610 | sInstance->childSetText("password_edit", filler); | ||
611 | sInstance->mIncomingPassword = filler; | ||
612 | sInstance->mMungedPassword = password; | ||
613 | } | 598 | } |
614 | else | 599 | else |
615 | { | 600 | { |
616 | // this is a normal text password | 601 | // this is a normal text password |
617 | sInstance->childSetText("password_edit", password); | 602 | sInstance->childSetText("password_edit", password); |
618 | sInstance->mIncomingPassword = password; | ||
619 | LLMD5 pass((unsigned char *)password.c_str()); | ||
620 | char munged_password[MD5HEX_STR_SIZE]; | ||
621 | pass.hex_digest(munged_password); | ||
622 | sInstance->mMungedPassword = munged_password; | ||
623 | } | 603 | } |
604 | |||
605 | // munging happens in the grid manager now | ||
606 | sInstance->mActualPassword = password; | ||
624 | } | 607 | } |
625 | 608 | ||
626 | 609 | ||
@@ -716,7 +699,8 @@ void LLPanelLogin::getFields(std::string *firstname, | |||
716 | LLStringUtil::trim(*lastname); | 699 | LLStringUtil::trim(*lastname); |
717 | } | 700 | } |
718 | 701 | ||
719 | *password = sInstance->mMungedPassword; | 702 | // sent to us from LLStartUp. Saved only on an actual connect |
703 | *password = sInstance->mActualPassword; | ||
720 | } | 704 | } |
721 | 705 | ||
722 | // static | 706 | // static |
@@ -844,9 +828,9 @@ void LLPanelLogin::refreshLoginPage() | |||
844 | if (!sInstance) return; | 828 | if (!sInstance) return; |
845 | 829 | ||
846 | sInstance->childSetVisible("create_new_account_text", | 830 | sInstance->childSetVisible("create_new_account_text", |
847 | !gHippoGridManager->getCurrentGrid()->getRegisterUrl().empty()); | 831 | !gHippoGridManager->getCurrentGrid()->getRegisterURL().empty()); |
848 | sInstance->childSetVisible("forgot_password_text", | 832 | sInstance->childSetVisible("forgot_password_text", |
849 | !gHippoGridManager->getCurrentGrid()->getPasswordUrl().empty()); | 833 | !gHippoGridManager->getCurrentGrid()->getPasswordURL().empty()); |
850 | 834 | ||
851 | // kick off a request to grab the url manually | 835 | // kick off a request to grab the url manually |
852 | gResponsePtr = LLIamHereLogin::build(sInstance); | 836 | gResponsePtr = LLIamHereLogin::build(sInstance); |
@@ -868,44 +852,47 @@ void LLPanelLogin::loadLoginForm() | |||
868 | if (!sInstance) return; | 852 | if (!sInstance) return; |
869 | 853 | ||
870 | // toggle between username/first+last login based on grid -- MC | 854 | // toggle between username/first+last login based on grid -- MC |
871 | LLTextBox* firstnamet = sInstance->getChild<LLTextBox>("first_name_text"); | 855 | LLTextBox* firstname_t = sInstance->getChild<LLTextBox>("first_name_text"); |
872 | LLTextBox* lastnamet = sInstance->getChild<LLTextBox>("last_name_text"); | 856 | LLTextBox* lastname_t = sInstance->getChild<LLTextBox>("last_name_text"); |
873 | LLTextBox* usernamet = sInstance->getChild<LLTextBox>("username_text"); | 857 | LLTextBox* username_t = sInstance->getChild<LLTextBox>("username_text"); |
874 | 858 | ||
875 | LLLineEditor* firstnamel = sInstance->getChild<LLLineEditor>("first_name_edit"); | 859 | LLLineEditor* firstname_l = sInstance->getChild<LLLineEditor>("first_name_edit"); |
876 | LLLineEditor* lastnamel = sInstance->getChild<LLLineEditor>("last_name_edit"); | 860 | LLLineEditor* lastname_l = sInstance->getChild<LLLineEditor>("last_name_edit"); |
877 | LLLineEditor* usernamel = sInstance->getChild<LLLineEditor>("username_edit"); | 861 | LLLineEditor* username_l = sInstance->getChild<LLLineEditor>("username_edit"); |
878 | 862 | ||
879 | firstnamet->setVisible(!gHippoGridManager->getCurrentGrid()->isUsernameCompat()); | 863 | firstname_t->setVisible(!gHippoGridManager->getCurrentGrid()->isUsernameCompat()); |
880 | lastnamet->setVisible(!gHippoGridManager->getCurrentGrid()->isUsernameCompat()); | 864 | lastname_t->setVisible(!gHippoGridManager->getCurrentGrid()->isUsernameCompat()); |
881 | usernamet->setVisible(gHippoGridManager->getCurrentGrid()->isUsernameCompat()); | 865 | username_t->setVisible(gHippoGridManager->getCurrentGrid()->isUsernameCompat()); |
882 | 866 | ||
883 | firstnamel->setVisible(!gHippoGridManager->getCurrentGrid()->isUsernameCompat()); | 867 | firstname_l->setVisible(!gHippoGridManager->getCurrentGrid()->isUsernameCompat()); |
884 | lastnamel->setVisible(!gHippoGridManager->getCurrentGrid()->isUsernameCompat()); | 868 | lastname_l->setVisible(!gHippoGridManager->getCurrentGrid()->isUsernameCompat()); |
885 | usernamel->setVisible(gHippoGridManager->getCurrentGrid()->isUsernameCompat()); | 869 | username_l->setVisible(gHippoGridManager->getCurrentGrid()->isUsernameCompat()); |
886 | 870 | ||
887 | // these should really REALLY be stored in the grid info -- MC | 871 | // get name info if we've got it |
888 | std::string firstnames = gSavedSettings.getString("FirstName"); | 872 | std::string firstname_s = gHippoGridManager->getCurrentGrid()->getFirstName(); |
889 | std::string lastnames = gSavedSettings.getString("LastName"); | 873 | std::string lastname_s = gHippoGridManager->getCurrentGrid()->getLastName(); |
890 | if (!firstnames.empty() && !lastnames.empty()) | 874 | if (gHippoGridManager->getCurrentGrid()->isUsernameCompat()) |
891 | { | 875 | { |
892 | if (gHippoGridManager->getCurrentGrid()->isUsernameCompat()) | 876 | if (lastname_s == "resident" || lastname_s == "Resident") |
893 | { | 877 | { |
894 | if (lastnames == "resident" || lastnames == "Resident") | 878 | username_l->setText(firstname_s); |
895 | { | 879 | } |
896 | usernamel->setText(firstnames); | 880 | else if (!firstname_s.empty() && !lastname_s.empty()) |
897 | } | 881 | { |
898 | else | 882 | username_l->setText(firstname_s+"."+lastname_s); |
899 | { | ||
900 | usernamel->setText(firstnames+"."+lastnames); | ||
901 | } | ||
902 | } | 883 | } |
903 | else | 884 | else |
904 | { | 885 | { |
905 | firstnamel->setText(firstnames); | 886 | username_l->clear(); |
906 | lastnamel->setText(lastnames); | ||
907 | } | 887 | } |
908 | } | 888 | } |
889 | else | ||
890 | { | ||
891 | firstname_l->setText(firstname_s); | ||
892 | lastname_l->setText(lastname_s); | ||
893 | } | ||
894 | |||
895 | setPassword(gHippoGridManager->getCurrentGrid()->getPassword()); | ||
909 | } | 896 | } |
910 | 897 | ||
911 | 898 | ||
@@ -1223,16 +1210,33 @@ bool LLPanelLogin::newAccountAlertCallback(const LLSD& notification, const LLSD& | |||
1223 | // static | 1210 | // static |
1224 | void LLPanelLogin::onClickNewAccount(void*) | 1211 | void LLPanelLogin::onClickNewAccount(void*) |
1225 | { | 1212 | { |
1226 | const std::string &url = gHippoGridManager->getConnectedGrid()->getRegisterUrl(); | 1213 | const std::string &url = gHippoGridManager->getConnectedGrid()->getRegisterURL(); |
1227 | if (!url.empty()) { | 1214 | if (!url.empty()) |
1215 | { | ||
1228 | llinfos << "Going to account creation URL." << llendl; | 1216 | llinfos << "Going to account creation URL." << llendl; |
1229 | LLWeb::loadURLExternal(url); | 1217 | LLWeb::loadURLExternal(url); |
1230 | } else { | 1218 | } |
1219 | else | ||
1220 | { | ||
1231 | llinfos << "Account creation URL is empty." << llendl; | 1221 | llinfos << "Account creation URL is empty." << llendl; |
1232 | sInstance->setFocus(TRUE); | 1222 | sInstance->setFocus(TRUE); |
1233 | } | 1223 | } |
1234 | } | 1224 | } |
1235 | 1225 | ||
1226 | // static | ||
1227 | void LLPanelLogin::onPasswordChanged(LLUICtrl* caller, void* user_data) | ||
1228 | { | ||
1229 | LLPanelLogin* self = (LLPanelLogin*)user_data; | ||
1230 | LLLineEditor* editor = (LLLineEditor*)caller; | ||
1231 | std::string password = editor->getText(); | ||
1232 | |||
1233 | // update if we've changed at all | ||
1234 | // is there a good way to let users know we can't let them use PASSWORD_FILLER? | ||
1235 | if (password != self->mActualPassword && password != PASSWORD_FILLER) | ||
1236 | { | ||
1237 | self->mActualPassword = password; | ||
1238 | } | ||
1239 | } | ||
1236 | 1240 | ||
1237 | // *NOTE: This function is dead as of 2008 August. I left it here in case | 1241 | // *NOTE: This function is dead as of 2008 August. I left it here in case |
1238 | // we suddenly decide to put the Quit button back. JC | 1242 | // we suddenly decide to put the Quit button back. JC |
@@ -1261,10 +1265,13 @@ void LLPanelLogin::onClickForgotPassword(void*) | |||
1261 | { | 1265 | { |
1262 | if (sInstance ) | 1266 | if (sInstance ) |
1263 | { | 1267 | { |
1264 | const std::string &url = gHippoGridManager->getConnectedGrid()->getPasswordUrl(); | 1268 | const std::string &url = gHippoGridManager->getConnectedGrid()->getPasswordURL(); |
1265 | if (!url.empty()) { | 1269 | if (!url.empty()) |
1270 | { | ||
1266 | LLWeb::loadURLExternal(url); | 1271 | LLWeb::loadURLExternal(url); |
1267 | } else { | 1272 | } |
1273 | else | ||
1274 | { | ||
1268 | llwarns << "Link for 'forgotton password' not set." << llendl; | 1275 | llwarns << "Link for 'forgotton password' not set." << llendl; |
1269 | } | 1276 | } |
1270 | } | 1277 | } |
diff --git a/linden/indra/newview/llpanellogin.h b/linden/indra/newview/llpanellogin.h index d077f32..4d79750 100644 --- a/linden/indra/newview/llpanellogin.h +++ b/linden/indra/newview/llpanellogin.h | |||
@@ -83,7 +83,6 @@ public: | |||
83 | static void refreshLoginPage(); | 83 | static void refreshLoginPage(); |
84 | static void giveFocus(); | 84 | static void giveFocus(); |
85 | static void setAlwaysRefresh(bool refresh); | 85 | static void setAlwaysRefresh(bool refresh); |
86 | static void mungePassword(LLUICtrl* caller, void* user_data); | ||
87 | 86 | ||
88 | // inherited from LLViewerMediaObserver | 87 | // inherited from LLViewerMediaObserver |
89 | /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event); | 88 | /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event); |
@@ -95,6 +94,7 @@ private: | |||
95 | static bool newAccountAlertCallback(const LLSD& notification, const LLSD& response); | 94 | static bool newAccountAlertCallback(const LLSD& notification, const LLSD& response); |
96 | static void onClickQuit(void*); | 95 | static void onClickQuit(void*); |
97 | static void onClickVersion(void*); | 96 | static void onClickVersion(void*); |
97 | static void onPasswordChanged(LLUICtrl* caller, void* user_data); | ||
98 | static void onClickForgotPassword(void*); | 98 | static void onClickForgotPassword(void*); |
99 | static void onPassKey(LLLineEditor* caller, void* user_data); | 99 | static void onPassKey(LLLineEditor* caller, void* user_data); |
100 | static void onSelectServer(LLUICtrl*, void*); | 100 | static void onSelectServer(LLUICtrl*, void*); |
@@ -117,8 +117,7 @@ private: | |||
117 | void (*mCallback)(S32 option, void *userdata); | 117 | void (*mCallback)(S32 option, void *userdata); |
118 | void* mCallbackData; | 118 | void* mCallbackData; |
119 | 119 | ||
120 | std::string mIncomingPassword; | 120 | std::string mActualPassword; |
121 | std::string mMungedPassword; | ||
122 | 121 | ||
123 | static LLPanelLogin* sInstance; | 122 | static LLPanelLogin* sInstance; |
124 | static BOOL sCapslockDidNotification; | 123 | static BOOL sCapslockDidNotification; |
diff --git a/linden/indra/newview/llpanelnetwork.cpp b/linden/indra/newview/llpanelnetwork.cpp index ebe1d53..8dc6601 100644 --- a/linden/indra/newview/llpanelnetwork.cpp +++ b/linden/indra/newview/llpanelnetwork.cpp | |||
@@ -34,14 +34,18 @@ | |||
34 | 34 | ||
35 | //file include | 35 | //file include |
36 | #include "llpanelnetwork.h" | 36 | #include "llpanelnetwork.h" |
37 | #include "llstartup.h" | ||
37 | 38 | ||
38 | // project includes | 39 | // project includes |
39 | #include "llcheckboxctrl.h" | 40 | #include "llcheckboxctrl.h" |
41 | #include "llradiogroup.h" | ||
40 | #include "lldirpicker.h" | 42 | #include "lldirpicker.h" |
41 | #include "lluictrlfactory.h" | 43 | #include "lluictrlfactory.h" |
42 | #include "llviewercontrol.h" | 44 | #include "llviewercontrol.h" |
43 | #include "llviewerwindow.h" | 45 | #include "llviewerwindow.h" |
44 | 46 | ||
47 | bool LLPanelNetwork::sSocksSettingsChanged; | ||
48 | |||
45 | LLPanelNetwork::LLPanelNetwork() | 49 | LLPanelNetwork::LLPanelNetwork() |
46 | { | 50 | { |
47 | LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_network.xml"); | 51 | LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_network.xml"); |
@@ -72,6 +76,31 @@ BOOL LLPanelNetwork::postBuild() | |||
72 | childSetEnabled("xmlrpc_proxy_editor", gSavedSettings.getBOOL("XMLRPCProxyEnabled")); | 76 | childSetEnabled("xmlrpc_proxy_editor", gSavedSettings.getBOOL("XMLRPCProxyEnabled")); |
73 | childSetEnabled("xmlrpc_proxy_port", gSavedSettings.getBOOL("XMLRPCProxyEnabled")); | 77 | childSetEnabled("xmlrpc_proxy_port", gSavedSettings.getBOOL("XMLRPCProxyEnabled")); |
74 | 78 | ||
79 | // Socks 5 proxy settings, commit callbacks | ||
80 | childSetCommitCallback("socks5_proxy_enabled", onCommitSocks5ProxyEnabled, this); | ||
81 | childSetCommitCallback("socks5_auth", onSocksAuthChanged, this); | ||
82 | |||
83 | //Socks 5 proxy settings, saved data | ||
84 | childSetValue("socks5_proxy_enabled", gSavedSettings.getBOOL("Socks5ProxyEnabled")); | ||
85 | childSetValue("socks5_http_proxy_type", gSavedSettings.getString("Socks5HttpProxyType")); | ||
86 | |||
87 | childSetValue("socks5_proxy_host", gSavedSettings.getString("Socks5ProxyHost")); | ||
88 | childSetValue("socks5_proxy_port", (F32)gSavedSettings.getU32("Socks5ProxyPort")); | ||
89 | childSetValue("socks5_proxy_username", gSavedSettings.getString("Socks5Username")); | ||
90 | childSetValue("socks5_proxy_password", gSavedSettings.getString("Socks5Password")); | ||
91 | childSetValue("socks5_auth", gSavedSettings.getString("Socks5AuthType")); | ||
92 | |||
93 | // Socks 5 proxy settings, check if settings modified callbacks | ||
94 | childSetCommitCallback("socks5_proxy_host", onSocksSettingsModified,this); | ||
95 | childSetCommitCallback("socks5_proxy_port", onSocksSettingsModified,this); | ||
96 | childSetCommitCallback("socks5_proxy_username", onSocksSettingsModified,this); | ||
97 | childSetCommitCallback("socks5_proxy_password", onSocksSettingsModified,this); | ||
98 | |||
99 | // Socks 5 settings, Set all controls and labels enabled state | ||
100 | updateProxyEnabled(this, gSavedSettings.getBOOL("Socks5ProxyEnabled"), gSavedSettings.getString("Socks5AuthType")); | ||
101 | |||
102 | sSocksSettingsChanged = false; | ||
103 | |||
75 | return TRUE; | 104 | return TRUE; |
76 | } | 105 | } |
77 | 106 | ||
@@ -91,6 +120,28 @@ void LLPanelNetwork::apply() | |||
91 | gSavedSettings.setBOOL("XMLRPCProxyEnabled", childGetValue("xmlrpc_proxy_enabled")); | 120 | gSavedSettings.setBOOL("XMLRPCProxyEnabled", childGetValue("xmlrpc_proxy_enabled")); |
92 | gSavedSettings.setString("XMLRPCProxyAddress", childGetValue("xmlrpc_proxy_editor")); | 121 | gSavedSettings.setString("XMLRPCProxyAddress", childGetValue("xmlrpc_proxy_editor")); |
93 | gSavedSettings.setS32("XMLRPCProxyPort", childGetValue("xmlrpc_proxy_port")); | 122 | gSavedSettings.setS32("XMLRPCProxyPort", childGetValue("xmlrpc_proxy_port")); |
123 | |||
124 | gSavedSettings.setBOOL("Socks5ProxyEnabled", childGetValue("socks5_proxy_enabled")); | ||
125 | gSavedSettings.setString("Socks5HttpProxyType", childGetValue("socks5_http_proxy_type")); | ||
126 | gSavedSettings.setString("Socks5ProxyHost", childGetValue("socks5_proxy_host")); | ||
127 | gSavedSettings.setU32("Socks5ProxyPort", childGetValue("socks5_proxy_port").asInteger()); | ||
128 | |||
129 | gSavedSettings.setString("Socks5AuthType", childGetValue("socks5_auth")); | ||
130 | gSavedSettings.setString("Socks5Username", childGetValue("socks5_proxy_username")); | ||
131 | gSavedSettings.setString("Socks5Password", childGetValue("socks5_proxy_password")); | ||
132 | |||
133 | if (sSocksSettingsChanged) | ||
134 | { | ||
135 | if (LLStartUp::getStartupState() != STATE_LOGIN_WAIT) | ||
136 | { | ||
137 | LLNotifications::instance().add("ProxyNeedRestart"); | ||
138 | } | ||
139 | else | ||
140 | { | ||
141 | // Mark the socks class that it needs to update its connection | ||
142 | LLSocks::getInstance()->updated(); | ||
143 | } | ||
144 | } | ||
94 | } | 145 | } |
95 | 146 | ||
96 | void LLPanelNetwork::cancel() | 147 | void LLPanelNetwork::cancel() |
@@ -167,4 +218,85 @@ void LLPanelNetwork::onCommitXMLRPCProxyEnabled(LLUICtrl* ctrl, void* data) | |||
167 | self->childSetEnabled("xmlrpc_proxy_editor", check->get()); | 218 | self->childSetEnabled("xmlrpc_proxy_editor", check->get()); |
168 | self->childSetEnabled("xmlrpc_proxy_port", check->get()); | 219 | self->childSetEnabled("xmlrpc_proxy_port", check->get()); |
169 | self->childSetEnabled("xmlrpc_proxy_text_label", check->get()); | 220 | self->childSetEnabled("xmlrpc_proxy_text_label", check->get()); |
221 | |||
222 | self->childSetEnabled("socks5_proxy_enabled", !check->get()); | ||
223 | } | ||
224 | |||
225 | // static | ||
226 | void LLPanelNetwork::onCommitSocks5ProxyEnabled(LLUICtrl* ctrl, void* data) | ||
227 | { | ||
228 | LLPanelNetwork* self = (LLPanelNetwork*)data; | ||
229 | LLCheckBoxCtrl* check = (LLCheckBoxCtrl*)ctrl; | ||
230 | |||
231 | if (!self || !check) return; | ||
232 | |||
233 | sSocksSettingsChanged = true; | ||
234 | |||
235 | updateProxyEnabled(self, check->get(), self->childGetValue("socks5_auth")); | ||
236 | } | ||
237 | |||
238 | // static | ||
239 | void LLPanelNetwork::onSocksSettingsModified(LLUICtrl* ctrl, void* data) | ||
240 | { | ||
241 | sSocksSettingsChanged = true; | ||
242 | } | ||
243 | |||
244 | // static | ||
245 | void LLPanelNetwork::onSocksAuthChanged(LLUICtrl* ctrl, void* data) | ||
246 | { | ||
247 | LLRadioGroup* radio = static_cast<LLRadioGroup*>(ctrl); | ||
248 | LLPanelNetwork* self = static_cast<LLPanelNetwork*>(data); | ||
249 | |||
250 | sSocksSettingsChanged = true; | ||
251 | |||
252 | std::string selection = radio->getValue().asString(); | ||
253 | updateProxyEnabled(self, true, selection); | ||
254 | } | ||
255 | |||
256 | // static | ||
257 | void LLPanelNetwork::updateProxyEnabled(LLPanelNetwork * self, bool enabled, std::string authtype) | ||
258 | { | ||
259 | // Manage all the enable/disable of the socks5 options from this single function | ||
260 | // to avoid code duplication | ||
261 | |||
262 | // Update all socks labels and controls except auth specific ones | ||
263 | self->childSetEnabled("socks5_proxy_port", enabled); | ||
264 | self->childSetEnabled("socks5_proxy_host", enabled); | ||
265 | self->childSetEnabled("socks5_host_label", enabled); | ||
266 | self->childSetEnabled("socks5_proxy_label", enabled); | ||
267 | self->childSetEnabled("socks5_proxy_port", enabled); | ||
268 | self->childSetEnabled("socks5_auth_label", enabled); | ||
269 | self->childSetEnabled("socks5_auth", enabled); | ||
270 | |||
271 | // disable the web option if the web proxy has not been configured | ||
272 | // this is still not ideal as apply or ok is needed for this to be saved to the preferences | ||
273 | self->childSetEnabled("Web", gSavedSettings.getBOOL("BrowserProxyEnabled")); | ||
274 | |||
275 | self->childSetEnabled("Socks", enabled); | ||
276 | |||
277 | // Hide the auth specific labels if authtype is none or | ||
278 | // we are not enabled. | ||
279 | if ((authtype.compare("None") == 0) || (enabled == false)) | ||
280 | { | ||
281 | self->childSetEnabled("socks5_username_label", false); | ||
282 | self->childSetEnabled("socks5_password_label", false); | ||
283 | self->childSetEnabled("socks5_proxy_username", false); | ||
284 | self->childSetEnabled("socks5_proxy_password", false); | ||
285 | } | ||
286 | |||
287 | // Only show the username and password boxes if we are enabled | ||
288 | // and authtype is username password. | ||
289 | if ((authtype.compare("UserPass") == 0) && (enabled == true)) | ||
290 | { | ||
291 | self->childSetEnabled("socks5_username_label", true); | ||
292 | self->childSetEnabled("socks5_password_label", true); | ||
293 | self->childSetEnabled("socks5_proxy_username", true); | ||
294 | self->childSetEnabled("socks5_proxy_password", true); | ||
295 | } | ||
296 | |||
297 | // Disable the XMLRPC proxy if it's enabled and we enable SOCKS5 | ||
298 | self->childSetEnabled("xmlrpc_proxy_enabled", !enabled); | ||
299 | self->childSetEnabled("xmlrpc_proxy_editor", !enabled); | ||
300 | self->childSetEnabled("xmlrpc_proxy_port", !enabled); | ||
301 | self->childSetEnabled("xmlrpc_proxy_text_label", !enabled); | ||
170 | } | 302 | } |
diff --git a/linden/indra/newview/llpanelnetwork.h b/linden/indra/newview/llpanelnetwork.h index 900158a..628f713 100644 --- a/linden/indra/newview/llpanelnetwork.h +++ b/linden/indra/newview/llpanelnetwork.h | |||
@@ -52,6 +52,14 @@ private: | |||
52 | static void onClickResetCache(void*); | 52 | static void onClickResetCache(void*); |
53 | static void onCommitPort(LLUICtrl* ctrl, void*); | 53 | static void onCommitPort(LLUICtrl* ctrl, void*); |
54 | static void onCommitXMLRPCProxyEnabled(LLUICtrl* ctrl, void* data); | 54 | static void onCommitXMLRPCProxyEnabled(LLUICtrl* ctrl, void* data); |
55 | static void onCommitSocks5ProxyEnabled(LLUICtrl* ctrl, void* data); | ||
56 | static void onClickTestProxy(void* user_data); | ||
57 | static void onSocksSettingsModified(LLUICtrl* ctrl, void* data); | ||
58 | static void onSocksAuthChanged(LLUICtrl* ctrl, void* data); | ||
59 | static void updateProxyEnabled(LLPanelNetwork * self, bool enabled, std::string authtype); | ||
60 | |||
61 | static bool sSocksSettingsChanged; | ||
62 | |||
55 | }; | 63 | }; |
56 | 64 | ||
57 | #endif | 65 | #endif |
diff --git a/linden/indra/newview/llpanelpick.cpp b/linden/indra/newview/llpanelpick.cpp index 3417b17..bf5d7f4 100644 --- a/linden/indra/newview/llpanelpick.cpp +++ b/linden/indra/newview/llpanelpick.cpp | |||
@@ -360,7 +360,15 @@ void LLPanelPick::processPickInfoReply(LLMessageSystem *msg, void **) | |||
360 | 360 | ||
361 | // Update UI controls | 361 | // Update UI controls |
362 | self->mNameEditor->setText(std::string(name)); | 362 | self->mNameEditor->setText(std::string(name)); |
363 | self->mDescEditor->setText(std::string(desc)); | 363 | if (self->mCreatorID == gAgent.getID()) |
364 | { | ||
365 | self->mDescEditor->setText(std::string(desc)); | ||
366 | } | ||
367 | else | ||
368 | { | ||
369 | self->mDescEditor->setParseHTML(TRUE); | ||
370 | self->mDescEditor->appendColoredText(std::string(desc), false, false, gColors.getColor("TextFgReadOnlyColor")); | ||
371 | } | ||
364 | self->mSnapshotCtrl->setImageAssetID(snapshot_id); | 372 | self->mSnapshotCtrl->setImageAssetID(snapshot_id); |
365 | self->mLocationEditor->setText(location_text); | 373 | self->mLocationEditor->setText(location_text); |
366 | self->mEnabledCheck->set(enabled); | 374 | self->mEnabledCheck->set(enabled); |
diff --git a/linden/indra/newview/llprefsadvanced.cpp b/linden/indra/newview/llprefsadvanced.cpp index 89dc0b2..f1b2428 100644 --- a/linden/indra/newview/llprefsadvanced.cpp +++ b/linden/indra/newview/llprefsadvanced.cpp | |||
@@ -42,8 +42,9 @@ | |||
42 | #include "lggautocorrectfloater.h" | 42 | #include "lggautocorrectfloater.h" |
43 | #include "llcombobox.h" | 43 | #include "llcombobox.h" |
44 | #include "llcolorswatch.h" | 44 | #include "llcolorswatch.h" |
45 | 45 | #include "llstartup.h" | |
46 | #include "lluictrlfactory.h" | 46 | #include "lluictrlfactory.h" |
47 | #include "lltexturectrl.h" | ||
47 | 48 | ||
48 | #include "boost/algorithm/string.hpp" | 49 | #include "boost/algorithm/string.hpp" |
49 | 50 | ||
@@ -82,12 +83,16 @@ BOOL LLPrefsAdvanced::postBuild() | |||
82 | { | 83 | { |
83 | childSetValue("disable_log_screen_check", gSavedSettings.getBOOL("DisableLoginLogoutScreens")); | 84 | childSetValue("disable_log_screen_check", gSavedSettings.getBOOL("DisableLoginLogoutScreens")); |
84 | childSetValue("disable_tp_screen_check", gSavedSettings.getBOOL("DisableTeleportScreens")); | 85 | childSetValue("disable_tp_screen_check", gSavedSettings.getBOOL("DisableTeleportScreens")); |
86 | |||
85 | static BOOL* sShowClientNameTag = rebind_llcontrol<BOOL>("ShowClientNameTag", &gSavedSettings, true); | 87 | static BOOL* sShowClientNameTag = rebind_llcontrol<BOOL>("ShowClientNameTag", &gSavedSettings, true); |
86 | childSetValue("client_name_tag_check", (*sShowClientNameTag)); | 88 | childSetValue("client_name_tag_check", (*sShowClientNameTag)); |
87 | static BOOL* sShowClientColor = rebind_llcontrol<BOOL>("ShowClientColor", &gSavedSettings, true); | 89 | static BOOL* sShowClientColor = rebind_llcontrol<BOOL>("ShowClientColor", &gSavedSettings, true); |
88 | childSetValue("client_name_color_check", (*sShowClientColor)); | 90 | childSetValue("client_name_color_check", (*sShowClientColor)); |
89 | childSetValue("client_name_hover_check", gSavedSettings.getBOOL("ShowClientNameHoverTip")); | 91 | childSetValue("client_name_hover_check", gSavedSettings.getBOOL("ShowClientNameHoverTip")); |
90 | childSetValue("client_name_tag_broadcast_check", gSavedSettings.getBOOL("ShowMyClientTagToOthers")); | 92 | childSetValue("client_name_tag_broadcast_check", gSavedSettings.getBOOL("ShowMyClientTagToOthers")); |
93 | getChild<LLColorSwatchCtrl>("client_tag_color")->set(gSavedSettings.getColor4("ImprudenceTagColor")); | ||
94 | mClientTagColor = gSavedSettings.getColor4("ImprudenceTagColor"); | ||
95 | |||
91 | childSetValue("http_texture_check", gSavedSettings.getBOOL("ImagePipelineUseHTTP")); | 96 | childSetValue("http_texture_check", gSavedSettings.getBOOL("ImagePipelineUseHTTP")); |
92 | childSetValue("speed_rez_check", gSavedSettings.getBOOL("SpeedRez")); | 97 | childSetValue("speed_rez_check", gSavedSettings.getBOOL("SpeedRez")); |
93 | childSetValue("speed_rez_interval_spinner", (F32)gSavedSettings.getU32("SpeedRezInterval")); | 98 | childSetValue("speed_rez_interval_spinner", (F32)gSavedSettings.getU32("SpeedRezInterval")); |
@@ -112,9 +117,12 @@ BOOL LLPrefsAdvanced::postBuild() | |||
112 | getChild<LLButton>("EmSpell_Remove")->setClickedCallback(onSpellRemove, this); | 117 | getChild<LLButton>("EmSpell_Remove")->setClickedCallback(onSpellRemove, this); |
113 | 118 | ||
114 | getChild<LLButton>("ac_button")->setClickedCallback(onAutoCorrectButton,this); | 119 | getChild<LLButton>("ac_button")->setClickedCallback(onAutoCorrectButton,this); |
115 | |||
116 | initHelpBtn("EmeraldHelp_SpellCheck", "EmeraldHelp_SpellCheck"); | 120 | initHelpBtn("EmeraldHelp_SpellCheck", "EmeraldHelp_SpellCheck"); |
117 | 121 | ||
122 | getChild<LLButton>("reset_cloud_this_account")->setClickedCallback(onResetThisCloudButton,this); | ||
123 | getChild<LLButton>("save_cloud_this_account")->setClickedCallback(onSaveThisCloudButton,this); | ||
124 | getChild<LLButton>("save_cloud_any_account")->setClickedCallback(onSaveAnyoneCloudButton,this); | ||
125 | |||
118 | refresh(); | 126 | refresh(); |
119 | 127 | ||
120 | return TRUE; | 128 | return TRUE; |
@@ -127,6 +135,9 @@ void LLPrefsAdvanced::apply() | |||
127 | gSavedSettings.setBOOL("ShowClientNameTag", childGetValue("client_name_tag_check")); | 135 | gSavedSettings.setBOOL("ShowClientNameTag", childGetValue("client_name_tag_check")); |
128 | gSavedSettings.setBOOL("ShowClientColor", childGetValue("client_name_color_check")); | 136 | gSavedSettings.setBOOL("ShowClientColor", childGetValue("client_name_color_check")); |
129 | gSavedSettings.setBOOL("ShowClientNameHoverTip", childGetValue("client_name_hover_check")); | 137 | gSavedSettings.setBOOL("ShowClientNameHoverTip", childGetValue("client_name_hover_check")); |
138 | gSavedSettings.setColor4("ImprudenceTagColor", getChild<LLColorSwatchCtrl>("client_tag_color")->get()); | ||
139 | mClientTagColor = getChild<LLColorSwatchCtrl>("client_tag_color")->get(); | ||
140 | |||
130 | gSavedSettings.setBOOL("ImagePipelineUseHTTP", childGetValue("http_texture_check")); | 141 | gSavedSettings.setBOOL("ImagePipelineUseHTTP", childGetValue("http_texture_check")); |
131 | gSavedSettings.setBOOL("SpeedRez", childGetValue("speed_rez_check")); | 142 | gSavedSettings.setBOOL("SpeedRez", childGetValue("speed_rez_check")); |
132 | gSavedSettings.setU32("SpeedRezInterval", childGetValue("speed_rez_interval_spinner").asReal()); | 143 | gSavedSettings.setU32("SpeedRezInterval", childGetValue("speed_rez_interval_spinner").asReal()); |
@@ -137,6 +148,8 @@ void LLPrefsAdvanced::apply() | |||
137 | gSavedSettings.setU32("LightShareAllowed", | 148 | gSavedSettings.setU32("LightShareAllowed", |
138 | (U32)childGetValue("lightshare_combo").asInteger()); | 149 | (U32)childGetValue("lightshare_combo").asInteger()); |
139 | 150 | ||
151 | |||
152 | |||
140 | // Need to force a rebake when ClothingLayerProtection toggled for it take effect -- MC | 153 | // Need to force a rebake when ClothingLayerProtection toggled for it take effect -- MC |
141 | if (gSavedSettings.getBOOL("ShowMyClientTagToOthers") != (BOOL)childGetValue("client_name_tag_broadcast_check")) | 154 | if (gSavedSettings.getBOOL("ShowMyClientTagToOthers") != (BOOL)childGetValue("client_name_tag_broadcast_check")) |
142 | { | 155 | { |
@@ -201,10 +214,20 @@ void LLPrefsAdvanced::apply() | |||
201 | 214 | ||
202 | LLComboBox* crash_behavior_combobox = getChild<LLComboBox>("crash_behavior_combobox"); | 215 | LLComboBox* crash_behavior_combobox = getChild<LLComboBox>("crash_behavior_combobox"); |
203 | gCrashSettings.setS32(CRASH_BEHAVIOR_SETTING, crash_behavior_combobox->getCurrentIndex()); | 216 | gCrashSettings.setS32(CRASH_BEHAVIOR_SETTING, crash_behavior_combobox->getCurrentIndex()); |
217 | |||
218 | if (LLStartUp::isLoggedIn() && LLVOAvatar::sHasCloud) | ||
219 | { | ||
220 | onSaveThisCloudButton(NULL); | ||
221 | } | ||
204 | } | 222 | } |
205 | 223 | ||
206 | void LLPrefsAdvanced::cancel() | 224 | void LLPrefsAdvanced::cancel() |
207 | { | 225 | { |
226 | gSavedSettings.setColor4("ImprudenceTagColor", mClientTagColor); | ||
227 | // llwarns << "cancel" << llendl; | ||
228 | // cool - "ok" is also cancel | ||
229 | // LLVOAvatar::sCloud.mPartData.mStartColor = mCloudStartColor; | ||
230 | // LLVOAvatar::sCloud.mPartData.mEndColor = mCloudEndColor; | ||
208 | } | 231 | } |
209 | 232 | ||
210 | void LLPrefsAdvanced::refresh() | 233 | void LLPrefsAdvanced::refresh() |
@@ -264,6 +287,76 @@ void LLPrefsAdvanced::refresh() | |||
264 | } | 287 | } |
265 | comboBox->selectByValue(selected); | 288 | comboBox->selectByValue(selected); |
266 | } | 289 | } |
290 | |||
291 | |||
292 | bool is_logged_in = LLStartUp::isLoggedIn(); | ||
293 | setParticleControls(is_logged_in); | ||
294 | |||
295 | } | ||
296 | |||
297 | void LLPrefsAdvanced::draw() | ||
298 | { | ||
299 | |||
300 | bool is_logged_in = LLStartUp::isLoggedIn(); | ||
301 | if(LLVOAvatar::sHasCloud && mWasLoggedIn != is_logged_in) | ||
302 | { | ||
303 | |||
304 | |||
305 | setParticleControls(is_logged_in); | ||
306 | |||
307 | mCloudStartColor = LLVOAvatar::sCloud.mPartData.mStartColor; | ||
308 | mCloudEndColor = LLVOAvatar::sCloud.mPartData.mEndColor; | ||
309 | |||
310 | |||
311 | getChild<LLColorSwatchCtrl>("part_start_color_swatch")->set(mCloudStartColor); | ||
312 | getChild<LLColorSwatchCtrl>("part_end_color_swatch")->set(mCloudEndColor); | ||
313 | |||
314 | |||
315 | mCloudTextureID = LLVOAvatar::sCloud.mPartImageID; | ||
316 | LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("part_texture_picker"); | ||
317 | if (texture_ctrl) | ||
318 | { | ||
319 | texture_ctrl->setImageAssetID(mCloudTextureID); | ||
320 | texture_ctrl->setAllowNoTexture( true ); | ||
321 | |||
322 | // Don't allow (no copy) or (no transfer) textures to be selected. | ||
323 | // With that we are less permissive than the original LL code of | ||
324 | // LLWaterParamManager, which allows picking (and saving) plain texture uuids | ||
325 | // without any permission check. | ||
326 | // If real absurdity is necessary we let the user save a windlight water setting | ||
327 | // for the texture uuid. | ||
328 | |||
329 | texture_ctrl->setImmediateFilterPermMask(PERM_NONE);//PERM_COPY | PERM_TRANSFER); | ||
330 | texture_ctrl->setNonImmediateFilterPermMask(PERM_NONE); | ||
331 | } | ||
332 | |||
333 | |||
334 | mWasLoggedIn = is_logged_in; | ||
335 | } | ||
336 | |||
337 | if(LLVOAvatar::sHasCloud && is_logged_in) | ||
338 | { | ||
339 | |||
340 | LLVOAvatar::sCloud.mPartData.mStartColor = childGetValue("part_start_color_swatch"); | ||
341 | LLVOAvatar::sCloud.mPartData.mEndColor = childGetValue("part_end_color_swatch"); | ||
342 | LLVOAvatar::sCloud.mPartImageID = childGetValue("part_texture_picker"); | ||
343 | } | ||
344 | |||
345 | LLPanel::draw(); | ||
346 | } | ||
347 | |||
348 | void LLPrefsAdvanced::setParticleControls(bool is_logged_in) | ||
349 | { | ||
350 | childSetEnabled("reset_cloud_this_account", is_logged_in ); | ||
351 | childSetEnabled("save_cloud_this_account", is_logged_in); | ||
352 | childSetEnabled("save_cloud_any_account", is_logged_in); | ||
353 | childSetEnabled("part_start_color_swatch", is_logged_in); | ||
354 | childSetEnabled("part_end_color_swatch", is_logged_in); | ||
355 | childSetEnabled("part_texture_picker", is_logged_in ); | ||
356 | |||
357 | childSetEnabled("preview_cloud", is_logged_in); | ||
358 | childSetVisible("preview_cloud", is_logged_in); | ||
359 | childSetVisible("must_be_logged_in_textbox", !is_logged_in); | ||
267 | } | 360 | } |
268 | 361 | ||
269 | //static | 362 | //static |
@@ -330,3 +423,35 @@ void LLPrefsAdvanced::onClickCommandLine(void* data) | |||
330 | FloaterCommandLine::getInstance()->open(); | 423 | FloaterCommandLine::getInstance()->open(); |
331 | FloaterCommandLine::getInstance()->center(); | 424 | FloaterCommandLine::getInstance()->center(); |
332 | } | 425 | } |
426 | |||
427 | void LLPrefsAdvanced::onResetThisCloudButton(void * data) | ||
428 | { | ||
429 | LLPrefsAdvanced* self = (LLPrefsAdvanced*)data; | ||
430 | if (!self) | ||
431 | { | ||
432 | return; | ||
433 | } | ||
434 | |||
435 | // keep draw() from overriding the cloud with the values from the UI | ||
436 | LLVOAvatar::sHasCloud = false; | ||
437 | std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "cloud.xml"); | ||
438 | LLVOAvatar::loadCloud(filename, LLVOAvatar::sCloud); | ||
439 | |||
440 | // tell draw() to override values from the UI with the data from the new cloud | ||
441 | self-> mWasLoggedIn = !(LLStartUp::isLoggedIn()); | ||
442 | |||
443 | LLVOAvatar::sHasCloud = true; | ||
444 | } | ||
445 | |||
446 | void LLPrefsAdvanced::onSaveThisCloudButton(void * data) | ||
447 | { | ||
448 | std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "cloud.xml"); | ||
449 | LLVOAvatar::saveCloud(filename, LLVOAvatar::sCloud); | ||
450 | } | ||
451 | |||
452 | void LLPrefsAdvanced::onSaveAnyoneCloudButton(void * data) | ||
453 | { | ||
454 | std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "cloud.xml"); | ||
455 | LLVOAvatar::saveCloud(filename, LLVOAvatar::sCloud); | ||
456 | } | ||
457 | |||
diff --git a/linden/indra/newview/llprefsadvanced.h b/linden/indra/newview/llprefsadvanced.h index d76e602..e4febcc 100644 --- a/linden/indra/newview/llprefsadvanced.h +++ b/linden/indra/newview/llprefsadvanced.h | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | #include "llpanel.h" | 34 | #include "llpanel.h" |
35 | #include "llviewerinventory.h" | 35 | #include "llviewerinventory.h" |
36 | class LLColor4; | ||
36 | 37 | ||
37 | class LLPrefsAdvanced : public LLPanel | 38 | class LLPrefsAdvanced : public LLPanel |
38 | { | 39 | { |
@@ -45,7 +46,7 @@ public: | |||
45 | void apply(); | 46 | void apply(); |
46 | void cancel(); | 47 | void cancel(); |
47 | void refresh(); | 48 | void refresh(); |
48 | 49 | void draw(); | |
49 | private: | 50 | private: |
50 | static LLPrefsAdvanced* sInstance; | 51 | static LLPrefsAdvanced* sInstance; |
51 | 52 | ||
@@ -58,10 +59,22 @@ private: | |||
58 | static void onSpellEditCustom(void* data); | 59 | static void onSpellEditCustom(void* data); |
59 | static void onSpellBaseComboBoxCommit(LLUICtrl* ctrl, void* userdata); | 60 | static void onSpellBaseComboBoxCommit(LLUICtrl* ctrl, void* userdata); |
60 | static void onAutoCorrectButton(void * data); | 61 | static void onAutoCorrectButton(void * data); |
62 | static void onResetThisCloudButton(void * data); | ||
63 | static void onSaveThisCloudButton(void * data); | ||
64 | static void onSaveAnyoneCloudButton(void * data); | ||
65 | |||
66 | LLColor4 mClientTagColor; | ||
61 | 67 | ||
62 | protected: | 68 | protected: |
69 | void setParticleControls(bool is_logged_in); | ||
63 | void initHelpBtn(const std::string& name, const std::string& xml_alert); | 70 | void initHelpBtn(const std::string& name, const std::string& xml_alert); |
64 | static void onClickHelp(void* data); | 71 | static void onClickHelp(void* data); |
72 | |||
73 | private: | ||
74 | bool mWasLoggedIn; | ||
75 | LLColor4 mCloudStartColor; | ||
76 | LLColor4 mCloudEndColor; | ||
77 | LLUUID mCloudTextureID; | ||
65 | }; | 78 | }; |
66 | 79 | ||
67 | #endif // LLPREFSADVANCED_H | 80 | #endif // LLPREFSADVANCED_H |
diff --git a/linden/indra/newview/llprefsim.cpp b/linden/indra/newview/llprefsim.cpp index 5ac2bb2..33d9701 100644 --- a/linden/indra/newview/llprefsim.cpp +++ b/linden/indra/newview/llprefsim.cpp | |||
@@ -179,12 +179,12 @@ void LLPrefsIMImpl::apply() | |||
179 | if (gSavedSettings.getBOOL("UseLegacyChatLogsFolder")) | 179 | if (gSavedSettings.getBOOL("UseLegacyChatLogsFolder")) |
180 | { | 180 | { |
181 | gDirUtilp->setPerAccountChatLogsDir(LLStringUtil::null, | 181 | gDirUtilp->setPerAccountChatLogsDir(LLStringUtil::null, |
182 | gSavedSettings.getString("FirstName"), gSavedSettings.getString("LastName") ); | 182 | gHippoGridManager->getCurrentGrid()->getFirstName(), gHippoGridManager->getCurrentGrid()->getLastName() ); |
183 | } | 183 | } |
184 | else | 184 | else |
185 | { | 185 | { |
186 | gDirUtilp->setPerAccountChatLogsDir(gHippoGridManager->getCurrentGridNick(), | 186 | gDirUtilp->setPerAccountChatLogsDir(gHippoGridManager->getCurrentGridNick(), |
187 | gSavedSettings.getString("FirstName"), gSavedSettings.getString("LastName") ); | 187 | gHippoGridManager->getCurrentGrid()->getFirstName(), gHippoGridManager->getCurrentGrid()->getLastName() ); |
188 | } | 188 | } |
189 | LLFile::mkdir(gDirUtilp->getPerAccountChatLogsDir()); | 189 | LLFile::mkdir(gDirUtilp->getPerAccountChatLogsDir()); |
190 | } | 190 | } |
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 73aa9ba..66849b1 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp | |||
@@ -76,12 +76,12 @@ | |||
76 | #include "llstring.h" | 76 | #include "llstring.h" |
77 | #include "lluserrelations.h" | 77 | #include "lluserrelations.h" |
78 | #include "llvfs.h" | 78 | #include "llvfs.h" |
79 | #include "llxorcipher.h" // saved password, MAC address | ||
80 | #include "message.h" | 79 | #include "message.h" |
81 | #include "v3math.h" | 80 | #include "v3math.h" |
82 | 81 | ||
83 | #include "llagent.h" | 82 | #include "llagent.h" |
84 | #include "llagentpilot.h" | 83 | #include "llagentpilot.h" |
84 | #include "llfloateravatarlist.h" | ||
85 | #include "llfloateravatarpicker.h" | 85 | #include "llfloateravatarpicker.h" |
86 | #include "llcallbacklist.h" | 86 | #include "llcallbacklist.h" |
87 | #include "llcallingcard.h" | 87 | #include "llcallingcard.h" |
@@ -189,6 +189,7 @@ | |||
189 | #include "llwlparammanager.h" | 189 | #include "llwlparammanager.h" |
190 | #include "llwaterparammanager.h" | 190 | #include "llwaterparammanager.h" |
191 | #include "llagentlanguage.h" | 191 | #include "llagentlanguage.h" |
192 | #include "llsocks5.h" | ||
192 | #include "viewerversion.h" | 193 | #include "viewerversion.h" |
193 | 194 | ||
194 | #include "lgghunspell_wrapper.h" | 195 | #include "lgghunspell_wrapper.h" |
@@ -260,7 +261,6 @@ bool LLStartUp::sLoginFailed = false; | |||
260 | 261 | ||
261 | void login_show(); | 262 | void login_show(); |
262 | void login_callback(S32 option, void* userdata); | 263 | void login_callback(S32 option, void* userdata); |
263 | bool is_hex_string(U8* str, S32 len); | ||
264 | void show_first_run_dialog(); | 264 | void show_first_run_dialog(); |
265 | bool first_run_dialog_callback(const LLSD& notification, const LLSD& response); | 265 | bool first_run_dialog_callback(const LLSD& notification, const LLSD& response); |
266 | void set_startup_status(const F32 frac, const std::string& string, const std::string& msg); | 266 | void set_startup_status(const F32 frac, const std::string& string, const std::string& msg); |
@@ -635,6 +635,15 @@ bool idle_startup() | |||
635 | LL_INFOS("AppInit") << "Message System Initialized." << LL_ENDL; | 635 | LL_INFOS("AppInit") << "Message System Initialized." << LL_ENDL; |
636 | 636 | ||
637 | //------------------------------------------------- | 637 | //------------------------------------------------- |
638 | // Init the socks 5 proxy and open the control TCP | ||
639 | // connection if the user is using SOCKS5 | ||
640 | // We need to do this early incase the user is using | ||
641 | // socks for http so we get the login screen via socks | ||
642 | //------------------------------------------------- | ||
643 | |||
644 | LLStartUp::handleSocksProxy(false); | ||
645 | |||
646 | //------------------------------------------------- | ||
638 | // Init audio, which may be needed for prefs dialog | 647 | // Init audio, which may be needed for prefs dialog |
639 | // or audio cues in connection UI. | 648 | // or audio cues in connection UI. |
640 | //------------------------------------------------- | 649 | //------------------------------------------------- |
@@ -739,12 +748,13 @@ bool idle_startup() | |||
739 | #endif | 748 | #endif |
740 | gSavedSettings.setBOOL("AutoLogin", TRUE); | 749 | gSavedSettings.setBOOL("AutoLogin", TRUE); |
741 | } | 750 | } |
742 | else if (gSavedSettings.getBOOL("AutoLogin")) | 751 | else if (gSavedSettings.getBOOL("AutoLogin") && gHippoGridManager) |
743 | { | 752 | { |
744 | firstname = gSavedSettings.getString("FirstName"); | 753 | // at this point, getCurrentGrid is the last logged in grid. Should we create a new entry for this? -- MC |
745 | lastname = gSavedSettings.getString("LastName"); | 754 | firstname = gHippoGridManager->getCurrentGrid()->getFirstName(); |
746 | password = LLStartUp::loadPasswordFromDisk(); | 755 | lastname = gHippoGridManager->getCurrentGrid()->getLastName(); |
747 | gSavedSettings.setBOOL("RememberPassword", TRUE); | 756 | password = gHippoGridManager->getCurrentGrid()->getPassword(); |
757 | gSavedSettings.setBOOL("RememberPassword", TRUE); // why do we do this, anyway? -- MC | ||
748 | 758 | ||
749 | #ifdef USE_VIEWER_AUTH | 759 | #ifdef USE_VIEWER_AUTH |
750 | show_connect_box = true; | 760 | show_connect_box = true; |
@@ -755,9 +765,7 @@ bool idle_startup() | |||
755 | else | 765 | else |
756 | { | 766 | { |
757 | // if not automatically logging in, display login dialog | 767 | // if not automatically logging in, display login dialog |
758 | firstname = gSavedSettings.getString("FirstName"); | 768 | // name and password are now handled in STATE_LOGIN_SHOW when the login screen's shown -- MC |
759 | lastname = gSavedSettings.getString("LastName"); | ||
760 | password = LLStartUp::loadPasswordFromDisk(); | ||
761 | show_connect_box = true; | 769 | show_connect_box = true; |
762 | } | 770 | } |
763 | 771 | ||
@@ -791,7 +799,7 @@ bool idle_startup() | |||
791 | 799 | ||
792 | timeout_count = 0; | 800 | timeout_count = 0; |
793 | 801 | ||
794 | if(LLStartUp::shouldAutoLogin()) | 802 | if (LLStartUp::shouldAutoLogin()) |
795 | { | 803 | { |
796 | show_connect_box = false; | 804 | show_connect_box = false; |
797 | } | 805 | } |
@@ -812,23 +820,35 @@ bool idle_startup() | |||
812 | 820 | ||
813 | // Show the login dialog | 821 | // Show the login dialog |
814 | login_show(); | 822 | login_show(); |
815 | // connect dialog is already shown, so fill in the names | 823 | |
816 | // icky how usernames get bolted on here as a kind of hack -- MC | 824 | // connect dialog is already shown, so fill in the names associated with the grid |
817 | if (gHippoGridManager && gHippoGridManager->getCurrentGrid()->isUsernameCompat()) | 825 | // note how we always remember avatar names, but don't necessarily have to |
826 | // icky how all this gets bolted on here as a kind of hack -- MC | ||
827 | if (gHippoGridManager) | ||
818 | { | 828 | { |
819 | if (lastname == "resident" || lastname == "Resident") | 829 | firstname = gHippoGridManager->getCurrentGrid()->getFirstName(); |
830 | lastname = gHippoGridManager->getCurrentGrid()->getLastName(); | ||
831 | // RememberPassword toggles this being saved | ||
832 | password = gHippoGridManager->getCurrentGrid()->getPassword(); | ||
833 | |||
834 | // empty in case we used logout | ||
835 | if (gHippoGridManager->getCurrentGrid()->isUsernameCompat()) | ||
820 | { | 836 | { |
821 | LLPanelLogin::setFields(firstname, password); | 837 | if ((lastname == "resident" || lastname == "Resident") || |
838 | (firstname.empty() && lastname.empty())) | ||
839 | { | ||
840 | LLPanelLogin::setFields(firstname, password); | ||
841 | } | ||
842 | else | ||
843 | { | ||
844 | LLPanelLogin::setFields(firstname+"."+lastname, password); | ||
845 | } | ||
822 | } | 846 | } |
823 | else | 847 | else |
824 | { | 848 | { |
825 | LLPanelLogin::setFields(firstname+"."+lastname, password); | 849 | LLPanelLogin::setFields(firstname, lastname, password); |
826 | } | 850 | } |
827 | } | 851 | } |
828 | else | ||
829 | { | ||
830 | LLPanelLogin::setFields(firstname, lastname, password); | ||
831 | } | ||
832 | 852 | ||
833 | LLPanelLogin::giveFocus(); | 853 | LLPanelLogin::giveFocus(); |
834 | 854 | ||
@@ -890,8 +910,31 @@ bool idle_startup() | |||
890 | 910 | ||
891 | if (STATE_LOGIN_CLEANUP == LLStartUp::getStartupState()) | 911 | if (STATE_LOGIN_CLEANUP == LLStartUp::getStartupState()) |
892 | { | 912 | { |
893 | |||
894 | LL_DEBUGS("AppInitStartupState") << "STATE_LOGIN_CLEANUP" << LL_ENDL; | 913 | LL_DEBUGS("AppInitStartupState") << "STATE_LOGIN_CLEANUP" << LL_ENDL; |
914 | |||
915 | // Post login screen, we should see if any settings have changed that may | ||
916 | // require us to either start/stop or change the socks proxy. As various communications | ||
917 | // past this point may require the proxy to be up. | ||
918 | bool socks_enable_required = gSavedSettings.getBOOL("Socks5ProxyEnabled"); | ||
919 | if ((LLSocks::getInstance()->isEnabled() != socks_enable_required) || LLSocks::getInstance()->needsUpdate()) | ||
920 | { | ||
921 | if (socks_enable_required) | ||
922 | { | ||
923 | if (!LLStartUp::handleSocksProxy(false)) | ||
924 | { | ||
925 | // Proxy start up failed, we should now bail the state machine | ||
926 | // HandleSocksProxy() will have reported an error to the user | ||
927 | // already, so we just go back to the login screen. The user | ||
928 | // could then change the perferences to fix the issue. | ||
929 | LLStartUp::setStartupState(STATE_LOGIN_SHOW); | ||
930 | return FALSE; | ||
931 | } | ||
932 | } | ||
933 | else | ||
934 | { | ||
935 | LLSocks::getInstance()->stopProxy(); | ||
936 | } | ||
937 | } | ||
895 | 938 | ||
896 | gDisconnected = TRUE; | 939 | gDisconnected = TRUE; |
897 | 940 | ||
@@ -938,21 +981,8 @@ bool idle_startup() | |||
938 | lastname = gLoginHandler.getLastName(); | 981 | lastname = gLoginHandler.getLastName(); |
939 | web_login_key = gLoginHandler.getWebLoginKey(); | 982 | web_login_key = gLoginHandler.getWebLoginKey(); |
940 | } | 983 | } |
941 | 984 | // note: the grid manager overrides defaults, always -- MC | |
942 | /* Jacek - Grid manager stuff that's changed with 1.23 | 985 | else if (show_connect_box) |
943 | if(!gLoginHandler.mPassword.empty()) | ||
944 | { | ||
945 | firstname = gLoginHandler.mFirstName; | ||
946 | lastname = gLoginHandler.mLastName; | ||
947 | password = gLoginHandler.mPassword; | ||
948 | |||
949 | gLoginHandler.mFirstName = ""; | ||
950 | gLoginHandler.mLastName = ""; | ||
951 | gLoginHandler.mPassword = ""; | ||
952 | LLStartUp::setShouldAutoLogin(false); | ||
953 | }*/ | ||
954 | |||
955 | if (show_connect_box) | ||
956 | { | 986 | { |
957 | // TODO if not use viewer auth | 987 | // TODO if not use viewer auth |
958 | // Load all the name information out of the login view | 988 | // Load all the name information out of the login view |
@@ -961,24 +991,28 @@ bool idle_startup() | |||
961 | 991 | ||
962 | // HACK: Try to make not jump on login | 992 | // HACK: Try to make not jump on login |
963 | gKeyboard->resetKeys(); | 993 | gKeyboard->resetKeys(); |
994 | |||
995 | LLStartUp::setShouldAutoLogin(false); | ||
964 | } | 996 | } |
965 | 997 | ||
966 | if (!firstname.empty() && !lastname.empty()) | 998 | if (!firstname.empty() && !lastname.empty()) |
967 | { | 999 | { |
968 | gSavedSettings.setString("FirstName", firstname); | 1000 | gHippoGridManager->getCurrentGrid()->setFirstName(firstname); |
969 | gSavedSettings.setString("LastName", lastname); | 1001 | gHippoGridManager->getCurrentGrid()->setLastName(lastname); |
970 | 1002 | ||
971 | //LL_INFOS("AppInit") << "Attempting login as: " << firstname << " " << lastname << " " << password << LL_ENDL; | 1003 | //LL_INFOS("AppInit") << "Attempting login as: " << firstname << " " << lastname << " " << password << LL_ENDL; |
972 | gDebugInfo["LoginName"] = firstname + " " + lastname; | 1004 | gDebugInfo["LoginName"] = firstname + " " + lastname; |
973 | } | ||
974 | |||
975 | |||
976 | 1005 | ||
977 | 1006 | // create necessary directories | |
978 | // create necessary directories | 1007 | // *FIX: these mkdir's should error check |
979 | // *FIX: these mkdir's should error check | 1008 | gDirUtilp->setViewerUserDir(gHippoGridManager->getCurrentGridNick(), firstname, lastname); |
980 | gDirUtilp->setViewerUserDir(gHippoGridManager->getCurrentGridNick(), firstname, lastname); | 1009 | LLFile::mkdir(gDirUtilp->getViewerUserDir()); |
981 | LLFile::mkdir(gDirUtilp->getViewerUserDir()); | 1010 | } |
1011 | else | ||
1012 | { | ||
1013 | // we don't do anything from here on out -- MC | ||
1014 | llerrs << "No first or last name given! Cannot proceed!" << llendl; | ||
1015 | } | ||
982 | 1016 | ||
983 | // Set PerAccountSettingsFile to the default value. | 1017 | // Set PerAccountSettingsFile to the default value. |
984 | gSavedSettings.setString("PerAccountSettingsFile", | 1018 | gSavedSettings.setString("PerAccountSettingsFile", |
@@ -1128,7 +1162,9 @@ bool idle_startup() | |||
1128 | // color init must be after saved settings loaded | 1162 | // color init must be after saved settings loaded |
1129 | init_colors(); | 1163 | init_colors(); |
1130 | 1164 | ||
1131 | if (gSavedSettings.getBOOL("VivoxLicenseAccepted") || gHippoGridManager->getConnectedGrid()->isSecondLife()) | 1165 | if (!gSavedSettings.getBOOL("EnableVoiceChat") || |
1166 | (gSavedSettings.getBOOL("EnableVoiceChat") && gSavedSettings.getBOOL("VivoxLicenseAccepted")) || | ||
1167 | !gHippoGridManager->getConnectedGrid()->isSecondLife()) | ||
1132 | { | 1168 | { |
1133 | // skipping over STATE_LOGIN_VOICE_LICENSE since we don't need it | 1169 | // skipping over STATE_LOGIN_VOICE_LICENSE since we don't need it |
1134 | // skipping over STATE_UPDATE_CHECK because that just waits for input | 1170 | // skipping over STATE_UPDATE_CHECK because that just waits for input |
@@ -1272,6 +1308,21 @@ bool idle_startup() | |||
1272 | } | 1308 | } |
1273 | } | 1309 | } |
1274 | 1310 | ||
1311 | // We hash a temporary password for login auth. The actual stored password | ||
1312 | // is in the grid manager, and is XORed with the mac address -- MC | ||
1313 | std::string hashed_password(""); | ||
1314 | if (password.length() == 32) | ||
1315 | { | ||
1316 | hashed_password = password; | ||
1317 | } | ||
1318 | else if (!password.empty()) | ||
1319 | { | ||
1320 | LLMD5 pass((unsigned char *)password.c_str()); | ||
1321 | char munged_password[MD5HEX_STR_SIZE]; | ||
1322 | pass.hex_digest(munged_password); | ||
1323 | hashed_password = munged_password; | ||
1324 | } | ||
1325 | |||
1275 | // TODO if statement here to use web_login_key | 1326 | // TODO if statement here to use web_login_key |
1276 | if(web_login_key.isNull()){ | 1327 | if(web_login_key.isNull()){ |
1277 | sAuthUriNum = llclamp(sAuthUriNum, 0, (S32)sAuthUris.size()-1); | 1328 | sAuthUriNum = llclamp(sAuthUriNum, 0, (S32)sAuthUris.size()-1); |
@@ -1280,7 +1331,7 @@ bool idle_startup() | |||
1280 | auth_method, | 1331 | auth_method, |
1281 | firstname, | 1332 | firstname, |
1282 | lastname, | 1333 | lastname, |
1283 | password, | 1334 | hashed_password, |
1284 | //web_login_key, | 1335 | //web_login_key, |
1285 | start.str(), | 1336 | start.str(), |
1286 | gSkipOptionalUpdate, | 1337 | gSkipOptionalUpdate, |
@@ -1513,7 +1564,7 @@ bool idle_startup() | |||
1513 | default: | 1564 | default: |
1514 | if (sAuthUriNum >= (int) sAuthUris.size() - 1) | 1565 | if (sAuthUriNum >= (int) sAuthUris.size() - 1) |
1515 | { | 1566 | { |
1516 | emsg << "Unable to connect to " << gHippoGridManager->getCurrentGrid()->getGridNick() << ".\n"; | 1567 | emsg << "Unable to connect to " << gHippoGridManager->getCurrentGrid()->getGridName() << ".\n"; |
1517 | emsg << LLUserAuth::getInstance()->errorMessage(); | 1568 | emsg << LLUserAuth::getInstance()->errorMessage(); |
1518 | } else { | 1569 | } else { |
1519 | sAuthUriNum++; | 1570 | sAuthUriNum++; |
@@ -1539,10 +1590,8 @@ bool idle_startup() | |||
1539 | 1590 | ||
1540 | if(successful_login) | 1591 | if(successful_login) |
1541 | { | 1592 | { |
1542 | { | 1593 | std::string current_grid = gHippoGridManager->getConnectedGrid()->getGridNick(); |
1543 | std::string current_grid = gHippoGridManager->getConnectedGrid()->getGridNick(); | 1594 | gSavedSettings.setString("LastConnectedGrid", current_grid); |
1544 | gSavedSettings.setString("LastConnectedGrid", current_grid); | ||
1545 | } | ||
1546 | 1595 | ||
1547 | std::string text; | 1596 | std::string text; |
1548 | text = LLUserAuth::getInstance()->getResponse("udp_blacklist"); | 1597 | text = LLUserAuth::getInstance()->getResponse("udp_blacklist"); |
@@ -1574,19 +1623,23 @@ bool idle_startup() | |||
1574 | } | 1623 | } |
1575 | text = LLUserAuth::getInstance()->getResponse("last_name"); | 1624 | text = LLUserAuth::getInstance()->getResponse("last_name"); |
1576 | if(!text.empty()) lastname.assign(text); | 1625 | if(!text.empty()) lastname.assign(text); |
1577 | gSavedSettings.setString("FirstName", firstname); | 1626 | |
1578 | gSavedSettings.setString("LastName", lastname); | 1627 | gHippoGridManager->getConnectedGrid()->setFirstName(firstname); |
1628 | gHippoGridManager->getConnectedGrid()->setLastName(lastname); | ||
1579 | 1629 | ||
1580 | if (gSavedSettings.getBOOL("RememberPassword")) | 1630 | if (gSavedSettings.getBOOL("RememberPassword")) |
1581 | { | 1631 | { |
1582 | // Successful login means the password is valid, so save it. | 1632 | // Successful login means the password is valid, so save it. |
1583 | LLStartUp::savePasswordToDisk(password); | 1633 | // formerly LLStartUp::savePasswordToDisk(password); |
1634 | // this needs to happen after gMACAddress is set -- MC | ||
1635 | gHippoGridManager->getConnectedGrid()->setPassword(password); | ||
1584 | } | 1636 | } |
1585 | else | 1637 | else |
1586 | { | 1638 | { |
1587 | // Don't leave password from previous session sitting around | 1639 | // Don't leave password from previous session sitting around |
1588 | // during this login session. | 1640 | // during this login session. |
1589 | LLStartUp::deletePasswordFromDisk(); | 1641 | // formerly LLStartUp::deletePasswordFromDisk(); -- MC |
1642 | gHippoGridManager->getConnectedGrid()->setPassword(""); | ||
1590 | } | 1643 | } |
1591 | 1644 | ||
1592 | // this is their actual ability to access content | 1645 | // this is their actual ability to access content |
@@ -1792,31 +1845,31 @@ bool idle_startup() | |||
1792 | std::string tmp = LLUserAuth::getInstance()->getResponse("gridname"); | 1845 | std::string tmp = LLUserAuth::getInstance()->getResponse("gridname"); |
1793 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setGridName(tmp); | 1846 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setGridName(tmp); |
1794 | tmp = LLUserAuth::getInstance()->getResponse("loginuri"); | 1847 | tmp = LLUserAuth::getInstance()->getResponse("loginuri"); |
1795 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setLoginUri(tmp); | 1848 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setLoginURI(tmp); |
1796 | tmp = LLUserAuth::getInstance()->getResponse("welcome"); | 1849 | tmp = LLUserAuth::getInstance()->getResponse("welcome"); |
1797 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setLoginPage(tmp); | 1850 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setLoginPage(tmp); |
1798 | tmp = LLUserAuth::getInstance()->getResponse("loginpage"); | 1851 | tmp = LLUserAuth::getInstance()->getResponse("loginpage"); |
1799 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setLoginPage(tmp); | 1852 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setLoginPage(tmp); |
1800 | tmp = LLUserAuth::getInstance()->getResponse("economy"); | 1853 | tmp = LLUserAuth::getInstance()->getResponse("economy"); |
1801 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setHelperUri(tmp); | 1854 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setHelperURI(tmp); |
1802 | tmp = LLUserAuth::getInstance()->getResponse("helperuri"); | 1855 | tmp = LLUserAuth::getInstance()->getResponse("helperuri"); |
1803 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setHelperUri(tmp); | 1856 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setHelperURI(tmp); |
1804 | tmp = LLUserAuth::getInstance()->getResponse("about"); | 1857 | tmp = LLUserAuth::getInstance()->getResponse("about"); |
1805 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setWebSite(tmp); | 1858 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setWebSite(tmp); |
1806 | tmp = LLUserAuth::getInstance()->getResponse("website"); | 1859 | tmp = LLUserAuth::getInstance()->getResponse("website"); |
1807 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setWebSite(tmp); | 1860 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setWebSite(tmp); |
1808 | tmp = LLUserAuth::getInstance()->getResponse("help"); | 1861 | tmp = LLUserAuth::getInstance()->getResponse("help"); |
1809 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setSupportUrl(tmp); | 1862 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setSupportURL(tmp); |
1810 | tmp = LLUserAuth::getInstance()->getResponse("support"); | 1863 | tmp = LLUserAuth::getInstance()->getResponse("support"); |
1811 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setSupportUrl(tmp); | 1864 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setSupportURL(tmp); |
1812 | tmp = LLUserAuth::getInstance()->getResponse("register"); | 1865 | tmp = LLUserAuth::getInstance()->getResponse("register"); |
1813 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setRegisterUrl(tmp); | 1866 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setRegisterURL(tmp); |
1814 | tmp = LLUserAuth::getInstance()->getResponse("account"); | 1867 | tmp = LLUserAuth::getInstance()->getResponse("account"); |
1815 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setRegisterUrl(tmp); | 1868 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setRegisterURL(tmp); |
1816 | tmp = LLUserAuth::getInstance()->getResponse("password"); | 1869 | tmp = LLUserAuth::getInstance()->getResponse("password"); |
1817 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setPasswordUrl(tmp); | 1870 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setPasswordURL(tmp); |
1818 | tmp = LLUserAuth::getInstance()->getResponse("search"); | 1871 | tmp = LLUserAuth::getInstance()->getResponse("search"); |
1819 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setSearchUrl(tmp); | 1872 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setSearchURL(tmp); |
1820 | tmp = LLUserAuth::getInstance()->getResponse("currency"); | 1873 | tmp = LLUserAuth::getInstance()->getResponse("currency"); |
1821 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setCurrencySymbol(tmp); | 1874 | if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setCurrencySymbol(tmp); |
1822 | tmp = LLUserAuth::getInstance()->getResponse("real_currency"); | 1875 | tmp = LLUserAuth::getInstance()->getResponse("real_currency"); |
@@ -2027,7 +2080,10 @@ bool idle_startup() | |||
2027 | { | 2080 | { |
2028 | LLFloaterMap::showInstance(); | 2081 | LLFloaterMap::showInstance(); |
2029 | } | 2082 | } |
2030 | 2083 | if (gSavedSettings.getBOOL("ShowRadar")) | |
2084 | { | ||
2085 | LLFloaterAvatarList::showInstance(); | ||
2086 | } | ||
2031 | if (gSavedSettings.getBOOL("ShowCameraControls")) | 2087 | if (gSavedSettings.getBOOL("ShowCameraControls")) |
2032 | { | 2088 | { |
2033 | LLFloaterCamera::showInstance(); | 2089 | LLFloaterCamera::showInstance(); |
@@ -2338,9 +2394,7 @@ bool idle_startup() | |||
2338 | LLStringUtil::format_map_t args; | 2394 | LLStringUtil::format_map_t args; |
2339 | args["[FIRST_NAME]"] = firstname; | 2395 | args["[FIRST_NAME]"] = firstname; |
2340 | args["[LAST_NAME]"] = lastname; | 2396 | args["[LAST_NAME]"] = lastname; |
2341 | args["[GRID_NAME]"] = (gHippoGridManager->getConnectedGrid()->getGridName().empty()) ? | 2397 | args["[GRID_NAME]"] = gHippoGridManager->getConnectedGrid()->getGridName(); |
2342 | gHippoGridManager->getConnectedGrid()->getGridNick() : | ||
2343 | gHippoGridManager->getConnectedGrid()->getGridName(); | ||
2344 | std::string title_text = LLTrans::getString("TitleBarMultiple", args); | 2398 | std::string title_text = LLTrans::getString("TitleBarMultiple", args); |
2345 | gWindowTitle = gSecondLife + " - " + title_text; | 2399 | gWindowTitle = gSecondLife + " - " + title_text; |
2346 | LLStringUtil::truncate(gWindowTitle, 255); | 2400 | LLStringUtil::truncate(gWindowTitle, 255); |
@@ -2846,6 +2900,9 @@ bool idle_startup() | |||
2846 | LL_DEBUGS("AppInitStartupState") << "STATE_CLEANUP" << LL_ENDL; | 2900 | LL_DEBUGS("AppInitStartupState") << "STATE_CLEANUP" << LL_ENDL; |
2847 | set_startup_status(1.0, "", ""); | 2901 | set_startup_status(1.0, "", ""); |
2848 | 2902 | ||
2903 | // Make sure we do this right after the login screen -- MC | ||
2904 | update_grid_specific_menus(); | ||
2905 | |||
2849 | // Make sure all the branding is in order -- MC | 2906 | // Make sure all the branding is in order -- MC |
2850 | if (gStatusBar) | 2907 | if (gStatusBar) |
2851 | { | 2908 | { |
@@ -3185,41 +3242,6 @@ void LLStartUp::deletePasswordFromDisk() | |||
3185 | LLFile::remove(filepath); | 3242 | LLFile::remove(filepath); |
3186 | } | 3243 | } |
3187 | 3244 | ||
3188 | |||
3189 | bool is_hex_string(U8* str, S32 len) | ||
3190 | { | ||
3191 | bool rv = true; | ||
3192 | U8* c = str; | ||
3193 | while(rv && len--) | ||
3194 | { | ||
3195 | switch(*c) | ||
3196 | { | ||
3197 | case '0': | ||
3198 | case '1': | ||
3199 | case '2': | ||
3200 | case '3': | ||
3201 | case '4': | ||
3202 | case '5': | ||
3203 | case '6': | ||
3204 | case '7': | ||
3205 | case '8': | ||
3206 | case '9': | ||
3207 | case 'a': | ||
3208 | case 'b': | ||
3209 | case 'c': | ||
3210 | case 'd': | ||
3211 | case 'e': | ||
3212 | case 'f': | ||
3213 | ++c; | ||
3214 | break; | ||
3215 | default: | ||
3216 | rv = false; | ||
3217 | break; | ||
3218 | } | ||
3219 | } | ||
3220 | return rv; | ||
3221 | } | ||
3222 | |||
3223 | void show_first_run_dialog() | 3245 | void show_first_run_dialog() |
3224 | { | 3246 | { |
3225 | LLNotifications::instance().add("FirstRun", LLSD(), LLSD(), first_run_dialog_callback); | 3247 | LLNotifications::instance().add("FirstRun", LLSD(), LLSD(), first_run_dialog_callback); |
@@ -3231,7 +3253,7 @@ bool first_run_dialog_callback(const LLSD& notification, const LLSD& response) | |||
3231 | if (0 == option) | 3253 | if (0 == option) |
3232 | { | 3254 | { |
3233 | LL_DEBUGS("AppInit") << "First run dialog cancelling" << LL_ENDL; | 3255 | LL_DEBUGS("AppInit") << "First run dialog cancelling" << LL_ENDL; |
3234 | const std::string &url = gHippoGridManager->getConnectedGrid()->getRegisterUrl(); | 3256 | const std::string &url = gHippoGridManager->getConnectedGrid()->getRegisterURL(); |
3235 | if (!url.empty()) { | 3257 | if (!url.empty()) { |
3236 | LLWeb::loadURL(url); | 3258 | LLWeb::loadURL(url); |
3237 | } else { | 3259 | } else { |
@@ -3283,7 +3305,7 @@ bool login_alert_status(const LLSD& notification, const LLSD& response) | |||
3283 | case 0: // OK | 3305 | case 0: // OK |
3284 | break; | 3306 | break; |
3285 | case 1: { // Help | 3307 | case 1: { // Help |
3286 | const std::string &url = gHippoGridManager->getConnectedGrid()->getSupportUrl(); | 3308 | const std::string &url = gHippoGridManager->getConnectedGrid()->getSupportURL(); |
3287 | if (!url.empty()) LLWeb::loadURLInternal(url); | 3309 | if (!url.empty()) LLWeb::loadURLInternal(url); |
3288 | break; | 3310 | break; |
3289 | } | 3311 | } |
@@ -4019,3 +4041,93 @@ void apply_udp_blacklist(const std::string& csv) | |||
4019 | 4041 | ||
4020 | } | 4042 | } |
4021 | 4043 | ||
4044 | bool LLStartUp::handleSocksProxy(bool reportOK) | ||
4045 | { | ||
4046 | std::string httpProxyType = gSavedSettings.getString("Socks5HttpProxyType"); | ||
4047 | |||
4048 | // Determine the http proxy type (if any) | ||
4049 | if ((httpProxyType.compare("Web") == 0) && gSavedSettings.getBOOL("BrowserProxyEnabled")) | ||
4050 | { | ||
4051 | LLHost httpHost; | ||
4052 | httpHost.setHostByName(gSavedSettings.getString("BrowserProxyAddress")); | ||
4053 | httpHost.setPort(gSavedSettings.getS32("BrowserProxyPort")); | ||
4054 | LLSocks::getInstance()->EnableHttpProxy(httpHost,LLPROXY_HTTP); | ||
4055 | } | ||
4056 | else if ((httpProxyType.compare("Socks") == 0) && gSavedSettings.getBOOL("Socks5ProxyEnabled")) | ||
4057 | { | ||
4058 | LLHost httpHost; | ||
4059 | httpHost.setHostByName(gSavedSettings.getString("Socks5ProxyHost")); | ||
4060 | httpHost.setPort(gSavedSettings.getU32("Socks5ProxyPort")); | ||
4061 | LLSocks::getInstance()->EnableHttpProxy(httpHost,LLPROXY_SOCKS); | ||
4062 | } | ||
4063 | else | ||
4064 | { | ||
4065 | LLSocks::getInstance()->DisableHttpProxy(); | ||
4066 | } | ||
4067 | |||
4068 | bool use_socks_proxy = gSavedSettings.getBOOL("Socks5ProxyEnabled"); | ||
4069 | if (use_socks_proxy) | ||
4070 | { | ||
4071 | |||
4072 | // Determine and update LLSocks with the saved authentication system | ||
4073 | std::string auth_type = gSavedSettings.getString("Socks5AuthType"); | ||
4074 | |||
4075 | if (auth_type.compare("None") == 0) | ||
4076 | { | ||
4077 | LLSocks::getInstance()->setAuthNone(); | ||
4078 | } | ||
4079 | |||
4080 | if (auth_type.compare("UserPass") == 0) | ||
4081 | { | ||
4082 | LLSocks::getInstance()->setAuthPassword(gSavedSettings.getString("Socks5Username"),gSavedSettings.getString("Socks5Password")); | ||
4083 | } | ||
4084 | |||
4085 | // Start the proxy and check for errors | ||
4086 | int status = LLSocks::getInstance()->startProxy(gSavedSettings.getString("Socks5ProxyHost"), gSavedSettings.getU32("Socks5ProxyPort")); | ||
4087 | LLSD subs; | ||
4088 | subs["PROXY"] = gSavedSettings.getString("Socks5ProxyHost"); | ||
4089 | |||
4090 | switch(status) | ||
4091 | { | ||
4092 | case SOCKS_OK: | ||
4093 | if (reportOK == true) | ||
4094 | { | ||
4095 | LLNotifications::instance().add("SOCKS_CONNECT_OK", subs); | ||
4096 | } | ||
4097 | return true; | ||
4098 | break; | ||
4099 | |||
4100 | case SOCKS_CONNECT_ERROR: // TCP Fail | ||
4101 | LLNotifications::instance().add("SOCKS_CONNECT_ERROR", subs); | ||
4102 | break; | ||
4103 | |||
4104 | case SOCKS_NOT_PERMITTED: // Socks5 server rule set refused connection | ||
4105 | LLNotifications::instance().add("SOCKS_NOT_PERMITTED", subs); | ||
4106 | break; | ||
4107 | |||
4108 | case SOCKS_NOT_ACCEPTABLE: // Selected authentication is not acceptable to server | ||
4109 | LLNotifications::instance().add("SOCKS_NOT_ACCEPTABLE", subs); | ||
4110 | break; | ||
4111 | |||
4112 | case SOCKS_AUTH_FAIL: // Authentication failed | ||
4113 | LLNotifications::instance().add("SOCKS_AUTH_FAIL", subs); | ||
4114 | break; | ||
4115 | |||
4116 | case SOCKS_UDP_FWD_NOT_GRANTED: // UDP forward request failed | ||
4117 | LLNotifications::instance().add("SOCKS_UDP_FWD_NOT_GRANTED", subs); | ||
4118 | break; | ||
4119 | |||
4120 | case SOCKS_HOST_CONNECT_FAILED: // Failed to open a TCP channel to the socks server | ||
4121 | LLNotifications::instance().add("SOCKS_HOST_CONNECT_FAILED", subs); | ||
4122 | break; | ||
4123 | } | ||
4124 | |||
4125 | return false; | ||
4126 | } | ||
4127 | else | ||
4128 | { | ||
4129 | LLSocks::getInstance()->stopProxy(); //ensure no UDP proxy is running and its all cleaned up | ||
4130 | } | ||
4131 | |||
4132 | return true; | ||
4133 | } | ||
diff --git a/linden/indra/newview/llstartup.h b/linden/indra/newview/llstartup.h index 3fe8daa..5960817 100644 --- a/linden/indra/newview/llstartup.h +++ b/linden/indra/newview/llstartup.h | |||
@@ -106,15 +106,6 @@ public: | |||
106 | // gender_name is either "male" or "female" | 106 | // gender_name is either "male" or "female" |
107 | static void loadInitialOutfit( const std::string& outfit_folder_name, | 107 | static void loadInitialOutfit( const std::string& outfit_folder_name, |
108 | const std::string& gender_name ); | 108 | const std::string& gender_name ); |
109 | |||
110 | // Load MD5 of user's password from local disk file. | ||
111 | static std::string loadPasswordFromDisk(); | ||
112 | |||
113 | // Record MD5 of user's password for subsequent login. | ||
114 | static void savePasswordToDisk(const std::string& hashed_password); | ||
115 | |||
116 | // Delete the saved password local disk file. | ||
117 | static void deletePasswordFromDisk(); | ||
118 | 109 | ||
119 | static bool dispatchURL(); | 110 | static bool dispatchURL(); |
120 | // if we have a SLURL or sim string ("Ahern/123/45") that started | 111 | // if we have a SLURL or sim string ("Ahern/123/45") that started |
@@ -123,6 +114,9 @@ public: | |||
123 | static std::string sSLURLCommand; | 114 | static std::string sSLURLCommand; |
124 | // *HACK: On startup, if we were passed a secondlife://app/do/foo | 115 | // *HACK: On startup, if we were passed a secondlife://app/do/foo |
125 | // command URL, store it for later processing. | 116 | // command URL, store it for later processing. |
117 | |||
118 | static bool handleSocksProxy(bool reportOK = true); | ||
119 | |||
126 | static bool shouldAutoLogin() { return mShouldAutoLogin; }; | 120 | static bool shouldAutoLogin() { return mShouldAutoLogin; }; |
127 | static void setShouldAutoLogin(bool value) { mShouldAutoLogin = value; }; | 121 | static void setShouldAutoLogin(bool value) { mShouldAutoLogin = value; }; |
128 | 122 | ||
diff --git a/linden/indra/newview/lltoolmgr.cpp b/linden/indra/newview/lltoolmgr.cpp index 4233a52..675412d 100644 --- a/linden/indra/newview/lltoolmgr.cpp +++ b/linden/indra/newview/lltoolmgr.cpp | |||
@@ -193,22 +193,11 @@ LLTool* LLToolMgr::getCurrentTool() | |||
193 | else | 193 | else |
194 | { | 194 | { |
195 | // due to window management weirdness we can get here with gToolNull | 195 | // due to window management weirdness we can get here with gToolNull |
196 | // // Don't use keyboard overrides when the edit window doesn't have focus. The chatbar is an unfortunate exception -- MC | 196 | bool can_override = mBaseTool && (mBaseTool != gToolNull) ; |
197 | // if (gViewerWindow && gViewerWindow->getUIHasFocus() | 197 | mOverrideTool = can_override ? mBaseTool->getOverrideTool(override_mask) : NULL; |
198 | // && gFloaterTools && !gFloaterTools->hasFocus() | ||
199 | // && gChatBar && !gChatBar->getVisible()) | ||
200 | // { | ||
201 | // cur_tool = mBaseTool; | ||
202 | // } | ||
203 | // else | ||
204 | { | ||
205 | bool can_override = mBaseTool && (mBaseTool != gToolNull) ; | ||
206 | |||
207 | mOverrideTool = can_override ? mBaseTool->getOverrideTool(override_mask) : NULL; | ||
208 | 198 | ||
209 | // use keyboard-override tool if available otherwise drop back to base tool | 199 | // use keyboard-override tool if available otherwise drop back to base tool |
210 | cur_tool = mOverrideTool ? mOverrideTool : mBaseTool; | 200 | cur_tool = mOverrideTool ? mOverrideTool : mBaseTool; |
211 | } | ||
212 | } | 201 | } |
213 | 202 | ||
214 | LLTool* prev_tool = mSelectedTool; | 203 | LLTool* prev_tool = mSelectedTool; |
diff --git a/linden/indra/newview/lltoolpie.cpp b/linden/indra/newview/lltoolpie.cpp index b7d762c..429b9d4 100644 --- a/linden/indra/newview/lltoolpie.cpp +++ b/linden/indra/newview/lltoolpie.cpp | |||
@@ -422,13 +422,16 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) | |||
422 | } | 422 | } |
423 | // [/RLVa:KB] | 423 | // [/RLVa:KB] |
424 | } | 424 | } |
425 | else if (object->isAttachment() && !object->isHUDAttachment()) | 425 | else if (object->isAttachment()) |
426 | { | 426 | { |
427 | gPieAttachment->show(x, y, mPieMouseButtonDown); | 427 | if (object->isHUDAttachment()) |
428 | } | 428 | { |
429 | else if (object->isHUDAttachment()) | 429 | gPieHUD->show(x, y, mPieMouseButtonDown); |
430 | { | 430 | } |
431 | gPieHUD->show(x, y, mPieMouseButtonDown); | 431 | else |
432 | { | ||
433 | gPieAttachment->show(x, y, mPieMouseButtonDown); | ||
434 | } | ||
432 | } | 435 | } |
433 | else | 436 | else |
434 | { | 437 | { |
@@ -802,8 +805,8 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask) | |||
802 | } | 805 | } |
803 | 806 | ||
804 | const LLTextureEntry* tep = object->getTE(mPick.mObjectFace); | 807 | const LLTextureEntry* tep = object->getTE(mPick.mObjectFace); |
805 | viewer_media_t media_impl = LLViewerMedia::getMediaImplFromTextureID(tep->getID()); | 808 | viewer_media_t media_impl = tep ? LLViewerMedia::getMediaImplFromTextureID(tep->getID()) : NULL; |
806 | if (tep && media_impl.notNull() && media_impl->hasMedia()) | 809 | if (media_impl.notNull() && media_impl->hasMedia()) |
807 | { | 810 | { |
808 | LL_DEBUGS("DoubleClicks") << "Double clicked running parcel media" << LL_ENDL; | 811 | LL_DEBUGS("DoubleClicks") << "Double clicked running parcel media" << LL_ENDL; |
809 | return FALSE; | 812 | return FALSE; |
diff --git a/linden/indra/newview/lluserauth.cpp b/linden/indra/newview/lluserauth.cpp index d76ed72..86d35e2 100644 --- a/linden/indra/newview/lluserauth.cpp +++ b/linden/indra/newview/lluserauth.cpp | |||
@@ -38,10 +38,12 @@ | |||
38 | #include <iterator> | 38 | #include <iterator> |
39 | 39 | ||
40 | #include "lldir.h" | 40 | #include "lldir.h" |
41 | #include "llversionviewer.h" | ||
41 | #include "llappviewer.h" | 42 | #include "llappviewer.h" |
43 | #include "llviewerbuild.h" | ||
42 | #include "llviewercontrol.h" | 44 | #include "llviewercontrol.h" |
43 | #include "llxmlrpctransaction.h" | 45 | #include "llxmlrpctransaction.h" |
44 | #include "llmd5.h" | 46 | #include "llsdutil.h" |
45 | 47 | ||
46 | // NOTE: MUST include these after otherincludes since queue gets redefined!?!! | 48 | // NOTE: MUST include these after otherincludes since queue gets redefined!?!! |
47 | #include <curl/curl.h> | 49 | #include <curl/curl.h> |
@@ -69,7 +71,8 @@ static const char* PLATFORM_STRING = "Sol"; | |||
69 | 71 | ||
70 | LLUserAuth::LLUserAuth() : | 72 | LLUserAuth::LLUserAuth() : |
71 | mTransaction(NULL), | 73 | mTransaction(NULL), |
72 | mLastTransferRateBPS(0) | 74 | mLastTransferRateBPS(0), |
75 | mResult(LLSD()) | ||
73 | { | 76 | { |
74 | mAuthResponse = E_NO_RESPONSE_YET; | 77 | mAuthResponse = E_NO_RESPONSE_YET; |
75 | } | 78 | } |
@@ -85,6 +88,7 @@ void LLUserAuth::reset() | |||
85 | mTransaction = NULL; | 88 | mTransaction = NULL; |
86 | mResponses.clear(); | 89 | mResponses.clear(); |
87 | mOptions.clear(); | 90 | mOptions.clear(); |
91 | mResult.clear(); | ||
88 | } | 92 | } |
89 | 93 | ||
90 | 94 | ||
@@ -114,25 +118,8 @@ void LLUserAuth::authenticate( | |||
114 | LL_INFOS2("AppInit", "Authentication") << option_str.str() << LL_ENDL; | 118 | LL_INFOS2("AppInit", "Authentication") << option_str.str() << LL_ENDL; |
115 | 119 | ||
116 | mAuthResponse = E_NO_RESPONSE_YET; | 120 | mAuthResponse = E_NO_RESPONSE_YET; |
117 | //mDownloadTimer.reset(); | 121 | //mDownloadTimer.reset(); |
118 | 122 | ||
119 | std::string strMac; | ||
120 | std::string strHDD; | ||
121 | char mac[MAX_STRING]; | ||
122 | char hdd[MAX_STRING]; | ||
123 | |||
124 | strMac.assign(web_login_key.asString()); | ||
125 | strMac.append(hashed_mac.c_str()); | ||
126 | |||
127 | strHDD.assign(web_login_key.asString()); | ||
128 | strHDD.append(hashed_volume_serial.c_str()); | ||
129 | |||
130 | LLMD5 md5Mac((const unsigned char *)strMac.c_str()); | ||
131 | LLMD5 md5HDD((const unsigned char *)strHDD.c_str()); | ||
132 | |||
133 | md5Mac.hex_digest(mac); | ||
134 | md5HDD.hex_digest(hdd); | ||
135 | |||
136 | // create the request | 123 | // create the request |
137 | XMLRPC_REQUEST request = XMLRPC_RequestNew(); | 124 | XMLRPC_REQUEST request = XMLRPC_RequestNew(); |
138 | XMLRPC_RequestSetMethodName(request, method.c_str()); | 125 | XMLRPC_RequestSetMethodName(request, method.c_str()); |
@@ -147,9 +134,10 @@ void LLUserAuth::authenticate( | |||
147 | XMLRPC_VectorAppendString(params, "version", gCurrentVersion.c_str(), 0); // Includes channel name | 134 | XMLRPC_VectorAppendString(params, "version", gCurrentVersion.c_str(), 0); // Includes channel name |
148 | XMLRPC_VectorAppendString(params, "channel", gSavedSettings.getString("VersionChannelName").c_str(), 0); | 135 | XMLRPC_VectorAppendString(params, "channel", gSavedSettings.getString("VersionChannelName").c_str(), 0); |
149 | XMLRPC_VectorAppendString(params, "platform", PLATFORM_STRING, 0); | 136 | XMLRPC_VectorAppendString(params, "platform", PLATFORM_STRING, 0); |
150 | XMLRPC_VectorAppendString(params, "mac", mac, 0); | 137 | XMLRPC_VectorAppendString(params, "mac", hashed_mac.c_str(), 0); |
151 | // A bit of security through obscurity: id0 is volume_serial | 138 | // A bit of security through obscurity: id0 is volume_serial |
152 | XMLRPC_VectorAppendString(params, "id0", hdd, 0); | 139 | XMLRPC_VectorAppendString(params, "id0", hashed_volume_serial.c_str(), 0); |
140 | |||
153 | if (skip_optional) | 141 | if (skip_optional) |
154 | { | 142 | { |
155 | XMLRPC_VectorAppendString(params, "skipoptional", "true", 0); | 143 | XMLRPC_VectorAppendString(params, "skipoptional", "true", 0); |
@@ -218,28 +206,7 @@ void LLUserAuth::authenticate( | |||
218 | 206 | ||
219 | mAuthResponse = E_NO_RESPONSE_YET; | 207 | mAuthResponse = E_NO_RESPONSE_YET; |
220 | //mDownloadTimer.reset(); | 208 | //mDownloadTimer.reset(); |
221 | 209 | ||
222 | std::string strMac; | ||
223 | std::string strHDD; | ||
224 | char mac[MAX_STRING]; | ||
225 | char hdd[MAX_STRING]; | ||
226 | |||
227 | strMac.assign(firstname); | ||
228 | strMac.append(lastname); | ||
229 | strMac.append(dpasswd.c_str()); | ||
230 | strMac.append(hashed_mac.c_str()); | ||
231 | |||
232 | strHDD.assign(firstname); | ||
233 | strHDD.append(lastname); | ||
234 | strHDD.append(dpasswd.c_str()); | ||
235 | strHDD.append(hashed_volume_serial.c_str()); | ||
236 | |||
237 | LLMD5 md5Mac((const unsigned char *)strMac.c_str()); | ||
238 | LLMD5 md5HDD((const unsigned char *)strHDD.c_str()); | ||
239 | |||
240 | md5Mac.hex_digest(mac); | ||
241 | md5HDD.hex_digest(hdd); | ||
242 | |||
243 | // create the request | 210 | // create the request |
244 | XMLRPC_REQUEST request = XMLRPC_RequestNew(); | 211 | XMLRPC_REQUEST request = XMLRPC_RequestNew(); |
245 | XMLRPC_RequestSetMethodName(request, method.c_str()); | 212 | XMLRPC_RequestSetMethodName(request, method.c_str()); |
@@ -254,9 +221,10 @@ void LLUserAuth::authenticate( | |||
254 | XMLRPC_VectorAppendString(params, "version", gCurrentVersion.c_str(), 0); // Includes channel name | 221 | XMLRPC_VectorAppendString(params, "version", gCurrentVersion.c_str(), 0); // Includes channel name |
255 | XMLRPC_VectorAppendString(params, "channel", gSavedSettings.getString("VersionChannelName").c_str(), 0); | 222 | XMLRPC_VectorAppendString(params, "channel", gSavedSettings.getString("VersionChannelName").c_str(), 0); |
256 | XMLRPC_VectorAppendString(params, "platform", PLATFORM_STRING, 0); | 223 | XMLRPC_VectorAppendString(params, "platform", PLATFORM_STRING, 0); |
257 | XMLRPC_VectorAppendString(params, "mac", mac, 0); | 224 | XMLRPC_VectorAppendString(params, "mac", hashed_mac.c_str(), 0); |
258 | // A bit of security through obscurity: id0 is volume_serial | 225 | // A bit of security through obscurity: id0 is volume_serial |
259 | XMLRPC_VectorAppendString(params, "id0", hdd, 0); | 226 | XMLRPC_VectorAppendString(params, "id0", hashed_volume_serial.c_str(), 0); |
227 | |||
260 | if (skip_optional) | 228 | if (skip_optional) |
261 | { | 229 | { |
262 | XMLRPC_VectorAppendString(params, "skipoptional", "true", 0); | 230 | XMLRPC_VectorAppendString(params, "skipoptional", "true", 0); |
diff --git a/linden/indra/newview/lluserauth.h b/linden/indra/newview/lluserauth.h index 0af8718..85cc180 100644 --- a/linden/indra/newview/lluserauth.h +++ b/linden/indra/newview/lluserauth.h | |||
@@ -127,6 +127,11 @@ public: | |||
127 | const std::string& hashed_volume_serial); | 127 | const std::string& hashed_volume_serial); |
128 | 128 | ||
129 | UserAuthcode authResponse(); | 129 | UserAuthcode authResponse(); |
130 | // mResult contains the responses we get through the login process | ||
131 | // | ||
132 | LLSD mResult; // OGPX : *way* different access of auth result in OGP. | ||
133 | UserAuthcode mAuthResponse; // OGPX TODO: proper access functions | ||
134 | |||
130 | 135 | ||
131 | // clears out internal data cache. | 136 | // clears out internal data cache. |
132 | void reset(); | 137 | void reset(); |
@@ -143,7 +148,7 @@ public: | |||
143 | private: | 148 | private: |
144 | LLXMLRPCTransaction* mTransaction; | 149 | LLXMLRPCTransaction* mTransaction; |
145 | 150 | ||
146 | UserAuthcode mAuthResponse; | 151 | |
147 | std::string mErrorMessage; | 152 | std::string mErrorMessage; |
148 | 153 | ||
149 | // dealing with the XML | 154 | // dealing with the XML |
diff --git a/linden/indra/newview/llviewerinventory.cpp b/linden/indra/newview/llviewerinventory.cpp index 0e06353..5f06b88 100644 --- a/linden/indra/newview/llviewerinventory.cpp +++ b/linden/indra/newview/llviewerinventory.cpp | |||
@@ -165,10 +165,9 @@ void LLViewerInventoryItem::updateServer(BOOL is_new) const | |||
165 | { | 165 | { |
166 | if(!mIsComplete) | 166 | if(!mIsComplete) |
167 | { | 167 | { |
168 | // *FIX: deal with this better. | 168 | llwarns << "LLViewerInventoryItem::updateServer() - for incomplete item" |
169 | // If we're crashing here then the UI is incorrectly enabled. | 169 | << llendl; |
170 | llerrs << "LLViewerInventoryItem::updateServer() - for incomplete item" | 170 | LLNotifications::instance().add("IncompleteInventoryItem"); |
171 | << llendl; | ||
172 | return; | 171 | return; |
173 | } | 172 | } |
174 | if(gAgent.getID() != mPermissions.getOwner()) | 173 | if(gAgent.getID() != mPermissions.getOwner()) |
diff --git a/linden/indra/newview/llviewerjoystick.cpp b/linden/indra/newview/llviewerjoystick.cpp index 4e509c7..675feb6 100644 --- a/linden/indra/newview/llviewerjoystick.cpp +++ b/linden/indra/newview/llviewerjoystick.cpp | |||
@@ -162,7 +162,7 @@ LLViewerJoystick::LLViewerJoystick() | |||
162 | memset(mBtn, 0, sizeof(mBtn)); | 162 | memset(mBtn, 0, sizeof(mBtn)); |
163 | 163 | ||
164 | // factor in bandwidth? bandwidth = gViewerStats->mKBitStat | 164 | // factor in bandwidth? bandwidth = gViewerStats->mKBitStat |
165 | mPerfScale = 4000.f / gSysCPU.getMhz(); | 165 | mPerfScale = 4000.f / gSysCPU.getMHz(); |
166 | } | 166 | } |
167 | 167 | ||
168 | // ----------------------------------------------------------------------------- | 168 | // ----------------------------------------------------------------------------- |
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 0d34f18..b85f3ca 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp | |||
@@ -89,6 +89,7 @@ | |||
89 | #include "llfloateractivespeakers.h" | 89 | #include "llfloateractivespeakers.h" |
90 | #include "llfloateranimpreview.h" | 90 | #include "llfloateranimpreview.h" |
91 | #include "llfloateravatarinfo.h" | 91 | #include "llfloateravatarinfo.h" |
92 | #include "llfloateravatarlist.h" | ||
92 | #include "llfloateravatartextures.h" | 93 | #include "llfloateravatartextures.h" |
93 | #include "llfloaterbeacons.h" | 94 | #include "llfloaterbeacons.h" |
94 | #include "llfloaterbuildoptions.h" | 95 | #include "llfloaterbuildoptions.h" |
@@ -725,10 +726,26 @@ void init_menus() | |||
725 | gLoginMenuBarView->setBackgroundColor( color ); | 726 | gLoginMenuBarView->setBackgroundColor( color ); |
726 | 727 | ||
727 | gMenuHolder->addChild(gLoginMenuBarView); | 728 | gMenuHolder->addChild(gLoginMenuBarView); |
728 | |||
729 | } | 729 | } |
730 | 730 | ||
731 | 731 | ||
732 | void update_grid_specific_menus() | ||
733 | { | ||
734 | if (!gMenuHolder || !gMenuBarView) | ||
735 | { | ||
736 | return; | ||
737 | } | ||
738 | else | ||
739 | { | ||
740 | // Disable these when we're not on Second Life grids | ||
741 | // (or don't have URLS for them if non-SL grids start using 'em) -- MC | ||
742 | gMenuHolder->childSetEnabled("Manage My Account...", gHippoGridManager->getConnectedGrid()->isSecondLife()); | ||
743 | gMenuHolder->childSetVisible("Manage My Account...", gHippoGridManager->getConnectedGrid()->isSecondLife()); | ||
744 | gMenuHolder->childSetEnabled("Account History...", gHippoGridManager->getConnectedGrid()->isSecondLife()); | ||
745 | gMenuHolder->childSetVisible("Account History...", gHippoGridManager->getConnectedGrid()->isSecondLife()); | ||
746 | } | ||
747 | } | ||
748 | |||
732 | 749 | ||
733 | void init_client_menu(LLMenuGL* menu) | 750 | void init_client_menu(LLMenuGL* menu) |
734 | { | 751 | { |
@@ -6131,6 +6148,10 @@ class LLShowFloater : public view_listener_t | |||
6131 | { | 6148 | { |
6132 | LLFloaterPerms::toggleInstance(LLSD()); | 6149 | LLFloaterPerms::toggleInstance(LLSD()); |
6133 | } | 6150 | } |
6151 | else if (floater_name == "full radar") | ||
6152 | { | ||
6153 | LLFloaterAvatarList::toggle(NULL); | ||
6154 | } | ||
6134 | return true; | 6155 | return true; |
6135 | } | 6156 | } |
6136 | }; | 6157 | }; |
@@ -6205,6 +6226,10 @@ class LLFloaterVisible : public view_listener_t | |||
6205 | if (!instn) new_value = false; | 6226 | if (!instn) new_value = false; |
6206 | else new_value = instn->getVisible(); | 6227 | else new_value = instn->getVisible(); |
6207 | } | 6228 | } |
6229 | else if (floater_name == "full radar") | ||
6230 | { | ||
6231 | new_value = (LLFloaterAvatarList::getInstance() != NULL); | ||
6232 | } | ||
6208 | gMenuHolder->findControl(control_name)->setValue(new_value); | 6233 | gMenuHolder->findControl(control_name)->setValue(new_value); |
6209 | return true; | 6234 | return true; |
6210 | } | 6235 | } |
@@ -10699,19 +10724,6 @@ class LLAdvancedDumpAvatarLocalTextures : public view_listener_t | |||
10699 | } | 10724 | } |
10700 | }; | 10725 | }; |
10701 | 10726 | ||
10702 | /////////////////////////////////// | ||
10703 | // Reload Avatar Cloud Particles // | ||
10704 | /////////////////////////////////// | ||
10705 | |||
10706 | |||
10707 | class LLAdvancedReloadAvatarCloudParticle : public view_listener_t | ||
10708 | { | ||
10709 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
10710 | { | ||
10711 | LLVOAvatar::initCloud(); | ||
10712 | return true; | ||
10713 | } | ||
10714 | }; | ||
10715 | 10727 | ||
10716 | /////////// | 10728 | /////////// |
10717 | // Crash // | 10729 | // Crash // |
@@ -11501,7 +11513,6 @@ void initialize_menus() | |||
11501 | addMenu(new LLAdvancedDumpAttachments(), "Advanced.DumpAttachments"); | 11513 | addMenu(new LLAdvancedDumpAttachments(), "Advanced.DumpAttachments"); |
11502 | addMenu(new LLAdvancedDebugAvatarTextures(), "Advanced.DebugAvatarTextures"); | 11514 | addMenu(new LLAdvancedDebugAvatarTextures(), "Advanced.DebugAvatarTextures"); |
11503 | addMenu(new LLAdvancedDumpAvatarLocalTextures(), "Advanced.DumpAvatarLocalTextures"); | 11515 | addMenu(new LLAdvancedDumpAvatarLocalTextures(), "Advanced.DumpAvatarLocalTextures"); |
11504 | addMenu(new LLAdvancedReloadAvatarCloudParticle(), "Advanced.ReloadAvatarCloudParticle"); | ||
11505 | 11516 | ||
11506 | // Advanced > Crash | 11517 | // Advanced > Crash |
11507 | addMenu(new LLAdvancedCrash(), "Advanced.Crash"); | 11518 | addMenu(new LLAdvancedCrash(), "Advanced.Crash"); |
diff --git a/linden/indra/newview/llviewermenu.h b/linden/indra/newview/llviewermenu.h index f33c201..9c01598 100644 --- a/linden/indra/newview/llviewermenu.h +++ b/linden/indra/newview/llviewermenu.h | |||
@@ -47,6 +47,8 @@ class LLObjectSelection; | |||
47 | void pre_init_menus(); | 47 | void pre_init_menus(); |
48 | void init_menus(); | 48 | void init_menus(); |
49 | void cleanup_menus(); | 49 | void cleanup_menus(); |
50 | // Updates grid-specific menu options after login | ||
51 | void update_grid_specific_menus(); | ||
50 | 52 | ||
51 | void show_debug_menus(); // checks for if menus should be shown first. | 53 | void show_debug_menus(); // checks for if menus should be shown first. |
52 | // builds either current or legacy pie menus depending upon LegacyPieEnabled | 54 | // builds either current or legacy pie menus depending upon LegacyPieEnabled |
diff --git a/linden/indra/newview/llviewernetwork.cpp b/linden/indra/newview/llviewernetwork.cpp index 1cfe665..0c39e15 100644 --- a/linden/indra/newview/llviewernetwork.cpp +++ b/linden/indra/newview/llviewernetwork.cpp | |||
@@ -75,7 +75,7 @@ void LLViewerLogin::getLoginURIs(std::vector<std::string>& uris) const | |||
75 | // If there was no command line uri... | 75 | // If there was no command line uri... |
76 | if(uris.empty()) | 76 | if(uris.empty()) |
77 | { | 77 | { |
78 | uris.push_back(gHippoGridManager->getConnectedGrid()->getLoginUri()); | 78 | uris.push_back(gHippoGridManager->getConnectedGrid()->getLoginURI()); |
79 | /* | 79 | /* |
80 | // If its a known grid choice, get the uri from the table, | 80 | // If its a known grid choice, get the uri from the table, |
81 | // else try the grid name. | 81 | // else try the grid name. |
@@ -92,7 +92,7 @@ void LLViewerLogin::getLoginURIs(std::vector<std::string>& uris) const | |||
92 | 92 | ||
93 | const std::string &LLViewerLogin::getGridLabel() const | 93 | const std::string &LLViewerLogin::getGridLabel() const |
94 | { | 94 | { |
95 | return gHippoGridManager->getConnectedGrid()->getGridNick(); | 95 | return gHippoGridManager->getConnectedGrid()->getGridName(); |
96 | } | 96 | } |
97 | 97 | ||
98 | const std::string &LLViewerLogin::getLoginPage() const | 98 | const std::string &LLViewerLogin::getLoginPage() const |
@@ -102,7 +102,7 @@ const std::string &LLViewerLogin::getLoginPage() const | |||
102 | 102 | ||
103 | const std::string &LLViewerLogin::getHelperURI() const | 103 | const std::string &LLViewerLogin::getHelperURI() const |
104 | { | 104 | { |
105 | return gHippoGridManager->getConnectedGrid()->getHelperUri(); | 105 | return gHippoGridManager->getConnectedGrid()->getHelperURI(); |
106 | } | 106 | } |
107 | 107 | ||
108 | bool LLViewerLogin::isOpenSimulator() | 108 | bool LLViewerLogin::isOpenSimulator() |
diff --git a/linden/indra/newview/llviewerobject.cpp b/linden/indra/newview/llviewerobject.cpp index 65c1d11..576f312 100644 --- a/linden/indra/newview/llviewerobject.cpp +++ b/linden/indra/newview/llviewerobject.cpp | |||
@@ -207,7 +207,8 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe | |||
207 | mJointInfo(NULL), | 207 | mJointInfo(NULL), |
208 | mState(0), | 208 | mState(0), |
209 | mMedia(NULL), | 209 | mMedia(NULL), |
210 | mClickAction(0) | 210 | mClickAction(0), |
211 | mSculptSurfaceArea(0.0) | ||
211 | { | 212 | { |
212 | if(!is_global) | 213 | if(!is_global) |
213 | { | 214 | { |
@@ -4012,9 +4013,15 @@ LLBBox LLViewerObject::getBoundingBoxAgent() const | |||
4012 | { | 4013 | { |
4013 | LLVector3 position_agent; | 4014 | LLVector3 position_agent; |
4014 | LLQuaternion rot; | 4015 | LLQuaternion rot; |
4016 | LLViewerObject* avatar_parent = NULL; | ||
4015 | LLViewerObject* root_edit = (LLViewerObject*)getRootEdit(); | 4017 | LLViewerObject* root_edit = (LLViewerObject*)getRootEdit(); |
4016 | LLViewerObject* avatar_parent = (LLViewerObject*)root_edit->getParent(); | 4018 | if (root_edit) |
4017 | if (avatar_parent && avatar_parent->isAvatar() && root_edit->mDrawable.notNull()) | 4019 | { |
4020 | avatar_parent = (LLViewerObject*)root_edit->getParent(); | ||
4021 | } | ||
4022 | |||
4023 | if (avatar_parent && avatar_parent->isAvatar() && | ||
4024 | root_edit && root_edit->mDrawable.notNull() && root_edit->mDrawable->getXform()->getParent()) | ||
4018 | { | 4025 | { |
4019 | LLXform* parent_xform = root_edit->mDrawable->getXform()->getParent(); | 4026 | LLXform* parent_xform = root_edit->mDrawable->getXform()->getParent(); |
4020 | position_agent = (getPositionEdit() * parent_xform->getWorldRotation()) + parent_xform->getWorldPosition(); | 4027 | position_agent = (getPositionEdit() * parent_xform->getWorldRotation()) + parent_xform->getWorldPosition(); |
@@ -4112,6 +4119,14 @@ void LLViewerObject::setDebugText(const std::string &utf8text) | |||
4112 | mText->setDoFade(FALSE); | 4119 | mText->setDoFade(FALSE); |
4113 | updateText(); | 4120 | updateText(); |
4114 | } | 4121 | } |
4122 | std::string LLViewerObject::getDebugText() | ||
4123 | { | ||
4124 | if(mText) | ||
4125 | { | ||
4126 | return mText->getStringUTF8(); | ||
4127 | } | ||
4128 | return ""; | ||
4129 | } | ||
4115 | 4130 | ||
4116 | void LLViewerObject::setIcon(LLViewerImage* icon_image) | 4131 | void LLViewerObject::setIcon(LLViewerImage* icon_image) |
4117 | { | 4132 | { |
@@ -4581,7 +4596,7 @@ bool LLViewerObject::setParameterEntry(U16 param_type, const LLNetworkData& new_ | |||
4581 | bool LLViewerObject::setParameterEntryInUse(U16 param_type, BOOL in_use, bool local_origin) | 4596 | bool LLViewerObject::setParameterEntryInUse(U16 param_type, BOOL in_use, bool local_origin) |
4582 | { | 4597 | { |
4583 | ExtraParameter* param = getExtraParameterEntryCreate(param_type); | 4598 | ExtraParameter* param = getExtraParameterEntryCreate(param_type); |
4584 | if (param->in_use != in_use) | 4599 | if (param && param->in_use != in_use) |
4585 | { | 4600 | { |
4586 | param->in_use = in_use; | 4601 | param->in_use = in_use; |
4587 | parameterChanged(param_type, param->data, in_use, local_origin); | 4602 | parameterChanged(param_type, param->data, in_use, local_origin); |
diff --git a/linden/indra/newview/llviewerobject.h b/linden/indra/newview/llviewerobject.h index 33e8da2..9b05470 100644 --- a/linden/indra/newview/llviewerobject.h +++ b/linden/indra/newview/llviewerobject.h | |||
@@ -353,6 +353,7 @@ public: | |||
353 | void setCanSelect(BOOL canSelect); | 353 | void setCanSelect(BOOL canSelect); |
354 | 354 | ||
355 | void setDebugText(const std::string &utf8text); | 355 | void setDebugText(const std::string &utf8text); |
356 | std::string getDebugText(); | ||
356 | void setIcon(LLViewerImage* icon_image); | 357 | void setIcon(LLViewerImage* icon_image); |
357 | void clearIcon(); | 358 | void clearIcon(); |
358 | 359 | ||
@@ -552,6 +553,7 @@ public: | |||
552 | LLPointer<LLHUDIcon> mIcon; | 553 | LLPointer<LLHUDIcon> mIcon; |
553 | 554 | ||
554 | static BOOL sUseSharedDrawables; | 555 | static BOOL sUseSharedDrawables; |
556 | F32 mSculptSurfaceArea; | ||
555 | 557 | ||
556 | protected: | 558 | protected: |
557 | // delete an item in the inventory, but don't tell the | 559 | // delete an item in the inventory, but don't tell the |
diff --git a/linden/indra/newview/llviewerobjectlist.cpp b/linden/indra/newview/llviewerobjectlist.cpp index 78ce247..2d6c9f4 100644 --- a/linden/indra/newview/llviewerobjectlist.cpp +++ b/linden/indra/newview/llviewerobjectlist.cpp | |||
@@ -166,12 +166,12 @@ U64 LLViewerObjectList::getIndex(const U32 local_id, | |||
166 | return (((U64)index) << 32) | (U64)local_id; | 166 | return (((U64)index) << 32) | (U64)local_id; |
167 | } | 167 | } |
168 | 168 | ||
169 | BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject &object) | 169 | BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject* objectp) |
170 | { | 170 | { |
171 | if(object.getRegion()) | 171 | if (objectp && objectp->getRegion()) |
172 | { | 172 | { |
173 | U32 local_id = object.mLocalID; | 173 | U32 local_id = objectp->mLocalID; |
174 | LLHost region_host = object.getRegion()->getHost(); | 174 | LLHost region_host = objectp->getRegion()->getHost(); |
175 | U32 ip = region_host.getAddress(); | 175 | U32 ip = region_host.getAddress(); |
176 | U32 port = region_host.getPort(); | 176 | U32 port = region_host.getPort(); |
177 | U64 ipport = (((U64)ip) << 32) | (U64)port; | 177 | U64 ipport = (((U64)ip) << 32) | (U64)port; |
@@ -186,7 +186,7 @@ BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject &object) | |||
186 | } | 186 | } |
187 | 187 | ||
188 | // Found existing entry | 188 | // Found existing entry |
189 | if (iter->second == object.getID()) | 189 | if (iter->second == objectp->getID()) |
190 | { // Full UUIDs match, so remove the entry | 190 | { // Full UUIDs match, so remove the entry |
191 | sIndexAndLocalIDToUUID.erase(iter); | 191 | sIndexAndLocalIDToUUID.erase(iter); |
192 | return TRUE; | 192 | return TRUE; |
@@ -451,7 +451,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, | |||
451 | ((objectp->mLocalID != local_id) || | 451 | ((objectp->mLocalID != local_id) || |
452 | (objectp->getRegion() != regionp))) | 452 | (objectp->getRegion() != regionp))) |
453 | { | 453 | { |
454 | removeFromLocalIDTable(*objectp); | 454 | removeFromLocalIDTable(objectp); |
455 | setUUIDAndLocal(fullid, | 455 | setUUIDAndLocal(fullid, |
456 | local_id, | 456 | local_id, |
457 | gMessageSystem->getSenderIP(), | 457 | gMessageSystem->getSenderIP(), |
@@ -813,20 +813,26 @@ void LLViewerObjectList::clearDebugText() | |||
813 | 813 | ||
814 | void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp) | 814 | void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp) |
815 | { | 815 | { |
816 | if (!objectp) | ||
817 | { | ||
818 | llwarns << "NULL object pointer passed." << llendl; | ||
819 | return; | ||
820 | } | ||
816 | LLMemType mt(LLMemType::MTYPE_OBJECT); | 821 | LLMemType mt(LLMemType::MTYPE_OBJECT); |
817 | if (mDeadObjects.count(objectp->mID)) | 822 | if (mDeadObjects.find(objectp->mID) != mDeadObjects.end()) |
818 | { | 823 | { |
819 | llinfos << "Object " << objectp->mID << " already on dead list, ignoring cleanup!" << llendl; | 824 | llinfos << "Object " << objectp->mID << " already on dead list, ignoring cleanup!" << llendl; |
820 | return; | ||
821 | } | 825 | } |
822 | 826 | else | |
823 | mDeadObjects.insert(std::pair<LLUUID, LLPointer<LLViewerObject> >(objectp->mID, objectp)); | 827 | { |
828 | mDeadObjects.insert(objectp->mID); | ||
829 | } | ||
824 | 830 | ||
825 | // Cleanup any references we have to this object | 831 | // Cleanup any references we have to this object |
826 | // Remove from object map so noone can look it up. | 832 | // Remove from object map so noone can look it up. |
827 | 833 | ||
828 | mUUIDObjectMap.erase(objectp->mID); | 834 | mUUIDObjectMap.erase(objectp->mID); |
829 | removeFromLocalIDTable(*objectp); | 835 | removeFromLocalIDTable(objectp); |
830 | 836 | ||
831 | if (objectp->onActiveList()) | 837 | if (objectp->onActiveList()) |
832 | { | 838 | { |
@@ -1060,7 +1066,7 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap) | |||
1060 | for (S32 i = 0; i < mMapObjects.count(); i++) | 1066 | for (S32 i = 0; i < mMapObjects.count(); i++) |
1061 | { | 1067 | { |
1062 | LLViewerObject* objectp = mMapObjects[i]; | 1068 | LLViewerObject* objectp = mMapObjects[i]; |
1063 | if (!objectp->getRegion() || objectp->isOrphaned() || objectp->isAttachment()) | 1069 | if (objectp->isDead() || !objectp->getRegion() || objectp->isOrphaned() || objectp->isAttachment()) |
1064 | { | 1070 | { |
1065 | continue; | 1071 | continue; |
1066 | } | 1072 | } |
diff --git a/linden/indra/newview/llviewerobjectlist.h b/linden/indra/newview/llviewerobjectlist.h index 07920cb..5999da3 100644 --- a/linden/indra/newview/llviewerobjectlist.h +++ b/linden/indra/newview/llviewerobjectlist.h | |||
@@ -182,7 +182,7 @@ public: | |||
182 | const U32 ip, | 182 | const U32 ip, |
183 | const U32 port); // Requires knowledge of message system info! | 183 | const U32 port); // Requires knowledge of message system info! |
184 | 184 | ||
185 | static BOOL removeFromLocalIDTable(const LLViewerObject &object); | 185 | static BOOL removeFromLocalIDTable(const LLViewerObject* objectp); |
186 | // Used ONLY by the orphaned object code. | 186 | // Used ONLY by the orphaned object code. |
187 | static U64 getIndex(const U32 local_id, const U32 ip, const U32 port); | 187 | static U64 getIndex(const U32 local_id, const U32 ip, const U32 port); |
188 | 188 | ||
@@ -200,8 +200,7 @@ protected: | |||
200 | 200 | ||
201 | LLDynamicArrayPtr<LLPointer<LLViewerObject> > mMapObjects; | 201 | LLDynamicArrayPtr<LLPointer<LLViewerObject> > mMapObjects; |
202 | 202 | ||
203 | typedef std::map<LLUUID, LLPointer<LLViewerObject> > vo_map; | 203 | std::set<LLUUID> mDeadObjects; |
204 | vo_map mDeadObjects; // Need to keep multiple entries per UUID | ||
205 | 204 | ||
206 | std::map<LLUUID, LLPointer<LLViewerObject> > mUUIDObjectMap; | 205 | std::map<LLUUID, LLPointer<LLViewerObject> > mUUIDObjectMap; |
207 | 206 | ||
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index 2345bf6..c268580 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp | |||
@@ -1038,6 +1038,7 @@ LLVOAvatar::~LLVOAvatar() | |||
1038 | LL_DEBUGS("VOAvatar") << "Destructing Zombie from previous session." << LL_ENDL; | 1038 | LL_DEBUGS("VOAvatar") << "Destructing Zombie from previous session." << LL_ENDL; |
1039 | } | 1039 | } |
1040 | 1040 | ||
1041 | |||
1041 | mRoot.removeAllChildren(); | 1042 | mRoot.removeAllChildren(); |
1042 | 1043 | ||
1043 | delete [] mSkeleton; | 1044 | delete [] mSkeleton; |
@@ -1493,6 +1494,8 @@ void LLVOAvatar::cleanupClass() | |||
1493 | } | 1494 | } |
1494 | 1495 | ||
1495 | LLPartSysData LLVOAvatar::sCloud; | 1496 | LLPartSysData LLVOAvatar::sCloud; |
1497 | bool LLVOAvatar::sHasCloud = false; | ||
1498 | |||
1496 | void LLVOAvatar::initCloud() | 1499 | void LLVOAvatar::initCloud() |
1497 | { | 1500 | { |
1498 | // fancy particle cloud designed by Brent | 1501 | // fancy particle cloud designed by Brent |
@@ -1506,12 +1509,45 @@ void LLVOAvatar::initCloud() | |||
1506 | filename = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "cloud.xml"); | 1509 | filename = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "cloud.xml"); |
1507 | } | 1510 | } |
1508 | 1511 | ||
1512 | loadCloud(filename, sCloud); | ||
1513 | sHasCloud = true; | ||
1514 | } | ||
1515 | |||
1516 | |||
1517 | void LLVOAvatar::loadCloud(const std::string& filename, LLPartSysData& particles) | ||
1518 | { | ||
1509 | LLSD cloud; | 1519 | LLSD cloud; |
1510 | llifstream in_file(filename); | 1520 | llifstream in_file(filename); |
1511 | LLSDSerialize::fromXMLDocument(cloud, in_file); | 1521 | LLSDSerialize::fromXMLDocument(cloud, in_file); |
1512 | sCloud.fromLLSD(cloud); | 1522 | |
1513 | LLViewerImage* cloud_image = gImageList.getImageFromFile("cloud-particle.j2c"); | 1523 | particles.fromLLSD(cloud); |
1514 | sCloud.mPartImageID = cloud_image->getID(); | 1524 | const LLUUID default_id = DEFAULT_UNREZZED_AVATAR_PARTICLE; |
1525 | if(particles.mPartImageID.isNull() || default_id == particles.mPartImageID) | ||
1526 | { | ||
1527 | LLViewerImage* cloud_image = | ||
1528 | gImageList.getImageFromFile("cloud-particle.j2c", MIPMAP_YES, IMMEDIATE_YES, 0, 0, default_id); | ||
1529 | particles.mPartImageID = cloud_image->getID(); | ||
1530 | } | ||
1531 | } | ||
1532 | |||
1533 | |||
1534 | void LLVOAvatar::saveCloud(const std::string& filename, LLPartSysData& particles) | ||
1535 | { | ||
1536 | llofstream out(filename); | ||
1537 | if (!out.good()) | ||
1538 | { | ||
1539 | llwarns << "Unable to open " << filename << " for output." << llendl; | ||
1540 | return; | ||
1541 | } | ||
1542 | LLSDSerialize::toXML(particles.asLLSD(), out); | ||
1543 | out.close(); | ||
1544 | |||
1545 | // Imprudence: actually we could export any particle system with this, | ||
1546 | // though we don't have a clue about its creator (could be from a no mod script) :( | ||
1547 | // This is probably also not ok to export on open sim grids, | ||
1548 | // unless theiy either add a creator property to particle systems | ||
1549 | // or their terms of service make sure this sort of content is free and open. | ||
1550 | // Saving only the cloud for now, which only exists client side. | ||
1515 | 1551 | ||
1516 | } | 1552 | } |
1517 | 1553 | ||
@@ -3228,6 +3264,7 @@ bool LLVOAvatar::loadClientTags() | |||
3228 | void LLVOAvatar::resolveClient(LLColor4& avatar_name_color, std::string& client, LLVOAvatar* avatar) | 3264 | void LLVOAvatar::resolveClient(LLColor4& avatar_name_color, std::string& client, LLVOAvatar* avatar) |
3229 | { | 3265 | { |
3230 | LLUUID idx = avatar->getTE(0)->getID(); | 3266 | LLUUID idx = avatar->getTE(0)->getID(); |
3267 | |||
3231 | // meta 7 gets special treatment - | 3268 | // meta 7 gets special treatment - |
3232 | // A) coz this is our damn viewer. | 3269 | // A) coz this is our damn viewer. |
3233 | // 2) makes it quicker coz everyone else around you is using it. | 3270 | // 2) makes it quicker coz everyone else around you is using it. |
@@ -3239,9 +3276,14 @@ void LLVOAvatar::resolveClient(LLColor4& avatar_name_color, std::string& client, | |||
3239 | client = "meta 7"; | 3276 | client = "meta 7"; |
3240 | } | 3277 | } |
3241 | // Imprudence is special to, coz dark blue on black is just unreadable. Pffft. | 3278 | // Imprudence is special to, coz dark blue on black is just unreadable. Pffft. |
3279 | // Also in case the user has a local color they prefer. | ||
3280 | // This means clientside colors for Imp will always override any on the website. | ||
3281 | // If you're going to add a new color, a new UUID needs to be added -- MC | ||
3242 | else if(idx == LLUUID("cc7a030f-282f-c165-44d2-b5ee572e72bf")) | 3282 | else if(idx == LLUUID("cc7a030f-282f-c165-44d2-b5ee572e72bf")) |
3243 | { | 3283 | { |
3244 | avatar_name_color = LLColor4(0.79f,0.44f,0.88f);// Imprudence | 3284 | //avatar_name_color = LLColor4(0.79f,0.44f,0.88f);// Imprudence |
3285 | // defaults to LLColor4(0.79f,0.44f,0.88f) | ||
3286 | avatar_name_color = gSavedSettings.getColor4("ImprudenceTagColor"); //Imprudence | ||
3245 | client = "Imprudence"; | 3287 | client = "Imprudence"; |
3246 | } | 3288 | } |
3247 | // Don't think anyone allocates these tags, so grab one for us to. | 3289 | // Don't think anyone allocates these tags, so grab one for us to. |
@@ -3431,6 +3473,7 @@ void LLVOAvatar::resolveClient(LLColor4& avatar_name_color, std::string& client, | |||
3431 | client = "nolife"; | 3473 | client = "nolife"; |
3432 | } | 3474 | } |
3433 | } | 3475 | } |
3476 | |||
3434 | if(client.empty()) | 3477 | if(client.empty()) |
3435 | { | 3478 | { |
3436 | LLPointer<LLViewerImage> image_point = gImageList.getImage(idx, MIPMAP_YES, IMMEDIATE_NO); | 3479 | LLPointer<LLViewerImage> image_point = gImageList.getImage(idx, MIPMAP_YES, IMMEDIATE_NO); |
@@ -3580,7 +3623,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) | |||
3580 | else | 3623 | else |
3581 | { | 3624 | { |
3582 | // Set your own name to the Imprudence color -- MC | 3625 | // Set your own name to the Imprudence color -- MC |
3583 | client_color = LLColor4(0.79f,0.44f,0.88f); | 3626 | client_color = gSavedSettings.getColor4("ImprudenceTagColor"); |
3584 | } | 3627 | } |
3585 | 3628 | ||
3586 | static BOOL* sShowClientColor = rebind_llcontrol<BOOL>("ShowClientColor", &gSavedSettings, true); | 3629 | static BOOL* sShowClientColor = rebind_llcontrol<BOOL>("ShowClientColor", &gSavedSettings, true); |
@@ -7393,6 +7436,7 @@ BOOL LLVOAvatar::isVisible() | |||
7393 | // returns true if the value has changed. | 7436 | // returns true if the value has changed. |
7394 | BOOL LLVOAvatar::updateIsFullyLoaded() | 7437 | BOOL LLVOAvatar::updateIsFullyLoaded() |
7395 | { | 7438 | { |
7439 | |||
7396 | // a "heuristic" to determine if we have enough avatar data to render | 7440 | // a "heuristic" to determine if we have enough avatar data to render |
7397 | // (to avoid rendering a "Ruth" - DEV-3168) | 7441 | // (to avoid rendering a "Ruth" - DEV-3168) |
7398 | 7442 | ||
@@ -7472,11 +7516,19 @@ BOOL LLVOAvatar::updateIsFullyLoaded() | |||
7472 | 7516 | ||
7473 | BOOL LLVOAvatar::isFullyLoaded() | 7517 | BOOL LLVOAvatar::isFullyLoaded() |
7474 | { | 7518 | { |
7519 | static BOOL* sPreviewAvatarCloud = rebind_llcontrol<BOOL>("PreviewAvatarAsCloud", &gSavedSettings, true); | ||
7475 | static BOOL* sRenderUnloadedAvatar = rebind_llcontrol<BOOL>("RenderUnloadedAvatar", &gSavedSettings, true); | 7520 | static BOOL* sRenderUnloadedAvatar = rebind_llcontrol<BOOL>("RenderUnloadedAvatar", &gSavedSettings, true); |
7476 | if (*sRenderUnloadedAvatar) | 7521 | |
7477 | return TRUE; | 7522 | if(*sPreviewAvatarCloud && mIsSelf) |
7478 | else | 7523 | { |
7479 | return mFullyLoaded; | 7524 | return FALSE; |
7525 | } | ||
7526 | else if (*sRenderUnloadedAvatar) | ||
7527 | { | ||
7528 | return TRUE; | ||
7529 | } | ||
7530 | |||
7531 | return mFullyLoaded; | ||
7480 | } | 7532 | } |
7481 | 7533 | ||
7482 | 7534 | ||
diff --git a/linden/indra/newview/llvoavatar.h b/linden/indra/newview/llvoavatar.h index e585a6a..4d08bf0 100644 --- a/linden/indra/newview/llvoavatar.h +++ b/linden/indra/newview/llvoavatar.h | |||
@@ -97,7 +97,11 @@ public: | |||
97 | static void initClass(); // Initialize data that's only init'd once per class. | 97 | static void initClass(); // Initialize data that's only init'd once per class. |
98 | static void cleanupClass(); // Cleanup data that's only init'd once per class. | 98 | static void cleanupClass(); // Cleanup data that's only init'd once per class. |
99 | static BOOL parseSkeletonFile(const std::string& filename); | 99 | static BOOL parseSkeletonFile(const std::string& filename); |
100 | |||
100 | static void initCloud(); | 101 | static void initCloud(); |
102 | static void loadCloud(const std::string& filename, LLPartSysData& particles); | ||
103 | static void saveCloud(const std::string& filename, LLPartSysData& particles); | ||
104 | |||
101 | virtual U32 processUpdateMessage(LLMessageSystem *mesgsys, | 105 | virtual U32 processUpdateMessage(LLMessageSystem *mesgsys, |
102 | void **user_data, | 106 | void **user_data, |
103 | U32 block_num, | 107 | U32 block_num, |
@@ -587,7 +591,8 @@ public: | |||
587 | static F32 sLODFactor; // user-settable LOD factor | 591 | static F32 sLODFactor; // user-settable LOD factor |
588 | static BOOL sJointDebug; // output total number of joints being touched for each avatar | 592 | static BOOL sJointDebug; // output total number of joints being touched for each avatar |
589 | static BOOL sDebugAvatarRotation; | 593 | static BOOL sDebugAvatarRotation; |
590 | static LLPartSysData sCloud; | 594 | static LLPartSysData sCloud; |
595 | static bool sHasCloud; | ||
591 | 596 | ||
592 | static S32 sNumVisibleAvatars; // Number of instances of this class | 597 | static S32 sNumVisibleAvatars; // Number of instances of this class |
593 | 598 | ||
diff --git a/linden/indra/newview/llvocache.cpp b/linden/indra/newview/llvocache.cpp index 3f1c132..20d0399 100644 --- a/linden/indra/newview/llvocache.cpp +++ b/linden/indra/newview/llvocache.cpp | |||
@@ -104,7 +104,10 @@ LLVOCacheEntry::LLVOCacheEntry(LLFILE *fp) | |||
104 | 104 | ||
105 | LLVOCacheEntry::~LLVOCacheEntry() | 105 | LLVOCacheEntry::~LLVOCacheEntry() |
106 | { | 106 | { |
107 | delete [] mBuffer; | 107 | if (mBuffer) |
108 | { | ||
109 | delete [] mBuffer; | ||
110 | } | ||
108 | } | 111 | } |
109 | 112 | ||
110 | 113 | ||
diff --git a/linden/indra/newview/llvovolume.cpp b/linden/indra/newview/llvovolume.cpp index 7aaf845..4a53d4e 100644 --- a/linden/indra/newview/llvovolume.cpp +++ b/linden/indra/newview/llvovolume.cpp | |||
@@ -72,6 +72,10 @@ const S32 MIN_QUIET_FRAMES_COALESCE = 30; | |||
72 | const F32 FORCE_SIMPLE_RENDER_AREA = 512.f; | 72 | const F32 FORCE_SIMPLE_RENDER_AREA = 512.f; |
73 | const F32 FORCE_CULL_AREA = 8.f; | 73 | const F32 FORCE_CULL_AREA = 8.f; |
74 | 74 | ||
75 | static const F32 sSculptSAThresh = 1750.f; // Surface area at which sculpts are considered for not being rendered | ||
76 | static const F32 sSculptSAMax = 50000.f; // The maximum combined surface area of sculpts(per frame) that are above the | ||
77 | // threshold before they stop being rendered | ||
78 | |||
75 | BOOL gAnimateTextures = TRUE; | 79 | BOOL gAnimateTextures = TRUE; |
76 | extern BOOL gHideSelectedObjects; | 80 | extern BOOL gHideSelectedObjects; |
77 | 81 | ||
@@ -89,6 +93,7 @@ LLVOVolume::LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *re | |||
89 | mRelativeXformInvTrans.setIdentity(); | 93 | mRelativeXformInvTrans.setIdentity(); |
90 | 94 | ||
91 | mLOD = MIN_LOD; | 95 | mLOD = MIN_LOD; |
96 | mSculptLevel = -2; | ||
92 | mTextureAnimp = NULL; | 97 | mTextureAnimp = NULL; |
93 | mVObjRadius = LLVector3(1,1,0.5f).length(); | 98 | mVObjRadius = LLVector3(1,1,0.5f).length(); |
94 | mNumFaces = 0; | 99 | mNumFaces = 0; |
@@ -502,8 +507,9 @@ void LLVOVolume::updateTextureVirtualSize() | |||
502 | 507 | ||
503 | if (isSculpted()) | 508 | if (isSculpted()) |
504 | { | 509 | { |
505 | updateSculptTexture(); | 510 | LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT); |
506 | 511 | LLUUID id = sculpt_params->getSculptTexture(); | |
512 | mSculptTexture = gImageList.getImage(id); | ||
507 | if (mSculptTexture.notNull()) | 513 | if (mSculptTexture.notNull()) |
508 | { | 514 | { |
509 | mSculptTexture->setBoostLevel(llmax((S32)mSculptTexture->getBoostLevel(), | 515 | mSculptTexture->setBoostLevel(llmax((S32)mSculptTexture->getBoostLevel(), |
@@ -526,22 +532,22 @@ void LLVOVolume::updateTextureVirtualSize() | |||
526 | } | 532 | } |
527 | } | 533 | } |
528 | 534 | ||
529 | S32 texture_discard = mSculptTexture->getDiscardLevel(); //try to match the texture | 535 | S32 texture_discard = mSculptTexture->getCachedRawImageLevel(); //try to match the texture |
530 | S32 current_discard = getVolume() ? getVolume()->getSculptLevel() : -2 ; | 536 | S32 current_discard = mSculptLevel; |
531 | 537 | ||
532 | if (texture_discard >= 0 && //texture has some data available | 538 | if (texture_discard >= 0 && //texture has some data available |
533 | (texture_discard < current_discard || //texture has more data than last rebuild | 539 | (texture_discard < current_discard || //texture has more data than last rebuild |
534 | current_discard < 0)) //no previous rebuild | 540 | current_discard < 0)) //no previous rebuild |
535 | { | 541 | { |
536 | gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, FALSE); | 542 | markForUpdate(FALSE); |
537 | mSculptChanged = TRUE; | 543 | mSculptChanged = TRUE; |
538 | } | 544 | } |
539 | 545 | ||
540 | if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SCULPTED)) | 546 | if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SCULPTED)) |
541 | { | 547 | { |
542 | setDebugText(llformat("T%d C%d V%d\n%dx%d", | 548 | setDebugText(llformat("T%d C%d V%d\n%dx%d SA%f", |
543 | texture_discard, current_discard, getVolume()->getSculptLevel(), | 549 | texture_discard, current_discard, getVolume()->getSculptLevel(), |
544 | mSculptTexture->getHeight(), mSculptTexture->getWidth())); | 550 | mSculptTexture->getHeight(), mSculptTexture->getWidth(), mSculptSurfaceArea)); |
545 | } | 551 | } |
546 | } | 552 | } |
547 | } | 553 | } |
@@ -681,50 +687,25 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams &volume_params, const S32 detail | |||
681 | mVolumeImpl->onSetVolume(volume_params, detail); | 687 | mVolumeImpl->onSetVolume(volume_params, detail); |
682 | } | 688 | } |
683 | 689 | ||
684 | updateSculptTexture(); | ||
685 | |||
686 | if (isSculpted()) | 690 | if (isSculpted()) |
687 | { | 691 | { |
692 | mSculptTexture = gImageList.getImage(volume_params.getSculptID()); | ||
688 | if (mSculptTexture.notNull()) | 693 | if (mSculptTexture.notNull()) |
689 | { | 694 | { |
690 | sculpt(); | 695 | sculpt(); |
696 | mSculptLevel = getVolume()->getSculptLevel(); | ||
697 | mSculptSurfaceArea = getVolume()->sculptGetSurfaceArea(); | ||
691 | } | 698 | } |
692 | } | 699 | } |
693 | 700 | else | |
694 | return TRUE; | ||
695 | } | ||
696 | return FALSE; | ||
697 | } | ||
698 | |||
699 | void LLVOVolume::updateSculptTexture() | ||
700 | { | ||
701 | LLPointer<LLViewerImage> old_sculpt = mSculptTexture; | ||
702 | |||
703 | if (isSculpted()) | ||
704 | { | ||
705 | LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT); | ||
706 | LLUUID id = sculpt_params->getSculptTexture(); | ||
707 | if (id.notNull()) | ||
708 | { | 701 | { |
709 | mSculptTexture = gImageList.getImage(id); | 702 | mSculptTexture = NULL; |
703 | mSculptSurfaceArea = 0.0; | ||
710 | } | 704 | } |
711 | } | ||
712 | else | ||
713 | { | ||
714 | mSculptTexture = NULL; | ||
715 | } | ||
716 | 705 | ||
717 | if (mSculptTexture != old_sculpt) | 706 | return TRUE; |
718 | { | ||
719 | if (old_sculpt.notNull()) | ||
720 | { | ||
721 | old_sculpt->removeVolume(this); | ||
722 | } | ||
723 | if (mSculptTexture.notNull()) | ||
724 | { | ||
725 | mSculptTexture->addVolume(this); | ||
726 | } | ||
727 | } | 707 | } |
708 | return FALSE; | ||
728 | } | 709 | } |
729 | 710 | ||
730 | // sculpt replaces generate() for sculpted surfaces | 711 | // sculpt replaces generate() for sculpted surfaces |
@@ -737,7 +718,7 @@ void LLVOVolume::sculpt() | |||
737 | S8 sculpt_components = 0; | 718 | S8 sculpt_components = 0; |
738 | const U8* sculpt_data = NULL; | 719 | const U8* sculpt_data = NULL; |
739 | 720 | ||
740 | S32 discard_level = mSculptTexture->getDiscardLevel(); | 721 | S32 discard_level = mSculptTexture->getCachedRawImageLevel() ; |
741 | LLImageRaw* raw_image = mSculptTexture->getCachedRawImage() ; | 722 | LLImageRaw* raw_image = mSculptTexture->getCachedRawImage() ; |
742 | 723 | ||
743 | S32 max_discard = mSculptTexture->getMaxDiscardLevel(); | 724 | S32 max_discard = mSculptTexture->getMaxDiscardLevel(); |
@@ -781,7 +762,7 @@ void LLVOVolume::sculpt() | |||
781 | } | 762 | } |
782 | getVolume()->sculpt(sculpt_width, sculpt_height, sculpt_components, sculpt_data, discard_level); | 763 | getVolume()->sculpt(sculpt_width, sculpt_height, sculpt_components, sculpt_data, discard_level); |
783 | 764 | ||
784 | //notify rebuild any other VOVolumes that reference this sculpty volume | 765 | /*//notify rebuild any other VOVolumes that reference this sculpty volume |
785 | for (S32 i = 0; i < mSculptTexture->getNumVolumes(); ++i) | 766 | for (S32 i = 0; i < mSculptTexture->getNumVolumes(); ++i) |
786 | { | 767 | { |
787 | LLVOVolume* volume = (*(mSculptTexture->getVolumeList()))[i]; | 768 | LLVOVolume* volume = (*(mSculptTexture->getVolumeList()))[i]; |
@@ -789,7 +770,7 @@ void LLVOVolume::sculpt() | |||
789 | { | 770 | { |
790 | gPipeline.markRebuild(volume->mDrawable, LLDrawable::REBUILD_GEOMETRY, FALSE); | 771 | gPipeline.markRebuild(volume->mDrawable, LLDrawable::REBUILD_GEOMETRY, FALSE); |
791 | } | 772 | } |
792 | } | 773 | }*/ |
793 | } | 774 | } |
794 | } | 775 | } |
795 | 776 | ||
@@ -2029,7 +2010,7 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector3& start, const LLVector3& e | |||
2029 | if (face == -1) | 2010 | if (face == -1) |
2030 | { | 2011 | { |
2031 | start_face = 0; | 2012 | start_face = 0; |
2032 | end_face = volume->getNumFaces(); | 2013 | end_face = volume->getNumVolumeFaces(); |
2033 | } | 2014 | } |
2034 | else | 2015 | else |
2035 | { | 2016 | { |
@@ -2298,6 +2279,16 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) | |||
2298 | } | 2279 | } |
2299 | 2280 | ||
2300 | LLVOVolume* vobj = drawablep->getVOVolume(); | 2281 | LLVOVolume* vobj = drawablep->getVOVolume(); |
2282 | |||
2283 | if (vobj->mSculptSurfaceArea > sSculptSAThresh) | ||
2284 | { | ||
2285 | LLPipeline::sSculptSurfaceAreaFrame += vobj->mSculptSurfaceArea; | ||
2286 | if(LLPipeline::sSculptSurfaceAreaFrame > sSculptSAMax) | ||
2287 | { | ||
2288 | continue; | ||
2289 | } | ||
2290 | } | ||
2291 | |||
2301 | llassert_always(vobj); | 2292 | llassert_always(vobj); |
2302 | vobj->updateTextureVirtualSize(); | 2293 | vobj->updateTextureVirtualSize(); |
2303 | vobj->preRebuild(); | 2294 | vobj->preRebuild(); |
diff --git a/linden/indra/newview/llvovolume.h b/linden/indra/newview/llvovolume.h index 7c8a68d..7fba28c 100644 --- a/linden/indra/newview/llvovolume.h +++ b/linden/indra/newview/llvovolume.h | |||
@@ -171,7 +171,6 @@ public: | |||
171 | void setTexture(const S32 face); | 171 | void setTexture(const S32 face); |
172 | S32 getIndexInTex() const {return mIndexInTex ;} | 172 | S32 getIndexInTex() const {return mIndexInTex ;} |
173 | /*virtual*/ BOOL setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume = false); | 173 | /*virtual*/ BOOL setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume = false); |
174 | void updateSculptTexture(); | ||
175 | void setIndexInTex(S32 index) { mIndexInTex = index ;} | 174 | void setIndexInTex(S32 index) { mIndexInTex = index ;} |
176 | void sculpt(); | 175 | void sculpt(); |
177 | void updateRelativeXform(); | 176 | void updateRelativeXform(); |
@@ -233,6 +232,7 @@ private: | |||
233 | LLFrameTimer mTextureUpdateTimer; | 232 | LLFrameTimer mTextureUpdateTimer; |
234 | S32 mLOD; | 233 | S32 mLOD; |
235 | BOOL mLODChanged; | 234 | BOOL mLODChanged; |
235 | S32 mSculptLevel; | ||
236 | BOOL mSculptChanged; | 236 | BOOL mSculptChanged; |
237 | LLMatrix4 mRelativeXform; | 237 | LLMatrix4 mRelativeXform; |
238 | LLMatrix3 mRelativeXformInvTrans; | 238 | LLMatrix3 mRelativeXformInvTrans; |
diff --git a/linden/indra/newview/llxmlrpctransaction.cpp b/linden/indra/newview/llxmlrpctransaction.cpp index 675ba42..e0805ee 100644 --- a/linden/indra/newview/llxmlrpctransaction.cpp +++ b/linden/indra/newview/llxmlrpctransaction.cpp | |||
@@ -236,6 +236,23 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip) | |||
236 | mCurlRequest->setopt(CURLOPT_PROXYPORT, port); | 236 | mCurlRequest->setopt(CURLOPT_PROXYPORT, port); |
237 | mCurlRequest->setopt(CURLOPT_PROXYTYPE, CURLPROXY_HTTP); | 237 | mCurlRequest->setopt(CURLOPT_PROXYTYPE, CURLPROXY_HTTP); |
238 | } | 238 | } |
239 | else if (LLSocks::getInstance()->isHttpProxyEnabled()) | ||
240 | { | ||
241 | std::string address = LLSocks::getInstance()->getHTTPProxy().getIPString(); | ||
242 | U16 port = LLSocks::getInstance()->getHTTPProxy().getPort(); | ||
243 | mCurlRequest->setoptString(CURLOPT_PROXY, address.c_str()); | ||
244 | mCurlRequest->setopt(CURLOPT_PROXYPORT, port); | ||
245 | if (LLSocks::getInstance()->getHttpProxyType() == LLPROXY_SOCKS) | ||
246 | { | ||
247 | mCurlRequest->setopt(CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); | ||
248 | if(LLSocks::getInstance()->getSelectedAuthMethod()==METHOD_PASSWORD) | ||
249 | mCurlRequest->setoptString(CURLOPT_PROXYUSERPWD,LLSocks::getInstance()->getProxyUserPwd()); | ||
250 | } | ||
251 | else | ||
252 | { | ||
253 | mCurlRequest->setopt(CURLOPT_PROXYTYPE, CURLPROXY_HTTP); | ||
254 | } | ||
255 | } | ||
239 | 256 | ||
240 | // mCurlRequest->setopt(CURLOPT_VERBOSE, 1); // usefull for debugging | 257 | // mCurlRequest->setopt(CURLOPT_VERBOSE, 1); // usefull for debugging |
241 | mCurlRequest->setopt(CURLOPT_NOSIGNAL, 1); | 258 | mCurlRequest->setopt(CURLOPT_NOSIGNAL, 1); |
@@ -421,7 +438,7 @@ void LLXMLRPCTransaction::Impl::setStatus(Status status, | |||
421 | mStatusMessage = | 438 | mStatusMessage = |
422 | "Despite our best efforts, something unexpected has gone wrong. \n" | 439 | "Despite our best efforts, something unexpected has gone wrong. \n" |
423 | " \n" | 440 | " \n" |
424 | "Please check " + gHippoGridManager->getCurrentGrid()->getGridNick() + "'s status \n" | 441 | "Please check " + gHippoGridManager->getCurrentGrid()->getGridName() + "'s status \n" |
425 | "to see if there is a known problem with the service."; | 442 | "to see if there is a known problem with the service."; |
426 | 443 | ||
427 | //mStatusURI = "http://secondlife.com/status/"; | 444 | //mStatusURI = "http://secondlife.com/status/"; |
@@ -432,14 +449,14 @@ void LLXMLRPCTransaction::Impl::setStatus(Status status, | |||
432 | void LLXMLRPCTransaction::Impl::setCurlStatus(CURLcode code) | 449 | void LLXMLRPCTransaction::Impl::setCurlStatus(CURLcode code) |
433 | { | 450 | { |
434 | std::string message; | 451 | std::string message; |
435 | std::string uri = gHippoGridManager->getCurrentGrid()->getSupportUrl(); | 452 | std::string uri = gHippoGridManager->getCurrentGrid()->getSupportURL(); |
436 | 453 | ||
437 | switch (code) | 454 | switch (code) |
438 | { | 455 | { |
439 | case CURLE_COULDNT_RESOLVE_HOST: | 456 | case CURLE_COULDNT_RESOLVE_HOST: |
440 | message = | 457 | message = |
441 | "DNS could not resolve the host name.\n" | 458 | "DNS could not resolve the host name.\n" |
442 | "Please verify that you can connect to " + gHippoGridManager->getCurrentGrid()->getGridNick() + "'s\n" | 459 | "Please verify that you can connect to " + gHippoGridManager->getCurrentGrid()->getGridName() + "'s\n" |
443 | "web site. If you can, but continue to receive this error,\n" | 460 | "web site. If you can, but continue to receive this error,\n" |
444 | "please go to the support section and report this problem."; | 461 | "please go to the support section and report this problem."; |
445 | break; | 462 | break; |
@@ -448,7 +465,7 @@ void LLXMLRPCTransaction::Impl::setCurlStatus(CURLcode code) | |||
448 | message = | 465 | message = |
449 | "The login server couldn't verify itself via SSL.\n" | 466 | "The login server couldn't verify itself via SSL.\n" |
450 | "If you continue to receive this error, please go\n" | 467 | "If you continue to receive this error, please go\n" |
451 | "to the Support section of " + gHippoGridManager->getCurrentGrid()->getGridNick() + "'s web site\n" | 468 | "to the Support section of " + gHippoGridManager->getCurrentGrid()->getGridName() + "'s web site\n" |
452 | "and report the problem."; | 469 | "and report the problem."; |
453 | break; | 470 | break; |
454 | 471 | ||
@@ -460,7 +477,7 @@ void LLXMLRPCTransaction::Impl::setCurlStatus(CURLcode code) | |||
460 | "are set correctly.\n" | 477 | "are set correctly.\n" |
461 | "\n" | 478 | "\n" |
462 | "If you continue to receive this error, please go\n" | 479 | "If you continue to receive this error, please go\n" |
463 | "to the Support section of " + gHippoGridManager->getCurrentGrid()->getGridNick() + "'s web site\n" | 480 | "to the Support section of " + gHippoGridManager->getCurrentGrid()->getGridName() + "'s web site\n" |
464 | "and report the problem."; | 481 | "and report the problem."; |
465 | break; | 482 | break; |
466 | 483 | ||
diff --git a/linden/indra/newview/panelradar.cpp b/linden/indra/newview/panelradar.cpp index a868ee2..c94c0d1 100644 --- a/linden/indra/newview/panelradar.cpp +++ b/linden/indra/newview/panelradar.cpp | |||
@@ -32,6 +32,7 @@ | |||
32 | #include "llagent.h" | 32 | #include "llagent.h" |
33 | #include "llchat.h" | 33 | #include "llchat.h" |
34 | #include "llfloateravatarinfo.h" | 34 | #include "llfloateravatarinfo.h" |
35 | #include "llfloateravatarlist.h" | ||
35 | #include "llfloaterchat.h" | 36 | #include "llfloaterchat.h" |
36 | #include "llfloaterfriends.h" | 37 | #include "llfloaterfriends.h" |
37 | #include "llfloatergroupinvite.h" | 38 | #include "llfloatergroupinvite.h" |
@@ -95,6 +96,7 @@ BOOL PanelRadar::postBuild() | |||
95 | //childSetAction("estate_eject_btn", onClickEjectFromEstate, this); | 96 | //childSetAction("estate_eject_btn", onClickEjectFromEstate, this); |
96 | //childSetAction("estate_ban_btn", onClickBanFromEstate, this); | 97 | //childSetAction("estate_ban_btn", onClickBanFromEstate, this); |
97 | childSetAction("ban_btn", onClickBan, this); | 98 | childSetAction("ban_btn", onClickBan, this); |
99 | childSetAction("full_radar_btn", onClickFullRadar, this); | ||
98 | 100 | ||
99 | setDefaultBtn("im_btn"); | 101 | setDefaultBtn("im_btn"); |
100 | 102 | ||
@@ -1025,6 +1027,13 @@ void PanelRadar::onClickAR(void* user_data) | |||
1025 | } | 1027 | } |
1026 | 1028 | ||
1027 | 1029 | ||
1030 | // static | ||
1031 | void PanelRadar::onClickFullRadar(void* user_data) | ||
1032 | { | ||
1033 | LLFloaterAvatarList::toggle(NULL); | ||
1034 | } | ||
1035 | |||
1036 | |||
1028 | //static | 1037 | //static |
1029 | /* Don't use until the UI can be worked out | 1038 | /* Don't use until the UI can be worked out |
1030 | void PanelRadar::onClickBanFromEstate(void* user_data) | 1039 | void PanelRadar::onClickBanFromEstate(void* user_data) |
diff --git a/linden/indra/newview/panelradar.h b/linden/indra/newview/panelradar.h index 59e6aff..ff5912c 100644 --- a/linden/indra/newview/panelradar.h +++ b/linden/indra/newview/panelradar.h | |||
@@ -108,6 +108,7 @@ private: | |||
108 | static void onClickAR(void* user_data); | 108 | static void onClickAR(void* user_data); |
109 | //static void onClickEjectFromEstate(void* user_data); Not working yet | 109 | //static void onClickEjectFromEstate(void* user_data); Not working yet |
110 | //static void onClickBanFromEstate(void* user_data); | 110 | //static void onClickBanFromEstate(void* user_data); |
111 | static void onClickFullRadar(void* user_data); | ||
111 | 112 | ||
112 | static void callbackAR(void* user_data); | 113 | static void callbackAR(void* user_data); |
113 | static bool callbackFreeze(const LLSD& notification, const LLSD& response); | 114 | static bool callbackFreeze(const LLSD& notification, const LLSD& response); |
diff --git a/linden/indra/newview/pipeline.cpp b/linden/indra/newview/pipeline.cpp index 5458af5..ae0e605 100644 --- a/linden/indra/newview/pipeline.cpp +++ b/linden/indra/newview/pipeline.cpp | |||
@@ -257,7 +257,8 @@ BOOL LLPipeline::sRenderFrameTest = FALSE; | |||
257 | BOOL LLPipeline::sRenderAttachedLights = TRUE; | 257 | BOOL LLPipeline::sRenderAttachedLights = TRUE; |
258 | BOOL LLPipeline::sRenderAttachedParticles = TRUE; | 258 | BOOL LLPipeline::sRenderAttachedParticles = TRUE; |
259 | BOOL LLPipeline::sRenderDeferred = FALSE; | 259 | BOOL LLPipeline::sRenderDeferred = FALSE; |
260 | S32 LLPipeline::sVisibleLightCount = 0; | 260 | S32 LLPipeline::sVisibleLightCount = 0; |
261 | F32 LLPipeline::sSculptSurfaceAreaFrame = 0.0; | ||
261 | 262 | ||
262 | static LLCullResult* sCull = NULL; | 263 | static LLCullResult* sCull = NULL; |
263 | 264 | ||
@@ -2198,6 +2199,8 @@ void LLPipeline::postSort(LLCamera& camera) | |||
2198 | LLFastTimer ftm(LLFastTimer::FTM_STATESORT_POSTSORT); | 2199 | LLFastTimer ftm(LLFastTimer::FTM_STATESORT_POSTSORT); |
2199 | 2200 | ||
2200 | assertInitialized(); | 2201 | assertInitialized(); |
2202 | |||
2203 | sSculptSurfaceAreaFrame = 0.0; | ||
2201 | 2204 | ||
2202 | //rebuild drawable geometry | 2205 | //rebuild drawable geometry |
2203 | for (LLCullResult::sg_list_t::iterator i = sCull->beginDrawableGroups(); i != sCull->endDrawableGroups(); ++i) | 2206 | for (LLCullResult::sg_list_t::iterator i = sCull->beginDrawableGroups(); i != sCull->endDrawableGroups(); ++i) |
diff --git a/linden/indra/newview/pipeline.h b/linden/indra/newview/pipeline.h index 1ecb56e..2252fbd 100644 --- a/linden/indra/newview/pipeline.h +++ b/linden/indra/newview/pipeline.h | |||
@@ -579,6 +579,8 @@ protected: | |||
579 | public: | 579 | public: |
580 | static BOOL sRenderBeacons; | 580 | static BOOL sRenderBeacons; |
581 | static BOOL sRenderHighlight; | 581 | static BOOL sRenderHighlight; |
582 | static F32 sSculptSurfaceAreaFrame; | ||
583 | |||
582 | }; | 584 | }; |
583 | 585 | ||
584 | void render_bbox(const LLVector3 &min, const LLVector3 &max); | 586 | void render_bbox(const LLVector3 &min, const LLVector3 &max); |
diff --git a/linden/indra/newview/skins/default/xui/da/menu_rightclick_text.xml b/linden/indra/newview/skins/default/xui/da/menu_rightclick_text.xml new file mode 100644 index 0000000..36fa667 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/da/menu_rightclick_text.xml | |||
@@ -0,0 +1,116 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | |||
3 | <menu drop_shadow="true" | ||
4 | mouse_opaque="false" name="Text Edit Menu" opaque="true"> | ||
5 | <menu_item_call label="Cut" mouse_opaque="true" | ||
6 | name="Cut Text"> | ||
7 | <on_click function="textfield_cut" userdata="about" /> | ||
8 | <on_enable function="textfield_cut_enable" /> | ||
9 | </menu_item_call> | ||
10 | <menu_item_call label="Copy" mouse_opaque="true" | ||
11 | name="Copy Text" > | ||
12 | <on_click function="textfield_copy" userdata="" /> | ||
13 | <on_enable function="textfield_copy_enable" /> | ||
14 | </menu_item_call> | ||
15 | <menu_item_call label="Paste" mouse_opaque="true" | ||
16 | name="Paste Text" > | ||
17 | <on_click function="textfield_paste" userdata="" /> | ||
18 | <on_enable function="textfield_paste_enable" /> | ||
19 | </menu_item_call> | ||
20 | <menu_item_call label="Delete" mouse_opaque="true" | ||
21 | name="Delete Text" > | ||
22 | <on_click function="textfield_delete" userdata="" /> | ||
23 | <on_enable function="textfield_delete_enable" /> | ||
24 | </menu_item_call> | ||
25 | <menu_item_separator /> | ||
26 | <menu_item_call label="Select All" mouse_opaque="true" | ||
27 | name="Select All Text" > | ||
28 | <on_click function="textfield_selectall" userdata="" /> | ||
29 | <on_enable function="textfield_selectall_enable" /> | ||
30 | </menu_item_call> | ||
31 | <menu_item_separator name="Translate" /> | ||
32 | <menu drop_shadow="true" | ||
33 | mouse_opaque="false" name="Translation Options" | ||
34 | bottom_delta="0" label="Translate To..." opaque="true" > | ||
35 | <menu_item_call label="English" mouse_opaque="true" | ||
36 | name="Translate Text" > | ||
37 | <on_click function="textfield_translate" translate="true" userdata="en" /> | ||
38 | <on_enable function="textfield_translate_enable" /> | ||
39 | </menu_item_call> | ||
40 | <menu_item_call label="Danish" mouse_opaque="true" | ||
41 | name="Translate Text" > | ||
42 | <on_click function="textfield_translate" translate="true" userdata="da" /> | ||
43 | <on_enable function="textfield_translate_enable" /> | ||
44 | </menu_item_call> | ||
45 | <menu_item_call label="Deutsch (German)" mouse_opaque="true" | ||
46 | name="Translate Text" > | ||
47 | <on_click function="textfield_translate" translate="true" userdata="de" /> | ||
48 | <on_enable function="textfield_translate_enable" /> | ||
49 | </menu_item_call> | ||
50 | <menu_item_call label="Spanish" mouse_opaque="true" | ||
51 | name="Translate Text" > | ||
52 | <on_click function="textfield_translate" translate="true" userdata="es" /> | ||
53 | <on_enable function="textfield_translate_enable" /> | ||
54 | </menu_item_call> | ||
55 | <menu_item_call label="French" mouse_opaque="true" | ||
56 | name="Translate Text" > | ||
57 | <on_click function="textfield_translate" translate="true" userdata="fr" /> | ||
58 | <on_enable function="textfield_translate_enable" /> | ||
59 | </menu_item_call> | ||
60 | <menu_item_call label="Italian" mouse_opaque="true" | ||
61 | name="Translate Text" > | ||
62 | <on_click function="textfield_translate" translate="true" userdata="it" /> | ||
63 | <on_enable function="textfield_translate_enable" /> | ||
64 | </menu_item_call> | ||
65 | <menu_item_call label="Hungarian" mouse_opaque="true" | ||
66 | name="Translate Text" > | ||
67 | <on_click function="textfield_translate" translate="true" userdata="hu" /> | ||
68 | <on_enable function="textfield_translate_enable" /> | ||
69 | </menu_item_call> | ||
70 | <menu_item_call label="Dutch" mouse_opaque="true" | ||
71 | name="Translate Text" > | ||
72 | <on_click function="textfield_translate" translate="true" userdata="nl" /> | ||
73 | <on_enable function="textfield_translate_enable" /> | ||
74 | </menu_item_call> | ||
75 | <menu_item_call label="Polish" mouse_opaque="true" | ||
76 | name="Translate Text" > | ||
77 | <on_click function="textfield_translate" translate="true" userdata="pl" /> | ||
78 | <on_enable function="textfield_translate_enable" /> | ||
79 | </menu_item_call> | ||
80 | <menu_item_call label="Portugese" mouse_opaque="true" | ||
81 | name="Translate Text" > | ||
82 | <on_click function="textfield_translate" translate="true" userdata="pt" /> | ||
83 | <on_enable function="textfield_translate_enable" /> | ||
84 | </menu_item_call> | ||
85 | <menu_item_call label="Russian" mouse_opaque="true" | ||
86 | name="Translate Text" > | ||
87 | <on_click function="textfield_translate" translate="true" userdata="ru" /> | ||
88 | <on_enable function="textfield_translate_enable" /> | ||
89 | </menu_item_call> | ||
90 | <menu_item_call label="Turkish" mouse_opaque="true" | ||
91 | name="Translate Text" > | ||
92 | <on_click function="textfield_translate" translate="true" userdata="tr" /> | ||
93 | <on_enable function="textfield_translate_enable" /> | ||
94 | </menu_item_call> | ||
95 | <menu_item_call label="Ukrainian" mouse_opaque="true" | ||
96 | name="Translate Text" > | ||
97 | <on_click function="textfield_translate" translate="true" userdata="uk" /> | ||
98 | <on_enable function="textfield_translate_enable" /> | ||
99 | </menu_item_call> | ||
100 | <menu_item_call label="Chinese" mouse_opaque="true" | ||
101 | name="Translate Text" > | ||
102 | <on_click function="textfield_translate" translate="true" userdata="zh" /> | ||
103 | <on_enable function="textfield_translate_enable" /> | ||
104 | </menu_item_call> | ||
105 | <menu_item_call label="Japanese" mouse_opaque="true" | ||
106 | name="Translate Text" > | ||
107 | <on_click function="textfield_translate" translate="true" userdata="ja" /> | ||
108 | <on_enable function="textfield_translate_enable" /> | ||
109 | </menu_item_call> | ||
110 | <menu_item_call label="Korean" mouse_opaque="true" | ||
111 | name="Translate Text" > | ||
112 | <on_click function="textfield_translate" translate="true" userdata="ko" /> | ||
113 | <on_enable function="textfield_translate_enable" /> | ||
114 | </menu_item_call> | ||
115 | </menu> | ||
116 | </menu> | ||
diff --git a/linden/indra/newview/skins/default/xui/de/menu_rightclick_text.xml b/linden/indra/newview/skins/default/xui/de/menu_rightclick_text.xml new file mode 100644 index 0000000..36fa667 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/de/menu_rightclick_text.xml | |||
@@ -0,0 +1,116 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | |||
3 | <menu drop_shadow="true" | ||
4 | mouse_opaque="false" name="Text Edit Menu" opaque="true"> | ||
5 | <menu_item_call label="Cut" mouse_opaque="true" | ||
6 | name="Cut Text"> | ||
7 | <on_click function="textfield_cut" userdata="about" /> | ||
8 | <on_enable function="textfield_cut_enable" /> | ||
9 | </menu_item_call> | ||
10 | <menu_item_call label="Copy" mouse_opaque="true" | ||
11 | name="Copy Text" > | ||
12 | <on_click function="textfield_copy" userdata="" /> | ||
13 | <on_enable function="textfield_copy_enable" /> | ||
14 | </menu_item_call> | ||
15 | <menu_item_call label="Paste" mouse_opaque="true" | ||
16 | name="Paste Text" > | ||
17 | <on_click function="textfield_paste" userdata="" /> | ||
18 | <on_enable function="textfield_paste_enable" /> | ||
19 | </menu_item_call> | ||
20 | <menu_item_call label="Delete" mouse_opaque="true" | ||
21 | name="Delete Text" > | ||
22 | <on_click function="textfield_delete" userdata="" /> | ||
23 | <on_enable function="textfield_delete_enable" /> | ||
24 | </menu_item_call> | ||
25 | <menu_item_separator /> | ||
26 | <menu_item_call label="Select All" mouse_opaque="true" | ||
27 | name="Select All Text" > | ||
28 | <on_click function="textfield_selectall" userdata="" /> | ||
29 | <on_enable function="textfield_selectall_enable" /> | ||
30 | </menu_item_call> | ||
31 | <menu_item_separator name="Translate" /> | ||
32 | <menu drop_shadow="true" | ||
33 | mouse_opaque="false" name="Translation Options" | ||
34 | bottom_delta="0" label="Translate To..." opaque="true" > | ||
35 | <menu_item_call label="English" mouse_opaque="true" | ||
36 | name="Translate Text" > | ||
37 | <on_click function="textfield_translate" translate="true" userdata="en" /> | ||
38 | <on_enable function="textfield_translate_enable" /> | ||
39 | </menu_item_call> | ||
40 | <menu_item_call label="Danish" mouse_opaque="true" | ||
41 | name="Translate Text" > | ||
42 | <on_click function="textfield_translate" translate="true" userdata="da" /> | ||
43 | <on_enable function="textfield_translate_enable" /> | ||
44 | </menu_item_call> | ||
45 | <menu_item_call label="Deutsch (German)" mouse_opaque="true" | ||
46 | name="Translate Text" > | ||
47 | <on_click function="textfield_translate" translate="true" userdata="de" /> | ||
48 | <on_enable function="textfield_translate_enable" /> | ||
49 | </menu_item_call> | ||
50 | <menu_item_call label="Spanish" mouse_opaque="true" | ||
51 | name="Translate Text" > | ||
52 | <on_click function="textfield_translate" translate="true" userdata="es" /> | ||
53 | <on_enable function="textfield_translate_enable" /> | ||
54 | </menu_item_call> | ||
55 | <menu_item_call label="French" mouse_opaque="true" | ||
56 | name="Translate Text" > | ||
57 | <on_click function="textfield_translate" translate="true" userdata="fr" /> | ||
58 | <on_enable function="textfield_translate_enable" /> | ||
59 | </menu_item_call> | ||
60 | <menu_item_call label="Italian" mouse_opaque="true" | ||
61 | name="Translate Text" > | ||
62 | <on_click function="textfield_translate" translate="true" userdata="it" /> | ||
63 | <on_enable function="textfield_translate_enable" /> | ||
64 | </menu_item_call> | ||
65 | <menu_item_call label="Hungarian" mouse_opaque="true" | ||
66 | name="Translate Text" > | ||
67 | <on_click function="textfield_translate" translate="true" userdata="hu" /> | ||
68 | <on_enable function="textfield_translate_enable" /> | ||
69 | </menu_item_call> | ||
70 | <menu_item_call label="Dutch" mouse_opaque="true" | ||
71 | name="Translate Text" > | ||
72 | <on_click function="textfield_translate" translate="true" userdata="nl" /> | ||
73 | <on_enable function="textfield_translate_enable" /> | ||
74 | </menu_item_call> | ||
75 | <menu_item_call label="Polish" mouse_opaque="true" | ||
76 | name="Translate Text" > | ||
77 | <on_click function="textfield_translate" translate="true" userdata="pl" /> | ||
78 | <on_enable function="textfield_translate_enable" /> | ||
79 | </menu_item_call> | ||
80 | <menu_item_call label="Portugese" mouse_opaque="true" | ||
81 | name="Translate Text" > | ||
82 | <on_click function="textfield_translate" translate="true" userdata="pt" /> | ||
83 | <on_enable function="textfield_translate_enable" /> | ||
84 | </menu_item_call> | ||
85 | <menu_item_call label="Russian" mouse_opaque="true" | ||
86 | name="Translate Text" > | ||
87 | <on_click function="textfield_translate" translate="true" userdata="ru" /> | ||
88 | <on_enable function="textfield_translate_enable" /> | ||
89 | </menu_item_call> | ||
90 | <menu_item_call label="Turkish" mouse_opaque="true" | ||
91 | name="Translate Text" > | ||
92 | <on_click function="textfield_translate" translate="true" userdata="tr" /> | ||
93 | <on_enable function="textfield_translate_enable" /> | ||
94 | </menu_item_call> | ||
95 | <menu_item_call label="Ukrainian" mouse_opaque="true" | ||
96 | name="Translate Text" > | ||
97 | <on_click function="textfield_translate" translate="true" userdata="uk" /> | ||
98 | <on_enable function="textfield_translate_enable" /> | ||
99 | </menu_item_call> | ||
100 | <menu_item_call label="Chinese" mouse_opaque="true" | ||
101 | name="Translate Text" > | ||
102 | <on_click function="textfield_translate" translate="true" userdata="zh" /> | ||
103 | <on_enable function="textfield_translate_enable" /> | ||
104 | </menu_item_call> | ||
105 | <menu_item_call label="Japanese" mouse_opaque="true" | ||
106 | name="Translate Text" > | ||
107 | <on_click function="textfield_translate" translate="true" userdata="ja" /> | ||
108 | <on_enable function="textfield_translate_enable" /> | ||
109 | </menu_item_call> | ||
110 | <menu_item_call label="Korean" mouse_opaque="true" | ||
111 | name="Translate Text" > | ||
112 | <on_click function="textfield_translate" translate="true" userdata="ko" /> | ||
113 | <on_enable function="textfield_translate_enable" /> | ||
114 | </menu_item_call> | ||
115 | </menu> | ||
116 | </menu> | ||
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_directory.xml b/linden/indra/newview/skins/default/xui/en-us/floater_directory.xml index 0424b72..1ea4574 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_directory.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_directory.xml | |||
@@ -726,6 +726,10 @@ To buy direct, visit the land and click on the place name in the title bar. | |||
726 | mouse_opaque="true" name="result_text" v_pad="0" width="328" /> | 726 | mouse_opaque="true" name="result_text" v_pad="0" width="328" /> |
727 | </panel> | 727 | </panel> |
728 | </tab_container> | 728 | </tab_container> |
729 | <check_box name="save_results_check" label="Save search results" | ||
730 | bottom="-37" right="-80" height="16" width="80" | ||
731 | follows="right|top" font="SansSerifSmall" control_name="SaveSearchResults" | ||
732 | initial_value="false" mouse_opaque="true" /> | ||
729 | <panel bottom="-580" follows="right|top" height="490" left="340" | 733 | <panel bottom="-580" follows="right|top" height="490" left="340" |
730 | name="classified_details_panel" width="440" /> | 734 | name="classified_details_panel" width="440" /> |
731 | <panel bottom="-580" follows="right|top" height="506" left="350" name="Panel Avatar" | 735 | <panel bottom="-580" follows="right|top" height="506" left="350" name="Panel Avatar" |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_grid_default_selector.xml b/linden/indra/newview/skins/default/xui/en-us/floater_grid_default_selector.xml index 3c26d30..157588d 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_grid_default_selector.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_grid_default_selector.xml | |||
@@ -7,10 +7,11 @@ | |||
7 | Or use the Grid Manager to add a new one | 7 | Or use the Grid Manager to add a new one |
8 | </text> | 8 | </text> |
9 | <scroll_list background_visible="true" bottom_delta="30" draw_border="true" | 9 | <scroll_list background_visible="true" bottom_delta="30" draw_border="true" |
10 | draw_stripes="false" sort_column="0" | 10 | draw_stripes="false" sort_column="1" |
11 | follows="top|left|bottom" height="280" left="10" multi_select="false" | 11 | follows="top|left|bottom" height="280" left="10" multi_select="false" |
12 | name="grid_list" width="240"> | 12 | name="grid_list" width="240"> |
13 | <column label="" name="grid" width="230" /> | 13 | <column label="" name="grid_nick" width="0" /> |
14 | <column label="" name="grid_name" width="230" /> | ||
14 | </scroll_list> | 15 | </scroll_list> |
15 | <button bottom="5" follows="bottom|right" height="20" label="Cancel" | 16 | <button bottom="5" follows="bottom|right" height="20" label="Cancel" |
16 | right="-5" name="btn_cancel" width="85" /> | 17 | right="-5" name="btn_cancel" width="85" /> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_grid_manager.xml b/linden/indra/newview/skins/default/xui/en-us/floater_grid_manager.xml index f635d59..bc07373 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_grid_manager.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_grid_manager.xml | |||
@@ -1,90 +1,112 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <floater can_close="true" can_drag_on_left="false" can_minimize="false" | 2 | <floater can_close="true" can_drag_on_left="false" can_minimize="false" |
3 | can_resize="true" height="400" min_height="400" min_width="600" | 3 | can_resize="true" height="420" min_height="420" min_width="600" |
4 | name="floater_login" title="Grid Manager" width="600"> | 4 | name="floater_login" title="Grid Manager" width="600"> |
5 | 5 | ||
6 | <!-- Grid Selector --> | 6 | <!-- GRID LIST --> |
7 | |||
7 | <text type="string" length="1" enabled="true" name="grid_selector_label" | 8 | <text type="string" length="1" enabled="true" name="grid_selector_label" |
8 | height="16" width="100" left="10" top="-18" | 9 | height="16" width="100" left="10" top="-18" |
9 | h_pad="0" v_pad="0" halign="left" | 10 | h_pad="0" v_pad="0" halign="left" |
10 | font="SansSerif" | 11 | font="SansSerif" |
11 | follows="left|top" bg_visible="false" border_visible="false" mouse_opaque="true" | 12 | follows="left|top" bg_visible="false" border_visible="false" mouse_opaque="true" |
12 | drop_shadow_visible="true" border_drop_shadow_visible="false"> | 13 | drop_shadow_visible="true" border_drop_shadow_visible="false"> |
13 | Select a Grid: | 14 | Select a Grid: |
14 | </text> | 15 | </text> |
15 | 16 | ||
16 | <scroll_list background_visible="true" bottom_delta="65" draw_border="true" | 17 | <scroll_list background_visible="true" bottom_delta="65" draw_border="true" |
17 | draw_stripes="false" sort_column="0" | 18 | draw_stripes="false" sort_column="1" |
18 | follows="top|left|bottom" height="300" left="10" multi_select="false" | 19 | follows="top|left|bottom" height="320" left="10" multi_select="false" |
19 | name="grid_selector" width="170"> | 20 | name="grid_selector" width="200"> |
20 | <column label="Grid List" name="grid" width="170" /> | 21 | <column label="Grid List" name="grid_nick" width="0" /> |
22 | <column label="Grid List" name="grid_name" width="200" /> | ||
21 | </scroll_list> | 23 | </scroll_list> |
22 | 24 | ||
23 | <!-- Grid Selector Buttons --> | 25 | <!-- GRID BUTTONS --> |
26 | |||
24 | <button label="Add New Grid" enabled="true" name="btn_add" | 27 | <button label="Add New Grid" enabled="true" name="btn_add" |
25 | height="18" width="150" left="10" bottom_delta="-22" | 28 | height="18" width="150" left="35" bottom_delta="-22" |
26 | halign="center" | 29 | halign="center" |
27 | follows="left|bottom" scale_image="true" | 30 | follows="left|bottom" scale_image="true" |
28 | font="SansSerifSmall" mouse_opaque="true" /> | 31 | font="SansSerifSmall" mouse_opaque="true" /> |
29 | <button label="Duplicate Grid" enabled="true" name="btn_copy" | 32 | <button label="Duplicate Grid" enabled="true" name="btn_copy" |
30 | height="18" width="150" left_delta="0" bottom_delta="-20" | 33 | height="18" width="150" left_delta="0" bottom_delta="-20" |
31 | halign="center" | 34 | halign="center" |
32 | follows="left|bottom" scale_image="true" | 35 | follows="left|bottom" scale_image="true" |
33 | font="SansSerifSmall" mouse_opaque="true" /> | 36 | font="SansSerifSmall" mouse_opaque="true" /> |
34 | <button label="Delete Grid" enabled="true" name="btn_delete" | 37 | <button label="Delete Grid" enabled="true" name="btn_delete" |
35 | height="18" width="150" left_delta="0" bottom_delta="-20" | 38 | height="18" width="150" left_delta="0" bottom_delta="-20" |
36 | halign="center" | 39 | halign="center" |
37 | follows="left|bottom" scale_image="true" | 40 | follows="left|bottom" scale_image="true" |
38 | font="SansSerifSmall" mouse_opaque="true" /> | 41 | font="SansSerifSmall" mouse_opaque="true" /> |
39 | 42 | ||
40 | <!-- Grid Details --> | 43 | <!-- GRID NAME AND NICK --> |
44 | |||
45 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
46 | bottom="365" drop_shadow_visible="true" follows="left|top" | ||
47 | font="SansSerif" h_pad="0" halign="left" height="16" | ||
48 | left="220" mouse_opaque="true" name="gridnick_text" v_pad="0" width="120"> | ||
49 | Grid nick (unique): | ||
50 | </text> | ||
51 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" | ||
52 | follows="left|top|right" font="SansSerif" handle_edit_keys_directly="true" | ||
53 | height="20" max_height="20" left_delta="110" max_length="40" mouse_opaque="true" | ||
54 | name="gridnick" select_all_on_focus_received="true" width="260" label="required" /> | ||
41 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 55 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
42 | top="-45" drop_shadow_visible="true" follows="left|top" | 56 | bottom_delta="-23" drop_shadow_visible="true" follows="left|top" |
43 | font="SansSerif" h_pad="0" halign="left" height="16" | 57 | font="SansSerif" h_pad="0" halign="left" height="16" |
44 | left="195" mouse_opaque="true" name="gridnick_text" v_pad="0" width="120"> | 58 | left="220" mouse_opaque="true" name="gridname_text" v_pad="0" width="120"> |
45 | Grid name: | 59 | Grid name: |
46 | </text> | 60 | </text> |
47 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="335" | 61 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" |
48 | follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="true" | 62 | follows="left|top|right" font="SansSerif" handle_edit_keys_directly="true" |
49 | height="20" max_height="20" left_delta="90" max_length="40" mouse_opaque="true" | 63 | height="20" max_height="20" left_delta="110" max_length="40" mouse_opaque="true" |
50 | name="gridnick" select_all_on_focus_received="true" width="300" /> | 64 | name="gridname" select_all_on_focus_received="true" width="260" label="required" /> |
51 | |||
52 | 65 | ||
53 | <!-- | 66 | <!-- NAME AND PASSWORD --> |
67 | |||
54 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 68 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
55 | bottom_delta="-23" drop_shadow_visible="true" follows="left|top" | 69 | bottom="315" drop_shadow_visible="true" follows="left|top" |
56 | font="SansSerif" h_pad="0" halign="left" height="16" | 70 | font="SansSerif" h_pad="0" halign="left" height="16" |
57 | left_delta="-90" mouse_opaque="true" name="first_name_text" v_pad="0" width="100"> | 71 | left="220" mouse_opaque="true" name="first_name_text" v_pad="0" width="100"> |
58 | First Name: | 72 | First Name: |
59 | </text> | 73 | </text> |
60 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" | 74 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" |
61 | follows="left|top|right" font="SansSerif" handle_edit_keys_directly="true" | 75 | follows="left|top|right" font="SansSerif" handle_edit_keys_directly="true" |
62 | height="20" left_delta="90" max_length="45" mouse_opaque="true" | 76 | height="20" left_delta="110" max_length="45" mouse_opaque="true" |
63 | name="first_name" select_all_on_focus_received="true" width="200" /> | 77 | name="first_name" select_all_on_focus_received="true" width="200" /> |
64 | |||
65 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 78 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
66 | bottom_delta="-23" drop_shadow_visible="true" follows="left|top" | 79 | bottom_delta="-23" drop_shadow_visible="true" follows="left|top" |
80 | font="SansSerif" h_pad="0" halign="left" height="16" | ||
81 | left_delta="-110" mouse_opaque="true" name="username_text" v_pad="0" width="100"> | ||
82 | Username: | ||
83 | </text> | ||
84 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" | ||
85 | follows="left|top|right" font="SansSerif" handle_edit_keys_directly="true" | ||
86 | height="20" left_delta="110" max_length="45" mouse_opaque="true" | ||
87 | name="username" select_all_on_focus_received="true" width="200" /> | ||
88 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
89 | bottom_delta="0" drop_shadow_visible="true" follows="left|top" | ||
67 | font="SansSerif" h_pad="0" halign="left" height="16" | 90 | font="SansSerif" h_pad="0" halign="left" height="16" |
68 | left_delta="-90" mouse_opaque="true" name="last_name_text" v_pad="0" width="100"> | 91 | left_delta="-110" mouse_opaque="true" name="last_name_text" v_pad="0" width="100"> |
69 | Last Name: | 92 | Last Name: |
70 | </text> | 93 | </text> |
71 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" | 94 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" |
72 | follows="left|top|right" font="SansSerif" handle_edit_keys_directly="true" | 95 | follows="left|top|right" font="SansSerif" handle_edit_keys_directly="true" |
73 | height="20" left_delta="90" max_length="45" mouse_opaque="true" | 96 | height="20" left_delta="110" max_length="45" mouse_opaque="true" |
74 | name="last_name" select_all_on_focus_received="true" width="200" /> | 97 | name="last_name" select_all_on_focus_received="true" width="200" /> |
75 | |||
76 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 98 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
77 | bottom_delta="-23" drop_shadow_visible="true" follows="left|top" | 99 | bottom_delta="-23" drop_shadow_visible="true" follows="left|top" |
78 | font="SansSerif" h_pad="0" halign="left" height="16" | 100 | font="SansSerif" h_pad="0" halign="left" height="16" |
79 | left_delta="-90" mouse_opaque="true" name="avatar_password_text" v_pad="0" width="120"> | 101 | left_delta="-110" mouse_opaque="true" name="avatar_password_text" v_pad="0" width="120"> |
80 | Password: | 102 | Password: |
81 | </text> | 103 | </text> |
82 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" | 104 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" |
83 | follows="left|top|right" font="SansSerif" handle_edit_keys_directly="true" | 105 | follows="left|top|right" font="SansSerif" handle_edit_keys_directly="true" |
84 | height="20" left_delta="90" max_length="16" mouse_opaque="true" | 106 | height="20" left_delta="110" max_length="16" mouse_opaque="true" |
85 | name="avatar_password" select_all_on_focus_received="true" width="200" /> | 107 | name="avatar_password" select_all_on_focus_received="true" width="200" /> |
86 | 108 | ||
87 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 109 | <!--<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
88 | bottom_delta="-22" drop_shadow_visible="true" follows="left|top" | 110 | bottom_delta="-22" drop_shadow_visible="true" follows="left|top" |
89 | font="SansSerif" h_pad="0" halign="left" height="16" | 111 | font="SansSerif" h_pad="0" halign="left" height="16" |
90 | left_delta="-90" mouse_opaque="true" name="start_location_text" v_pad="0" | 112 | left_delta="-90" mouse_opaque="true" name="start_location_text" v_pad="0" |
@@ -105,112 +127,110 @@ | |||
105 | </combo_item> | 127 | </combo_item> |
106 | </combo_box> | 128 | </combo_box> |
107 | --> | 129 | --> |
130 | |||
131 | <!-- LOGIN URI STUFF --> | ||
108 | 132 | ||
109 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 133 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
110 | bottom_delta="-30" drop_shadow_visible="true" follows="left|top" | 134 | bottom_delta="-30" drop_shadow_visible="true" follows="left|top" |
111 | font="SansSerif" h_pad="0" halign="left" height="16" | 135 | font="SansSerif" h_pad="0" halign="left" height="16" |
112 | left_delta="-90" mouse_opaque="true" name="loginuri_text" v_pad="0" width="120"> | 136 | left_delta="-110" mouse_opaque="true" name="loginuri_text" v_pad="0" width="120"> |
113 | Login URI: | 137 | Login URI: |
114 | </text> | 138 | </text> |
115 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" | 139 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" |
116 | follows="left|top|right" font="SansSerif" handle_edit_keys_directly="true" | 140 | follows="left|top|right" font="SansSerif" handle_edit_keys_directly="true" |
117 | height="20" left_delta="90" max_length="255" mouse_opaque="true" | 141 | height="20" left_delta="110" max_length="255" mouse_opaque="true" |
118 | name="loginuri" select_all_on_focus_received="true" width="300" /> | 142 | name="loginuri" select_all_on_focus_received="true" width="260" label="required" /> |
119 | 143 | ||
120 | <button label="Get Grid Info" enabled="true" name="btn_gridinfo" | 144 | <button label="Get Grid Info" enabled="true" name="btn_gridinfo" |
121 | height="18" width="100" bottom_delta="-25" left_delta="0" | 145 | height="18" width="100" bottom_delta="-38" left_delta="0" |
122 | halign="center" follows="left|top" scale_image="true" | 146 | halign="center" follows="left|top" scale_image="true" |
123 | font="SansSerifSmall" mouse_opaque="true" /> | 147 | font="SansSerifSmall" mouse_opaque="true" /> |
124 | <button bottom_delta="0" follows="left|top" font="SansSerifSmall" halign="center" | 148 | <button bottom_delta="0" follows="left|top" font="SansSerifSmall" halign="center" |
125 | height="18" label="Clear Info" left_delta="104" | 149 | height="18" label="Clear Info" left_delta="104" |
126 | mouse_opaque="true" name="btn_clear" scale_image="true" width="100" /> | 150 | mouse_opaque="true" name="btn_clear" scale_image="true" width="100" /> |
127 | 151 | ||
152 | <!-- LOGIN URI RETURN URLS--> | ||
153 | |||
128 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 154 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
129 | bottom_delta="-30" drop_shadow_visible="true" follows="left|top" | 155 | bottom_delta="-25" drop_shadow_visible="true" follows="left|top" |
130 | font="SansSerif" h_pad="0" halign="left" height="16" | 156 | font="SansSerifSmall" h_pad="0" halign="left" height="16" |
131 | left="195" mouse_opaque="true" name="loginpage_text" v_pad="0" width="120"> | 157 | left="230" mouse_opaque="true" name="loginpage_text" v_pad="0" width="120"> |
132 | Grid Info URLs: | ||
133 | </text> | ||
134 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
135 | bottom_delta="-28" drop_shadow_visible="true" follows="left|top" | ||
136 | font="SansSerifSmall" h_pad="0" halign="left" height="16" | ||
137 | left="205" mouse_opaque="true" name="loginpage_text" v_pad="0" width="120"> | ||
138 | Login page: | 158 | Login page: |
139 | </text> | 159 | </text> |
140 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" | 160 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" |
141 | follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="true" | 161 | follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="true" |
142 | height="20" left_delta="90" max_length="255" mouse_opaque="true" | 162 | height="20" left_delta="100" max_length="255" mouse_opaque="true" |
143 | name="loginpage" select_all_on_focus_received="true" width="280" /> | 163 | name="loginpage" select_all_on_focus_received="true" width="250" /> |
144 | 164 | ||
145 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 165 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
146 | bottom_delta="-22" drop_shadow_visible="true" follows="left|top" | 166 | bottom_delta="-22" drop_shadow_visible="true" follows="left|top" |
147 | font="SansSerifSmall" h_pad="0" halign="left" height="16" | 167 | font="SansSerifSmall" h_pad="0" halign="left" height="16" |
148 | left_delta="-90" mouse_opaque="true" name="helperuri_text" v_pad="0" width="120"> | 168 | left_delta="-100" mouse_opaque="true" name="helperuri_text" v_pad="0" width="120"> |
149 | Helper URI: | 169 | Helper URI: |
150 | </text> | 170 | </text> |
151 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" | 171 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" |
152 | follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="true" | 172 | follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="true" |
153 | height="20" left_delta="90" max_length="255" mouse_opaque="true" | 173 | height="20" left_delta="100" max_length="255" mouse_opaque="true" |
154 | name="helperuri" select_all_on_focus_received="true" width="280" /> | 174 | name="helperuri" select_all_on_focus_received="true" width="250" /> |
155 | 175 | ||
156 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 176 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
157 | bottom_delta="-22" drop_shadow_visible="true" follows="left|top" | 177 | bottom_delta="-22" drop_shadow_visible="true" follows="left|top" |
158 | font="SansSerifSmall" h_pad="0" halign="left" height="16" | 178 | font="SansSerifSmall" h_pad="0" halign="left" height="16" |
159 | left_delta="-90" mouse_opaque="true" name="website_text" v_pad="0" width="120"> | 179 | left_delta="-100" mouse_opaque="true" name="website_text" v_pad="0" width="120"> |
160 | Website: | 180 | Website: |
161 | </text> | 181 | </text> |
162 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" | 182 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" |
163 | follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="true" | 183 | follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="true" |
164 | height="20" left_delta="90" max_length="255" mouse_opaque="true" | 184 | height="20" left_delta="100" max_length="255" mouse_opaque="true" |
165 | name="website" select_all_on_focus_received="true" width="280" /> | 185 | name="website" select_all_on_focus_received="true" width="250" /> |
166 | 186 | ||
167 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 187 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
168 | bottom_delta="-22" drop_shadow_visible="true" follows="left|top" | 188 | bottom_delta="-22" drop_shadow_visible="true" follows="left|top" |
169 | font="SansSerifSmall" h_pad="0" halign="left" height="16" | 189 | font="SansSerifSmall" h_pad="0" halign="left" height="16" |
170 | left_delta="-90" mouse_opaque="true" name="support_text" v_pad="0" width="120"> | 190 | left_delta="-100" mouse_opaque="true" name="support_text" v_pad="0" width="120"> |
171 | Support: | 191 | Support: |
172 | </text> | 192 | </text> |
173 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" | 193 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" |
174 | follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="true" | 194 | follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="true" |
175 | height="20" left_delta="90" max_length="255" mouse_opaque="true" | 195 | height="20" left_delta="100" max_length="255" mouse_opaque="true" |
176 | name="support" select_all_on_focus_received="true" width="280" /> | 196 | name="support" select_all_on_focus_received="true" width="250" /> |
177 | 197 | ||
178 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 198 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
179 | bottom_delta="-22" drop_shadow_visible="true" follows="left|top" | 199 | bottom_delta="-22" drop_shadow_visible="true" follows="left|top" |
180 | font="SansSerifSmall" h_pad="0" halign="left" height="16" | 200 | font="SansSerifSmall" h_pad="0" halign="left" height="16" |
181 | left_delta="-90" mouse_opaque="true" name="register_text" v_pad="0" width="120"> | 201 | left_delta="-100" mouse_opaque="true" name="register_text" v_pad="0" width="120"> |
182 | Account: | 202 | Account: |
183 | </text> | 203 | </text> |
184 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" | 204 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" |
185 | follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="true" | 205 | follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="true" |
186 | height="20" left_delta="90" max_length="255" mouse_opaque="true" | 206 | height="20" left_delta="100" max_length="255" mouse_opaque="true" |
187 | name="register" select_all_on_focus_received="true" width="280" /> | 207 | name="register" select_all_on_focus_received="true" width="250" /> |
188 | 208 | ||
189 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 209 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
190 | bottom_delta="-22" drop_shadow_visible="true" follows="left|top" | 210 | bottom_delta="-22" drop_shadow_visible="true" follows="left|top" |
191 | font="SansSerifSmall" h_pad="0" halign="left" height="16" | 211 | font="SansSerifSmall" h_pad="0" halign="left" height="16" |
192 | left_delta="-90" mouse_opaque="true" name="password_text" v_pad="0" width="120"> | 212 | left_delta="-100" mouse_opaque="true" name="password_text" v_pad="0" width="120"> |
193 | Password: | 213 | Password: |
194 | </text> | 214 | </text> |
195 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" | 215 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" |
196 | follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="true" | 216 | follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="true" |
197 | height="20" left_delta="90" max_length="255" mouse_opaque="true" | 217 | height="20" left_delta="100" max_length="255" mouse_opaque="true" |
198 | name="password" select_all_on_focus_received="true" width="280" /> | 218 | name="password" select_all_on_focus_received="true" width="250" /> |
199 | 219 | ||
200 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 220 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
201 | bottom_delta="-22" drop_shadow_visible="true" follows="left|top" | 221 | bottom_delta="-22" drop_shadow_visible="true" follows="left|top" |
202 | font="SansSerifSmall" h_pad="0" halign="left" height="16" | 222 | font="SansSerifSmall" h_pad="0" halign="left" height="16" |
203 | left_delta="-90" mouse_opaque="true" name="websearch_text" v_pad="0" width="120"> | 223 | left_delta="-100" mouse_opaque="true" name="search_text" v_pad="0" width="120"> |
204 | Web Search: | 224 | Web Search: |
205 | </text> | 225 | </text> |
206 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" | 226 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" |
207 | follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="true" | 227 | follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="true" |
208 | height="20" left_delta="90" max_length="255" mouse_opaque="true" | 228 | height="20" left_delta="100" max_length="255" mouse_opaque="true" |
209 | name="search" select_all_on_focus_received="true" width="280" /> | 229 | name="search" select_all_on_focus_received="true" width="250" /> |
210 | 230 | ||
211 | <view_border bevel_style="none" border_thickness="1" bottom_delta="-10" | 231 | <view_border bevel_style="none" border_thickness="1" bottom_delta="-10" |
212 | follows="top|left|right" height="168" left="195" | 232 | follows="top|left|right" height="193" left="220" |
213 | name="OptionalPrefsBorder" width="390" /> | 233 | name="OptionalPrefsBorder" width="370" /> |
214 | 234 | ||
215 | <!-- Combo box for multi avatar grid manager avatar name | 235 | <!-- Combo box for multi avatar grid manager avatar name |
216 | <combo_box allow_text_entry="true" bevel_style="in" border_style="line" border_thickness="1" | 236 | <combo_box allow_text_entry="true" bevel_style="in" border_style="line" border_thickness="1" |
@@ -236,39 +256,32 @@ | |||
236 | initial_value="false" label="Global Avatar" | 256 | initial_value="false" label="Global Avatar" |
237 | left_delta="0" mouse_opaque="true" name="global_check" width="138" /> | 257 | left_delta="0" mouse_opaque="true" name="global_check" width="138" /> |
238 | 258 | ||
239 | <check_box bottom="10" follows="left|bottom" font="SansSerifSmall" height="16" | 259 | <check_box bottom="10" follows="left|top" font="SansSerifSmall" height="16" |
240 | initial_value="false" label="Remember password" | 260 | initial_value="false" label="Remember password" |
241 | left_delta="165" mouse_opaque="true" name="remember_check" width="138" /> | 261 | left_delta="165" mouse_opaque="true" name="remember_check" width="138" /> |
242 | 262 | ||
243 | <check_box bottom="10" follows="left|bottom" font="SansSerifSmall" height="16" | 263 | <check_box bottom="10" follows="left|top" font="SansSerifSmall" height="16" |
244 | initial_value="false" label="secret level" | 264 | initial_value="false" label="secret level" |
245 | left_delta="165" mouse_opaque="true" name="gawd_mode" width="138" /> | 265 | left_delta="165" mouse_opaque="true" name="gawd_mode" width="138" /> |
246 | --> | 266 | --> |
247 | 267 | ||
248 | <!-- Cancel/Connect Buttons --> | 268 | <!-- Cancel/Connect Buttons --> |
249 | 269 | ||
250 | <!-- | ||
251 | <button bottom="-44" follows="right|top" font="SansSerif" halign="center" | ||
252 | height="24" label="Set as Default" label_selected="Set as Default" | ||
253 | left="470" mouse_opaque="true" name="set_default" scale_image="TRUE" | ||
254 | width="110" /> | ||
255 | --> | ||
256 | |||
257 | <!-- <button bottom="28" follows="right|bottom" font="SansSerif" halign="center" | 270 | <!-- <button bottom="28" follows="right|bottom" font="SansSerif" halign="center" |
258 | height="24" label="Connect" label_selected="Connect" | 271 | height="24" label="Connect" label_selected="Connect" |
259 | left="280" mouse_opaque="true" name="connect_btn" scale_image="TRUE" | 272 | left="280" mouse_opaque="true" name="connect_btn" scale_image="TRUE" |
260 | width="100" /> --> | 273 | width="100" /> --> |
261 | <button bottom="2" follows="right|bottom" font="SansSerif" halign="center" | 274 | <button bottom="2" follows="right|bottom" font="SansSerif" halign="center" |
262 | height="24" label="Apply" label_selected="Apply" left="-108" | 275 | height="24" label="Apply" label_selected="Apply" left="-108" |
263 | mouse_opaque="true" name="btn_apply" scale_image="TRUE" width="100" /> | 276 | mouse_opaque="true" name="btn_apply" scale_image="TRUE" width="100" /> |
264 | <button bottom="2" follows="right|bottom" font="SansSerif" halign="center" | 277 | <button bottom="2" follows="right|bottom" font="SansSerif" halign="center" |
265 | height="24" label="Cancel" label_selected="Cancel" left_delta="-104" | 278 | height="24" label="Cancel" label_selected="Cancel" left_delta="-104" |
266 | mouse_opaque="true" name="btn_cancel" scale_image="TRUE" width="100" /> | 279 | mouse_opaque="true" name="btn_cancel" scale_image="TRUE" width="100" /> |
267 | <button bottom="2" follows="right|bottom" font="SansSerif" halign="center" | 280 | <button bottom="2" follows="right|bottom" font="SansSerif" halign="center" |
268 | height="24" label="OK" label_selected="OK" left_delta="-104" | 281 | height="24" label="OK" label_selected="OK" left_delta="-104" |
269 | mouse_opaque="true" name="btn_ok" scale_image="TRUE" width="100" /> | 282 | mouse_opaque="true" name="btn_ok" scale_image="TRUE" width="100" /> |
270 | <!-- | 283 | <!-- |
271 | <combo_box allow_text_entry="true" bottom="32" follows="left|bottom" height="18" | 284 | <combo_box allow_text_entry="true" bottom="32" follows="left|top" height="18" |
272 | left_delta="135" max_chars="40" mouse_opaque="true" | 285 | left_delta="135" max_chars="40" mouse_opaque="true" |
273 | name="server_combo" width="200" /> | 286 | name="server_combo" width="200" /> |
274 | --> | 287 | --> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_inspect.xml b/linden/indra/newview/skins/default/xui/en-us/floater_inspect.xml index fbb1133..5e9cacd 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_inspect.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_inspect.xml | |||
@@ -1,6 +1,6 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true" | 2 | <floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true" |
3 | min_height="300" min_width="400" name="inspect" | 3 | min_height="300" min_width="550" name="inspect" |
4 | rect_control="FloaterInspectRect" title="Inspect Objects"> | 4 | rect_control="FloaterInspectRect" title="Inspect Objects"> |
5 | <scroll_list bottom="30" can_resize="false" column_padding="0" draw_heading="true" | 5 | <scroll_list bottom="30" can_resize="false" column_padding="0" draw_heading="true" |
6 | follows="top|right|left|bottom" left="10" multi_select="false" | 6 | follows="top|right|left|bottom" left="10" multi_select="false" |
@@ -9,16 +9,26 @@ | |||
9 | top="-20"> | 9 | top="-20"> |
10 | <column dynamicwidth="true" label="Object Name" name="object_name" /> | 10 | <column dynamicwidth="true" label="Object Name" name="object_name" /> |
11 | <column dynamicwidth="true" label="Owner Name" name="owner_name" /> | 11 | <column dynamicwidth="true" label="Owner Name" name="owner_name" /> |
12 | <column dynamicwidth="true" label="Last Owner Name" name="last_owner_name" /> | ||
12 | <column dynamicwidth="true" label="Creator Name" name="creator_name" /> | 13 | <column dynamicwidth="true" label="Creator Name" name="creator_name" /> |
14 | <column label="Faces" name="face_num" width="70" /> | ||
15 | <column label="Vertices" name="vertex_num" width="70" /> | ||
16 | <column label="Scripts" name="script_num" width="70" /> | ||
17 | <column label="Inv Total" name="inv_num" width="70" /> | ||
13 | <column label="Creation Date" name="creation_date" width="150" /> | 18 | <column label="Creation Date" name="creation_date" width="150" /> |
14 | </scroll_list> | 19 | </scroll_list> |
15 | <button bottom="5" follows="left|bottom" font="SansSerif" halign="center" height="20" | 20 | <button bottom="5" follows="left|bottom" font="SansSerif" halign="center" height="20" |
16 | label="See Owner Profile..." label_selected="" left="10" | 21 | label="Owner Profile" label_selected="" left="10" |
17 | mouse_opaque="true" name="button owner" | 22 | mouse_opaque="true" name="button owner" |
18 | tool_tip="See profile of the highlighted object's owner" width="150" /> | 23 | tool_tip="See profile of the highlighted object's owner" width="130" /> |
19 | <button bottom="5" follows="left|bottom" font="SansSerif" halign="center" height="20" | 24 | <button bottom="5" follows="left|bottom" font="SansSerif" halign="center" height="20" |
20 | label="See Creator Profile..." label_selected="" left="170" | 25 | label="Last Owner Profile" label_selected="" left="150" |
26 | mouse_opaque="true" name="button_last_owner" | ||
27 | tool_tip="See profile of the highlighted object's last owner" | ||
28 | width="130" /> | ||
29 | <button bottom="5" follows="left|bottom" font="SansSerif" halign="center" height="20" | ||
30 | label="Creator Profile" label_selected="" left="290" | ||
21 | mouse_opaque="true" name="button creator" | 31 | mouse_opaque="true" name="button creator" |
22 | tool_tip="See profile of the highlighted object's original creator" | 32 | tool_tip="See profile of the highlighted object's original creator" |
23 | width="150" /> | 33 | width="130" /> |
24 | </floater> | 34 | </floater> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_radar.xml b/linden/indra/newview/skins/default/xui/en-us/floater_radar.xml new file mode 100644 index 0000000..7db7330 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/en-us/floater_radar.xml | |||
@@ -0,0 +1,327 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes"?> | ||
2 | <floater name="radar" title="Radar" | ||
3 | can_resize="true" can_minimize="true" can_close="true" can_drag_on_left="false" | ||
4 | rect_control="FloaterRadarRect" min_width="300" min_height="300"> | ||
5 | |||
6 | <scroll_list name="avatar_list" | ||
7 | left="10" right="-10" top="-20" bottom="140" can_resize="true" | ||
8 | column_padding="0" follows="left|top|bottom|right" | ||
9 | draw_heading="true" multi_select="true" search_column="1" | ||
10 | tool_tip="Hold shift or control while clicking to select multiple avatars"> | ||
11 | <column name="marked" label="Mark" width="12" tool_tip="Marked avatars"/> | ||
12 | <column name="avatar_name" label="Name" dynamicwidth="true" tool_tip="Hold shift or control while clicking to select multiple avatars"/> | ||
13 | <column name="distance" label="Dist." width="48" tool_tip="Distance from your avatar (red=within chat range, yellow=within shout range, green=within draw distance)"/> | ||
14 | <column name="position" label="Pos." width="60" tool_tip="Position (X, Y) within this sim, or general direction (cardinal point) for outside sims"/> | ||
15 | <column name="altitude" label="Alt." width="48" tool_tip="Altitude"/> | ||
16 | </scroll_list> | ||
17 | |||
18 | <tab_container border="false" bottom_delta="-130" height="120" left="6" mouse_opaque="false" | ||
19 | name="actions_tab_container" tab_position="top" follows="left|right|bottom"> | ||
20 | <panel border="true" bottom_delta="-130" follows="left|top|right|bottom" height="255" | ||
21 | label="Avatar" left="1" mouse_opaque="true" | ||
22 | name="actions_tab" width="398"> | ||
23 | <!-- upper row --> | ||
24 | <button | ||
25 | name="profile_btn" | ||
26 | label="Profile" | ||
27 | tool_tip="Show picture, groups, and other information" | ||
28 | left="10" | ||
29 | bottom_delta="-180" | ||
30 | width="80" | ||
31 | height="20" | ||
32 | font="SansSerifSmall" | ||
33 | follows="bottom|left" | ||
34 | /> | ||
35 | <button | ||
36 | name="track_btn" | ||
37 | label="(Un)Track" | ||
38 | tool_tip="Toggle tracking of this avatar's position" | ||
39 | left_delta="90" | ||
40 | bottom_delta="0" | ||
41 | width="80" | ||
42 | height="20" | ||
43 | font="SansSerifSmall" | ||
44 | follows="bottom|left" | ||
45 | /> | ||
46 | <button | ||
47 | name="get_key_btn" | ||
48 | label="Get Key" | ||
49 | tool_tip="Copies avatar's key to the clipboard" | ||
50 | left_delta="90" | ||
51 | bottom_delta="0" | ||
52 | width="80" | ||
53 | height="20" | ||
54 | font="SansSerifSmall" | ||
55 | follows="bottom|left" | ||
56 | /> | ||
57 | <!-- upper middle row --> | ||
58 | <button | ||
59 | name="im_btn" | ||
60 | label="IM" | ||
61 | tool_tip="Open Instant Message session" | ||
62 | left="10" | ||
63 | bottom_delta="-22" | ||
64 | width="80" | ||
65 | height="20" | ||
66 | font="SansSerifSmall" | ||
67 | follows="bottom|left" | ||
68 | /> | ||
69 | <button | ||
70 | name="offer_btn" | ||
71 | label="Offer TP" | ||
72 | tool_tip="Offer Teleport" | ||
73 | left_delta="90" | ||
74 | bottom_delta="0" | ||
75 | width="80" | ||
76 | height="20" | ||
77 | font="SansSerifSmall" | ||
78 | follows="bottom|left" | ||
79 | /> | ||
80 | <button | ||
81 | name="teleport_btn" | ||
82 | label="TP to" | ||
83 | tool_tip="Teleport to avatar's position" | ||
84 | left_delta="90" | ||
85 | bottom_delta="0" | ||
86 | width="80" | ||
87 | height="20" | ||
88 | font="SansSerifSmall" | ||
89 | follows="bottom|left" | ||
90 | /> | ||
91 | <!-- lower middle row--> | ||
92 | <button | ||
93 | name="mark_btn" | ||
94 | label="(Un)Mark" | ||
95 | tool_tip="(Un)Mark this avatar in the list" | ||
96 | left="10" | ||
97 | bottom_delta="-22" | ||
98 | width="80" | ||
99 | height="20" | ||
100 | font="SansSerifSmall" | ||
101 | follows="bottom|left" | ||
102 | /> | ||
103 | <button | ||
104 | name="prev_marked_btn" | ||
105 | label="Prev Marked" | ||
106 | tool_tip="Focus camera on previous marked avatar" | ||
107 | left_delta="90" | ||
108 | bottom_delta="0" | ||
109 | width="80" | ||
110 | height="20" | ||
111 | font="SansSerifSmall" | ||
112 | follows="bottom|left" | ||
113 | /> | ||
114 | <button | ||
115 | name="next_marked_btn" | ||
116 | label="Next Marked" | ||
117 | tool_tip="Focus camera on next marked avatar" | ||
118 | left_delta="90" | ||
119 | bottom_delta="0" | ||
120 | width="80" | ||
121 | height="20" | ||
122 | font="SansSerifSmall" | ||
123 | follows="bottom|left" | ||
124 | /> | ||
125 | <!-- lower row--> | ||
126 | <button | ||
127 | name="focus_btn" | ||
128 | label="Focus" | ||
129 | tool_tip="Focus camera on this avatar in the list" | ||
130 | left="10" | ||
131 | bottom_delta="-22" | ||
132 | width="80" | ||
133 | height="20" | ||
134 | font="SansSerifSmall" | ||
135 | follows="bottom|left" | ||
136 | /> | ||
137 | <button | ||
138 | name="prev_in_list_btn" | ||
139 | label="Previous" | ||
140 | tool_tip="Focus camera on previous avatar in list" | ||
141 | left_delta="90" | ||
142 | bottom_delta="0" | ||
143 | width="80" | ||
144 | height="20" | ||
145 | font="SansSerifSmall" | ||
146 | follows="bottom|left" | ||
147 | /> | ||
148 | <button | ||
149 | name="next_in_list_btn" | ||
150 | label="Next" | ||
151 | tool_tip="Focus camera on next avatar in list" | ||
152 | left_delta="90" | ||
153 | bottom_delta="0" | ||
154 | width="80" | ||
155 | height="20" | ||
156 | font="SansSerifSmall" | ||
157 | follows="bottom|left" | ||
158 | /> | ||
159 | |||
160 | </panel> | ||
161 | |||
162 | <panel border="true" bottom_delta="-150" follows="left|top|right|bottom" height="255" | ||
163 | label="Alerts" left="1" mouse_opaque="true" | ||
164 | name="alerts_tab" width="398"> | ||
165 | <check_box height="16" label="Display alerts in chat" | ||
166 | left="10" bottom_delta="-176" name="radar_alerts" | ||
167 | width="200" follows="bottom|left" | ||
168 | hidden="false" mouse_opaque="true" font="SansSerifSmall" | ||
169 | initial_value="true" enabled="true" radio_style="false" | ||
170 | control_name="RadarChatAlerts" | ||
171 | tool_tip="Announce alerts about incoming and outgoing avatars in chat" /> | ||
172 | |||
173 | <check_box height="16" label="Avatars entering/exiting the sim" | ||
174 | left="20" bottom_delta="-18" name="alerts_sim" | ||
175 | width="200" follows="bottom|left" | ||
176 | hidden="false" mouse_opaque="true" font="SansSerifSmall" | ||
177 | initial_value="true" enabled="true" radio_style="false" | ||
178 | control_name="RadarAlertSim" | ||
179 | tool_tip="Report avatars entering or exiting the sim" /> | ||
180 | |||
181 | <check_box height="16" label="Avatars within/beyond the draw distance" | ||
182 | left="20" bottom_delta="-18" name="alerts_draw" | ||
183 | width="200" follows="bottom|left" | ||
184 | hidden="false" mouse_opaque="true" font="SansSerifSmall" | ||
185 | initial_value="true" enabled="true" radio_style="false" | ||
186 | control_name="RadarAlertDraw" | ||
187 | tool_tip="Report avatars getting within or beyond the draw distance" /> | ||
188 | |||
189 | <check_box height="16" label="Avatars within/beyond the shout range" | ||
190 | left="20" bottom_delta="-18" name="alerts_chat" | ||
191 | width="200" follows="bottom|left" | ||
192 | hidden="false" mouse_opaque="true" font="SansSerifSmall" | ||
193 | initial_value="true" enabled="true" radio_style="false" | ||
194 | control_name="RadarAlertShoutRange" | ||
195 | tool_tip="Report avatars getting within or beyond the shout range" /> | ||
196 | |||
197 | <check_box height="16" label="Avatars within/beyond the chat range" | ||
198 | left="20" bottom_delta="-18" name="alerts_chat" | ||
199 | width="200" follows="bottom|left" | ||
200 | hidden="false" mouse_opaque="true" font="SansSerifSmall" | ||
201 | initial_value="true" enabled="true" radio_style="false" | ||
202 | control_name="RadarAlertChatRange" | ||
203 | tool_tip="Report avatars getting within or beyond the chat range" /> | ||
204 | </panel> | ||
205 | |||
206 | <panel border="true" bottom_delta="-130" follows="left|top|right|bottom" height="255" | ||
207 | label="Moderation" left="1" mouse_opaque="true" | ||
208 | name="land_tab" width="398"> | ||
209 | |||
210 | <!-- Upper row --> | ||
211 | <button | ||
212 | name="mute_btn" | ||
213 | label="(Un)Mute" | ||
214 | tool_tip="Mute or unmute this avatar (muted avatars' names are highlighted in red in the list)." | ||
215 | left="10" | ||
216 | bottom_delta="-200" | ||
217 | width="80" | ||
218 | height="20" | ||
219 | font="SansSerifSmall" | ||
220 | follows="bottom|left" | ||
221 | /> | ||
222 | <button | ||
223 | name="freeze_btn" | ||
224 | label="Freeze" | ||
225 | tool_tip="Freeze the avatar, preventing it from moving" | ||
226 | left_delta="90" | ||
227 | bottom_delta="0" | ||
228 | width="80" | ||
229 | height="20" | ||
230 | font="SansSerifSmall" | ||
231 | follows="bottom|left" | ||
232 | /> | ||
233 | <button | ||
234 | name="ar_btn" | ||
235 | label="AR" | ||
236 | tool_tip="Report abuse on this avatar" | ||
237 | left_delta="90" | ||
238 | bottom_delta="0" | ||
239 | width="80" | ||
240 | height="20" | ||
241 | font="SansSerifSmall" | ||
242 | follows="bottom|left" | ||
243 | /> | ||
244 | <!-- Lower row --> | ||
245 | <button | ||
246 | name="eject_btn" | ||
247 | label="Eject" | ||
248 | tool_tip="Eject the avatar from the parcel" | ||
249 | left="10" | ||
250 | bottom_delta="-24" | ||
251 | width="80" | ||
252 | height="20" | ||
253 | font="SansSerifSmall" | ||
254 | follows="bottom|left" | ||
255 | /> | ||
256 | |||
257 | <button | ||
258 | name="estate_eject_btn" | ||
259 | label="Eject from estate" | ||
260 | tool_tip="Eject this avatar from the estate" | ||
261 | left_delta="90" | ||
262 | bottom_delta="0" | ||
263 | width="170" | ||
264 | height="20" | ||
265 | font="SansSerifSmall" | ||
266 | follows="bottom|left" | ||
267 | /> | ||
268 | </panel> | ||
269 | |||
270 | <panel border="true" bottom_delta="-150" follows="left|top|right|bottom" height="255" | ||
271 | label="Options" left="1" mouse_opaque="true" | ||
272 | name="options_tab" width="398"> | ||
273 | <check_box height="16" label="Update" | ||
274 | left="10" bottom_delta="-180" name="update_enabled_cb" | ||
275 | width="200" follows="bottom|left" | ||
276 | hidden="false" mouse_opaque="true" font="SansSerifSmall" | ||
277 | initial_value="true" enabled="true" radio_style="false" | ||
278 | tool_tip="Set whether the avatar list should update" /> | ||
279 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
280 | bottom_delta="-24" drop_shadow_visible="true" enabled="true" font="SansSerifSmall" height="18" left="24" | ||
281 | mouse_opaque="false" name="rate" width="30"> | ||
282 | Rate: | ||
283 | </text> | ||
284 | <radio_group draw_border="true" bottom_delta="2" left_delta="44" follows="bottom|left" width="196" height="20" | ||
285 | mouse_opaque="true" name="update_rate" control_name="RadarUpdateRate" enabled="true" | ||
286 | tool_tip="Rate of the radar updates (eats up more FPS when higher)"> | ||
287 | <radio_item type="string" length="1" bottom_delta="0" height="16" left_delta="4" mouse_opaque="true" | ||
288 | name="high" width="20" follows="bottom|left"> | ||
289 | High | ||
290 | </radio_item> | ||
291 | <radio_item type="string" length="1" bottom_delta="0" height="16" left_delta="30" mouse_opaque="true" | ||
292 | name="medium" width="25" follows="bottom|left"> | ||
293 | Medium | ||
294 | </radio_item> | ||
295 | <radio_item type="string" length="1" bottom_delta="0" height="16" left_delta="35" mouse_opaque="true" | ||
296 | name="low" width="20" follows="bottom|left"> | ||
297 | Low | ||
298 | </radio_item> | ||
299 | </radio_group> | ||
300 | <check_box height="16" label="Announce even when closed" | ||
301 | left="10" bottom_delta="-24" name="keep_open" | ||
302 | width="200" follows="bottom|left" | ||
303 | hidden="false" mouse_opaque="true" font="SansSerifSmall" | ||
304 | initial_value="true" enabled="true" radio_style="false" | ||
305 | control_name="RadarKeepOpen" | ||
306 | tool_tip="Hides floater instead of closing to still announce in chat" /> | ||
307 | <check_box height="16" label="Announce keys to HUD" | ||
308 | left="10" bottom_delta="-20" name="radar_chat_keys" | ||
309 | width="200" follows="bottom|left" | ||
310 | hidden="false" mouse_opaque="true" font="SansSerifSmall" | ||
311 | initial_value="true" enabled="true" radio_style="false" | ||
312 | control_name="RadarChatKeys" | ||
313 | tool_tip="Set whether to send keys of avatars to LSL scripts" /> | ||
314 | <button | ||
315 | name="send_keys_btn" | ||
316 | label="Announce now" | ||
317 | tool_tip="Send all keys to HUD now" | ||
318 | left_delta="150" | ||
319 | bottom_delta="-2" | ||
320 | width="100" | ||
321 | height="20" | ||
322 | font="SansSerifSmall" | ||
323 | follows="bottom|left" | ||
324 | /> | ||
325 | </panel> | ||
326 | </tab_container> | ||
327 | </floater> \ No newline at end of file | ||
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_settings_debug.xml b/linden/indra/newview/skins/default/xui/en-us/floater_settings_debug.xml index a8c0840..1dc8a5e 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_settings_debug.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_settings_debug.xml | |||
@@ -1,10 +1,12 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <floater can_close="true" can_drag_on_left="false" can_minimize="false" | 2 | <floater can_close="true" can_drag_on_left="false" can_minimize="false" |
3 | can_resize="false" height="215" name="settings_debug" | 3 | can_resize="false" height="235" name="settings_debug" |
4 | title="Debug Settings" width="350"> | 4 | title="Debug Settings" width="350"> |
5 | <combo_box allow_text_entry="true" bottom="-50" follows="top|left" font="SansSerifSmall" | 5 | <search_editor bottom="-45" height="20" name="control_search" visible="true" width="320" |
6 | left="15" label="Type here to search" /> | ||
7 | <combo_box allow_text_entry="false" bottom_delta="-30" follows="top|left" font="SansSerifSmall" | ||
6 | height="20" left="15" max_chars="255" name="settings_combo" /> | 8 | height="20" left="15" max_chars="255" name="settings_combo" /> |
7 | <text_editor bottom_delta="-75" enabled="false" height="60" width="320" hide_scrollbar="true" | 9 | <text_editor bottom_delta="-70" enabled="false" height="60" width="320" hide_scrollbar="true" |
8 | name="comment_text" word_wrap="true" /> | 10 | name="comment_text" word_wrap="true" /> |
9 | <combo_box bottom_delta="-30" follows="top|left" font="SansSerifSmall" height="20" | 11 | <combo_box bottom_delta="-30" follows="top|left" font="SansSerifSmall" height="20" |
10 | left="15" name="boolean_combo" visible="false"> | 12 | left="15" name="boolean_combo" visible="false"> |
@@ -15,7 +17,7 @@ | |||
15 | FALSE | 17 | FALSE |
16 | </combo_item> | 18 | </combo_item> |
17 | </combo_box> | 19 | </combo_box> |
18 | <line_editor bottom_delta="0" height="20" name="val_text" visible="false" width="300" /> | 20 | <line_editor bottom_delta="0" height="20" name="val_text" visible="false" width="320" /> |
19 | <color_swatch bottom="30" can_apply_immediately="true" height="55" label="Color" | 21 | <color_swatch bottom="30" can_apply_immediately="true" height="55" label="Color" |
20 | name="color_swatch" visible="true" width="37" /> | 22 | name="color_swatch" visible="true" width="37" /> |
21 | <spinner bottom_delta="25" height="20" label="x" label_width="40" max_val="10000000" | 23 | <spinner bottom_delta="25" height="20" label="x" label_width="40" max_val="10000000" |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml index c665563..3f476cf 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml | |||
@@ -908,12 +908,12 @@ | |||
908 | Slice Begin and End: | 908 | Slice Begin and End: |
909 | </text> | 909 | </text> |
910 | <spinner bottom_delta="-19" decimal_digits="3" follows="left|top" height="16" | 910 | <spinner bottom_delta="-19" decimal_digits="3" follows="left|top" height="16" |
911 | increment="0.025" initial_val="0" label="B" label_width="10" left="121" | 911 | increment="0.02" initial_val="0" label="B" label_width="10" left="121" |
912 | max_val="0.95" min_val="0" mouse_opaque="true" name="Path Limit Begin" | 912 | max_val="0.98" min_val="0" mouse_opaque="true" name="Path Limit Begin" |
913 | width="68" /> | 913 | width="68" /> |
914 | <spinner bottom_delta="0" decimal_digits="3" follows="left|top" height="16" | 914 | <spinner bottom_delta="0" decimal_digits="3" follows="left|top" height="16" |
915 | increment="0.025" initial_val="1" label="E" label_width="10" left_delta="73" | 915 | increment="0.02" initial_val="1" label="E" label_width="10" left_delta="73" |
916 | max_val="1" min_val="0.05" mouse_opaque="true" name="Path Limit End" | 916 | max_val="1" min_val="0.02" mouse_opaque="true" name="Path Limit End" |
917 | width="68" /> | 917 | width="68" /> |
918 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 918 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
919 | bottom_delta="-14" drop_shadow_visible="true" follows="left|top" | 919 | bottom_delta="-14" drop_shadow_visible="true" follows="left|top" |
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_rightclick_text.xml b/linden/indra/newview/skins/default/xui/en-us/menu_rightclick_text.xml new file mode 100644 index 0000000..36fa667 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/en-us/menu_rightclick_text.xml | |||
@@ -0,0 +1,116 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | |||
3 | <menu drop_shadow="true" | ||
4 | mouse_opaque="false" name="Text Edit Menu" opaque="true"> | ||
5 | <menu_item_call label="Cut" mouse_opaque="true" | ||
6 | name="Cut Text"> | ||
7 | <on_click function="textfield_cut" userdata="about" /> | ||
8 | <on_enable function="textfield_cut_enable" /> | ||
9 | </menu_item_call> | ||
10 | <menu_item_call label="Copy" mouse_opaque="true" | ||
11 | name="Copy Text" > | ||
12 | <on_click function="textfield_copy" userdata="" /> | ||
13 | <on_enable function="textfield_copy_enable" /> | ||
14 | </menu_item_call> | ||
15 | <menu_item_call label="Paste" mouse_opaque="true" | ||
16 | name="Paste Text" > | ||
17 | <on_click function="textfield_paste" userdata="" /> | ||
18 | <on_enable function="textfield_paste_enable" /> | ||
19 | </menu_item_call> | ||
20 | <menu_item_call label="Delete" mouse_opaque="true" | ||
21 | name="Delete Text" > | ||
22 | <on_click function="textfield_delete" userdata="" /> | ||
23 | <on_enable function="textfield_delete_enable" /> | ||
24 | </menu_item_call> | ||
25 | <menu_item_separator /> | ||
26 | <menu_item_call label="Select All" mouse_opaque="true" | ||
27 | name="Select All Text" > | ||
28 | <on_click function="textfield_selectall" userdata="" /> | ||
29 | <on_enable function="textfield_selectall_enable" /> | ||
30 | </menu_item_call> | ||
31 | <menu_item_separator name="Translate" /> | ||
32 | <menu drop_shadow="true" | ||
33 | mouse_opaque="false" name="Translation Options" | ||
34 | bottom_delta="0" label="Translate To..." opaque="true" > | ||
35 | <menu_item_call label="English" mouse_opaque="true" | ||
36 | name="Translate Text" > | ||
37 | <on_click function="textfield_translate" translate="true" userdata="en" /> | ||
38 | <on_enable function="textfield_translate_enable" /> | ||
39 | </menu_item_call> | ||
40 | <menu_item_call label="Danish" mouse_opaque="true" | ||
41 | name="Translate Text" > | ||
42 | <on_click function="textfield_translate" translate="true" userdata="da" /> | ||
43 | <on_enable function="textfield_translate_enable" /> | ||
44 | </menu_item_call> | ||
45 | <menu_item_call label="Deutsch (German)" mouse_opaque="true" | ||
46 | name="Translate Text" > | ||
47 | <on_click function="textfield_translate" translate="true" userdata="de" /> | ||
48 | <on_enable function="textfield_translate_enable" /> | ||
49 | </menu_item_call> | ||
50 | <menu_item_call label="Spanish" mouse_opaque="true" | ||
51 | name="Translate Text" > | ||
52 | <on_click function="textfield_translate" translate="true" userdata="es" /> | ||
53 | <on_enable function="textfield_translate_enable" /> | ||
54 | </menu_item_call> | ||
55 | <menu_item_call label="French" mouse_opaque="true" | ||
56 | name="Translate Text" > | ||
57 | <on_click function="textfield_translate" translate="true" userdata="fr" /> | ||
58 | <on_enable function="textfield_translate_enable" /> | ||
59 | </menu_item_call> | ||
60 | <menu_item_call label="Italian" mouse_opaque="true" | ||
61 | name="Translate Text" > | ||
62 | <on_click function="textfield_translate" translate="true" userdata="it" /> | ||
63 | <on_enable function="textfield_translate_enable" /> | ||
64 | </menu_item_call> | ||
65 | <menu_item_call label="Hungarian" mouse_opaque="true" | ||
66 | name="Translate Text" > | ||
67 | <on_click function="textfield_translate" translate="true" userdata="hu" /> | ||
68 | <on_enable function="textfield_translate_enable" /> | ||
69 | </menu_item_call> | ||
70 | <menu_item_call label="Dutch" mouse_opaque="true" | ||
71 | name="Translate Text" > | ||
72 | <on_click function="textfield_translate" translate="true" userdata="nl" /> | ||
73 | <on_enable function="textfield_translate_enable" /> | ||
74 | </menu_item_call> | ||
75 | <menu_item_call label="Polish" mouse_opaque="true" | ||
76 | name="Translate Text" > | ||
77 | <on_click function="textfield_translate" translate="true" userdata="pl" /> | ||
78 | <on_enable function="textfield_translate_enable" /> | ||
79 | </menu_item_call> | ||
80 | <menu_item_call label="Portugese" mouse_opaque="true" | ||
81 | name="Translate Text" > | ||
82 | <on_click function="textfield_translate" translate="true" userdata="pt" /> | ||
83 | <on_enable function="textfield_translate_enable" /> | ||
84 | </menu_item_call> | ||
85 | <menu_item_call label="Russian" mouse_opaque="true" | ||
86 | name="Translate Text" > | ||
87 | <on_click function="textfield_translate" translate="true" userdata="ru" /> | ||
88 | <on_enable function="textfield_translate_enable" /> | ||
89 | </menu_item_call> | ||
90 | <menu_item_call label="Turkish" mouse_opaque="true" | ||
91 | name="Translate Text" > | ||
92 | <on_click function="textfield_translate" translate="true" userdata="tr" /> | ||
93 | <on_enable function="textfield_translate_enable" /> | ||
94 | </menu_item_call> | ||
95 | <menu_item_call label="Ukrainian" mouse_opaque="true" | ||
96 | name="Translate Text" > | ||
97 | <on_click function="textfield_translate" translate="true" userdata="uk" /> | ||
98 | <on_enable function="textfield_translate_enable" /> | ||
99 | </menu_item_call> | ||
100 | <menu_item_call label="Chinese" mouse_opaque="true" | ||
101 | name="Translate Text" > | ||
102 | <on_click function="textfield_translate" translate="true" userdata="zh" /> | ||
103 | <on_enable function="textfield_translate_enable" /> | ||
104 | </menu_item_call> | ||
105 | <menu_item_call label="Japanese" mouse_opaque="true" | ||
106 | name="Translate Text" > | ||
107 | <on_click function="textfield_translate" translate="true" userdata="ja" /> | ||
108 | <on_enable function="textfield_translate_enable" /> | ||
109 | </menu_item_call> | ||
110 | <menu_item_call label="Korean" mouse_opaque="true" | ||
111 | name="Translate Text" > | ||
112 | <on_click function="textfield_translate" translate="true" userdata="ko" /> | ||
113 | <on_enable function="textfield_translate_enable" /> | ||
114 | </menu_item_call> | ||
115 | </menu> | ||
116 | </menu> | ||
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml index 93ebd1c..626e6e7 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml | |||
@@ -1063,6 +1063,10 @@ | |||
1063 | <on_click function="ShowFloater" userdata="animation list" /> | 1063 | <on_click function="ShowFloater" userdata="animation list" /> |
1064 | <on_check function="FloaterVisible" userdata="animation list" /> | 1064 | <on_check function="FloaterVisible" userdata="animation list" /> |
1065 | </menu_item_check> | 1065 | </menu_item_check> |
1066 | <menu_item_check label="Full Radar" name="Full Radar"> | ||
1067 | <on_click function="ShowFloater" userdata="full radar" /> | ||
1068 | <on_check function="FloaterVisible" userdata="full radar" /> | ||
1069 | </menu_item_check> | ||
1066 | <menu_item_check label="Area Object Search" name="Area Object Search" | 1070 | <menu_item_check label="Area Object Search" name="Area Object Search" |
1067 | shortcut="alt|A"> | 1071 | shortcut="alt|A"> |
1068 | <on_click function="ShowFloater" userdata="areasearch" /> | 1072 | <on_click function="ShowFloater" userdata="areasearch" /> |
@@ -2044,13 +2048,6 @@ | |||
2044 | <on_click function="Advanced.DumpAttachments" | 2048 | <on_click function="Advanced.DumpAttachments" |
2045 | userdata="" /> | 2049 | userdata="" /> |
2046 | </menu_item_call> | 2050 | </menu_item_call> |
2047 | <menu_item_call | ||
2048 | label="Reload Avatar Cloud Particle" | ||
2049 | name="Reload Avatar Cloud Particle"> | ||
2050 | <on_click | ||
2051 | function="Advanced.ReloadAvatarCloudParticle" | ||
2052 | userdata="" /> | ||
2053 | </menu_item_call> | ||
2054 | </menu> | 2051 | </menu> |
2055 | 2052 | ||
2056 | <!-- CRASH --> | 2053 | <!-- CRASH --> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/mime_types_windows.xml b/linden/indra/newview/skins/default/xui/en-us/mime_types_windows.xml index 26491e0..5217dbe 100644 --- a/linden/indra/newview/skins/default/xui/en-us/mime_types_windows.xml +++ b/linden/indra/newview/skins/default/xui/en-us/mime_types_windows.xml | |||
@@ -439,8 +439,8 @@ | |||
439 | movie | 439 | movie |
440 | </widgettype> | 440 | </widgettype> |
441 | <impl> | 441 | <impl> |
442 | media_plugin_gstreamer | 442 | media_plugin_quicktime |
443 | </impl> | 443 | </impl> |
444 | </mimetype> | 444 | </mimetype> |
445 | <mimetype menu="1" name="video/quicktime"> | 445 | <mimetype menu="1" name="video/quicktime"> |
446 | <label name="video/quicktime_label"> | 446 | <label name="video/quicktime_label"> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/notifications.xml b/linden/indra/newview/skins/default/xui/en-us/notifications.xml index 97a020d..9ff00a4 100644 --- a/linden/indra/newview/skins/default/xui/en-us/notifications.xml +++ b/linden/indra/newview/skins/default/xui/en-us/notifications.xml | |||
@@ -7135,11 +7135,14 @@ You need to specify a unique grid nickname. | |||
7135 | 7135 | ||
7136 | <notification | 7136 | <notification |
7137 | icon="alertmodal.tga" | 7137 | icon="alertmodal.tga" |
7138 | name="GridsNoLoginUri" | 7138 | name="GridInfoDirty" |
7139 | type="alertmodal"> | 7139 | type="alertmodal"> |
7140 | Cannot save new grid '[NAME]'. | 7140 | You have unsaved changes that will be lost. Continue? |
7141 | 7141 | <usetemplate | |
7142 | You need to specify a login URI. | 7142 | ignoretext="When creating new grids" |
7143 | name="okcancelignore" | ||
7144 | notext="Cancel" | ||
7145 | yestext="Continue"/> | ||
7143 | </notification> | 7146 | </notification> |
7144 | 7147 | ||
7145 | <notification | 7148 | <notification |
@@ -7152,6 +7155,13 @@ A grid with the same nickname already exists. | |||
7152 | </notification> | 7155 | </notification> |
7153 | 7156 | ||
7154 | <notification | 7157 | <notification |
7158 | icon="alertmodal.tga" | ||
7159 | name="GridInfoNoLoginUri" | ||
7160 | type="alertmodal"> | ||
7161 | A login URI is required to retrieve the grid info. | ||
7162 | </notification> | ||
7163 | |||
7164 | <notification | ||
7155 | icon="alertmodal.tga" | 7165 | icon="alertmodal.tga" |
7156 | name="GridInfoNoLoginUri" | 7166 | name="GridInfoNoLoginUri" |
7157 | type="alertmodal"> | 7167 | type="alertmodal"> |
@@ -7195,6 +7205,20 @@ If you don't have an account, would you like to create one now? | |||
7195 | </notification> | 7205 | </notification> |
7196 | 7206 | ||
7197 | <notification | 7207 | <notification |
7208 | icon="alertmodal.tga" | ||
7209 | name="InvalidPassword" | ||
7210 | type="alertmodal"> | ||
7211 | You have entered an invalid password! Please try again. | ||
7212 | </notification> | ||
7213 | |||
7214 | <notification | ||
7215 | icon="notifytip.tga" | ||
7216 | name="IncompleteInventoryItem" | ||
7217 | type="notifytip"> | ||
7218 | The item you are accessing is not yet locally available. Please try again in a minute. | ||
7219 | </notification> | ||
7220 | |||
7221 | <notification | ||
7198 | icon="alert.tga" | 7222 | icon="alert.tga" |
7199 | name="ShowLookAtInfo" | 7223 | name="ShowLookAtInfo" |
7200 | type="alert"> | 7224 | type="alert"> |
@@ -7372,6 +7396,62 @@ Media/audio URL blocked for [DOMAIN] | |||
7372 | The media filters have been cleared | 7396 | The media filters have been cleared |
7373 | </notification> | 7397 | </notification> |
7374 | 7398 | ||
7399 | <notification | ||
7400 | icon="alertmodal.tga" | ||
7401 | name="ProxyNeedRestart" | ||
7402 | type="alertmodal"> | ||
7403 | Socks proxy settings will take effect after you restart [VIEWER_NAME]. | ||
7404 | </notification> | ||
7405 | |||
7406 | <notification | ||
7407 | icon="alertmodal.tga" | ||
7408 | name="SOCKS_CONNECT_OK" | ||
7409 | type="alertmodal"> | ||
7410 | Connection to Socks5 proxy [PROXY] was successful. | ||
7411 | </notification> | ||
7412 | |||
7413 | <notification | ||
7414 | icon="alertmodal.tga" | ||
7415 | name="SOCKS_NOT_PERMITTED" | ||
7416 | type="alertmodal"> | ||
7417 | The Socks5 proxy "[PROXY]" refused the connection, not allowed by rule set | ||
7418 | </notification> | ||
7419 | |||
7420 | <notification | ||
7421 | icon="alertmodal.tga" | ||
7422 | name="SOCKS_CONNECT_ERROR" | ||
7423 | type="alertmodal"> | ||
7424 | The Socks5 proxy "[PROXY]" refused the connection, could not open TCP channel | ||
7425 | </notification> | ||
7426 | |||
7427 | <notification | ||
7428 | icon="alertmodal.tga" | ||
7429 | name="SOCKS_NOT_ACCEPTABLE" | ||
7430 | type="alertmodal"> | ||
7431 | The Socks5 proxy "[PROXY]" refused the selected authentication system | ||
7432 | </notification> | ||
7433 | |||
7434 | <notification | ||
7435 | icon="alertmodal.tga" | ||
7436 | name="SOCKS_AUTH_FAIL" | ||
7437 | type="alertmodal"> | ||
7438 | The Socks5 proxy "[PROXY]" reported your credentials are invalid | ||
7439 | </notification> | ||
7440 | |||
7441 | <notification | ||
7442 | icon="alertmodal.tga" | ||
7443 | name="SOCKS_UDP_FWD_NOT_GRANTED" | ||
7444 | type="alertmodal"> | ||
7445 | The Socks5 proxy "[PROXY]" refused the UDP associate request | ||
7446 | </notification> | ||
7447 | |||
7448 | <notification | ||
7449 | icon="alert.tga" | ||
7450 | name="SOCKS_HOST_CONNECT_FAILED" | ||
7451 | type="alert"> | ||
7452 | Could not connect to Socks5 proxy server "[PROXY]" | ||
7453 | </notification> | ||
7454 | |||
7375 | <!--End Imprudence notifications--> | 7455 | <!--End Imprudence notifications--> |
7376 | <!-- [KITTY VIEWER] --> | 7456 | <!-- [KITTY VIEWER] --> |
7377 | <notification | 7457 | <notification |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_particle_settings.xml b/linden/indra/newview/skins/default/xui/en-us/panel_particle_settings.xml new file mode 100644 index 0000000..c1e1da9 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/en-us/panel_particle_settings.xml | |||
@@ -0,0 +1,49 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | <panel border="true" bottom="-580" follows="left|top|right|bottom" height="525" label="Particle Settings" | ||
3 | left="1" mouse_opaque="true" name="ParticleSettings" width="418"> | ||
4 | |||
5 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
6 | bottom_delta="-36" drop_shadow_visible="true" enabled="true" follows="left|top" | ||
7 | font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10" | ||
8 | mouse_opaque="true" name="part_start_color_textbox" v_pad="0" width="394"> | ||
9 | Start Color: | ||
10 | </text> | ||
11 | <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom_delta="-44" | ||
12 | can_apply_immediately="true" color="1 1 1 1" | ||
13 | enabled="true" follows="left|top" height="55" label="" left_delta="53" | ||
14 | mouse_opaque="true" name="part_start_color_swatch" | ||
15 | tool_tip="Click to open Color Picker" width="45" /> | ||
16 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
17 | bottom_delta="-20" drop_shadow_visible="true" enabled="true" follows="left|top" | ||
18 | font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10" | ||
19 | mouse_opaque="true" name="part_end_color_textbox" v_pad="0" width="394"> | ||
20 | End Color: | ||
21 | </text> | ||
22 | <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom_delta="-44" | ||
23 | can_apply_immediately="true" color="1 1 1 1" | ||
24 | enabled="true" follows="left|top" height="55" label="" left_delta="53" | ||
25 | mouse_opaque="true" name="part_end_color_swatch" | ||
26 | tool_tip="Click to open Color Picker" width="45" /> | ||
27 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
28 | bottom_delta="-20" drop_shadow_visible="true" enabled="true" follows="left|top" | ||
29 | font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10" | ||
30 | mouse_opaque="true" name="part_texture_textbox" v_pad="0" width="394"> | ||
31 | Texture: | ||
32 | </text> | ||
33 | |||
34 | <texture_picker border_color="0.45098 0.517647 0.607843 1" bottom_delta="-44" | ||
35 | can_apply_immediately="true" color="1 1 1 1" | ||
36 | enabled="true" follows="left|top" height="55" label="" left_delta="53" | ||
37 | mouse_opaque="true" name="part_texture_picker" | ||
38 | tool_tip="Click to open Texture Chooser" width="45" /> | ||
39 | <button name="reset_cloud_this_account" label="reset for this account" halign="center" | ||
40 | tool_tip="reset the Avatar particle cloud to default for this account" left="12" | ||
41 | bottom_delta="-50" width="180" height="20" font="SansSerifSmall" follows="left|top"/> | ||
42 | <button name="save_cloud_this_account" label="save for this account" halign="center" | ||
43 | tool_tip="save the Avatar particle cloud for this account" left="12" | ||
44 | bottom_delta="-50" width="180" height="20" font="SansSerifSmall" follows="left|top"/> | ||
45 | <button name="save_cloud_any_account" label="save for any account" halign="center" | ||
46 | tool_tip="save the Avatar particle cloud for any account" left="12" | ||
47 | bottom_delta="-24" width="180" height="20" font="SansSerifSmall" follows="left|top"/> | ||
48 | </panel> | ||
49 | |||
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml index b8f6e7d..3b66fb8 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml | |||
@@ -24,16 +24,21 @@ | |||
24 | name="client_name_tag_check" radio_style="false" width="160" /> | 24 | name="client_name_tag_check" radio_style="false" width="160" /> |
25 | <check_box bottom_delta="-18" enabled="true" follows="left|top" | 25 | <check_box bottom_delta="-18" enabled="true" follows="left|top" |
26 | font="SansSerifSmall" height="16" initial_value="false" | 26 | font="SansSerifSmall" height="16" initial_value="false" |
27 | label="Show client names with color" left_delta="0" mouse_opaque="true" | ||
28 | name="client_name_color_check" radio_style="false" width="160" /> | ||
29 | <check_box bottom_delta="-18" enabled="true" follows="left|top" | ||
30 | font="SansSerifSmall" height="16" initial_value="false" | ||
31 | label="Show client names in hovertip" left_delta="0" mouse_opaque="true" | 27 | label="Show client names in hovertip" left_delta="0" mouse_opaque="true" |
32 | name="client_name_hover_check" radio_style="false" width="160" /> | 28 | name="client_name_hover_check" radio_style="false" width="160" /> |
33 | <check_box bottom_delta="-18" enabled="true" follows="left|top" | 29 | <check_box bottom_delta="-18" enabled="true" follows="left|top" |
34 | font="SansSerifSmall" height="16" initial_value="false" | 30 | font="SansSerifSmall" height="16" initial_value="false" |
35 | label="Show your client name to others" left_delta="0" mouse_opaque="true" | 31 | label="Show your client name to others" left_delta="0" mouse_opaque="true" |
36 | name="client_name_tag_broadcast_check" radio_style="false" width="217" /> | 32 | name="client_name_tag_broadcast_check" radio_style="false" width="217" /> |
33 | <color_swatch border_color="0.45098 0.517647 0.607843 1" bottom="-122" | ||
34 | can_apply_immediately="true" color="0.79 0.44 0.88 1" | ||
35 | enabled="true" follows="left|top" | ||
36 | height="65" label="Imprudence" left="250" mouse_opaque="true" | ||
37 | name="client_tag_color" width="65" /> | ||
38 | <check_box bottom_delta="-18" enabled="true" follows="left|top" | ||
39 | font="SansSerifSmall" height="16" initial_value="false" | ||
40 | label="Show client names with color" left_delta="0" mouse_opaque="true" | ||
41 | name="client_name_color_check" radio_style="false" width="160" /> | ||
37 | <check_box bottom_delta="-25" enabled="true" follows="left|top" | 42 | <check_box bottom_delta="-25" enabled="true" follows="left|top" |
38 | font="SansSerifSmall" height="16" initial_value="false" | 43 | font="SansSerifSmall" height="16" initial_value="false" |
39 | label="Enable shadows (WARNING: unstable and requires Ultra graphics)" left="12" mouse_opaque="true" | 44 | label="Enable shadows (WARNING: unstable and requires Ultra graphics)" left="12" mouse_opaque="true" |
@@ -77,6 +82,11 @@ | |||
77 | tool_tip="Toggle editing animation and standing up when entering appearance mode" | 82 | tool_tip="Toggle editing animation and standing up when entering appearance mode" |
78 | label="Animate avatar when editing appearance" left="12" mouse_opaque="true" | 83 | label="Animate avatar when editing appearance" left="12" mouse_opaque="true" |
79 | name="appearance_anim_check" radio_style="false" width="217" /> | 84 | name="appearance_anim_check" radio_style="false" width="217" /> |
85 | <check_box bottom_delta="-25" control_name="HeadFollowsMouse" enabled="true" | ||
86 | follows="left|top" font="SansSerifSmall" height="16" | ||
87 | label="Head follows mouse" tooltip="If your avatars head follows your mouse movements" left="12" | ||
88 | mouse_opaque="true" name="head_follows_mouse_checkbox" radio_style="false" | ||
89 | width="256" /> | ||
80 | <check_box bottom_delta="-25" enabled="true" | 90 | <check_box bottom_delta="-25" enabled="true" |
81 | follows="left|top" font="SansSerifSmall" height="16" initial_value="false" | 91 | follows="left|top" font="SansSerifSmall" height="16" initial_value="false" |
82 | label="Use legacy pie menus" left="12" | 92 | label="Use legacy pie menus" left="12" |
@@ -176,6 +186,20 @@ To use spellcheck, right-click a misspelled word | |||
176 | tool_tip="Modify the AutoCorrect word list and settings" left="12" | 186 | tool_tip="Modify the AutoCorrect word list and settings" left="12" |
177 | bottom_delta="-50" width="180" height="20" font="SansSerifSmall" follows="left|top"/> | 187 | bottom_delta="-50" width="180" height="20" font="SansSerifSmall" follows="left|top"/> |
178 | </panel> | 188 | </panel> |
179 | 189 | <panel border="true" bottom="-580" follows="left|top|right|bottom" height="525" label="Eye Candy" | |
190 | left="1" mouse_opaque="true" filename="panel_particle_settings.xml" name="AvatarCloud" width="418"> | ||
191 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
192 | bottom_delta="-20" drop_shadow_visible="true" enabled="true" follows="left|top" | ||
193 | font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10" | ||
194 | mouse_opaque="true" name="must_be_logged_in_textbox" v_pad="0" width="394"> | ||
195 | You must be logged in to change this | ||
196 | </text> | ||
197 | <check_box bottom_delta="-4" control_name="PreviewAvatarAsCloud" enabled="true" | ||
198 | follows="left|top" font="SansSerifSmall" height="16" | ||
199 | label="Preview avatar as cloud" left="10" | ||
200 | mouse_opaque="true" name="preview_cloud" | ||
201 | radio_style="false" tool_tip="Preview avatar as cloud when already rezzed" | ||
202 | width="80" /> | ||
203 | </panel> | ||
180 | </tab_container> | 204 | </tab_container> |
181 | </panel> | 205 | </panel> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml index 6ced7d6..8b354b4 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_general.xml | |||
@@ -216,8 +216,8 @@ | |||
216 | mouse_opaque="true" name="language_textbox" v_pad="0" width="394"> | 216 | mouse_opaque="true" name="language_textbox" v_pad="0" width="394"> |
217 | Language: | 217 | Language: |
218 | </text> | 218 | </text> |
219 | <combo_box allow_text_entry="true" bottom_delta="0" enabled="true" | 219 | <combo_box allow_text_entry="false" bottom_delta="0" enabled="true" |
220 | follows="left|top" height="16" left="153" max_chars="135" | 220 | follows="left|top" height="18" left="153" max_chars="135" |
221 | mouse_opaque="true" name="language_combobox" width="146"> | 221 | mouse_opaque="true" name="language_combobox" width="146"> |
222 | <combo_item type="string" length="1" enabled="true" name="System Default Language" value="default"> | 222 | <combo_item type="string" length="1" enabled="true" name="System Default Language" value="default"> |
223 | System Default | 223 | System Default |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_network.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_network.xml index 86aa353..7d6bb4a 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_network.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_network.xml | |||
@@ -32,9 +32,9 @@ | |||
32 | increment="10" initial_val="50" left_delta="0" max_val="1000" min_val="10" | 32 | increment="10" initial_val="50" left_delta="0" max_val="1000" min_val="10" |
33 | mouse_opaque="true" name="cache_size" show_text="true" width="180" /> | 33 | mouse_opaque="true" name="cache_size" show_text="true" width="180" /> |
34 | <button bottom_delta="-4" enabled="true" follows="left|top" | 34 | <button bottom_delta="-4" enabled="true" follows="left|top" |
35 | font="SansSerif" halign="center" height="22" label="Clear Cache" left="340" | 35 | font="SansSerif" halign="center" height="22" label="Clear Disk Cache" left="340" |
36 | left_delta="186" mouse_opaque="true" name="clear_cache" scale_image="true" | 36 | left_delta="186" mouse_opaque="true" name="clear_cache" scale_image="true" |
37 | width="100" /> | 37 | width="150" /> |
38 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 38 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
39 | bottom_delta="-17" drop_shadow_visible="true" enabled="true" | 39 | bottom_delta="-17" drop_shadow_visible="true" enabled="true" |
40 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" | 40 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" |
@@ -56,39 +56,123 @@ | |||
56 | name="reset_cache" scale_image="true" width="100" /> | 56 | name="reset_cache" scale_image="true" width="100" /> |
57 | <check_box bottom="-173" bottom_delta="-25" control_name="ConnectionPortEnabled" | 57 | <check_box bottom="-173" bottom_delta="-25" control_name="ConnectionPortEnabled" |
58 | enabled="true" follows="left|top" font="SansSerifSmall" height="16" | 58 | enabled="true" follows="left|top" font="SansSerifSmall" height="16" |
59 | initial_value="false" label="Custom port connection" left="12" | 59 | initial_value="false" label="Enable custom outgoing port" left="12" |
60 | mouse_opaque="true" name="connection_port_enabled" radio_style="false" | 60 | mouse_opaque="true" name="connection_port_enabled" radio_style="false" |
61 | tool_tip="Enables custom port for outgoing connections" | ||
61 | width="256" /> | 62 | width="256" /> |
62 | <spinner bottom="-193" bottom_delta="-20" control_name="ConnectionPort" | 63 | <spinner bottom="-193" bottom_delta="-20" control_name="ConnectionPort" |
63 | decimal_digits="0" enabled="true" follows="left|top" height="16" | 64 | decimal_digits="0" enabled="true" follows="left|top" height="16" |
64 | increment="1" initial_val="13000" label="Port number:" label_width="75" | 65 | increment="1" initial_val="13000" label="Port number:" label_width="75" |
65 | left_delta="20" max_val="13050" min_val="13000" mouse_opaque="true" | 66 | left_delta="20" max_val="13050" min_val="13000" mouse_opaque="true" |
66 | name="connection_port" width="150" /> | 67 | name="connection_port" width="140" /> |
67 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 68 | |
68 | bottom_delta="-24" drop_shadow_visible="true" enabled="true" | 69 | <!-- XMLRPC PROXY --> |
69 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" | 70 | |
70 | height="10" left="15" mouse_opaque="false" name="proxy_label" v_pad="0" | 71 | <check_box bottom_delta="-25" enabled="true" |
71 | width="250"> | ||
72 | XMLRPC Proxy (Login, Land- and Money purchase): | ||
73 | </text> | ||
74 | <check_box bottom_delta="-25" enabled="true" | ||
75 | follows="left|top" font="SansSerifSmall" height="16" initial_value="false" | 72 | follows="left|top" font="SansSerifSmall" height="16" initial_value="false" |
76 | label="Enable XMLRPC proxy" left_delta="199" mouse_opaque="true" | 73 | label="Enable XMLRPC proxy (Login, Land, and Money purchases)" left="15" mouse_opaque="true" |
77 | name="xmlrpc_proxy_enabled" radio_style="false" width="256" /> | 74 | name="xmlrpc_proxy_enabled" radio_style="false" width="300" /> |
78 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 75 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
79 | bottom_delta="-25" drop_shadow_visible="true" enabled="true" | 76 | bottom_delta="-18" drop_shadow_visible="true" enabled="true" |
80 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" | 77 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" |
81 | height="10" left="140" mouse_opaque="false" name="xmlrpc_proxy_text_label" | 78 | height="10" left_delta="20" mouse_opaque="false" name="xmlrpc_proxy_text_label" |
82 | v_pad="0" width="128"> | 79 | v_pad="0" width="128"> |
83 | Address: | 80 | Address: |
84 | </text> | 81 | </text> |
85 | <line_editor bottom_delta="-8" enabled="true" follows="left|top" font="SansSerif" | 82 | <line_editor bottom_delta="-8" enabled="true" follows="left|top" font="SansSerif" |
86 | height="20" left="217" name="xmlrpc_proxy_editor" | 83 | height="20" left="112" name="xmlrpc_proxy_editor" |
87 | tool_tip="The name or IP address of the proxy you would like to use" | 84 | tool_tip="The name or IP address of the proxy you would like to use" |
88 | width="200" /> | 85 | width="200" /> |
89 | <spinner bottom_delta="-25" decimal_digits="0" | 86 | <spinner bottom_delta="-20" decimal_digits="0" |
87 | enabled="true" follows="left|top" height="16" increment="1" | ||
88 | initial_val="80" label="Port number:" label_width="75" left="35" | ||
89 | max_val="65535" min_val="10" mouse_opaque="true" name="xmlrpc_proxy_port" | ||
90 | width="140" /> | ||
91 | |||
92 | <!-- SOCKS 5 PROXY --> | ||
93 | |||
94 | <check_box bottom_delta="-24" enabled="true" | ||
95 | follows="left|top" font="SansSerifSmall" height="16" initial_value="false" | ||
96 | label="Enable SOCKS 5 proxy" left="15" mouse_opaque="true" | ||
97 | name="socks5_proxy_enabled" radio_style="false" width="256" /> | ||
98 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
99 | bottom_delta="-18" drop_shadow_visible="true" enabled="true" | ||
100 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" | ||
101 | height="10" left="35" mouse_opaque="false" name="socks5_host_label" | ||
102 | v_pad="0" width="128"> | ||
103 | SOCKS 5 host: | ||
104 | </text> | ||
105 | <line_editor bottom_delta="-6" enabled="true" follows="left|top" font="SansSerif" | ||
106 | height="20" left="113" name="socks5_proxy_host" | ||
107 | tool_tip="The name or IP address of the SOCKS5 proxy you would like to use" | ||
108 | width="200" /> | ||
109 | <spinner bottom_delta="-20" decimal_digits="0" | ||
90 | enabled="true" follows="left|top" height="16" increment="1" | 110 | enabled="true" follows="left|top" height="16" increment="1" |
91 | initial_val="80" label="Port number:" label_width="75" left="140" | 111 | initial_val="80" label="Port number:" label_width="75" left="35" |
92 | max_val="12000" min_val="10" mouse_opaque="true" name="xmlrpc_proxy_port" | 112 | max_val="65535" min_val="10" mouse_opaque="true" name="socks5_proxy_port" |
93 | width="140" /> | 113 | width="140" /> |
114 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
115 | bottom_delta="-20" drop_shadow_visible="true" enabled="true" | ||
116 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" | ||
117 | height="10" left="35" mouse_opaque="false" name="socks5_auth_label" | ||
118 | v_pad="0" width="128"> | ||
119 | SOCKS 5 authentication: | ||
120 | </text> | ||
121 | <radio_group bottom_delta="-6" draw_border="false" follows="left|top" height="20" left="35" | ||
122 | name="socks5_auth" width="420"> | ||
123 | <radio_item bottom="0" height="20" left_delta="80" name="None" width="50" | ||
124 | tool_tip="No authentication"> | ||
125 | None | ||
126 | </radio_item> | ||
127 | <radio_item bottom="0" height="20" left_delta="50" name="UserPass" width="50" | ||
128 | tool_tip="Username / Password authentication"> | ||
129 | Username / Password | ||
130 | </radio_item> | ||
131 | </radio_group> | ||
132 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
133 | bottom_delta="-16" drop_shadow_visible="true" enabled="true" | ||
134 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" | ||
135 | height="10" left="122" mouse_opaque="false" name="socks5_username_label" | ||
136 | v_pad="0" width="128"> | ||
137 | Username: | ||
138 | </text> | ||
139 | <line_editor bottom_delta="-8" enabled="true" follows="left|top" font="SansSerif" | ||
140 | height="20" left="200" name="socks5_proxy_username" | ||
141 | tool_tip="Username for the Socks5 proxy" | ||
142 | width="200" /> | ||
143 | |||
144 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
145 | bottom_delta="-14" drop_shadow_visible="true" enabled="true" | ||
146 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" | ||
147 | height="10" left="122" mouse_opaque="false" name="socks5_password_label" | ||
148 | v_pad="0" width="128"> | ||
149 | Password: | ||
150 | </text> | ||
151 | <line_editor bottom_delta="-8" enabled="true" follows="left|top" font="SansSerif" | ||
152 | height="20" left="200" name="socks5_proxy_password" | ||
153 | tool_tip="Password for the Socks5 proxy" | ||
154 | width="200" /> | ||
155 | |||
156 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
157 | bottom_delta="-20" drop_shadow_visible="true" enabled="true" | ||
158 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" | ||
159 | height="10" left="35" mouse_opaque="false" name="http_proxy_label" | ||
160 | v_pad="0" width="128"> | ||
161 | HTTP proxy: | ||
162 | </text> | ||
163 | <radio_group bottom_delta="-8" draw_border="false" follows="left|top" height="20" left="35" | ||
164 | name="socks5_http_proxy_type" width="380" > | ||
165 | <radio_item height="20" bottom="0" left="100" name="None" width="50" | ||
166 | tool_tip="No HTTP proxy"> | ||
167 | None | ||
168 | </radio_item> | ||
169 | <radio_item height="20" bottom="0" left="170" name="Socks" width="50" | ||
170 | tool_tip="Use Socks for HTTP proxy"> | ||
171 | SOCKS 5 | ||
172 | </radio_item> | ||
173 | <radio_item height="20" bottom="0" left="250" name="Web" width="50" | ||
174 | tool_tip="Use web proxy for HTTP proxy"> | ||
175 | Web | ||
176 | </radio_item> | ||
177 | </radio_group> | ||
94 | </panel> | 178 | </panel> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_web.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_web.xml index d855a6f..b4dbbb5 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_web.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_web.xml | |||
@@ -1,6 +1,6 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <panel border="true" bottom="-409" enabled="true" follows="left|top|right|bottom" | 2 | <panel border="true" bottom="-409" enabled="true" follows="left|top|right|bottom" |
3 | height="408" label="Web" left="102" mouse_opaque="true" name="web" | 3 | height="408" label="Web Browser" left="102" mouse_opaque="true" name="web" |
4 | width="517"> | 4 | width="517"> |
5 | <radio_group bottom="-45" draw_border="false" follows="top|left" height="40" left="12" | 5 | <radio_group bottom="-45" draw_border="false" follows="top|left" height="40" left="12" |
6 | name="use_external_browser" width="480"> | 6 | name="use_external_browser" width="480"> |
@@ -13,76 +13,56 @@ | |||
13 | Use built-in web browser | 13 | Use built-in web browser |
14 | </radio_item> | 14 | </radio_item> |
15 | </radio_group> | 15 | </radio_group> |
16 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 16 | <button bottom_delta="-30" enabled="true" follows="left|top" font="SansSerif" |
17 | bottom_delta="-25" drop_shadow_visible="true" enabled="true" | 17 | halign="center" height="22" label="Clear Built-In Browser Cache" left="35" |
18 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" | 18 | mouse_opaque="true" name="clear_cache" scale_image="true" width="250" /> |
19 | height="10" left="15" mouse_opaque="false" name="cache_size_label_l" | 19 | <check_box bottom_delta="-35" enabled="true" follows="left|top" |
20 | v_pad="0" width="128"> | 20 | font="SansSerifSmall" height="16" initial_value="false" |
21 | Browser Cache: | 21 | label="Accept cookies while using built-in web browser" left="15" mouse_opaque="true" |
22 | </text> | 22 | tool_top="Allows the built-in web browser to accept cookies from websites" |
23 | <button bottom_delta="-10" enabled="true" follows="left|top" font="SansSerif" | ||
24 | halign="center" height="22" label="Clear Now" left="140" | ||
25 | mouse_opaque="true" name="clear_cache" scale_image="true" width="100" /> | ||
26 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
27 | bottom_delta="-30" drop_shadow_visible="true" enabled="true" | ||
28 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" | ||
29 | height="10" left="15" mouse_opaque="false" name="cookie_label" v_pad="0" | ||
30 | width="128"> | ||
31 | Cookies: | ||
32 | </text> | ||
33 | <check_box bottom_delta="-7" enabled="true" follows="left|top" | ||
34 | font="SansSerifSmall" height="16" initial_value="false" | ||
35 | label="Accept cookies from sites" left="140" mouse_opaque="true" | ||
36 | name="cookies_enabled" radio_style="false" width="256" /> | 23 | name="cookies_enabled" radio_style="false" width="256" /> |
37 | <button bottom_delta="-20" enabled="true" follows="left|top" font="SansSerif" | 24 | <button bottom_delta="-25" enabled="true" follows="left|top" font="SansSerif" |
38 | halign="center" height="18" label="Clear Cookies" left_delta="0" | 25 | halign="center" height="20" label="Clear Cookies" left_delta="20" |
39 | tool_tip="Clear Cookies" | 26 | tool_tip="Clear Cookies" |
40 | mouse_opaque="true" name="clear_ookies" scale_image="true" width="110" /> | 27 | mouse_opaque="true" name="clear_ookies" scale_image="true" width="110" /> |
41 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 28 | <check_box bottom_delta="-35" enabled="true" |
42 | bottom_delta="-24" drop_shadow_visible="true" enabled="true" | ||
43 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" | ||
44 | height="10" left="15" mouse_opaque="false" name="proxy_label" v_pad="0" | ||
45 | width="128"> | ||
46 | Web Proxy: | ||
47 | </text> | ||
48 | <check_box bottom_delta="-7" enabled="true" | ||
49 | follows="left|top" font="SansSerifSmall" height="16" initial_value="false" | 29 | follows="left|top" font="SansSerifSmall" height="16" initial_value="false" |
50 | label="Enable web proxy" left="140" mouse_opaque="true" | 30 | label="Enable proxy for built-in web browser" left="15" mouse_opaque="true" |
51 | name="web_proxy_enabled" radio_style="false" width="256" /> | 31 | name="web_proxy_enabled" radio_style="false" width="256" /> |
52 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 32 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
53 | bottom_delta="-25" drop_shadow_visible="true" enabled="true" | 33 | bottom_delta="-18" drop_shadow_visible="true" enabled="true" |
54 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" | 34 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" |
55 | height="10" left="140" mouse_opaque="false" name="proxy_text_label" | 35 | height="10" left_delta="20" mouse_opaque="false" name="proxy_text_label" |
56 | v_pad="0" width="128"> | 36 | v_pad="0" width="128"> |
57 | Address: | 37 | Address: |
58 | </text> | 38 | </text> |
59 | <line_editor bottom_delta="-8" enabled="true" follows="left|top" font="SansSerif" | 39 | <line_editor bottom_delta="-8" enabled="true" follows="left|top" font="SansSerif" |
60 | height="20" left="217" name="web_proxy_editor" | 40 | height="20" left="112" name="web_proxy_editor" |
61 | tool_tip="The name or IP address of the proxy you would like to use" | 41 | tool_tip="The name or IP address of the proxy you would like to use" |
62 | width="200" /> | 42 | width="200" /> |
63 | <spinner bottom_delta="-25" decimal_digits="0" | 43 | <spinner bottom_delta="-20" decimal_digits="0" |
64 | enabled="true" follows="left|top" height="16" increment="1" | 44 | enabled="true" follows="left|top" height="16" increment="1" |
65 | initial_val="80" label="Port number:" label_width="75" left="140" | 45 | initial_val="80" label="Port number:" label_width="75" left="35" |
66 | max_val="12000" min_val="10" mouse_opaque="true" name="web_proxy_port" | 46 | max_val="12000" min_val="10" mouse_opaque="true" name="web_proxy_port" |
67 | width="140" /> | 47 | width="140" /> |
68 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 48 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
69 | bottom_delta="-25" drop_shadow_visible="true" enabled="true" | 49 | bottom_delta="-30" drop_shadow_visible="true" enabled="true" |
70 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" | 50 | follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" |
71 | height="10" left="15" mouse_opaque="false" name="cache_size_label_l" | 51 | height="10" left="15" mouse_opaque="false" name="cache_size_label_l" |
72 | v_pad="0" width="128"> | 52 | v_pad="0" width="200"> |
73 | World search: | 53 | Custom All (web) search tab URL: |
74 | </text> | 54 | </text> |
75 | <line_editor bottom_delta="-8" enabled="true" follows="left|top" | 55 | <line_editor bottom_delta="-25" enabled="true" follows="left|top" |
76 | font="SansSerifSmall" height="18" left="100" name="world_search_editor" | 56 | font="SansSerifSmall" height="18" left="15" name="world_search_editor" |
77 | tool_tip="Address of the world search engine you would like to use" | 57 | tool_tip="Address of the world search engine you would like to use" |
78 | width="355" /> | 58 | width="400" /> |
79 | <button bottom_delta="-22" enabled="true" follows="left|top" font="SansSerif" | 59 | <button bottom_delta="-22" enabled="true" follows="left|top" font="SansSerif" |
80 | halign="center" height="18" label="Reset" left="100" | 60 | halign="center" height="20" label="Reset" left="15" |
81 | tool_tip="Reset to default" | 61 | tool_tip="Reset to default" |
82 | mouse_opaque="true" name="world_search_reset_default" scale_image="true" width="65" /> | 62 | mouse_opaque="true" name="world_search_reset_default" scale_image="true" width="80" /> |
83 | <button bottom_delta="0" enabled="true" follows="left|top" font="SansSerif" | 63 | <button bottom_delta="0" enabled="true" follows="left|top" font="SansSerif" |
84 | halign="center" height="18" label="Clear" left="170" | 64 | halign="center" height="20" label="Clear" left_delta="85" |
85 | tool_tip="clear field" | 65 | tool_tip="clear field" |
86 | mouse_opaque="true" name="world_search_clear" scale_image="true" width="65" /> | 66 | mouse_opaque="true" name="world_search_clear" scale_image="true" width="80" /> |
87 | 67 | ||
88 | </panel> | 68 | </panel> |
diff --git a/linden/indra/newview/skins/default/xui/es/menu_rightclick_text.xml b/linden/indra/newview/skins/default/xui/es/menu_rightclick_text.xml new file mode 100644 index 0000000..36fa667 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/es/menu_rightclick_text.xml | |||
@@ -0,0 +1,116 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | |||
3 | <menu drop_shadow="true" | ||
4 | mouse_opaque="false" name="Text Edit Menu" opaque="true"> | ||
5 | <menu_item_call label="Cut" mouse_opaque="true" | ||
6 | name="Cut Text"> | ||
7 | <on_click function="textfield_cut" userdata="about" /> | ||
8 | <on_enable function="textfield_cut_enable" /> | ||
9 | </menu_item_call> | ||
10 | <menu_item_call label="Copy" mouse_opaque="true" | ||
11 | name="Copy Text" > | ||
12 | <on_click function="textfield_copy" userdata="" /> | ||
13 | <on_enable function="textfield_copy_enable" /> | ||
14 | </menu_item_call> | ||
15 | <menu_item_call label="Paste" mouse_opaque="true" | ||
16 | name="Paste Text" > | ||
17 | <on_click function="textfield_paste" userdata="" /> | ||
18 | <on_enable function="textfield_paste_enable" /> | ||
19 | </menu_item_call> | ||
20 | <menu_item_call label="Delete" mouse_opaque="true" | ||
21 | name="Delete Text" > | ||
22 | <on_click function="textfield_delete" userdata="" /> | ||
23 | <on_enable function="textfield_delete_enable" /> | ||
24 | </menu_item_call> | ||
25 | <menu_item_separator /> | ||
26 | <menu_item_call label="Select All" mouse_opaque="true" | ||
27 | name="Select All Text" > | ||
28 | <on_click function="textfield_selectall" userdata="" /> | ||
29 | <on_enable function="textfield_selectall_enable" /> | ||
30 | </menu_item_call> | ||
31 | <menu_item_separator name="Translate" /> | ||
32 | <menu drop_shadow="true" | ||
33 | mouse_opaque="false" name="Translation Options" | ||
34 | bottom_delta="0" label="Translate To..." opaque="true" > | ||
35 | <menu_item_call label="English" mouse_opaque="true" | ||
36 | name="Translate Text" > | ||
37 | <on_click function="textfield_translate" translate="true" userdata="en" /> | ||
38 | <on_enable function="textfield_translate_enable" /> | ||
39 | </menu_item_call> | ||
40 | <menu_item_call label="Danish" mouse_opaque="true" | ||
41 | name="Translate Text" > | ||
42 | <on_click function="textfield_translate" translate="true" userdata="da" /> | ||
43 | <on_enable function="textfield_translate_enable" /> | ||
44 | </menu_item_call> | ||
45 | <menu_item_call label="Deutsch (German)" mouse_opaque="true" | ||
46 | name="Translate Text" > | ||
47 | <on_click function="textfield_translate" translate="true" userdata="de" /> | ||
48 | <on_enable function="textfield_translate_enable" /> | ||
49 | </menu_item_call> | ||
50 | <menu_item_call label="Spanish" mouse_opaque="true" | ||
51 | name="Translate Text" > | ||
52 | <on_click function="textfield_translate" translate="true" userdata="es" /> | ||
53 | <on_enable function="textfield_translate_enable" /> | ||
54 | </menu_item_call> | ||
55 | <menu_item_call label="French" mouse_opaque="true" | ||
56 | name="Translate Text" > | ||
57 | <on_click function="textfield_translate" translate="true" userdata="fr" /> | ||
58 | <on_enable function="textfield_translate_enable" /> | ||
59 | </menu_item_call> | ||
60 | <menu_item_call label="Italian" mouse_opaque="true" | ||
61 | name="Translate Text" > | ||
62 | <on_click function="textfield_translate" translate="true" userdata="it" /> | ||
63 | <on_enable function="textfield_translate_enable" /> | ||
64 | </menu_item_call> | ||
65 | <menu_item_call label="Hungarian" mouse_opaque="true" | ||
66 | name="Translate Text" > | ||
67 | <on_click function="textfield_translate" translate="true" userdata="hu" /> | ||
68 | <on_enable function="textfield_translate_enable" /> | ||
69 | </menu_item_call> | ||
70 | <menu_item_call label="Dutch" mouse_opaque="true" | ||
71 | name="Translate Text" > | ||
72 | <on_click function="textfield_translate" translate="true" userdata="nl" /> | ||
73 | <on_enable function="textfield_translate_enable" /> | ||
74 | </menu_item_call> | ||
75 | <menu_item_call label="Polish" mouse_opaque="true" | ||
76 | name="Translate Text" > | ||
77 | <on_click function="textfield_translate" translate="true" userdata="pl" /> | ||
78 | <on_enable function="textfield_translate_enable" /> | ||
79 | </menu_item_call> | ||
80 | <menu_item_call label="Portugese" mouse_opaque="true" | ||
81 | name="Translate Text" > | ||
82 | <on_click function="textfield_translate" translate="true" userdata="pt" /> | ||
83 | <on_enable function="textfield_translate_enable" /> | ||
84 | </menu_item_call> | ||
85 | <menu_item_call label="Russian" mouse_opaque="true" | ||
86 | name="Translate Text" > | ||
87 | <on_click function="textfield_translate" translate="true" userdata="ru" /> | ||
88 | <on_enable function="textfield_translate_enable" /> | ||
89 | </menu_item_call> | ||
90 | <menu_item_call label="Turkish" mouse_opaque="true" | ||
91 | name="Translate Text" > | ||
92 | <on_click function="textfield_translate" translate="true" userdata="tr" /> | ||
93 | <on_enable function="textfield_translate_enable" /> | ||
94 | </menu_item_call> | ||
95 | <menu_item_call label="Ukrainian" mouse_opaque="true" | ||
96 | name="Translate Text" > | ||
97 | <on_click function="textfield_translate" translate="true" userdata="uk" /> | ||
98 | <on_enable function="textfield_translate_enable" /> | ||
99 | </menu_item_call> | ||
100 | <menu_item_call label="Chinese" mouse_opaque="true" | ||
101 | name="Translate Text" > | ||
102 | <on_click function="textfield_translate" translate="true" userdata="zh" /> | ||
103 | <on_enable function="textfield_translate_enable" /> | ||
104 | </menu_item_call> | ||
105 | <menu_item_call label="Japanese" mouse_opaque="true" | ||
106 | name="Translate Text" > | ||
107 | <on_click function="textfield_translate" translate="true" userdata="ja" /> | ||
108 | <on_enable function="textfield_translate_enable" /> | ||
109 | </menu_item_call> | ||
110 | <menu_item_call label="Korean" mouse_opaque="true" | ||
111 | name="Translate Text" > | ||
112 | <on_click function="textfield_translate" translate="true" userdata="ko" /> | ||
113 | <on_enable function="textfield_translate_enable" /> | ||
114 | </menu_item_call> | ||
115 | </menu> | ||
116 | </menu> | ||
diff --git a/linden/indra/newview/skins/default/xui/fr/menu_rightclick_text.xml b/linden/indra/newview/skins/default/xui/fr/menu_rightclick_text.xml new file mode 100644 index 0000000..36fa667 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/fr/menu_rightclick_text.xml | |||
@@ -0,0 +1,116 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | |||
3 | <menu drop_shadow="true" | ||
4 | mouse_opaque="false" name="Text Edit Menu" opaque="true"> | ||
5 | <menu_item_call label="Cut" mouse_opaque="true" | ||
6 | name="Cut Text"> | ||
7 | <on_click function="textfield_cut" userdata="about" /> | ||
8 | <on_enable function="textfield_cut_enable" /> | ||
9 | </menu_item_call> | ||
10 | <menu_item_call label="Copy" mouse_opaque="true" | ||
11 | name="Copy Text" > | ||
12 | <on_click function="textfield_copy" userdata="" /> | ||
13 | <on_enable function="textfield_copy_enable" /> | ||
14 | </menu_item_call> | ||
15 | <menu_item_call label="Paste" mouse_opaque="true" | ||
16 | name="Paste Text" > | ||
17 | <on_click function="textfield_paste" userdata="" /> | ||
18 | <on_enable function="textfield_paste_enable" /> | ||
19 | </menu_item_call> | ||
20 | <menu_item_call label="Delete" mouse_opaque="true" | ||
21 | name="Delete Text" > | ||
22 | <on_click function="textfield_delete" userdata="" /> | ||
23 | <on_enable function="textfield_delete_enable" /> | ||
24 | </menu_item_call> | ||
25 | <menu_item_separator /> | ||
26 | <menu_item_call label="Select All" mouse_opaque="true" | ||
27 | name="Select All Text" > | ||
28 | <on_click function="textfield_selectall" userdata="" /> | ||
29 | <on_enable function="textfield_selectall_enable" /> | ||
30 | </menu_item_call> | ||
31 | <menu_item_separator name="Translate" /> | ||
32 | <menu drop_shadow="true" | ||
33 | mouse_opaque="false" name="Translation Options" | ||
34 | bottom_delta="0" label="Translate To..." opaque="true" > | ||
35 | <menu_item_call label="English" mouse_opaque="true" | ||
36 | name="Translate Text" > | ||
37 | <on_click function="textfield_translate" translate="true" userdata="en" /> | ||
38 | <on_enable function="textfield_translate_enable" /> | ||
39 | </menu_item_call> | ||
40 | <menu_item_call label="Danish" mouse_opaque="true" | ||
41 | name="Translate Text" > | ||
42 | <on_click function="textfield_translate" translate="true" userdata="da" /> | ||
43 | <on_enable function="textfield_translate_enable" /> | ||
44 | </menu_item_call> | ||
45 | <menu_item_call label="Deutsch (German)" mouse_opaque="true" | ||
46 | name="Translate Text" > | ||
47 | <on_click function="textfield_translate" translate="true" userdata="de" /> | ||
48 | <on_enable function="textfield_translate_enable" /> | ||
49 | </menu_item_call> | ||
50 | <menu_item_call label="Spanish" mouse_opaque="true" | ||
51 | name="Translate Text" > | ||
52 | <on_click function="textfield_translate" translate="true" userdata="es" /> | ||
53 | <on_enable function="textfield_translate_enable" /> | ||
54 | </menu_item_call> | ||
55 | <menu_item_call label="French" mouse_opaque="true" | ||
56 | name="Translate Text" > | ||
57 | <on_click function="textfield_translate" translate="true" userdata="fr" /> | ||
58 | <on_enable function="textfield_translate_enable" /> | ||
59 | </menu_item_call> | ||
60 | <menu_item_call label="Italian" mouse_opaque="true" | ||
61 | name="Translate Text" > | ||
62 | <on_click function="textfield_translate" translate="true" userdata="it" /> | ||
63 | <on_enable function="textfield_translate_enable" /> | ||
64 | </menu_item_call> | ||
65 | <menu_item_call label="Hungarian" mouse_opaque="true" | ||
66 | name="Translate Text" > | ||
67 | <on_click function="textfield_translate" translate="true" userdata="hu" /> | ||
68 | <on_enable function="textfield_translate_enable" /> | ||
69 | </menu_item_call> | ||
70 | <menu_item_call label="Dutch" mouse_opaque="true" | ||
71 | name="Translate Text" > | ||
72 | <on_click function="textfield_translate" translate="true" userdata="nl" /> | ||
73 | <on_enable function="textfield_translate_enable" /> | ||
74 | </menu_item_call> | ||
75 | <menu_item_call label="Polish" mouse_opaque="true" | ||
76 | name="Translate Text" > | ||
77 | <on_click function="textfield_translate" translate="true" userdata="pl" /> | ||
78 | <on_enable function="textfield_translate_enable" /> | ||
79 | </menu_item_call> | ||
80 | <menu_item_call label="Portugese" mouse_opaque="true" | ||
81 | name="Translate Text" > | ||
82 | <on_click function="textfield_translate" translate="true" userdata="pt" /> | ||
83 | <on_enable function="textfield_translate_enable" /> | ||
84 | </menu_item_call> | ||
85 | <menu_item_call label="Russian" mouse_opaque="true" | ||
86 | name="Translate Text" > | ||
87 | <on_click function="textfield_translate" translate="true" userdata="ru" /> | ||
88 | <on_enable function="textfield_translate_enable" /> | ||
89 | </menu_item_call> | ||
90 | <menu_item_call label="Turkish" mouse_opaque="true" | ||
91 | name="Translate Text" > | ||
92 | <on_click function="textfield_translate" translate="true" userdata="tr" /> | ||
93 | <on_enable function="textfield_translate_enable" /> | ||
94 | </menu_item_call> | ||
95 | <menu_item_call label="Ukrainian" mouse_opaque="true" | ||
96 | name="Translate Text" > | ||
97 | <on_click function="textfield_translate" translate="true" userdata="uk" /> | ||
98 | <on_enable function="textfield_translate_enable" /> | ||
99 | </menu_item_call> | ||
100 | <menu_item_call label="Chinese" mouse_opaque="true" | ||
101 | name="Translate Text" > | ||
102 | <on_click function="textfield_translate" translate="true" userdata="zh" /> | ||
103 | <on_enable function="textfield_translate_enable" /> | ||
104 | </menu_item_call> | ||
105 | <menu_item_call label="Japanese" mouse_opaque="true" | ||
106 | name="Translate Text" > | ||
107 | <on_click function="textfield_translate" translate="true" userdata="ja" /> | ||
108 | <on_enable function="textfield_translate_enable" /> | ||
109 | </menu_item_call> | ||
110 | <menu_item_call label="Korean" mouse_opaque="true" | ||
111 | name="Translate Text" > | ||
112 | <on_click function="textfield_translate" translate="true" userdata="ko" /> | ||
113 | <on_enable function="textfield_translate_enable" /> | ||
114 | </menu_item_call> | ||
115 | </menu> | ||
116 | </menu> | ||
diff --git a/linden/indra/newview/skins/default/xui/hu/menu_rightclick_text.xml b/linden/indra/newview/skins/default/xui/hu/menu_rightclick_text.xml new file mode 100644 index 0000000..36fa667 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/hu/menu_rightclick_text.xml | |||
@@ -0,0 +1,116 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | |||
3 | <menu drop_shadow="true" | ||
4 | mouse_opaque="false" name="Text Edit Menu" opaque="true"> | ||
5 | <menu_item_call label="Cut" mouse_opaque="true" | ||
6 | name="Cut Text"> | ||
7 | <on_click function="textfield_cut" userdata="about" /> | ||
8 | <on_enable function="textfield_cut_enable" /> | ||
9 | </menu_item_call> | ||
10 | <menu_item_call label="Copy" mouse_opaque="true" | ||
11 | name="Copy Text" > | ||
12 | <on_click function="textfield_copy" userdata="" /> | ||
13 | <on_enable function="textfield_copy_enable" /> | ||
14 | </menu_item_call> | ||
15 | <menu_item_call label="Paste" mouse_opaque="true" | ||
16 | name="Paste Text" > | ||
17 | <on_click function="textfield_paste" userdata="" /> | ||
18 | <on_enable function="textfield_paste_enable" /> | ||
19 | </menu_item_call> | ||
20 | <menu_item_call label="Delete" mouse_opaque="true" | ||
21 | name="Delete Text" > | ||
22 | <on_click function="textfield_delete" userdata="" /> | ||
23 | <on_enable function="textfield_delete_enable" /> | ||
24 | </menu_item_call> | ||
25 | <menu_item_separator /> | ||
26 | <menu_item_call label="Select All" mouse_opaque="true" | ||
27 | name="Select All Text" > | ||
28 | <on_click function="textfield_selectall" userdata="" /> | ||
29 | <on_enable function="textfield_selectall_enable" /> | ||
30 | </menu_item_call> | ||
31 | <menu_item_separator name="Translate" /> | ||
32 | <menu drop_shadow="true" | ||
33 | mouse_opaque="false" name="Translation Options" | ||
34 | bottom_delta="0" label="Translate To..." opaque="true" > | ||
35 | <menu_item_call label="English" mouse_opaque="true" | ||
36 | name="Translate Text" > | ||
37 | <on_click function="textfield_translate" translate="true" userdata="en" /> | ||
38 | <on_enable function="textfield_translate_enable" /> | ||
39 | </menu_item_call> | ||
40 | <menu_item_call label="Danish" mouse_opaque="true" | ||
41 | name="Translate Text" > | ||
42 | <on_click function="textfield_translate" translate="true" userdata="da" /> | ||
43 | <on_enable function="textfield_translate_enable" /> | ||
44 | </menu_item_call> | ||
45 | <menu_item_call label="Deutsch (German)" mouse_opaque="true" | ||
46 | name="Translate Text" > | ||
47 | <on_click function="textfield_translate" translate="true" userdata="de" /> | ||
48 | <on_enable function="textfield_translate_enable" /> | ||
49 | </menu_item_call> | ||
50 | <menu_item_call label="Spanish" mouse_opaque="true" | ||
51 | name="Translate Text" > | ||
52 | <on_click function="textfield_translate" translate="true" userdata="es" /> | ||
53 | <on_enable function="textfield_translate_enable" /> | ||
54 | </menu_item_call> | ||
55 | <menu_item_call label="French" mouse_opaque="true" | ||
56 | name="Translate Text" > | ||
57 | <on_click function="textfield_translate" translate="true" userdata="fr" /> | ||
58 | <on_enable function="textfield_translate_enable" /> | ||
59 | </menu_item_call> | ||
60 | <menu_item_call label="Italian" mouse_opaque="true" | ||
61 | name="Translate Text" > | ||
62 | <on_click function="textfield_translate" translate="true" userdata="it" /> | ||
63 | <on_enable function="textfield_translate_enable" /> | ||
64 | </menu_item_call> | ||
65 | <menu_item_call label="Hungarian" mouse_opaque="true" | ||
66 | name="Translate Text" > | ||
67 | <on_click function="textfield_translate" translate="true" userdata="hu" /> | ||
68 | <on_enable function="textfield_translate_enable" /> | ||
69 | </menu_item_call> | ||
70 | <menu_item_call label="Dutch" mouse_opaque="true" | ||
71 | name="Translate Text" > | ||
72 | <on_click function="textfield_translate" translate="true" userdata="nl" /> | ||
73 | <on_enable function="textfield_translate_enable" /> | ||
74 | </menu_item_call> | ||
75 | <menu_item_call label="Polish" mouse_opaque="true" | ||
76 | name="Translate Text" > | ||
77 | <on_click function="textfield_translate" translate="true" userdata="pl" /> | ||
78 | <on_enable function="textfield_translate_enable" /> | ||
79 | </menu_item_call> | ||
80 | <menu_item_call label="Portugese" mouse_opaque="true" | ||
81 | name="Translate Text" > | ||
82 | <on_click function="textfield_translate" translate="true" userdata="pt" /> | ||
83 | <on_enable function="textfield_translate_enable" /> | ||
84 | </menu_item_call> | ||
85 | <menu_item_call label="Russian" mouse_opaque="true" | ||
86 | name="Translate Text" > | ||
87 | <on_click function="textfield_translate" translate="true" userdata="ru" /> | ||
88 | <on_enable function="textfield_translate_enable" /> | ||
89 | </menu_item_call> | ||
90 | <menu_item_call label="Turkish" mouse_opaque="true" | ||
91 | name="Translate Text" > | ||
92 | <on_click function="textfield_translate" translate="true" userdata="tr" /> | ||
93 | <on_enable function="textfield_translate_enable" /> | ||
94 | </menu_item_call> | ||
95 | <menu_item_call label="Ukrainian" mouse_opaque="true" | ||
96 | name="Translate Text" > | ||
97 | <on_click function="textfield_translate" translate="true" userdata="uk" /> | ||
98 | <on_enable function="textfield_translate_enable" /> | ||
99 | </menu_item_call> | ||
100 | <menu_item_call label="Chinese" mouse_opaque="true" | ||
101 | name="Translate Text" > | ||
102 | <on_click function="textfield_translate" translate="true" userdata="zh" /> | ||
103 | <on_enable function="textfield_translate_enable" /> | ||
104 | </menu_item_call> | ||
105 | <menu_item_call label="Japanese" mouse_opaque="true" | ||
106 | name="Translate Text" > | ||
107 | <on_click function="textfield_translate" translate="true" userdata="ja" /> | ||
108 | <on_enable function="textfield_translate_enable" /> | ||
109 | </menu_item_call> | ||
110 | <menu_item_call label="Korean" mouse_opaque="true" | ||
111 | name="Translate Text" > | ||
112 | <on_click function="textfield_translate" translate="true" userdata="ko" /> | ||
113 | <on_enable function="textfield_translate_enable" /> | ||
114 | </menu_item_call> | ||
115 | </menu> | ||
116 | </menu> | ||
diff --git a/linden/indra/newview/skins/default/xui/it/menu_rightclick_text.xml b/linden/indra/newview/skins/default/xui/it/menu_rightclick_text.xml new file mode 100644 index 0000000..36fa667 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/it/menu_rightclick_text.xml | |||
@@ -0,0 +1,116 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | |||
3 | <menu drop_shadow="true" | ||
4 | mouse_opaque="false" name="Text Edit Menu" opaque="true"> | ||
5 | <menu_item_call label="Cut" mouse_opaque="true" | ||
6 | name="Cut Text"> | ||
7 | <on_click function="textfield_cut" userdata="about" /> | ||
8 | <on_enable function="textfield_cut_enable" /> | ||
9 | </menu_item_call> | ||
10 | <menu_item_call label="Copy" mouse_opaque="true" | ||
11 | name="Copy Text" > | ||
12 | <on_click function="textfield_copy" userdata="" /> | ||
13 | <on_enable function="textfield_copy_enable" /> | ||
14 | </menu_item_call> | ||
15 | <menu_item_call label="Paste" mouse_opaque="true" | ||
16 | name="Paste Text" > | ||
17 | <on_click function="textfield_paste" userdata="" /> | ||
18 | <on_enable function="textfield_paste_enable" /> | ||
19 | </menu_item_call> | ||
20 | <menu_item_call label="Delete" mouse_opaque="true" | ||
21 | name="Delete Text" > | ||
22 | <on_click function="textfield_delete" userdata="" /> | ||
23 | <on_enable function="textfield_delete_enable" /> | ||
24 | </menu_item_call> | ||
25 | <menu_item_separator /> | ||
26 | <menu_item_call label="Select All" mouse_opaque="true" | ||
27 | name="Select All Text" > | ||
28 | <on_click function="textfield_selectall" userdata="" /> | ||
29 | <on_enable function="textfield_selectall_enable" /> | ||
30 | </menu_item_call> | ||
31 | <menu_item_separator name="Translate" /> | ||
32 | <menu drop_shadow="true" | ||
33 | mouse_opaque="false" name="Translation Options" | ||
34 | bottom_delta="0" label="Translate To..." opaque="true" > | ||
35 | <menu_item_call label="English" mouse_opaque="true" | ||
36 | name="Translate Text" > | ||
37 | <on_click function="textfield_translate" translate="true" userdata="en" /> | ||
38 | <on_enable function="textfield_translate_enable" /> | ||
39 | </menu_item_call> | ||
40 | <menu_item_call label="Danish" mouse_opaque="true" | ||
41 | name="Translate Text" > | ||
42 | <on_click function="textfield_translate" translate="true" userdata="da" /> | ||
43 | <on_enable function="textfield_translate_enable" /> | ||
44 | </menu_item_call> | ||
45 | <menu_item_call label="Deutsch (German)" mouse_opaque="true" | ||
46 | name="Translate Text" > | ||
47 | <on_click function="textfield_translate" translate="true" userdata="de" /> | ||
48 | <on_enable function="textfield_translate_enable" /> | ||
49 | </menu_item_call> | ||
50 | <menu_item_call label="Spanish" mouse_opaque="true" | ||
51 | name="Translate Text" > | ||
52 | <on_click function="textfield_translate" translate="true" userdata="es" /> | ||
53 | <on_enable function="textfield_translate_enable" /> | ||
54 | </menu_item_call> | ||
55 | <menu_item_call label="French" mouse_opaque="true" | ||
56 | name="Translate Text" > | ||
57 | <on_click function="textfield_translate" translate="true" userdata="fr" /> | ||
58 | <on_enable function="textfield_translate_enable" /> | ||
59 | </menu_item_call> | ||
60 | <menu_item_call label="Italian" mouse_opaque="true" | ||
61 | name="Translate Text" > | ||
62 | <on_click function="textfield_translate" translate="true" userdata="it" /> | ||
63 | <on_enable function="textfield_translate_enable" /> | ||
64 | </menu_item_call> | ||
65 | <menu_item_call label="Hungarian" mouse_opaque="true" | ||
66 | name="Translate Text" > | ||
67 | <on_click function="textfield_translate" translate="true" userdata="hu" /> | ||
68 | <on_enable function="textfield_translate_enable" /> | ||
69 | </menu_item_call> | ||
70 | <menu_item_call label="Dutch" mouse_opaque="true" | ||
71 | name="Translate Text" > | ||
72 | <on_click function="textfield_translate" translate="true" userdata="nl" /> | ||
73 | <on_enable function="textfield_translate_enable" /> | ||
74 | </menu_item_call> | ||
75 | <menu_item_call label="Polish" mouse_opaque="true" | ||
76 | name="Translate Text" > | ||
77 | <on_click function="textfield_translate" translate="true" userdata="pl" /> | ||
78 | <on_enable function="textfield_translate_enable" /> | ||
79 | </menu_item_call> | ||
80 | <menu_item_call label="Portugese" mouse_opaque="true" | ||
81 | name="Translate Text" > | ||
82 | <on_click function="textfield_translate" translate="true" userdata="pt" /> | ||
83 | <on_enable function="textfield_translate_enable" /> | ||
84 | </menu_item_call> | ||
85 | <menu_item_call label="Russian" mouse_opaque="true" | ||
86 | name="Translate Text" > | ||
87 | <on_click function="textfield_translate" translate="true" userdata="ru" /> | ||
88 | <on_enable function="textfield_translate_enable" /> | ||
89 | </menu_item_call> | ||
90 | <menu_item_call label="Turkish" mouse_opaque="true" | ||
91 | name="Translate Text" > | ||
92 | <on_click function="textfield_translate" translate="true" userdata="tr" /> | ||
93 | <on_enable function="textfield_translate_enable" /> | ||
94 | </menu_item_call> | ||
95 | <menu_item_call label="Ukrainian" mouse_opaque="true" | ||
96 | name="Translate Text" > | ||
97 | <on_click function="textfield_translate" translate="true" userdata="uk" /> | ||
98 | <on_enable function="textfield_translate_enable" /> | ||
99 | </menu_item_call> | ||
100 | <menu_item_call label="Chinese" mouse_opaque="true" | ||
101 | name="Translate Text" > | ||
102 | <on_click function="textfield_translate" translate="true" userdata="zh" /> | ||
103 | <on_enable function="textfield_translate_enable" /> | ||
104 | </menu_item_call> | ||
105 | <menu_item_call label="Japanese" mouse_opaque="true" | ||
106 | name="Translate Text" > | ||
107 | <on_click function="textfield_translate" translate="true" userdata="ja" /> | ||
108 | <on_enable function="textfield_translate_enable" /> | ||
109 | </menu_item_call> | ||
110 | <menu_item_call label="Korean" mouse_opaque="true" | ||
111 | name="Translate Text" > | ||
112 | <on_click function="textfield_translate" translate="true" userdata="ko" /> | ||
113 | <on_enable function="textfield_translate_enable" /> | ||
114 | </menu_item_call> | ||
115 | </menu> | ||
116 | </menu> | ||
diff --git a/linden/indra/newview/skins/default/xui/ja/menu_rightclick_text.xml b/linden/indra/newview/skins/default/xui/ja/menu_rightclick_text.xml new file mode 100644 index 0000000..36fa667 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/ja/menu_rightclick_text.xml | |||
@@ -0,0 +1,116 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | |||
3 | <menu drop_shadow="true" | ||
4 | mouse_opaque="false" name="Text Edit Menu" opaque="true"> | ||
5 | <menu_item_call label="Cut" mouse_opaque="true" | ||
6 | name="Cut Text"> | ||
7 | <on_click function="textfield_cut" userdata="about" /> | ||
8 | <on_enable function="textfield_cut_enable" /> | ||
9 | </menu_item_call> | ||
10 | <menu_item_call label="Copy" mouse_opaque="true" | ||
11 | name="Copy Text" > | ||
12 | <on_click function="textfield_copy" userdata="" /> | ||
13 | <on_enable function="textfield_copy_enable" /> | ||
14 | </menu_item_call> | ||
15 | <menu_item_call label="Paste" mouse_opaque="true" | ||
16 | name="Paste Text" > | ||
17 | <on_click function="textfield_paste" userdata="" /> | ||
18 | <on_enable function="textfield_paste_enable" /> | ||
19 | </menu_item_call> | ||
20 | <menu_item_call label="Delete" mouse_opaque="true" | ||
21 | name="Delete Text" > | ||
22 | <on_click function="textfield_delete" userdata="" /> | ||
23 | <on_enable function="textfield_delete_enable" /> | ||
24 | </menu_item_call> | ||
25 | <menu_item_separator /> | ||
26 | <menu_item_call label="Select All" mouse_opaque="true" | ||
27 | name="Select All Text" > | ||
28 | <on_click function="textfield_selectall" userdata="" /> | ||
29 | <on_enable function="textfield_selectall_enable" /> | ||
30 | </menu_item_call> | ||
31 | <menu_item_separator name="Translate" /> | ||
32 | <menu drop_shadow="true" | ||
33 | mouse_opaque="false" name="Translation Options" | ||
34 | bottom_delta="0" label="Translate To..." opaque="true" > | ||
35 | <menu_item_call label="English" mouse_opaque="true" | ||
36 | name="Translate Text" > | ||
37 | <on_click function="textfield_translate" translate="true" userdata="en" /> | ||
38 | <on_enable function="textfield_translate_enable" /> | ||
39 | </menu_item_call> | ||
40 | <menu_item_call label="Danish" mouse_opaque="true" | ||
41 | name="Translate Text" > | ||
42 | <on_click function="textfield_translate" translate="true" userdata="da" /> | ||
43 | <on_enable function="textfield_translate_enable" /> | ||
44 | </menu_item_call> | ||
45 | <menu_item_call label="Deutsch (German)" mouse_opaque="true" | ||
46 | name="Translate Text" > | ||
47 | <on_click function="textfield_translate" translate="true" userdata="de" /> | ||
48 | <on_enable function="textfield_translate_enable" /> | ||
49 | </menu_item_call> | ||
50 | <menu_item_call label="Spanish" mouse_opaque="true" | ||
51 | name="Translate Text" > | ||
52 | <on_click function="textfield_translate" translate="true" userdata="es" /> | ||
53 | <on_enable function="textfield_translate_enable" /> | ||
54 | </menu_item_call> | ||
55 | <menu_item_call label="French" mouse_opaque="true" | ||
56 | name="Translate Text" > | ||
57 | <on_click function="textfield_translate" translate="true" userdata="fr" /> | ||
58 | <on_enable function="textfield_translate_enable" /> | ||
59 | </menu_item_call> | ||
60 | <menu_item_call label="Italian" mouse_opaque="true" | ||
61 | name="Translate Text" > | ||
62 | <on_click function="textfield_translate" translate="true" userdata="it" /> | ||
63 | <on_enable function="textfield_translate_enable" /> | ||
64 | </menu_item_call> | ||
65 | <menu_item_call label="Hungarian" mouse_opaque="true" | ||
66 | name="Translate Text" > | ||
67 | <on_click function="textfield_translate" translate="true" userdata="hu" /> | ||
68 | <on_enable function="textfield_translate_enable" /> | ||
69 | </menu_item_call> | ||
70 | <menu_item_call label="Dutch" mouse_opaque="true" | ||
71 | name="Translate Text" > | ||
72 | <on_click function="textfield_translate" translate="true" userdata="nl" /> | ||
73 | <on_enable function="textfield_translate_enable" /> | ||
74 | </menu_item_call> | ||
75 | <menu_item_call label="Polish" mouse_opaque="true" | ||
76 | name="Translate Text" > | ||
77 | <on_click function="textfield_translate" translate="true" userdata="pl" /> | ||
78 | <on_enable function="textfield_translate_enable" /> | ||
79 | </menu_item_call> | ||
80 | <menu_item_call label="Portugese" mouse_opaque="true" | ||
81 | name="Translate Text" > | ||
82 | <on_click function="textfield_translate" translate="true" userdata="pt" /> | ||
83 | <on_enable function="textfield_translate_enable" /> | ||
84 | </menu_item_call> | ||
85 | <menu_item_call label="Russian" mouse_opaque="true" | ||
86 | name="Translate Text" > | ||
87 | <on_click function="textfield_translate" translate="true" userdata="ru" /> | ||
88 | <on_enable function="textfield_translate_enable" /> | ||
89 | </menu_item_call> | ||
90 | <menu_item_call label="Turkish" mouse_opaque="true" | ||
91 | name="Translate Text" > | ||
92 | <on_click function="textfield_translate" translate="true" userdata="tr" /> | ||
93 | <on_enable function="textfield_translate_enable" /> | ||
94 | </menu_item_call> | ||
95 | <menu_item_call label="Ukrainian" mouse_opaque="true" | ||
96 | name="Translate Text" > | ||
97 | <on_click function="textfield_translate" translate="true" userdata="uk" /> | ||
98 | <on_enable function="textfield_translate_enable" /> | ||
99 | </menu_item_call> | ||
100 | <menu_item_call label="Chinese" mouse_opaque="true" | ||
101 | name="Translate Text" > | ||
102 | <on_click function="textfield_translate" translate="true" userdata="zh" /> | ||
103 | <on_enable function="textfield_translate_enable" /> | ||
104 | </menu_item_call> | ||
105 | <menu_item_call label="Japanese" mouse_opaque="true" | ||
106 | name="Translate Text" > | ||
107 | <on_click function="textfield_translate" translate="true" userdata="ja" /> | ||
108 | <on_enable function="textfield_translate_enable" /> | ||
109 | </menu_item_call> | ||
110 | <menu_item_call label="Korean" mouse_opaque="true" | ||
111 | name="Translate Text" > | ||
112 | <on_click function="textfield_translate" translate="true" userdata="ko" /> | ||
113 | <on_enable function="textfield_translate_enable" /> | ||
114 | </menu_item_call> | ||
115 | </menu> | ||
116 | </menu> | ||
diff --git a/linden/indra/newview/skins/default/xui/ko/menu_rightclick_text.xml b/linden/indra/newview/skins/default/xui/ko/menu_rightclick_text.xml new file mode 100644 index 0000000..36fa667 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/ko/menu_rightclick_text.xml | |||
@@ -0,0 +1,116 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | |||
3 | <menu drop_shadow="true" | ||
4 | mouse_opaque="false" name="Text Edit Menu" opaque="true"> | ||
5 | <menu_item_call label="Cut" mouse_opaque="true" | ||
6 | name="Cut Text"> | ||
7 | <on_click function="textfield_cut" userdata="about" /> | ||
8 | <on_enable function="textfield_cut_enable" /> | ||
9 | </menu_item_call> | ||
10 | <menu_item_call label="Copy" mouse_opaque="true" | ||
11 | name="Copy Text" > | ||
12 | <on_click function="textfield_copy" userdata="" /> | ||
13 | <on_enable function="textfield_copy_enable" /> | ||
14 | </menu_item_call> | ||
15 | <menu_item_call label="Paste" mouse_opaque="true" | ||
16 | name="Paste Text" > | ||
17 | <on_click function="textfield_paste" userdata="" /> | ||
18 | <on_enable function="textfield_paste_enable" /> | ||
19 | </menu_item_call> | ||
20 | <menu_item_call label="Delete" mouse_opaque="true" | ||
21 | name="Delete Text" > | ||
22 | <on_click function="textfield_delete" userdata="" /> | ||
23 | <on_enable function="textfield_delete_enable" /> | ||
24 | </menu_item_call> | ||
25 | <menu_item_separator /> | ||
26 | <menu_item_call label="Select All" mouse_opaque="true" | ||
27 | name="Select All Text" > | ||
28 | <on_click function="textfield_selectall" userdata="" /> | ||
29 | <on_enable function="textfield_selectall_enable" /> | ||
30 | </menu_item_call> | ||
31 | <menu_item_separator name="Translate" /> | ||
32 | <menu drop_shadow="true" | ||
33 | mouse_opaque="false" name="Translation Options" | ||
34 | bottom_delta="0" label="Translate To..." opaque="true" > | ||
35 | <menu_item_call label="English" mouse_opaque="true" | ||
36 | name="Translate Text" > | ||
37 | <on_click function="textfield_translate" translate="true" userdata="en" /> | ||
38 | <on_enable function="textfield_translate_enable" /> | ||
39 | </menu_item_call> | ||
40 | <menu_item_call label="Danish" mouse_opaque="true" | ||
41 | name="Translate Text" > | ||
42 | <on_click function="textfield_translate" translate="true" userdata="da" /> | ||
43 | <on_enable function="textfield_translate_enable" /> | ||
44 | </menu_item_call> | ||
45 | <menu_item_call label="Deutsch (German)" mouse_opaque="true" | ||
46 | name="Translate Text" > | ||
47 | <on_click function="textfield_translate" translate="true" userdata="de" /> | ||
48 | <on_enable function="textfield_translate_enable" /> | ||
49 | </menu_item_call> | ||
50 | <menu_item_call label="Spanish" mouse_opaque="true" | ||
51 | name="Translate Text" > | ||
52 | <on_click function="textfield_translate" translate="true" userdata="es" /> | ||
53 | <on_enable function="textfield_translate_enable" /> | ||
54 | </menu_item_call> | ||
55 | <menu_item_call label="French" mouse_opaque="true" | ||
56 | name="Translate Text" > | ||
57 | <on_click function="textfield_translate" translate="true" userdata="fr" /> | ||
58 | <on_enable function="textfield_translate_enable" /> | ||
59 | </menu_item_call> | ||
60 | <menu_item_call label="Italian" mouse_opaque="true" | ||
61 | name="Translate Text" > | ||
62 | <on_click function="textfield_translate" translate="true" userdata="it" /> | ||
63 | <on_enable function="textfield_translate_enable" /> | ||
64 | </menu_item_call> | ||
65 | <menu_item_call label="Hungarian" mouse_opaque="true" | ||
66 | name="Translate Text" > | ||
67 | <on_click function="textfield_translate" translate="true" userdata="hu" /> | ||
68 | <on_enable function="textfield_translate_enable" /> | ||
69 | </menu_item_call> | ||
70 | <menu_item_call label="Dutch" mouse_opaque="true" | ||
71 | name="Translate Text" > | ||
72 | <on_click function="textfield_translate" translate="true" userdata="nl" /> | ||
73 | <on_enable function="textfield_translate_enable" /> | ||
74 | </menu_item_call> | ||
75 | <menu_item_call label="Polish" mouse_opaque="true" | ||
76 | name="Translate Text" > | ||
77 | <on_click function="textfield_translate" translate="true" userdata="pl" /> | ||
78 | <on_enable function="textfield_translate_enable" /> | ||
79 | </menu_item_call> | ||
80 | <menu_item_call label="Portugese" mouse_opaque="true" | ||
81 | name="Translate Text" > | ||
82 | <on_click function="textfield_translate" translate="true" userdata="pt" /> | ||
83 | <on_enable function="textfield_translate_enable" /> | ||
84 | </menu_item_call> | ||
85 | <menu_item_call label="Russian" mouse_opaque="true" | ||
86 | name="Translate Text" > | ||
87 | <on_click function="textfield_translate" translate="true" userdata="ru" /> | ||
88 | <on_enable function="textfield_translate_enable" /> | ||
89 | </menu_item_call> | ||
90 | <menu_item_call label="Turkish" mouse_opaque="true" | ||
91 | name="Translate Text" > | ||
92 | <on_click function="textfield_translate" translate="true" userdata="tr" /> | ||
93 | <on_enable function="textfield_translate_enable" /> | ||
94 | </menu_item_call> | ||
95 | <menu_item_call label="Ukrainian" mouse_opaque="true" | ||
96 | name="Translate Text" > | ||
97 | <on_click function="textfield_translate" translate="true" userdata="uk" /> | ||
98 | <on_enable function="textfield_translate_enable" /> | ||
99 | </menu_item_call> | ||
100 | <menu_item_call label="Chinese" mouse_opaque="true" | ||
101 | name="Translate Text" > | ||
102 | <on_click function="textfield_translate" translate="true" userdata="zh" /> | ||
103 | <on_enable function="textfield_translate_enable" /> | ||
104 | </menu_item_call> | ||
105 | <menu_item_call label="Japanese" mouse_opaque="true" | ||
106 | name="Translate Text" > | ||
107 | <on_click function="textfield_translate" translate="true" userdata="ja" /> | ||
108 | <on_enable function="textfield_translate_enable" /> | ||
109 | </menu_item_call> | ||
110 | <menu_item_call label="Korean" mouse_opaque="true" | ||
111 | name="Translate Text" > | ||
112 | <on_click function="textfield_translate" translate="true" userdata="ko" /> | ||
113 | <on_enable function="textfield_translate_enable" /> | ||
114 | </menu_item_call> | ||
115 | </menu> | ||
116 | </menu> | ||
diff --git a/linden/indra/newview/skins/default/xui/pl/menu_rightclick_text.xml b/linden/indra/newview/skins/default/xui/pl/menu_rightclick_text.xml new file mode 100644 index 0000000..36fa667 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/pl/menu_rightclick_text.xml | |||
@@ -0,0 +1,116 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | |||
3 | <menu drop_shadow="true" | ||
4 | mouse_opaque="false" name="Text Edit Menu" opaque="true"> | ||
5 | <menu_item_call label="Cut" mouse_opaque="true" | ||
6 | name="Cut Text"> | ||
7 | <on_click function="textfield_cut" userdata="about" /> | ||
8 | <on_enable function="textfield_cut_enable" /> | ||
9 | </menu_item_call> | ||
10 | <menu_item_call label="Copy" mouse_opaque="true" | ||
11 | name="Copy Text" > | ||
12 | <on_click function="textfield_copy" userdata="" /> | ||
13 | <on_enable function="textfield_copy_enable" /> | ||
14 | </menu_item_call> | ||
15 | <menu_item_call label="Paste" mouse_opaque="true" | ||
16 | name="Paste Text" > | ||
17 | <on_click function="textfield_paste" userdata="" /> | ||
18 | <on_enable function="textfield_paste_enable" /> | ||
19 | </menu_item_call> | ||
20 | <menu_item_call label="Delete" mouse_opaque="true" | ||
21 | name="Delete Text" > | ||
22 | <on_click function="textfield_delete" userdata="" /> | ||
23 | <on_enable function="textfield_delete_enable" /> | ||
24 | </menu_item_call> | ||
25 | <menu_item_separator /> | ||
26 | <menu_item_call label="Select All" mouse_opaque="true" | ||
27 | name="Select All Text" > | ||
28 | <on_click function="textfield_selectall" userdata="" /> | ||
29 | <on_enable function="textfield_selectall_enable" /> | ||
30 | </menu_item_call> | ||
31 | <menu_item_separator name="Translate" /> | ||
32 | <menu drop_shadow="true" | ||
33 | mouse_opaque="false" name="Translation Options" | ||
34 | bottom_delta="0" label="Translate To..." opaque="true" > | ||
35 | <menu_item_call label="English" mouse_opaque="true" | ||
36 | name="Translate Text" > | ||
37 | <on_click function="textfield_translate" translate="true" userdata="en" /> | ||
38 | <on_enable function="textfield_translate_enable" /> | ||
39 | </menu_item_call> | ||
40 | <menu_item_call label="Danish" mouse_opaque="true" | ||
41 | name="Translate Text" > | ||
42 | <on_click function="textfield_translate" translate="true" userdata="da" /> | ||
43 | <on_enable function="textfield_translate_enable" /> | ||
44 | </menu_item_call> | ||
45 | <menu_item_call label="Deutsch (German)" mouse_opaque="true" | ||
46 | name="Translate Text" > | ||
47 | <on_click function="textfield_translate" translate="true" userdata="de" /> | ||
48 | <on_enable function="textfield_translate_enable" /> | ||
49 | </menu_item_call> | ||
50 | <menu_item_call label="Spanish" mouse_opaque="true" | ||
51 | name="Translate Text" > | ||
52 | <on_click function="textfield_translate" translate="true" userdata="es" /> | ||
53 | <on_enable function="textfield_translate_enable" /> | ||
54 | </menu_item_call> | ||
55 | <menu_item_call label="French" mouse_opaque="true" | ||
56 | name="Translate Text" > | ||
57 | <on_click function="textfield_translate" translate="true" userdata="fr" /> | ||
58 | <on_enable function="textfield_translate_enable" /> | ||
59 | </menu_item_call> | ||
60 | <menu_item_call label="Italian" mouse_opaque="true" | ||
61 | name="Translate Text" > | ||
62 | <on_click function="textfield_translate" translate="true" userdata="it" /> | ||
63 | <on_enable function="textfield_translate_enable" /> | ||
64 | </menu_item_call> | ||
65 | <menu_item_call label="Hungarian" mouse_opaque="true" | ||
66 | name="Translate Text" > | ||
67 | <on_click function="textfield_translate" translate="true" userdata="hu" /> | ||
68 | <on_enable function="textfield_translate_enable" /> | ||
69 | </menu_item_call> | ||
70 | <menu_item_call label="Dutch" mouse_opaque="true" | ||
71 | name="Translate Text" > | ||
72 | <on_click function="textfield_translate" translate="true" userdata="nl" /> | ||
73 | <on_enable function="textfield_translate_enable" /> | ||
74 | </menu_item_call> | ||
75 | <menu_item_call label="Polish" mouse_opaque="true" | ||
76 | name="Translate Text" > | ||
77 | <on_click function="textfield_translate" translate="true" userdata="pl" /> | ||
78 | <on_enable function="textfield_translate_enable" /> | ||
79 | </menu_item_call> | ||
80 | <menu_item_call label="Portugese" mouse_opaque="true" | ||
81 | name="Translate Text" > | ||
82 | <on_click function="textfield_translate" translate="true" userdata="pt" /> | ||
83 | <on_enable function="textfield_translate_enable" /> | ||
84 | </menu_item_call> | ||
85 | <menu_item_call label="Russian" mouse_opaque="true" | ||
86 | name="Translate Text" > | ||
87 | <on_click function="textfield_translate" translate="true" userdata="ru" /> | ||
88 | <on_enable function="textfield_translate_enable" /> | ||
89 | </menu_item_call> | ||
90 | <menu_item_call label="Turkish" mouse_opaque="true" | ||
91 | name="Translate Text" > | ||
92 | <on_click function="textfield_translate" translate="true" userdata="tr" /> | ||
93 | <on_enable function="textfield_translate_enable" /> | ||
94 | </menu_item_call> | ||
95 | <menu_item_call label="Ukrainian" mouse_opaque="true" | ||
96 | name="Translate Text" > | ||
97 | <on_click function="textfield_translate" translate="true" userdata="uk" /> | ||
98 | <on_enable function="textfield_translate_enable" /> | ||
99 | </menu_item_call> | ||
100 | <menu_item_call label="Chinese" mouse_opaque="true" | ||
101 | name="Translate Text" > | ||
102 | <on_click function="textfield_translate" translate="true" userdata="zh" /> | ||
103 | <on_enable function="textfield_translate_enable" /> | ||
104 | </menu_item_call> | ||
105 | <menu_item_call label="Japanese" mouse_opaque="true" | ||
106 | name="Translate Text" > | ||
107 | <on_click function="textfield_translate" translate="true" userdata="ja" /> | ||
108 | <on_enable function="textfield_translate_enable" /> | ||
109 | </menu_item_call> | ||
110 | <menu_item_call label="Korean" mouse_opaque="true" | ||
111 | name="Translate Text" > | ||
112 | <on_click function="textfield_translate" translate="true" userdata="ko" /> | ||
113 | <on_enable function="textfield_translate_enable" /> | ||
114 | </menu_item_call> | ||
115 | </menu> | ||
116 | </menu> | ||
diff --git a/linden/indra/newview/skins/default/xui/pt/menu_rightclick_text.xml b/linden/indra/newview/skins/default/xui/pt/menu_rightclick_text.xml new file mode 100644 index 0000000..36fa667 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/pt/menu_rightclick_text.xml | |||
@@ -0,0 +1,116 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | |||
3 | <menu drop_shadow="true" | ||
4 | mouse_opaque="false" name="Text Edit Menu" opaque="true"> | ||
5 | <menu_item_call label="Cut" mouse_opaque="true" | ||
6 | name="Cut Text"> | ||
7 | <on_click function="textfield_cut" userdata="about" /> | ||
8 | <on_enable function="textfield_cut_enable" /> | ||
9 | </menu_item_call> | ||
10 | <menu_item_call label="Copy" mouse_opaque="true" | ||
11 | name="Copy Text" > | ||
12 | <on_click function="textfield_copy" userdata="" /> | ||
13 | <on_enable function="textfield_copy_enable" /> | ||
14 | </menu_item_call> | ||
15 | <menu_item_call label="Paste" mouse_opaque="true" | ||
16 | name="Paste Text" > | ||
17 | <on_click function="textfield_paste" userdata="" /> | ||
18 | <on_enable function="textfield_paste_enable" /> | ||
19 | </menu_item_call> | ||
20 | <menu_item_call label="Delete" mouse_opaque="true" | ||
21 | name="Delete Text" > | ||
22 | <on_click function="textfield_delete" userdata="" /> | ||
23 | <on_enable function="textfield_delete_enable" /> | ||
24 | </menu_item_call> | ||
25 | <menu_item_separator /> | ||
26 | <menu_item_call label="Select All" mouse_opaque="true" | ||
27 | name="Select All Text" > | ||
28 | <on_click function="textfield_selectall" userdata="" /> | ||
29 | <on_enable function="textfield_selectall_enable" /> | ||
30 | </menu_item_call> | ||
31 | <menu_item_separator name="Translate" /> | ||
32 | <menu drop_shadow="true" | ||
33 | mouse_opaque="false" name="Translation Options" | ||
34 | bottom_delta="0" label="Translate To..." opaque="true" > | ||
35 | <menu_item_call label="English" mouse_opaque="true" | ||
36 | name="Translate Text" > | ||
37 | <on_click function="textfield_translate" translate="true" userdata="en" /> | ||
38 | <on_enable function="textfield_translate_enable" /> | ||
39 | </menu_item_call> | ||
40 | <menu_item_call label="Danish" mouse_opaque="true" | ||
41 | name="Translate Text" > | ||
42 | <on_click function="textfield_translate" translate="true" userdata="da" /> | ||
43 | <on_enable function="textfield_translate_enable" /> | ||
44 | </menu_item_call> | ||
45 | <menu_item_call label="Deutsch (German)" mouse_opaque="true" | ||
46 | name="Translate Text" > | ||
47 | <on_click function="textfield_translate" translate="true" userdata="de" /> | ||
48 | <on_enable function="textfield_translate_enable" /> | ||
49 | </menu_item_call> | ||
50 | <menu_item_call label="Spanish" mouse_opaque="true" | ||
51 | name="Translate Text" > | ||
52 | <on_click function="textfield_translate" translate="true" userdata="es" /> | ||
53 | <on_enable function="textfield_translate_enable" /> | ||
54 | </menu_item_call> | ||
55 | <menu_item_call label="French" mouse_opaque="true" | ||
56 | name="Translate Text" > | ||
57 | <on_click function="textfield_translate" translate="true" userdata="fr" /> | ||
58 | <on_enable function="textfield_translate_enable" /> | ||
59 | </menu_item_call> | ||
60 | <menu_item_call label="Italian" mouse_opaque="true" | ||
61 | name="Translate Text" > | ||
62 | <on_click function="textfield_translate" translate="true" userdata="it" /> | ||
63 | <on_enable function="textfield_translate_enable" /> | ||
64 | </menu_item_call> | ||
65 | <menu_item_call label="Hungarian" mouse_opaque="true" | ||
66 | name="Translate Text" > | ||
67 | <on_click function="textfield_translate" translate="true" userdata="hu" /> | ||
68 | <on_enable function="textfield_translate_enable" /> | ||
69 | </menu_item_call> | ||
70 | <menu_item_call label="Dutch" mouse_opaque="true" | ||
71 | name="Translate Text" > | ||
72 | <on_click function="textfield_translate" translate="true" userdata="nl" /> | ||
73 | <on_enable function="textfield_translate_enable" /> | ||
74 | </menu_item_call> | ||
75 | <menu_item_call label="Polish" mouse_opaque="true" | ||
76 | name="Translate Text" > | ||
77 | <on_click function="textfield_translate" translate="true" userdata="pl" /> | ||
78 | <on_enable function="textfield_translate_enable" /> | ||
79 | </menu_item_call> | ||
80 | <menu_item_call label="Portugese" mouse_opaque="true" | ||
81 | name="Translate Text" > | ||
82 | <on_click function="textfield_translate" translate="true" userdata="pt" /> | ||
83 | <on_enable function="textfield_translate_enable" /> | ||
84 | </menu_item_call> | ||
85 | <menu_item_call label="Russian" mouse_opaque="true" | ||
86 | name="Translate Text" > | ||
87 | <on_click function="textfield_translate" translate="true" userdata="ru" /> | ||
88 | <on_enable function="textfield_translate_enable" /> | ||
89 | </menu_item_call> | ||
90 | <menu_item_call label="Turkish" mouse_opaque="true" | ||
91 | name="Translate Text" > | ||
92 | <on_click function="textfield_translate" translate="true" userdata="tr" /> | ||
93 | <on_enable function="textfield_translate_enable" /> | ||
94 | </menu_item_call> | ||
95 | <menu_item_call label="Ukrainian" mouse_opaque="true" | ||
96 | name="Translate Text" > | ||
97 | <on_click function="textfield_translate" translate="true" userdata="uk" /> | ||
98 | <on_enable function="textfield_translate_enable" /> | ||
99 | </menu_item_call> | ||
100 | <menu_item_call label="Chinese" mouse_opaque="true" | ||
101 | name="Translate Text" > | ||
102 | <on_click function="textfield_translate" translate="true" userdata="zh" /> | ||
103 | <on_enable function="textfield_translate_enable" /> | ||
104 | </menu_item_call> | ||
105 | <menu_item_call label="Japanese" mouse_opaque="true" | ||
106 | name="Translate Text" > | ||
107 | <on_click function="textfield_translate" translate="true" userdata="ja" /> | ||
108 | <on_enable function="textfield_translate_enable" /> | ||
109 | </menu_item_call> | ||
110 | <menu_item_call label="Korean" mouse_opaque="true" | ||
111 | name="Translate Text" > | ||
112 | <on_click function="textfield_translate" translate="true" userdata="ko" /> | ||
113 | <on_enable function="textfield_translate_enable" /> | ||
114 | </menu_item_call> | ||
115 | </menu> | ||
116 | </menu> | ||
diff --git a/linden/indra/newview/skins/default/xui/ru/menu_rightclick_text.xml b/linden/indra/newview/skins/default/xui/ru/menu_rightclick_text.xml new file mode 100644 index 0000000..36fa667 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/ru/menu_rightclick_text.xml | |||
@@ -0,0 +1,116 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | |||
3 | <menu drop_shadow="true" | ||
4 | mouse_opaque="false" name="Text Edit Menu" opaque="true"> | ||
5 | <menu_item_call label="Cut" mouse_opaque="true" | ||
6 | name="Cut Text"> | ||
7 | <on_click function="textfield_cut" userdata="about" /> | ||
8 | <on_enable function="textfield_cut_enable" /> | ||
9 | </menu_item_call> | ||
10 | <menu_item_call label="Copy" mouse_opaque="true" | ||
11 | name="Copy Text" > | ||
12 | <on_click function="textfield_copy" userdata="" /> | ||
13 | <on_enable function="textfield_copy_enable" /> | ||
14 | </menu_item_call> | ||
15 | <menu_item_call label="Paste" mouse_opaque="true" | ||
16 | name="Paste Text" > | ||
17 | <on_click function="textfield_paste" userdata="" /> | ||
18 | <on_enable function="textfield_paste_enable" /> | ||
19 | </menu_item_call> | ||
20 | <menu_item_call label="Delete" mouse_opaque="true" | ||
21 | name="Delete Text" > | ||
22 | <on_click function="textfield_delete" userdata="" /> | ||
23 | <on_enable function="textfield_delete_enable" /> | ||
24 | </menu_item_call> | ||
25 | <menu_item_separator /> | ||
26 | <menu_item_call label="Select All" mouse_opaque="true" | ||
27 | name="Select All Text" > | ||
28 | <on_click function="textfield_selectall" userdata="" /> | ||
29 | <on_enable function="textfield_selectall_enable" /> | ||
30 | </menu_item_call> | ||
31 | <menu_item_separator name="Translate" /> | ||
32 | <menu drop_shadow="true" | ||
33 | mouse_opaque="false" name="Translation Options" | ||
34 | bottom_delta="0" label="Translate To..." opaque="true" > | ||
35 | <menu_item_call label="English" mouse_opaque="true" | ||
36 | name="Translate Text" > | ||
37 | <on_click function="textfield_translate" translate="true" userdata="en" /> | ||
38 | <on_enable function="textfield_translate_enable" /> | ||
39 | </menu_item_call> | ||
40 | <menu_item_call label="Danish" mouse_opaque="true" | ||
41 | name="Translate Text" > | ||
42 | <on_click function="textfield_translate" translate="true" userdata="da" /> | ||
43 | <on_enable function="textfield_translate_enable" /> | ||
44 | </menu_item_call> | ||
45 | <menu_item_call label="Deutsch (German)" mouse_opaque="true" | ||
46 | name="Translate Text" > | ||
47 | <on_click function="textfield_translate" translate="true" userdata="de" /> | ||
48 | <on_enable function="textfield_translate_enable" /> | ||
49 | </menu_item_call> | ||
50 | <menu_item_call label="Spanish" mouse_opaque="true" | ||
51 | name="Translate Text" > | ||
52 | <on_click function="textfield_translate" translate="true" userdata="es" /> | ||
53 | <on_enable function="textfield_translate_enable" /> | ||
54 | </menu_item_call> | ||
55 | <menu_item_call label="French" mouse_opaque="true" | ||
56 | name="Translate Text" > | ||
57 | <on_click function="textfield_translate" translate="true" userdata="fr" /> | ||
58 | <on_enable function="textfield_translate_enable" /> | ||
59 | </menu_item_call> | ||
60 | <menu_item_call label="Italian" mouse_opaque="true" | ||
61 | name="Translate Text" > | ||
62 | <on_click function="textfield_translate" translate="true" userdata="it" /> | ||
63 | <on_enable function="textfield_translate_enable" /> | ||
64 | </menu_item_call> | ||
65 | <menu_item_call label="Hungarian" mouse_opaque="true" | ||
66 | name="Translate Text" > | ||
67 | <on_click function="textfield_translate" translate="true" userdata="hu" /> | ||
68 | <on_enable function="textfield_translate_enable" /> | ||
69 | </menu_item_call> | ||
70 | <menu_item_call label="Dutch" mouse_opaque="true" | ||
71 | name="Translate Text" > | ||
72 | <on_click function="textfield_translate" translate="true" userdata="nl" /> | ||
73 | <on_enable function="textfield_translate_enable" /> | ||
74 | </menu_item_call> | ||
75 | <menu_item_call label="Polish" mouse_opaque="true" | ||
76 | name="Translate Text" > | ||
77 | <on_click function="textfield_translate" translate="true" userdata="pl" /> | ||
78 | <on_enable function="textfield_translate_enable" /> | ||
79 | </menu_item_call> | ||
80 | <menu_item_call label="Portugese" mouse_opaque="true" | ||
81 | name="Translate Text" > | ||
82 | <on_click function="textfield_translate" translate="true" userdata="pt" /> | ||
83 | <on_enable function="textfield_translate_enable" /> | ||
84 | </menu_item_call> | ||
85 | <menu_item_call label="Russian" mouse_opaque="true" | ||
86 | name="Translate Text" > | ||
87 | <on_click function="textfield_translate" translate="true" userdata="ru" /> | ||
88 | <on_enable function="textfield_translate_enable" /> | ||
89 | </menu_item_call> | ||
90 | <menu_item_call label="Turkish" mouse_opaque="true" | ||
91 | name="Translate Text" > | ||
92 | <on_click function="textfield_translate" translate="true" userdata="tr" /> | ||
93 | <on_enable function="textfield_translate_enable" /> | ||
94 | </menu_item_call> | ||
95 | <menu_item_call label="Ukrainian" mouse_opaque="true" | ||
96 | name="Translate Text" > | ||
97 | <on_click function="textfield_translate" translate="true" userdata="uk" /> | ||
98 | <on_enable function="textfield_translate_enable" /> | ||
99 | </menu_item_call> | ||
100 | <menu_item_call label="Chinese" mouse_opaque="true" | ||
101 | name="Translate Text" > | ||
102 | <on_click function="textfield_translate" translate="true" userdata="zh" /> | ||
103 | <on_enable function="textfield_translate_enable" /> | ||
104 | </menu_item_call> | ||
105 | <menu_item_call label="Japanese" mouse_opaque="true" | ||
106 | name="Translate Text" > | ||
107 | <on_click function="textfield_translate" translate="true" userdata="ja" /> | ||
108 | <on_enable function="textfield_translate_enable" /> | ||
109 | </menu_item_call> | ||
110 | <menu_item_call label="Korean" mouse_opaque="true" | ||
111 | name="Translate Text" > | ||
112 | <on_click function="textfield_translate" translate="true" userdata="ko" /> | ||
113 | <on_enable function="textfield_translate_enable" /> | ||
114 | </menu_item_call> | ||
115 | </menu> | ||
116 | </menu> | ||
diff --git a/linden/indra/newview/skins/default/xui/tr/menu_rightclick_text.xml b/linden/indra/newview/skins/default/xui/tr/menu_rightclick_text.xml new file mode 100644 index 0000000..36fa667 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/tr/menu_rightclick_text.xml | |||
@@ -0,0 +1,116 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | |||
3 | <menu drop_shadow="true" | ||
4 | mouse_opaque="false" name="Text Edit Menu" opaque="true"> | ||
5 | <menu_item_call label="Cut" mouse_opaque="true" | ||
6 | name="Cut Text"> | ||
7 | <on_click function="textfield_cut" userdata="about" /> | ||
8 | <on_enable function="textfield_cut_enable" /> | ||
9 | </menu_item_call> | ||
10 | <menu_item_call label="Copy" mouse_opaque="true" | ||
11 | name="Copy Text" > | ||
12 | <on_click function="textfield_copy" userdata="" /> | ||
13 | <on_enable function="textfield_copy_enable" /> | ||
14 | </menu_item_call> | ||
15 | <menu_item_call label="Paste" mouse_opaque="true" | ||
16 | name="Paste Text" > | ||
17 | <on_click function="textfield_paste" userdata="" /> | ||
18 | <on_enable function="textfield_paste_enable" /> | ||
19 | </menu_item_call> | ||
20 | <menu_item_call label="Delete" mouse_opaque="true" | ||
21 | name="Delete Text" > | ||
22 | <on_click function="textfield_delete" userdata="" /> | ||
23 | <on_enable function="textfield_delete_enable" /> | ||
24 | </menu_item_call> | ||
25 | <menu_item_separator /> | ||
26 | <menu_item_call label="Select All" mouse_opaque="true" | ||
27 | name="Select All Text" > | ||
28 | <on_click function="textfield_selectall" userdata="" /> | ||
29 | <on_enable function="textfield_selectall_enable" /> | ||
30 | </menu_item_call> | ||
31 | <menu_item_separator name="Translate" /> | ||
32 | <menu drop_shadow="true" | ||
33 | mouse_opaque="false" name="Translation Options" | ||
34 | bottom_delta="0" label="Translate To..." opaque="true" > | ||
35 | <menu_item_call label="English" mouse_opaque="true" | ||
36 | name="Translate Text" > | ||
37 | <on_click function="textfield_translate" translate="true" userdata="en" /> | ||
38 | <on_enable function="textfield_translate_enable" /> | ||
39 | </menu_item_call> | ||
40 | <menu_item_call label="Danish" mouse_opaque="true" | ||
41 | name="Translate Text" > | ||
42 | <on_click function="textfield_translate" translate="true" userdata="da" /> | ||
43 | <on_enable function="textfield_translate_enable" /> | ||
44 | </menu_item_call> | ||
45 | <menu_item_call label="Deutsch (German)" mouse_opaque="true" | ||
46 | name="Translate Text" > | ||
47 | <on_click function="textfield_translate" translate="true" userdata="de" /> | ||
48 | <on_enable function="textfield_translate_enable" /> | ||
49 | </menu_item_call> | ||
50 | <menu_item_call label="Spanish" mouse_opaque="true" | ||
51 | name="Translate Text" > | ||
52 | <on_click function="textfield_translate" translate="true" userdata="es" /> | ||
53 | <on_enable function="textfield_translate_enable" /> | ||
54 | </menu_item_call> | ||
55 | <menu_item_call label="French" mouse_opaque="true" | ||
56 | name="Translate Text" > | ||
57 | <on_click function="textfield_translate" translate="true" userdata="fr" /> | ||
58 | <on_enable function="textfield_translate_enable" /> | ||
59 | </menu_item_call> | ||
60 | <menu_item_call label="Italian" mouse_opaque="true" | ||
61 | name="Translate Text" > | ||
62 | <on_click function="textfield_translate" translate="true" userdata="it" /> | ||
63 | <on_enable function="textfield_translate_enable" /> | ||
64 | </menu_item_call> | ||
65 | <menu_item_call label="Hungarian" mouse_opaque="true" | ||
66 | name="Translate Text" > | ||
67 | <on_click function="textfield_translate" translate="true" userdata="hu" /> | ||
68 | <on_enable function="textfield_translate_enable" /> | ||
69 | </menu_item_call> | ||
70 | <menu_item_call label="Dutch" mouse_opaque="true" | ||
71 | name="Translate Text" > | ||
72 | <on_click function="textfield_translate" translate="true" userdata="nl" /> | ||
73 | <on_enable function="textfield_translate_enable" /> | ||
74 | </menu_item_call> | ||
75 | <menu_item_call label="Polish" mouse_opaque="true" | ||
76 | name="Translate Text" > | ||
77 | <on_click function="textfield_translate" translate="true" userdata="pl" /> | ||
78 | <on_enable function="textfield_translate_enable" /> | ||
79 | </menu_item_call> | ||
80 | <menu_item_call label="Portugese" mouse_opaque="true" | ||
81 | name="Translate Text" > | ||
82 | <on_click function="textfield_translate" translate="true" userdata="pt" /> | ||
83 | <on_enable function="textfield_translate_enable" /> | ||
84 | </menu_item_call> | ||
85 | <menu_item_call label="Russian" mouse_opaque="true" | ||
86 | name="Translate Text" > | ||
87 | <on_click function="textfield_translate" translate="true" userdata="ru" /> | ||
88 | <on_enable function="textfield_translate_enable" /> | ||
89 | </menu_item_call> | ||
90 | <menu_item_call label="Turkish" mouse_opaque="true" | ||
91 | name="Translate Text" > | ||
92 | <on_click function="textfield_translate" translate="true" userdata="tr" /> | ||
93 | <on_enable function="textfield_translate_enable" /> | ||
94 | </menu_item_call> | ||
95 | <menu_item_call label="Ukrainian" mouse_opaque="true" | ||
96 | name="Translate Text" > | ||
97 | <on_click function="textfield_translate" translate="true" userdata="uk" /> | ||
98 | <on_enable function="textfield_translate_enable" /> | ||
99 | </menu_item_call> | ||
100 | <menu_item_call label="Chinese" mouse_opaque="true" | ||
101 | name="Translate Text" > | ||
102 | <on_click function="textfield_translate" translate="true" userdata="zh" /> | ||
103 | <on_enable function="textfield_translate_enable" /> | ||
104 | </menu_item_call> | ||
105 | <menu_item_call label="Japanese" mouse_opaque="true" | ||
106 | name="Translate Text" > | ||
107 | <on_click function="textfield_translate" translate="true" userdata="ja" /> | ||
108 | <on_enable function="textfield_translate_enable" /> | ||
109 | </menu_item_call> | ||
110 | <menu_item_call label="Korean" mouse_opaque="true" | ||
111 | name="Translate Text" > | ||
112 | <on_click function="textfield_translate" translate="true" userdata="ko" /> | ||
113 | <on_enable function="textfield_translate_enable" /> | ||
114 | </menu_item_call> | ||
115 | </menu> | ||
116 | </menu> | ||
diff --git a/linden/indra/newview/skins/default/xui/uk/menu_rightclick_text.xml b/linden/indra/newview/skins/default/xui/uk/menu_rightclick_text.xml new file mode 100644 index 0000000..36fa667 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/uk/menu_rightclick_text.xml | |||
@@ -0,0 +1,116 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | |||
3 | <menu drop_shadow="true" | ||
4 | mouse_opaque="false" name="Text Edit Menu" opaque="true"> | ||
5 | <menu_item_call label="Cut" mouse_opaque="true" | ||
6 | name="Cut Text"> | ||
7 | <on_click function="textfield_cut" userdata="about" /> | ||
8 | <on_enable function="textfield_cut_enable" /> | ||
9 | </menu_item_call> | ||
10 | <menu_item_call label="Copy" mouse_opaque="true" | ||
11 | name="Copy Text" > | ||
12 | <on_click function="textfield_copy" userdata="" /> | ||
13 | <on_enable function="textfield_copy_enable" /> | ||
14 | </menu_item_call> | ||
15 | <menu_item_call label="Paste" mouse_opaque="true" | ||
16 | name="Paste Text" > | ||
17 | <on_click function="textfield_paste" userdata="" /> | ||
18 | <on_enable function="textfield_paste_enable" /> | ||
19 | </menu_item_call> | ||
20 | <menu_item_call label="Delete" mouse_opaque="true" | ||
21 | name="Delete Text" > | ||
22 | <on_click function="textfield_delete" userdata="" /> | ||
23 | <on_enable function="textfield_delete_enable" /> | ||
24 | </menu_item_call> | ||
25 | <menu_item_separator /> | ||
26 | <menu_item_call label="Select All" mouse_opaque="true" | ||
27 | name="Select All Text" > | ||
28 | <on_click function="textfield_selectall" userdata="" /> | ||
29 | <on_enable function="textfield_selectall_enable" /> | ||
30 | </menu_item_call> | ||
31 | <menu_item_separator name="Translate" /> | ||
32 | <menu drop_shadow="true" | ||
33 | mouse_opaque="false" name="Translation Options" | ||
34 | bottom_delta="0" label="Translate To..." opaque="true" > | ||
35 | <menu_item_call label="English" mouse_opaque="true" | ||
36 | name="Translate Text" > | ||
37 | <on_click function="textfield_translate" translate="true" userdata="en" /> | ||
38 | <on_enable function="textfield_translate_enable" /> | ||
39 | </menu_item_call> | ||
40 | <menu_item_call label="Danish" mouse_opaque="true" | ||
41 | name="Translate Text" > | ||
42 | <on_click function="textfield_translate" translate="true" userdata="da" /> | ||
43 | <on_enable function="textfield_translate_enable" /> | ||
44 | </menu_item_call> | ||
45 | <menu_item_call label="Deutsch (German)" mouse_opaque="true" | ||
46 | name="Translate Text" > | ||
47 | <on_click function="textfield_translate" translate="true" userdata="de" /> | ||
48 | <on_enable function="textfield_translate_enable" /> | ||
49 | </menu_item_call> | ||
50 | <menu_item_call label="Spanish" mouse_opaque="true" | ||
51 | name="Translate Text" > | ||
52 | <on_click function="textfield_translate" translate="true" userdata="es" /> | ||
53 | <on_enable function="textfield_translate_enable" /> | ||
54 | </menu_item_call> | ||
55 | <menu_item_call label="French" mouse_opaque="true" | ||
56 | name="Translate Text" > | ||
57 | <on_click function="textfield_translate" translate="true" userdata="fr" /> | ||
58 | <on_enable function="textfield_translate_enable" /> | ||
59 | </menu_item_call> | ||
60 | <menu_item_call label="Italian" mouse_opaque="true" | ||
61 | name="Translate Text" > | ||
62 | <on_click function="textfield_translate" translate="true" userdata="it" /> | ||
63 | <on_enable function="textfield_translate_enable" /> | ||
64 | </menu_item_call> | ||
65 | <menu_item_call label="Hungarian" mouse_opaque="true" | ||
66 | name="Translate Text" > | ||
67 | <on_click function="textfield_translate" translate="true" userdata="hu" /> | ||
68 | <on_enable function="textfield_translate_enable" /> | ||
69 | </menu_item_call> | ||
70 | <menu_item_call label="Dutch" mouse_opaque="true" | ||
71 | name="Translate Text" > | ||
72 | <on_click function="textfield_translate" translate="true" userdata="nl" /> | ||
73 | <on_enable function="textfield_translate_enable" /> | ||
74 | </menu_item_call> | ||
75 | <menu_item_call label="Polish" mouse_opaque="true" | ||
76 | name="Translate Text" > | ||
77 | <on_click function="textfield_translate" translate="true" userdata="pl" /> | ||
78 | <on_enable function="textfield_translate_enable" /> | ||
79 | </menu_item_call> | ||
80 | <menu_item_call label="Portugese" mouse_opaque="true" | ||
81 | name="Translate Text" > | ||
82 | <on_click function="textfield_translate" translate="true" userdata="pt" /> | ||
83 | <on_enable function="textfield_translate_enable" /> | ||
84 | </menu_item_call> | ||
85 | <menu_item_call label="Russian" mouse_opaque="true" | ||
86 | name="Translate Text" > | ||
87 | <on_click function="textfield_translate" translate="true" userdata="ru" /> | ||
88 | <on_enable function="textfield_translate_enable" /> | ||
89 | </menu_item_call> | ||
90 | <menu_item_call label="Turkish" mouse_opaque="true" | ||
91 | name="Translate Text" > | ||
92 | <on_click function="textfield_translate" translate="true" userdata="tr" /> | ||
93 | <on_enable function="textfield_translate_enable" /> | ||
94 | </menu_item_call> | ||
95 | <menu_item_call label="Ukrainian" mouse_opaque="true" | ||
96 | name="Translate Text" > | ||
97 | <on_click function="textfield_translate" translate="true" userdata="uk" /> | ||
98 | <on_enable function="textfield_translate_enable" /> | ||
99 | </menu_item_call> | ||
100 | <menu_item_call label="Chinese" mouse_opaque="true" | ||
101 | name="Translate Text" > | ||
102 | <on_click function="textfield_translate" translate="true" userdata="zh" /> | ||
103 | <on_enable function="textfield_translate_enable" /> | ||
104 | </menu_item_call> | ||
105 | <menu_item_call label="Japanese" mouse_opaque="true" | ||
106 | name="Translate Text" > | ||
107 | <on_click function="textfield_translate" translate="true" userdata="ja" /> | ||
108 | <on_enable function="textfield_translate_enable" /> | ||
109 | </menu_item_call> | ||
110 | <menu_item_call label="Korean" mouse_opaque="true" | ||
111 | name="Translate Text" > | ||
112 | <on_click function="textfield_translate" translate="true" userdata="ko" /> | ||
113 | <on_enable function="textfield_translate_enable" /> | ||
114 | </menu_item_call> | ||
115 | </menu> | ||
116 | </menu> | ||
diff --git a/linden/indra/newview/skins/default/xui/zh/menu_rightclick_text.xml b/linden/indra/newview/skins/default/xui/zh/menu_rightclick_text.xml new file mode 100644 index 0000000..36fa667 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/zh/menu_rightclick_text.xml | |||
@@ -0,0 +1,116 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | |||
3 | <menu drop_shadow="true" | ||
4 | mouse_opaque="false" name="Text Edit Menu" opaque="true"> | ||
5 | <menu_item_call label="Cut" mouse_opaque="true" | ||
6 | name="Cut Text"> | ||
7 | <on_click function="textfield_cut" userdata="about" /> | ||
8 | <on_enable function="textfield_cut_enable" /> | ||
9 | </menu_item_call> | ||
10 | <menu_item_call label="Copy" mouse_opaque="true" | ||
11 | name="Copy Text" > | ||
12 | <on_click function="textfield_copy" userdata="" /> | ||
13 | <on_enable function="textfield_copy_enable" /> | ||
14 | </menu_item_call> | ||
15 | <menu_item_call label="Paste" mouse_opaque="true" | ||
16 | name="Paste Text" > | ||
17 | <on_click function="textfield_paste" userdata="" /> | ||
18 | <on_enable function="textfield_paste_enable" /> | ||
19 | </menu_item_call> | ||
20 | <menu_item_call label="Delete" mouse_opaque="true" | ||
21 | name="Delete Text" > | ||
22 | <on_click function="textfield_delete" userdata="" /> | ||
23 | <on_enable function="textfield_delete_enable" /> | ||
24 | </menu_item_call> | ||
25 | <menu_item_separator /> | ||
26 | <menu_item_call label="Select All" mouse_opaque="true" | ||
27 | name="Select All Text" > | ||
28 | <on_click function="textfield_selectall" userdata="" /> | ||
29 | <on_enable function="textfield_selectall_enable" /> | ||
30 | </menu_item_call> | ||
31 | <menu_item_separator name="Translate" /> | ||
32 | <menu drop_shadow="true" | ||
33 | mouse_opaque="false" name="Translation Options" | ||
34 | bottom_delta="0" label="Translate To..." opaque="true" > | ||
35 | <menu_item_call label="English" mouse_opaque="true" | ||
36 | name="Translate Text" > | ||
37 | <on_click function="textfield_translate" translate="true" userdata="en" /> | ||
38 | <on_enable function="textfield_translate_enable" /> | ||
39 | </menu_item_call> | ||
40 | <menu_item_call label="Danish" mouse_opaque="true" | ||
41 | name="Translate Text" > | ||
42 | <on_click function="textfield_translate" translate="true" userdata="da" /> | ||
43 | <on_enable function="textfield_translate_enable" /> | ||
44 | </menu_item_call> | ||
45 | <menu_item_call label="Deutsch (German)" mouse_opaque="true" | ||
46 | name="Translate Text" > | ||
47 | <on_click function="textfield_translate" translate="true" userdata="de" /> | ||
48 | <on_enable function="textfield_translate_enable" /> | ||
49 | </menu_item_call> | ||
50 | <menu_item_call label="Spanish" mouse_opaque="true" | ||
51 | name="Translate Text" > | ||
52 | <on_click function="textfield_translate" translate="true" userdata="es" /> | ||
53 | <on_enable function="textfield_translate_enable" /> | ||
54 | </menu_item_call> | ||
55 | <menu_item_call label="French" mouse_opaque="true" | ||
56 | name="Translate Text" > | ||
57 | <on_click function="textfield_translate" translate="true" userdata="fr" /> | ||
58 | <on_enable function="textfield_translate_enable" /> | ||
59 | </menu_item_call> | ||
60 | <menu_item_call label="Italian" mouse_opaque="true" | ||
61 | name="Translate Text" > | ||
62 | <on_click function="textfield_translate" translate="true" userdata="it" /> | ||
63 | <on_enable function="textfield_translate_enable" /> | ||
64 | </menu_item_call> | ||
65 | <menu_item_call label="Hungarian" mouse_opaque="true" | ||
66 | name="Translate Text" > | ||
67 | <on_click function="textfield_translate" translate="true" userdata="hu" /> | ||
68 | <on_enable function="textfield_translate_enable" /> | ||
69 | </menu_item_call> | ||
70 | <menu_item_call label="Dutch" mouse_opaque="true" | ||
71 | name="Translate Text" > | ||
72 | <on_click function="textfield_translate" translate="true" userdata="nl" /> | ||
73 | <on_enable function="textfield_translate_enable" /> | ||
74 | </menu_item_call> | ||
75 | <menu_item_call label="Polish" mouse_opaque="true" | ||
76 | name="Translate Text" > | ||
77 | <on_click function="textfield_translate" translate="true" userdata="pl" /> | ||
78 | <on_enable function="textfield_translate_enable" /> | ||
79 | </menu_item_call> | ||
80 | <menu_item_call label="Portugese" mouse_opaque="true" | ||
81 | name="Translate Text" > | ||
82 | <on_click function="textfield_translate" translate="true" userdata="pt" /> | ||
83 | <on_enable function="textfield_translate_enable" /> | ||
84 | </menu_item_call> | ||
85 | <menu_item_call label="Russian" mouse_opaque="true" | ||
86 | name="Translate Text" > | ||
87 | <on_click function="textfield_translate" translate="true" userdata="ru" /> | ||
88 | <on_enable function="textfield_translate_enable" /> | ||
89 | </menu_item_call> | ||
90 | <menu_item_call label="Turkish" mouse_opaque="true" | ||
91 | name="Translate Text" > | ||
92 | <on_click function="textfield_translate" translate="true" userdata="tr" /> | ||
93 | <on_enable function="textfield_translate_enable" /> | ||
94 | </menu_item_call> | ||
95 | <menu_item_call label="Ukrainian" mouse_opaque="true" | ||
96 | name="Translate Text" > | ||
97 | <on_click function="textfield_translate" translate="true" userdata="uk" /> | ||
98 | <on_enable function="textfield_translate_enable" /> | ||
99 | </menu_item_call> | ||
100 | <menu_item_call label="Chinese" mouse_opaque="true" | ||
101 | name="Translate Text" > | ||
102 | <on_click function="textfield_translate" translate="true" userdata="zh" /> | ||
103 | <on_enable function="textfield_translate_enable" /> | ||
104 | </menu_item_call> | ||
105 | <menu_item_call label="Japanese" mouse_opaque="true" | ||
106 | name="Translate Text" > | ||
107 | <on_click function="textfield_translate" translate="true" userdata="ja" /> | ||
108 | <on_enable function="textfield_translate_enable" /> | ||
109 | </menu_item_call> | ||
110 | <menu_item_call label="Korean" mouse_opaque="true" | ||
111 | name="Translate Text" > | ||
112 | <on_click function="textfield_translate" translate="true" userdata="ko" /> | ||
113 | <on_enable function="textfield_translate_enable" /> | ||
114 | </menu_item_call> | ||
115 | </menu> | ||
116 | </menu> | ||
diff --git a/linden/indra/newview/viewer_manifest.py b/linden/indra/newview/viewer_manifest.py index 3a7039b..9ff1107 100755 --- a/linden/indra/newview/viewer_manifest.py +++ b/linden/indra/newview/viewer_manifest.py | |||
@@ -912,6 +912,7 @@ class LinuxManifest(ViewerManifest): | |||
912 | 912 | ||
913 | self.path("res/meta-impy_icon.png","meta-impy_icon.png") | 913 | self.path("res/meta-impy_icon.png","meta-impy_icon.png") |
914 | if self.prefix("linux_tools", dst=""): | 914 | if self.prefix("linux_tools", dst=""): |
915 | self.path("alsoft.conf") | ||
915 | #self.path("client-readme.txt","README-linux.txt") | 916 | #self.path("client-readme.txt","README-linux.txt") |
916 | self.path("client-readme-voice.txt","README-linux-voice.txt") | 917 | self.path("client-readme-voice.txt","README-linux-voice.txt") |
917 | #self.path("client-readme-joystick.txt","README-linux-joystick.txt") | 918 | #self.path("client-readme-joystick.txt","README-linux-joystick.txt") |
diff --git a/linden/indra/newview/viewertime.cpp b/linden/indra/newview/viewertime.cpp index 5ed9465..9892aa5 100644 --- a/linden/indra/newview/viewertime.cpp +++ b/linden/indra/newview/viewertime.cpp | |||
@@ -107,7 +107,13 @@ void ViewerTime::refresh() | |||
107 | // it's daylight savings time there. | 107 | // it's daylight savings time there. |
108 | internal_time = utc_to_pacific_time(utc_time, gPacificDaylightTime); | 108 | internal_time = utc_to_pacific_time(utc_time, gPacificDaylightTime); |
109 | } | 109 | } |
110 | 110 | ||
111 | if(NULL == internal_time) | ||
112 | { | ||
113 | llwarns << "internal_time == NULL - Kaboom!" << llendl; | ||
114 | return; | ||
115 | } | ||
116 | |||
111 | mMinute = internal_time->tm_min; | 117 | mMinute = internal_time->tm_min; |
112 | mSecond = internal_time->tm_sec; | 118 | mSecond = internal_time->tm_sec; |
113 | S32 hour = internal_time->tm_hour; | 119 | S32 hour = internal_time->tm_hour; |