Compare commits

..

123 Commits

Author SHA1 Message Date
Shyotl
ea10825c27 Typo effed things up and blocked instant-messages all willy-nilly. 2011-05-01 01:28:50 -05:00
Shyotl
a8f4b3ed4a Merge branch 'master' into V2AvatarPhysics 2011-04-30 22:41:25 -05:00
Shyotl
09133307a1 Merge branch 'master' of git://github.com/siana/SingularityViewer.git 2011-04-30 22:41:08 -05:00
Siana Gearz
ae50fc4404 GCCified SH_SpamHandler 2011-05-01 04:57:44 +02:00
Shyotl
cff618f67d Doubleclick focus on avatar radar. 2011-04-30 21:46:01 -05:00
Siana Gearz
1d90b8624b Updated LSL keywords 2011-04-30 23:28:28 +02:00
Shyotl
6cf9c3b4ed Demoted llerrs to llwarns in HippoGridManager::saveFile() to prevent forcing the client to crash on connect if something goes wrong there(Have had a few reports of this llerrs popping up for people on XP). Failure to save is non-critical. 2011-04-30 16:01:10 -05:00
Shyotl
226de66b81 Skip rendering hud-related elements when rendering for impostor. http://code.google.com/p/singularity-viewer/issues/detail?id=20&can=1 2011-04-30 16:01:02 -05:00
Shyotl
89c6f11072 Demoted llerrs to llwarns in HippoGridManager::saveFile() to prevent forcing the client to crash on connect if something goes wrong there(Have had a few reports of this llerrs popping up for people on XP). Failure to save is non-critical. 2011-04-30 16:00:06 -05:00
Shyotl
41dc9f9751 Skip rendering hud-related elements when rendering for impostor. http://code.google.com/p/singularity-viewer/issues/detail?id=20&can=1 2011-04-30 15:59:16 -05:00
Siana Gearz
ee2508274e Merge branch 'master' of https://github.com/Shyotl/SingularityViewer
Conflicts:
	indra/newview/app_settings/settings.xml
2011-04-30 22:02:02 +02:00
Siana Gearz
4bb68e5a34 Updated root certificates 2011-04-30 22:00:12 +02:00
Shyotl
e3b328a115 Removed superfluous llinfos messages. 2011-04-30 02:13:35 -05:00
Shyotl
0dd3e189fc Adjusted camera positions while editing physics. Focuses and zooms in closer to location being edited. 2011-04-29 20:15:37 -05:00
Shyotl
a694742522 Added physics subpanel to avatar customize floater.
Also, removed redundant tattoo and alpha entries.
Modified LLScrollingPanelParam to work without needing 'hints'. A bit hacky since I didn't want to dive into making yet another xml, but works well enough.
Avatar_lad entries names changed to more readable forms since LLTrans isn't where it needs to be yet.

Camera doesn't move to great positions when editing phys parts, but that's for another day.
2011-04-29 03:39:05 -05:00
Shyotl
d2f66f9bd0 LLTextureCache is spamming warnings as it attempts to remove non-existant files. Not sure if this is a bug or not, but it's been this way for a while now, so I'm squelching it. 2011-04-29 00:24:07 -05:00
Shyotl
8b12d794c5 Added physics saved settings.
Emerald physics demoted to legacy. Only enabled on av's that fail to send physics paramaters, or AvatarPhysics is completely disabled.
Params reset when AvatarPhysics is toggled off. (Bugfix for LL's code)
2011-04-28 22:47:48 -05:00
Shyotl
2dff12433c Avatar Physics innital commit. No edit panel. SavedSettings not plugged in yet. 2011-04-28 10:09:11 -05:00
Shyotl
332cfdb532 Updated llinventory to something closer to V2's implementation. Mostly just restructuring.
Most the changes are due to InventoryObjectList* changing to LLInventoryObject::object_list_t*, LLInventoryItem::II_FLAGS* changing to LLInventoryItemFlags::II_FLAGS* and also const'ing.
Certain perms for certain asset types(callcard&landmarks) have been laxed, as per LL's V2.
LLInventoryType now does lookups mostly though new lldictionary class.
LLLandmark using boost for callbacks, instead of custom class structure.
2011-04-28 01:43:44 -05:00
Shyotl
722a1dda04 Minor iterator loop change. http://hg.secondlife.com/viewer-development/changeset/89a345e2d1cf
Also a little v2 cleanup snuck in.
2011-04-28 01:20:42 -05:00
Shyotl
0909a4ddbe Support for new 'rental' parcel category. 2011-04-28 01:18:08 -05:00
Siana Gearz
9a8a28ee1a HTTP fetch bandwidth limited again 2011-04-28 01:51:09 +02:00
Shyotl
ab35a07f0e Added anti-spam features.
ScriptsCanShowUI:false disables LLMapDestination (from V2)
SH_SpamHandler, derived from Cryogenic's spam blocking:
 If flooded by an object, all objects of same owner get blocked.
 If flooded by an avatar, avatar will be blocked.
 Dialog flood prevention. (Objects only)
 Calling card flood prevention (Avatar only)
 Chat flood prevention. (Avatar and objects)
 IM/Inventory offer flood prevention (Avatar and objects)

See additions to settings_sh.xml for details on new settings pertaining to anti-spam.
2011-04-27 16:39:20 -05:00
Siana Gearz
51133c3894 Dict unbotch 2011-04-27 00:32:12 +02:00
Siana Gearz
0f0d506928 Merge git://github.com/TighMacFanatic/SingularityViewer 2011-04-26 23:45:21 +02:00
tmac@latestevidence.com
8cf8814f8b Spell check fix 2011-04-26 17:25:57 -04:00
Shyotl
06f14eae42 Merge branch 'V2TextureSystem' 2011-04-25 20:13:42 -05:00
Shyotl
4f264f0359 Testing potential fix for http://code.google.com/p/singularity-viewer/issues/detail?id=5 2011-04-25 19:59:50 -05:00
Shyotl
80db7f58c7 Added pass_post_bump for fullbright bump faces. 2011-04-25 18:18:36 -05:00
Siana Gearz
04b3dee767 Merge remote-tracking branch 'shyotl/V2TextureSystem' 2011-04-26 00:28:58 +02:00
Siana Gearz
b6c0436c1b Merge branch 'master' of github.com:siana/SingularityViewer 2011-04-26 00:23:01 +02:00
Shyotl
5954e0d71c Merge branch 'master' into V2TextureSystem
Conflicts:
	indra/newview/llfloaterexport.cpp
2011-04-24 03:31:31 -05:00
Shyotl
50540049c1 Merge branch 'master' of git://github.com/siana/SingularityViewer.git 2011-04-24 01:05:31 -05:00
Shyotl
2d882e527f Updating commit from v2renderer to work with new llviewertexture. 2011-04-23 21:09:33 -05:00
Shyotl
ac12349a8a Merge branch 'V2Renderer' into V2TextureSystem
Conflicts:
	indra/newview/llviewercontrol.cpp
2011-04-23 19:33:20 -05:00
Shyotl
f7a5394904 Super-sampling only to be done when taking a snapshot to disk in high-res mode. Clamping to 3x.
Removed 'SHHighResSnapshotForceTile' setting, as tiling is now the only way snapshots can be done.
2011-04-23 17:51:29 -05:00
tmac@latestevidence.com
af203533b3 Spell check added 2011-04-23 18:08:59 -04:00
Shyotl
41f42fc741 Nuking some glsl warnings, and fixing relwithdebug compile(and prolly gcc too) 2011-04-23 03:02:56 -05:00
Shyotl
c694d12c93 Bringing in-line with V2. mbstowcs->MultiByteToWideChar, ancient comment removal, fullscreen behavior check... 2011-04-23 01:01:55 -05:00
Shyotl
f190644464 LLDrawPoolWater::shade no longer binds diffuse texture if nonexistant or unused by shader. (was firing a warning upon bind) 2011-04-23 00:59:20 -05:00
Shyotl
0b1b7c6618 Fixed issues with changing AA and AF...
-AF change no longer reloads the window to apply. Doing such isn't needed anymore.
-AA change no longer reloads the window to apply, IFF RenderUseFBO is true.
-AA change, IFF RenderUseFBO is false, reloads window. Texture issues under this scenario should be resolved.
-LLComboBox now updates control_name it's linked to, automatically.
-New LLComboBox Behavor when paired with new AA/AF application changes renders LLFloaterHardwareSettings::apply() pointless, EXCEPT for when changing AA while FBOs are off.
2011-04-23 00:58:27 -05:00
Shyotl
98c2b7e11f Sorted out high-res snapshot issues.
LL has since removed high-res snapshots using render targets. I find this change to be favorable, as rendertargets were very finicky to get working with anti-aliasing. Also, deferred rendering uses many rendertargets that depend on screen resolution. Changing resolution every screenshot is.. not very awesome.

There is some deviation from LL's viewer. I've kept the old tiled glow pass enabled for non-deferred, as it fixes issues with tile edges truncating glow propogation. However, this does no work with deferred yet. I need to pin down why. I assume using binding one of the RenderTargets is required for deferred.

Additionally, the usage of a RenderTarget for snapshots is what prevented me from fully enabling my supersampling settings. Now that that hurdle is gone, I consider including this new setting by default to be safe enough.

And a note: Do not remove the 'tiling' variable when merging with v2 changes, as singu's glow pass is 'special'. There are other fixes absent from LL's viewer that require knowing if the render is tiled or not. (water reflections/cloud freezing)
2011-04-21 23:36:41 -05:00
Shyotl
7b1736ea9d Merge branch 'master' into V2TextureSystem 2011-04-21 00:17:57 -05:00
Shyotl
673a338bf5 Merge branch 'master' into V2Renderer 2011-04-21 00:17:36 -05:00
Shyotl
d3c91698bf Removed crash vulnerability to malevolently malformed notecards. 2011-04-21 00:17:10 -05:00
Shyotl
ab20e881ce Local-lights now display in deferred
Fixed LLCachedControl<U32> caching invalid values
2011-04-20 20:08:42 -05:00
Siana Gearz
41fe5f47e1 Merge git://github.com/TighMacFanatic/SingularityViewer 2011-04-19 14:20:04 +02:00
Siana Gearz
73cf43cbc9 Merge branch 'master' of https://github.com/Shyotl/SingularityViewer 2011-04-19 14:00:04 +02:00
Siana Gearz
26058999b3 TOS compliance 2011-04-19 13:59:11 +02:00
Siana Gearz
8f09dedb1e Wearable import/export, from Imprudence 2011-04-19 13:46:09 +02:00
Siana Gearz
955ca21298 OpenSim compatible prim backup 2011-04-19 01:33:09 +02:00
Siana Gearz
25b4452a12 Sometimes i build offline too 2011-04-18 23:39:47 +02:00
Siana Gearz
5d5231fe8c Removed Import/Export 2011-04-18 23:28:27 +02:00
Shyotl
d2291b5903 Clamping prim settext max visible range to that of a 15^3 prim, because certain 'people' abuse megaprims to make annoying hovertext spam. 2011-04-18 01:44:40 -05:00
Shyotl
4c068a4a85 Clamping prim settext max visible range to that of a 15^3 prim, because certain 'people' abuse megaprims to make annoying hovertext spam. 2011-04-18 01:44:13 -05:00
Shyotl
eded2546fc Merge branch 'master' into V2TextureSystem 2011-04-17 20:42:59 -05:00
Shyotl
0c2ea7cc9b Static'd some llcachedcontrols. 2011-04-17 20:39:54 -05:00
tmac@latestevidence.com
0b9a44a842 Added include so that #ifdefs on compiler/OS actually work. 2011-04-17 14:37:08 -04:00
tmac@latestevidence.com
e81f2ea3be Made Debug textures floater smaller and better organized. 2011-04-17 14:35:31 -04:00
Shyotl
cacf87e962 The collisions list is a vanilla C array of explicit size? Ugggh. 2011-04-16 23:44:32 -05:00
Shyotl
c816d25e68 The collisions list is a vanilla C array of explicit size? Ugggh. 2011-04-16 23:42:14 -05:00
Shyotl
2afa251b64 Added walking sound to collision list in sound explorer floater.
Undid some minor regression.
2011-04-16 21:11:34 -05:00
Shyotl
a6c802bd86 Added walking sound to collision list in sound explorer floater.
Undid some minor regression.
2011-04-16 21:11:14 -05:00
Shyotl
d32f820903 Merge branch 'master' into V2TextureSystem 2011-04-16 18:25:11 -05:00
Shyotl
c38a47ea48 Merge branch 'master' of git://github.com/siana/SingularityViewer.git 2011-04-16 18:24:34 -05:00
Shyotl
ad19c0209b Merge branch 'master' into V2TextureSystem 2011-04-16 18:23:41 -05:00
Shyotl
3901893a3a Resolved some unitialized variables. 2011-04-16 18:21:54 -05:00
Shyotl
d2d53fec7f Minor tweaks of little consequence. Nullcheck, overrun paranoia. 2011-04-16 18:21:38 -05:00
Shyotl
8204ec5565 New gpu_table entries 2011-04-16 18:20:35 -05:00
Shyotl
48538fe182 Resolved some unitialized variables. 2011-04-16 18:18:24 -05:00
tmac@latestevidence.com
2abece1819 Fixed searching for Visual Studio Express versions 2011-04-16 15:56:15 -04:00
Siana Gearz
8018a8842f Merge remote branch 'shyotlsv/master' 2011-04-16 16:31:33 +02:00
Siana Gearz
68a95b5b1a Crashfix/sanity on Octopus 2011-04-16 02:09:49 +02:00
Siana Gearz
ef43a87ac0 Anti suicide kind of thing 2011-04-16 02:07:24 +02:00
Siana Gearz
0c2765511e Unhack some Inertia octree hack.
No performance change.
2011-04-15 18:33:19 +02:00
Siana Gearz
1a0387f918 Idle timeout goes down to 0 2011-04-15 17:12:51 +02:00
Siana Gearz
b9203e487a Don't need RLV assertions 2011-04-15 17:06:44 +02:00
Siana Gearz
4f9b8443e2 Should correct not being able to accept Vivox license 2011-04-15 17:04:32 +02:00
Shyotl
dbd26ddee1 Minor tweaks of little consequence. Nullcheck, overrun paranoia. 2011-04-15 02:42:30 -05:00
Shyotl
4d2dde73d7 New gpu_table entries 2011-04-15 01:21:33 -05:00
Shyotl
6cbbe493dd Removed warning regarding 'RenderCubeMap' feature upon startup 2011-04-13 02:48:40 -05:00
Shyotl
8ff0a29f9d Removed warning regarding 'RenderCubeMap' feature upon startup 2011-04-13 02:47:49 -05:00
Shyotl
f30dc32503 Media textures (browser and such) should now display 2011-04-13 02:44:04 -05:00
Shyotl
a35a59d56b Revert regression from merge 2011-04-13 01:28:56 -05:00
Shyotl
4d4c49cd24 Merge branch 'master' into V2TextureSystem
Conflicts:
	indra/newview/llviewerimage.cpp
	indra/newview/pipeline.h
2011-04-12 22:29:49 -05:00
Shyotl
aa1167e4d5 Un-borked Non-Deferred + Snapshot + RenderUseFBO + RenderGlow combination. 2011-04-12 17:47:45 -05:00
Shyotl
9e4bc6754a Merge branch 'master' of git://github.com/siana/SingularityViewer.git 2011-04-12 16:43:50 -05:00
Shyotl
c6fa0be39b Cleanup and render-to-texture tweaks.
Added two new debug render modes
Fixed bizarre issue with line-widths being sporadically inconsistent in ui. (needs glFlush for some reason)
2011-04-12 16:40:23 -05:00
Shyotl
15a8a86b15 Alphas can now glow as expected 2011-04-12 15:26:03 -05:00
Shyotl
125a90e46b Cleanup 2011-04-12 15:24:31 -05:00
Shyotl
e9147cb7fb Cleaned up overlapping elements in group properties panel 2011-04-11 22:19:49 -05:00
Shyotl
db5ba95f58 Fixed fast-alpha'd textures on hud attachments not rendering as fullbright 2011-04-09 19:44:27 -05:00
Siana Gearz
ab8656d5d8 Version 1.5.6(1) 2011-04-09 22:57:39 +02:00
Siana Gearz
711a4fdacd Revert "OpenJPEG 1.4 stable"
This reverts commit 3fca56df23.
2011-04-09 20:29:12 +02:00
Siana Gearz
156bb5415d Revert "Our old crashfixes for OpenJPEG"
This reverts commit 753c0b9285.
2011-04-09 20:28:34 +02:00
Shyotl
88fe5d6979 Eups. Compiles now. Hurr. 2011-04-09 01:30:48 -05:00
Shyotl
4e3501d034 Fixed ugly checkboxes. Dem pixels. 2011-04-09 00:30:42 -05:00
Shyotl
b390d74b9c Name tag should now update consistently upon change via namefromchat bridge 2011-04-09 00:30:15 -05:00
Siana Gearz
fcc98ffe46 Singularity 1.5.6 release 2011-04-08 23:52:52 +02:00
Siana Gearz
fd8866c411 Sione's Media Filter 2011-04-08 19:53:41 +02:00
Siana Gearz
0d3c91269b Various fixes, mostly through Henri 2011-04-08 17:51:45 +02:00
Siana Gearz
b952d3f4e6 Graphics default adjustments 2011-04-08 15:35:37 +02:00
Siana Gearz
186bd80ba0 Group creation fee fix 2011-04-08 14:07:45 +02:00
Siana Gearz
e6b5811e7e Hide friend groups until we implement them. 2011-04-08 04:17:37 +02:00
Siana Gearz
344cafcb1b Don't clutter up the minimap with skyboxes 2011-04-08 03:52:46 +02:00
Shyotl
3a3805fd18 Texture console now shows number of 'cached' raw images.
png loading now immediately dumps allocated data on failure
2011-04-07 03:16:11 -05:00
Siana Gearz
58102daf94 Minor adjustments 2011-04-07 02:17:03 +02:00
Siana Gearz
753c0b9285 Our old crashfixes for OpenJPEG 2011-04-06 04:54:04 +02:00
Siana Gearz
ad4d974812 Stop j2c decode throbbing 2011-04-06 04:25:05 +02:00
Siana Gearz
3fca56df23 OpenJPEG 1.4 stable 2011-04-06 04:23:16 +02:00
Siana Gearz
b7cc1932f1 VWR-24321: fix validation of textures that start with 00, patch by Aleric Inglewood 2011-04-05 00:23:53 +02:00
Siana Gearz
c17b67399b Final OpenSim group chat fix... i HOPE 2011-04-04 02:48:05 +02:00
Siana Gearz
cd7b1e434d Announce incoming option fix 2011-04-03 01:51:07 +02:00
Siana Gearz
f9e0b122ae Revert voice control to snowglobe 2011-04-03 01:11:48 +02:00
Siana Gearz
7e895d4590 I really got annoyed by [RECIPIENT] 2011-04-03 00:46:34 +02:00
Siana Gearz
6dd9212d16 Group voice chat fix 2011-04-02 05:03:36 +02:00
Siana Gearz
0f038bbffc Grid manager stuff, part. debrand 2011-04-02 05:03:10 +02:00
Shyotl
6e437d4188 Fixed texture console showing invalid values...
Improved texture console progress bar visibility.
Shoehorned sgblacklist for server response status 499
Restored stat recording for LLViewerTextureList
Cleaned up lltexturefetch by excluding more unused code via #if
2011-04-01 17:19:23 -05:00
Siana Gearz
b92dec7530 How about i read before i commit? Fixes PerAccount dir 2011-04-01 20:50:44 +02:00
Siana Gearz
8b54d6503a Merge branch 'master' of https://github.com/Shyotl/SingularityViewer 2011-04-01 15:48:35 +02:00
Shyotl
05102e98ab Using newer method to mark faces dirty on alpha change. 2011-04-01 01:16:01 -05:00
Shyotl
497e63bfb6 Fixed scaling issues with non-power-of-two ui textures 2011-03-31 21:53:23 -05:00
Shyotl
e756140e1d Innitial commit of experimental v2 texture system port work. Compiles and runs on windows, at least. Fixing bugs as they come.
Need to test:
localassetbrowser
preview related floaters
hgfloatertexteditor
maps
media textures! Currently very hacky
web browser
alpha masks on avatars
bumpmaps
Are all sky components appearing?
LLViewerDynamicTexture (texture baking, browser, animated textures, anim previews, etc)
Snapshot related features
Customize avatar
vfs floater
UI textures in general
Texture priority issues
2011-03-31 03:22:01 -05:00
278 changed files with 77689 additions and 7450 deletions

View File

@@ -28,6 +28,7 @@ set(cmake_SOURCE_FILES
FindCARes.cmake
FindELFIO.cmake
FindGooglePerfTools.cmake
FindHunSpell.cmake
FindMono.cmake
FindMT.cmake
FindMySQL.cmake
@@ -39,6 +40,7 @@ set(cmake_SOURCE_FILES
FreeType.cmake
GStreamer010Plugin.cmake
GooglePerfTools.cmake
HUNSPELL.cmake
JPEG.cmake
LLAddBuildTest.cmake
LLAudio.cmake

View File

@@ -25,6 +25,7 @@ set(all_targets ${all_targets} ${out_targets})
set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug")
set(debug_files
libhunspell.dll
libapr-1.dll
libaprutil-1.dll
libapriconv-1.dll
@@ -243,6 +244,7 @@ set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release")
set(release_files
libtcmalloc_minimal.dll
fmod.dll
libhunspell.dll
libapr-1.dll
libaprutil-1.dll
libapriconv-1.dll

View File

@@ -0,0 +1,34 @@
FIND_PATH(HUNSPELL_INCLUDE_DIR hunspell.hxx
/usr/local/include/hunspell
/usr/local/include
/usr/include/hunspell
/usr/include
)
SET(HUNSPELL_NAMES ${HUNSPELL_NAMES} hunspell hunspell-1.2)
FIND_LIBRARY(HUNSPELL_LIBRARY
NAMES ${HUNSPELL_NAMES}
PATHS /usr/lib /usr/local/lib
)
IF(HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
SET(HUNSPELL_LIBRARIES ${HUNSPELL_LIBRARY})
SET(HUNSPELL_FOUND "YES")
ELSE(HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
SET(HUNSPELL_FOUND "NO")
ENDIF(HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
IF(HUNSPELL_FOUND)
IF(NOT HUNSPELL_FIND_QUIETLY)
MESSAGE(STATUS "Found Hunspell: ${HUNSPELL_LIBRARIES}")
ENDIF(NOT HUNSPELL_FIND_QUIETLY)
ELSE(HUNSPELL_FOUND)
IF(HUNSPELL_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find HunSpell library")
ENDIF(HUNSPELL_FIND_REQUIRED)
ENDIF(HUNSPELL_FOUND)
MARK_AS_ADVANCED(
HUNSPELL_LIBRARY
HUNSPELL_INCLUDE_DIR
)

View File

@@ -0,0 +1,16 @@
# -*- cmake -*-
include(Prebuilt)
if (STANDALONE)
include(FindHunSpell)
else (STANDALONE)
use_prebuilt_binary(hunspell)
set(HUNSPELL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/hunspell)
if (LINUX OR DARWIN)
set(HUNSPELL_LIBRARY hunspell-1.2)
else (LINUX OR DARWIN)
set(HUNSPELL_LIBRARY libhunspell)
endif (LINUX OR DARWIN)
endif (STANDALONE)

View File

@@ -518,9 +518,16 @@ class WindowsSetup(PlatformSetup):
self.using_express = True
print 'Building with ', self.gens[version]['gen'] , "Express edition"
break
else:
print >> sys.stderr, 'Cannot find any Visual Studio installation'
sys.exit(1)
else:
for version in 'vc80 vc90 vc100 vc71'.split():
if self.find_visual_studio_express_single(version):
self._generator = version
self.using_express = True
print 'Building with ', self.gens[version]['gen'] , "Express edition"
break
else:
print >> sys.stderr, 'Cannot find any Visual Studio installation'
sys.exit(1)
return self._generator
def _set_generator(self, gen):
@@ -605,6 +612,28 @@ class WindowsSetup(PlatformSetup):
except WindowsError, err:
print >> sys.stderr, "Didn't find ", self.gens[gen]['gen']
return ''
def find_visual_studio_express_single(self, gen=None):
if gen is None:
gen = self._generator
gen = gen.lower()
try:
import _winreg
key_str = (r'SOFTWARE\Microsoft\VCEXpress\%s_Config\Setup\VC' %
self.gens[gen]['ver'])
value_str = (r'ProductDir')
print ('Reading VS environment from HKEY_CURRENT_USER\%s\%s' %
(key_str, value_str))
print key_str
reg = _winreg.ConnectRegistry(None, _winreg.HKEY_CURRENT_USER)
key = _winreg.OpenKey(reg, key_str)
value = _winreg.QueryValueEx(key, value_str)[0]+"IDE"
print 'Found: %s' % value
return value
except WindowsError, err:
print >> sys.stderr, "Didn't find ", self.gens[gen]['gen']
return ''
def get_build_cmd(self):
if self.incredibuild:
@@ -617,13 +646,15 @@ class WindowsSetup(PlatformSetup):
if environment == '':
environment = self.find_visual_studio_express()
if environment == '':
print >> sys.stderr, "Something went very wrong during build stage, could not find a Visual Studio?"
else:
build_dirs=self.build_dirs()
print >> sys.stderr, "\nSolution generation complete, it can can now be found in:", build_dirs[0]
print >> sys.stderr, "\nAs you are using an Express Visual Studio, the build step cannot be automated"
print >> sys.stderr, "\nPlease see https://wiki.secondlife.com/wiki/Microsoft_Visual_Studio#Extra_steps_for_Visual_Studio_Express_editions for Visual Studio Express specific information"
exit(0)
environment = self.find_visual_studio_express_single()
if environment == '':
print >> sys.stderr, "Something went very wrong during build stage, could not find a Visual Studio?"
else:
build_dirs=self.build_dirs()
print >> sys.stderr, "\nSolution generation complete, it can can now be found in:", build_dirs[0]
print >> sys.stderr, "\nAs you are using an Express Visual Studio, the build step cannot be automated"
print >> sys.stderr, "\nPlease see https://wiki.secondlife.com/wiki/Microsoft_Visual_Studio#Extra_steps_for_Visual_Studio_Express_editions for Visual Studio Express specific information"
exit(0)
# devenv.com is CLI friendly, devenv.exe... not so much.
return ('"%sdevenv.com" %s.sln /build %s' %

View File

@@ -27,6 +27,7 @@ set(llcommon_SOURCE_FILES
llcriticaldamp.cpp
llcursortypes.cpp
lldate.cpp
lldictionary.cpp
llerror.cpp
llerrorthread.cpp
llevent.cpp
@@ -106,6 +107,7 @@ set(llcommon_HEADER_FILES
lldate.h
lldefs.h
lldepthstack.h
lldictionary.h
lldlinked.h
lldqueueptr.h
llendianswizzle.h

View File

@@ -0,0 +1,54 @@
/**
* @file lldictionary.cpp
* @brief Lldictionary class header file
*
* $LicenseInfo:firstyear=2002&license=viewergpl$
*
* Copyright (c) 2002-2010, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlife.com/developers/opensource/gplv2
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlife.com/developers/opensource/flossexception
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*
*/
#include "linden_common.h"
#include "lldictionary.h"
#include "llstring.h"
// Define in .cpp file to prevent header include of llstring.h
LLDictionaryEntry::LLDictionaryEntry(const std::string &name)
: mName(name)
{
mNameCapitalized = mName;
LLStringUtil::replaceChar(mNameCapitalized, '-', ' ');
LLStringUtil::replaceChar(mNameCapitalized, '_', ' ');
for (U32 i=0; i < mNameCapitalized.size(); i++)
{
if (i == 0 || mNameCapitalized[i-1] == ' ') // don't change ordering of this statement or crash
{
mNameCapitalized[i] = toupper(mNameCapitalized[i]);
}
}
}

View File

@@ -0,0 +1,103 @@
/**
* @file lldictionary.h
* @brief Lldictionary class header file
*
* $LicenseInfo:firstyear=2002&license=viewergpl$
*
* Copyright (c) 2002-2010, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlife.com/developers/opensource/gplv2
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlife.com/developers/opensource/flossexception
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*
*/
#ifndef LL_LLDICTIONARY_H
#define LL_LLDICTIONARY_H
#include <map>
#include <string>
struct LL_COMMON_API LLDictionaryEntry
{
LLDictionaryEntry(const std::string &name);
virtual ~LLDictionaryEntry() {}
const std::string mName;
std::string mNameCapitalized;
};
template <class Index, class Entry>
class LLDictionary : public std::map<Index, Entry *>
{
public:
typedef std::map<Index, Entry *> map_t;
typedef typename map_t::iterator iterator_t;
typedef typename map_t::const_iterator const_iterator_t;
LLDictionary() {}
virtual ~LLDictionary()
{
for (iterator_t iter = map_t::begin(); iter != map_t::end(); ++iter)
delete (iter->second);
}
const Entry *lookup(Index index) const
{
const_iterator_t dictionary_iter = map_t::find(index);
if (dictionary_iter == map_t::end()) return NULL;
return dictionary_iter->second;
}
const Index lookup(const std::string &name) const
{
for (const_iterator_t dictionary_iter = map_t::begin();
dictionary_iter != map_t::end();
dictionary_iter++)
{
const Entry *entry = dictionary_iter->second;
if (entry->mName == name)
{
return dictionary_iter->first;
}
}
return notFound();
}
protected:
virtual Index notFound() const
{
// default is to assert
// don't assert -- makes it impossible to work on mesh-development and viewer-development simultaneously
// -- davep 2010.10.29
//llassert(false);
return Index(-1);
}
void addEntry(Index index, Entry *entry)
{
if (lookup(index))
{
llerrs << "Dictionary entry already added (attempted to add duplicate entry)" << llendl;
}
(*this)[index] = entry;
}
};
#endif // LL_LLDICTIONARY_H

View File

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

View File

@@ -248,16 +248,17 @@ U8* LLImageBase::allocateDataSize(S32 width, S32 height, S32 ncomponents, S32 si
S32 LLImageRaw::sGlobalRawMemory = 0;
S32 LLImageRaw::sRawImageCount = 0;
S32 LLImageRaw::sRawImageCachedCount = 0;
LLImageRaw::LLImageRaw()
: LLImageBase()
: LLImageBase(), mCacheEntries(0)
{
mMemType = LLMemType::MTYPE_IMAGERAW;
++sRawImageCount;
}
LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components)
: LLImageBase()
: LLImageBase(), mCacheEntries(0)
{
mMemType = LLMemType::MTYPE_IMAGERAW;
llassert( S32(width) * S32(height) * S32(components) <= MAX_IMAGE_DATA_SIZE );
@@ -266,7 +267,7 @@ LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components)
}
LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components)
: LLImageBase()
: LLImageBase(), mCacheEntries(0)
{
mMemType = LLMemType::MTYPE_IMAGERAW;
if(allocateDataSize(width, height, components) && data)
@@ -277,7 +278,7 @@ LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components)
}
LLImageRaw::LLImageRaw(const std::string& filename, bool j2c_lowest_mip_only)
: LLImageBase()
: LLImageBase(), mCacheEntries(0)
{
createFromFile(filename, j2c_lowest_mip_only);
}
@@ -288,6 +289,7 @@ LLImageRaw::~LLImageRaw()
// NOT LLImageRaw::deleteData()
deleteData();
--sRawImageCount;
setInCache(false);
}
// virtual

View File

@@ -243,6 +243,24 @@ protected:
public:
static S32 sGlobalRawMemory;
static S32 sRawImageCount;
static S32 sRawImageCachedCount;
S32 mCacheEntries;
void setInCache(bool in_cache)
{
if(in_cache)
{
if(!mCacheEntries)
sRawImageCachedCount++;
mCacheEntries++;
}
else if(mCacheEntries)
{
mCacheEntries--;
if(!mCacheEntries)
sRawImageCachedCount--;
}
}
};
// Compressed representation of image.

View File

@@ -131,6 +131,7 @@ BOOL LLImagePNG::encode(const LLImageRaw* raw_image, F32 encode_time)
if (! pngWrapper.writePng(raw_image, getData()))
{
setLastError(pngWrapper.getErrorMessage());
deleteData();
return FALSE;
}
@@ -138,6 +139,7 @@ BOOL LLImagePNG::encode(const LLImageRaw* raw_image, F32 encode_time)
if(!reallocateData(pngWrapper.getFinalSize())) //Shrink. Returns NULL on failure.
{
setLastError("LLImagePNG::encode failed reallocateData");
deleteData();
return FALSE;
}
return TRUE;

View File

@@ -171,7 +171,7 @@ void LLImageDecodeThread::ImageRequest::finishRequest(bool completed)
{
if (mResponder.notNull())
{
bool success = completed && mDecodedRaw && (!mNeedsAux || mDecodedAux);
bool success = completed && mDecodedRaw && mDecodedImageRaw->getDataSize() && (!mNeedsAux || mDecodedAux);
mResponder->completed(success, mDecodedImageRaw, mDecodedImageAux);
}
// Will automatically be deleted

View File

@@ -19,6 +19,7 @@ set(llinventory_SOURCE_FILES
llcategory.cpp
lleconomy.cpp
llinventory.cpp
llinventorydefines.cpp
llinventorytype.cpp
lllandmark.cpp
llnotecard.cpp
@@ -35,6 +36,7 @@ set(llinventory_HEADER_FILES
llcategory.h
lleconomy.h
llinventory.h
llinventorydefines.h
llinventorytype.h
lllandmark.h
llnotecard.h

View File

@@ -64,34 +64,27 @@ static const std::string INV_CREATION_DATE_LABEL("created_at");
// key used by agent-inventory-service
static const std::string INV_ASSET_TYPE_LABEL_WS("type_default");
static const std::string INV_FOLDER_ID_LABEL_WS("category_id");
///----------------------------------------------------------------------------
/// Local function declarations, constants, enums, and typedefs
///----------------------------------------------------------------------------
const U8 TASK_INVENTORY_ITEM_KEY = 0;
const U8 TASK_INVENTORY_ASSET_KEY = 1;
const LLUUID MAGIC_ID("3c115e51-04f4-523c-9fa6-98aff1034730");
///----------------------------------------------------------------------------
/// Class LLInventoryObject
///----------------------------------------------------------------------------
LLInventoryObject::LLInventoryObject(
const LLUUID& uuid,
const LLUUID& parent_uuid,
LLAssetType::EType type,
const std::string& name) :
LLInventoryObject::LLInventoryObject(const LLUUID& uuid,
const LLUUID& parent_uuid,
LLAssetType::EType type,
const std::string& name) :
mUUID(uuid),
mParentUUID(parent_uuid),
mType(type),
mName(name)
{
LLStringUtil::replaceNonstandardASCII(mName, ' ');
LLStringUtil::replaceChar(mName, '|', ' ');
LLStringUtil::trim(mName);
LLStringUtil::truncate(mName, DB_INV_ITEM_NAME_STR_LEN);
correctInventoryName(mName);
}
LLInventoryObject::LLInventoryObject() :
@@ -99,7 +92,7 @@ LLInventoryObject::LLInventoryObject() :
{
}
LLInventoryObject::~LLInventoryObject( void )
LLInventoryObject::~LLInventoryObject()
{
}
@@ -158,12 +151,8 @@ void LLInventoryObject::setUUID(const LLUUID& new_uuid)
void LLInventoryObject::rename(const std::string& n)
{
std::string new_name(n);
LLStringUtil::replaceNonstandardASCII(new_name, ' ');
LLStringUtil::replaceChar(new_name, '|', ' ');
LLStringUtil::trim(new_name);
LLStringUtil::truncate(new_name, DB_INV_ITEM_NAME_STR_LEN);
if( new_name != mName )
correctInventoryName(new_name);
if( !new_name.empty() && new_name != mName )
{
mName = new_name;
}
@@ -224,10 +213,7 @@ BOOL LLInventoryObject::importLegacyStream(std::istream& input_stream)
" %254s %254[^|]",
keyword, valuestr);
mName.assign(valuestr);
LLStringUtil::replaceNonstandardASCII(mName, ' ');
LLStringUtil::replaceChar(mName, '|', ' ');
LLStringUtil::trim(mName);
LLStringUtil::truncate(mName, DB_INV_ITEM_NAME_STR_LEN);
correctInventoryName(mName);
}
else
{
@@ -287,23 +273,31 @@ void LLInventoryObject::updateServer(BOOL) const
llwarns << "LLInventoryObject::updateServer() called. Doesn't do anything." << llendl;
}
inline
void LLInventoryObject::correctInventoryName(std::string& name)
{
LLStringUtil::replaceNonstandardASCII(name, ' ');
LLStringUtil::replaceChar(name, '|', ' ');
LLStringUtil::trim(name);
LLStringUtil::truncate(name, DB_INV_ITEM_NAME_STR_LEN);
}
///----------------------------------------------------------------------------
/// Class LLInventoryItem
///----------------------------------------------------------------------------
LLInventoryItem::LLInventoryItem(
const LLUUID& uuid,
const LLUUID& parent_uuid,
const LLPermissions& permissions,
const LLUUID& asset_uuid,
LLAssetType::EType type,
LLInventoryType::EType inv_type,
const std::string& name,
const std::string& desc,
const LLSaleInfo& sale_info,
U32 flags,
S32 creation_date_utc) :
LLInventoryItem::LLInventoryItem(const LLUUID& uuid,
const LLUUID& parent_uuid,
const LLPermissions& permissions,
const LLUUID& asset_uuid,
LLAssetType::EType type,
LLInventoryType::EType inv_type,
const std::string& name,
const std::string& desc,
const LLSaleInfo& sale_info,
U32 flags,
S32 creation_date_utc) :
LLInventoryObject(uuid, parent_uuid, type, name),
mPermissions(permissions),
mAssetUUID(asset_uuid),
@@ -315,6 +309,7 @@ LLInventoryItem::LLInventoryItem(
{
LLStringUtil::replaceNonstandardASCII(mDescription, ' ');
LLStringUtil::replaceChar(mDescription, '|', ' ');
mPermissions.initMasks(inv_type);
}
LLInventoryItem::LLInventoryItem() :
@@ -446,6 +441,9 @@ void LLInventoryItem::setDescription(const std::string& d)
void LLInventoryItem::setPermissions(const LLPermissions& perm)
{
mPermissions = perm;
// Override permissions to unrestricted if this is a landmark
mPermissions.initMasks(mInventoryType);
}
void LLInventoryItem::setInventoryType(LLInventoryType::EType inv_type)
@@ -463,6 +461,46 @@ void LLInventoryItem::setCreationDate(time_t creation_date_utc)
mCreationDate = creation_date_utc;
}
// Currently only used in the Viewer to handle calling cards
// where the creator is actually used to store the target.
void LLInventoryItem::setCreator(const LLUUID& creator)
{
mPermissions.setCreator(creator);
}
void LLInventoryItem::accumulatePermissionSlamBits(const LLInventoryItem& old_item)
{
// Remove any pre-existing II_FLAGS_PERM_OVERWRITE_MASK flags
// because we now detect when they should be set.
setFlags( old_item.getFlags() | (getFlags() & ~(LLInventoryItemFlags::II_FLAGS_PERM_OVERWRITE_MASK)) );
// Enforce the PERM_OVERWRITE flags for any masks that are different
// but only for AT_OBJECT's since that is the only asset type that can
// exist in-world (instead of only in-inventory or in-object-contents).
if (LLAssetType::AT_OBJECT == getType())
{
LLPermissions old_permissions = old_item.getPermissions();
U32 flags_to_be_set = 0;
if(old_permissions.getMaskNextOwner() != getPermissions().getMaskNextOwner())
{
flags_to_be_set |= LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_PERM;
}
if(old_permissions.getMaskEveryone() != getPermissions().getMaskEveryone())
{
flags_to_be_set |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
}
if(old_permissions.getMaskGroup() != getPermissions().getMaskGroup())
{
flags_to_be_set |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
}
LLSaleInfo old_sale_info = old_item.getSaleInfo();
if(old_sale_info != getSaleInfo())
{
flags_to_be_set |= LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_SALE;
}
setFlags(getFlags() | flags_to_be_set);
}
}
const LLSaleInfo& LLInventoryItem::getSaleInfo() const
{
@@ -517,6 +555,7 @@ BOOL LLInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32
mType = static_cast<LLAssetType::EType>(type);
msg->getS8(block, "InvType", type, block_num);
mInventoryType = static_cast<LLInventoryType::EType>(type);
mPermissions.initMasks(mInventoryType);
msg->getU32Fast(block, _PREHASH_Flags, mFlags, block_num);
@@ -707,6 +746,9 @@ BOOL LLInventoryItem::importFile(LLFILE* fp)
lldebugs << "Resetting inventory type for " << mUUID << llendl;
mInventoryType = LLInventoryType::defaultForAssetType(mType);
}
mPermissions.initMasks(mInventoryType);
return success;
}
@@ -746,8 +788,8 @@ BOOL LLInventoryItem::exportFile(LLFILE* fp, BOOL include_asset_key) const
fprintf(fp, "\t\tasset_id\t%s\n", uuid_str.c_str());
}
fprintf(fp, "\t\ttype\t%s\n", LLAssetType::lookup(mType));
const char* inv_type_str = LLInventoryType::lookup(mInventoryType);
if(inv_type_str) fprintf(fp, "\t\tinv_type\t%s\n", inv_type_str);
const std::string inv_type_str = LLInventoryType::lookup(mInventoryType);
if(!inv_type_str.empty()) fprintf(fp, "\t\tinv_type\t%s\n", inv_type_str.c_str());
fprintf(fp, "\t\tflags\t%08x\n", mFlags);
mSaleInfo.exportFile(fp);
fprintf(fp, "\t\tname\t%s|\n", mName.c_str());
@@ -910,6 +952,9 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream)
lldebugs << "Resetting inventory type for " << mUUID << llendl;
mInventoryType = LLInventoryType::defaultForAssetType(mType);
}
mPermissions.initMasks(mInventoryType);
return success;
}
@@ -949,8 +994,8 @@ BOOL LLInventoryItem::exportLegacyStream(std::ostream& output_stream, BOOL inclu
output_stream << "\t\tasset_id\t" << uuid_str << "\n";
}
output_stream << "\t\ttype\t" << LLAssetType::lookup(mType) << "\n";
const char* inv_type_str = LLInventoryType::lookup(mInventoryType);
if(inv_type_str)
const std::string inv_type_str = LLInventoryType::lookup(mInventoryType);
if(!inv_type_str.empty())
output_stream << "\t\tinv_type\t" << inv_type_str << "\n";
std::string buffer;
buffer = llformat( "\t\tflags\t%08x\n", mFlags);
@@ -966,6 +1011,12 @@ BOOL LLInventoryItem::exportLegacyStream(std::ostream& output_stream, BOOL inclu
LLSD LLInventoryItem::asLLSD() const
{
LLSD sd = LLSD();
asLLSD(sd);
return sd;
}
void LLInventoryItem::asLLSD( LLSD& sd ) const
{
sd[INV_ITEM_ID_LABEL] = mUUID;
sd[INV_PARENT_ID_LABEL] = mParentUUID;
sd[INV_PERMISSIONS_LABEL] = ll_create_sd_from_permissions(mPermissions);
@@ -986,8 +1037,8 @@ LLSD LLInventoryItem::asLLSD() const
}
sd[INV_ASSET_TYPE_LABEL] = LLAssetType::lookup(mType);
sd[INV_INVENTORY_TYPE_LABEL] = mInventoryType;
const char* inv_type_str = LLInventoryType::lookup(mInventoryType);
if(inv_type_str)
const std::string inv_type_str = LLInventoryType::lookup(mInventoryType);
if(!inv_type_str.empty())
{
sd[INV_INVENTORY_TYPE_LABEL] = inv_type_str;
}
@@ -997,11 +1048,9 @@ LLSD LLInventoryItem::asLLSD() const
sd[INV_NAME_LABEL] = mName;
sd[INV_DESC_LABEL] = mDescription;
sd[INV_CREATION_DATE_LABEL] = (S32) mCreationDate;
return sd;
}
bool LLInventoryItem::fromLLSD(LLSD& sd)
bool LLInventoryItem::fromLLSD(const LLSD& sd)
{
mInventoryType = LLInventoryType::IT_NONE;
mAssetUUID.setNull();
@@ -1128,6 +1177,8 @@ bool LLInventoryItem::fromLLSD(LLSD& sd)
mInventoryType = LLInventoryType::defaultForAssetType(mType);
}
mPermissions.initMasks(mInventoryType);
return true;
fail:
return false;
@@ -1294,23 +1345,19 @@ void LLInventoryItem::unpackBinaryBucket(U8* bin_bucket, S32 bin_bucket_size)
// Early exit on an empty binary bucket.
if (bin_bucket_size <= 1) return;
// Convert the bin_bucket into a string.
char* item_buffer = new char[bin_bucket_size+1];
if ((item_buffer != NULL) && (bin_bucket != NULL))
if (NULL == bin_bucket)
{
memcpy(item_buffer, bin_bucket, bin_bucket_size); /* Flawfinder: ignore */
}
else
{
llerrs << "unpackBinaryBucket failed. item_buffer or bin_bucket is Null." << llendl;
delete[] item_buffer;
llerrs << "unpackBinaryBucket failed. bin_bucket is NULL." << llendl;
return;
}
item_buffer[bin_bucket_size] = '\0';
std::string str(item_buffer);
lldebugs << "item buffer: " << item_buffer << llendl;
delete[] item_buffer;
// Convert the bin_bucket into a string.
std::vector<char> item_buffer(bin_bucket_size+1);
memcpy(&item_buffer[0], bin_bucket, bin_bucket_size); /* Flawfinder: ignore */
item_buffer[bin_bucket_size] = '\0';
std::string str(&item_buffer[0]);
lldebugs << "item buffer: " << str << llendl;
// Tokenize the string.
typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
@@ -1385,11 +1432,10 @@ BOOL item_date_sort( LLInventoryItem* a, LLInventoryItem* b )
/// Class LLInventoryCategory
///----------------------------------------------------------------------------
LLInventoryCategory::LLInventoryCategory(
const LLUUID& uuid,
const LLUUID& parent_uuid,
LLAssetType::EType preferred_type,
const std::string& name) :
LLInventoryCategory::LLInventoryCategory(const LLUUID& uuid,
const LLUUID& parent_uuid,
LLAssetType::EType preferred_type,
const std::string& name) :
LLInventoryObject(uuid, parent_uuid, LLAssetType::AT_CATEGORY, name),
mPreferredType(preferred_type)
{
@@ -1451,7 +1497,7 @@ void LLInventoryCategory::packMessage(LLMessageSystem* msg) const
msg->addStringFast(_PREHASH_Name, mName);
}
bool LLInventoryCategory::fromLLSD(LLSD& sd)
bool LLInventoryCategory::fromLLSD(const LLSD& sd)
{
std::string w;

View File

@@ -33,180 +33,107 @@
#ifndef LL_LLINVENTORY_H
#define LL_LLINVENTORY_H
#include <functional>
#include "llassetstorage.h"
#include "lldarray.h"
#include "llinventorytype.h"
#include "llinventorydefines.h"
#include "llmemtype.h"
#include "llpermissions.h"
#include "llsaleinfo.h"
#include "llsd.h"
#include "lluuid.h"
#include "llxmlnode.h"
// consts for Key field in the task inventory update message
extern const U8 TASK_INVENTORY_ITEM_KEY;
extern const U8 TASK_INVENTORY_ASSET_KEY;
// anonymous enumeration to specify a max inventory buffer size for
// use in packBinaryBucket()
enum
{
MAX_INVENTORY_BUFFER_SIZE = 1024
};
class LLMessageSystem;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLInventoryObject
//
// This is the base class for inventory objects that handles the
// common code between items and categories. The 'mParentUUID' member
// means the parent category since all inventory objects except each
// user's root category are in some category. Each user's root
// category will have mParentUUID==LLUUID::null.
// Base class for anything in the user's inventory. Handles the common code
// between items and categories.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLMessageSystem;
class LLInventoryObject : public LLRefCount
{
protected:
LLUUID mUUID;
LLUUID mParentUUID;
LLAssetType::EType mType;
std::string mName;
public:
typedef std::list<LLPointer<LLInventoryObject> > object_list_t;
protected:
virtual ~LLInventoryObject( void );
//--------------------------------------------------------------------
// Initialization
//--------------------------------------------------------------------
public:
MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY);
LLInventoryObject(const LLUUID& uuid, const LLUUID& parent_uuid,
LLAssetType::EType type, const std::string& name);
LLInventoryObject();
LLInventoryObject(const LLUUID& uuid,
const LLUUID& parent_uuid,
LLAssetType::EType type,
const std::string& name);
void copyObject(const LLInventoryObject* other); // LLRefCount requires custom copy
protected:
virtual ~LLInventoryObject();
// accessors
virtual const LLUUID& getUUID() const;
//--------------------------------------------------------------------
// Accessors
//--------------------------------------------------------------------
public:
virtual const LLUUID& getUUID() const; // inventoryID that this item points to
virtual const LLUUID& getLinkedUUID() const; // inventoryID that this item points to, else this item's inventoryID
const LLUUID& getParentUUID() const;
virtual const LLUUID& getLinkedUUID() const; // get the inventoryID that this item points to, else this item's inventoryID
virtual const std::string& getName() const;
virtual LLAssetType::EType getType() const;
LLAssetType::EType getActualType() const; // bypasses indirection for linked items
BOOL getIsLinkType() const;
// mutators - will not call updateServer();
//--------------------------------------------------------------------
// Mutators
// Will not call updateServer
//--------------------------------------------------------------------
public:
void setUUID(const LLUUID& new_uuid);
virtual void rename(const std::string& new_name);
void setParent(const LLUUID& new_parent);
void setType(LLAssetType::EType type);
// file support - implemented here so that a minimal information
// set can be transmitted between simulator and viewer.
// virtual BOOL importFile(LLFILE* fp);
virtual BOOL exportFile(LLFILE* fp, BOOL include_asset_key = TRUE) const;
private:
// in place correction for inventory name string
void correctInventoryName(std::string& name);
//--------------------------------------------------------------------
// File Support
// Implemented here so that a minimal information set can be transmitted
// between simulator and viewer.
//--------------------------------------------------------------------
public:
// virtual BOOL importFile(LLFILE* fp);
virtual BOOL exportFile(LLFILE* fp, BOOL include_asset_key = TRUE) const;
virtual BOOL importLegacyStream(std::istream& input_stream);
virtual BOOL exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key = TRUE) const;
// virtual methods
virtual void removeFromServer();
virtual void updateParentOnServer(BOOL) const;
virtual void updateServer(BOOL) const;
//--------------------------------------------------------------------
// Member Variables
//--------------------------------------------------------------------
protected:
LLUUID mUUID;
LLUUID mParentUUID; // Parent category. Root categories have LLUUID::NULL.
LLAssetType::EType mType;
std::string mName;
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLInventoryItem
//
// An inventory item represents something that the current user has in
// their inventory.
// An item in the current user's inventory.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLInventoryItem : public LLInventoryObject
{
public:
typedef LLDynamicArray<LLPointer<LLInventoryItem> > item_array_t;
protected:
LLPermissions mPermissions;
LLUUID mAssetUUID;
std::string mDescription;
LLSaleInfo mSaleInfo;
LLInventoryType::EType mInventoryType;
U32 mFlags;
time_t mCreationDate; // seconds from 1/1/1970, UTC
public:
/**
* Anonymous enumeration for specifying the inventory item flags.
*/
enum
{
// The shared flags at the top are shared among all inventory
// types. After that section, all values of flags are type
// dependent. The shared flags will start at 2^30 and work
// down while item type specific flags will start at 2^0 and
// work up.
II_FLAGS_NONE = 0,
//
// Shared flags
//
//
// This value means that the asset has only one reference in
// the system. If the inventory item is deleted, or the asset
// id updated, then we can remove the old reference.
II_FLAGS_SHARED_SINGLE_REFERENCE = 0x40000000,
//
// Landmark flags
//
II_FLAGS_LANDMARK_VISITED = 1,
//
// Object flags
//
// flag to indicate that object permissions should have next
// owner perm be more restrictive on rez. We bump this into
// the second byte of the flags since the low byte is used to
// track attachment points.
II_FLAGS_OBJECT_SLAM_PERM = 0x100,
// flag to indicate that the object sale information has been changed.
II_FLAGS_OBJECT_SLAM_SALE = 0x1000,
// These flags specify which permissions masks to overwrite
// upon rez. Normally, if no permissions slam (above) or
// overwrite flags are set, the asset's permissions are
// used and the inventory's permissions are ignored. If
// any of these flags are set, the inventory's permissions
// take precedence.
II_FLAGS_OBJECT_PERM_OVERWRITE_BASE = 0x010000,
II_FLAGS_OBJECT_PERM_OVERWRITE_OWNER = 0x020000,
II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP = 0x040000,
II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE = 0x080000,
II_FLAGS_OBJECT_PERM_OVERWRITE_NEXT_OWNER = 0x100000,
// flag to indicate whether an object that is returned is composed
// of muiltiple items or not.
II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS = 0x200000,
//
// wearables use the low order byte of flags to store the
// EWearableType enumeration found in newview/llwearable.h
//
II_FLAGS_WEARABLES_MASK = 0xff,
};
protected:
~LLInventoryItem(); // ref counted
//--------------------------------------------------------------------
// Initialization
//--------------------------------------------------------------------
public:
MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY);
LLInventoryItem(const LLUUID& uuid,
@@ -226,13 +153,19 @@ public:
// is prohibited
LLInventoryItem(const LLInventoryItem* other);
virtual void copyItem(const LLInventoryItem* other); // LLRefCount requires custom copy
// As a constructor alternative, the clone() method works like a
void generateUUID() { mUUID.generate(); }
// As a constructor alternative, the clone() method works like a
// copy constructor, but gens a new UUID.
// It is up to the caller to delete (unref) the item.
virtual void cloneItem(LLPointer<LLInventoryItem>& newitem) const;
protected:
~LLInventoryItem(); // ref counted
// accessors
//--------------------------------------------------------------------
// Accessors
//--------------------------------------------------------------------
public:
virtual const LLUUID& getLinkedUUID() const;
virtual const LLPermissions& getPermissions() const;
virtual const LLUUID& getCreatorUUID() const;
@@ -244,8 +177,12 @@ public:
virtual time_t getCreationDate() const;
virtual U32 getCRC32() const; // really more of a checksum.
// mutators - will not call updateServer(), and will never fail
// (though it may correct to sane values)
//--------------------------------------------------------------------
// Mutators
// Will not call updateServer and will never fail
// (though it may correct to sane values)
//--------------------------------------------------------------------
public:
void setAssetUUID(const LLUUID& asset_id);
void setDescription(const std::string& new_desc);
void setSaleInfo(const LLSaleInfo& sale_info);
@@ -253,34 +190,56 @@ public:
void setInventoryType(LLInventoryType::EType inv_type);
void setFlags(U32 flags);
void setCreationDate(time_t creation_date_utc);
void setCreator(const LLUUID& creator); // only used for calling cards
// Put this inventory item onto the current outgoing mesage. It
// assumes you have already called nextBlock().
// Check for changes in permissions masks and sale info
// and set the corresponding bits in mFlags.
void accumulatePermissionSlamBits(const LLInventoryItem& old_item);
// Put this inventory item onto the current outgoing mesage.
// Assumes you have already called nextBlock().
virtual void packMessage(LLMessageSystem* msg) const;
// unpack returns TRUE if the inventory item came through the
// network ok. It uses a simple crc check which is defeatable, but
// we want to detect network mangling somehow.
virtual BOOL unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num = 0);
// file support
//--------------------------------------------------------------------
// File Support
//--------------------------------------------------------------------
public:
virtual BOOL importFile(LLFILE* fp);
virtual BOOL exportFile(LLFILE* fp, BOOL include_asset_key = TRUE) const;
virtual BOOL importLegacyStream(std::istream& input_stream);
virtual BOOL exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key = TRUE) const;
virtual LLXMLNode *exportFileXML(BOOL include_asset_key = TRUE) const;
BOOL importXML(LLXMLNode* node);
// helper functions
//--------------------------------------------------------------------
// Helper Functions
//--------------------------------------------------------------------
public:
// Pack all information needed to reconstruct this item into the given binary bucket.
// pack all information needed to reconstruct this item into the given binary bucket.
// perm_override is optional
S32 packBinaryBucket(U8* bin_bucket, LLPermissions* perm_override = NULL) const;
void unpackBinaryBucket(U8* bin_bucket, S32 bin_bucket_size);
LLSD asLLSD() const;
bool fromLLSD(LLSD& sd);
void asLLSD( LLSD& sd ) const;
bool fromLLSD(const LLSD& sd);
//--------------------------------------------------------------------
// Member Variables
//--------------------------------------------------------------------
protected:
LLPermissions mPermissions;
LLUUID mAssetUUID;
std::string mDescription;
LLSaleInfo mSaleInfo;
LLInventoryType::EType mInventoryType;
U32 mFlags;
time_t mCreationDate; // seconds from 1/1/1970, UTC
};
BOOL item_dictionary_sort(LLInventoryItem* a,LLInventoryItem* b);
@@ -300,9 +259,9 @@ class LLInventoryCategory : public LLInventoryObject
public:
typedef LLDynamicArray<LLPointer<LLInventoryCategory> > cat_array_t;
protected:
~LLInventoryCategory();
//--------------------------------------------------------------------
// Initialization
//--------------------------------------------------------------------
public:
MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY);
LLInventoryCategory(const LLUUID& uuid, const LLUUID& parent_uuid,
@@ -311,29 +270,39 @@ public:
LLInventoryCategory();
LLInventoryCategory(const LLInventoryCategory* other);
void copyCategory(const LLInventoryCategory* other); // LLRefCount requires custom copy
protected:
~LLInventoryCategory();
// accessors and mutators
//--------------------------------------------------------------------
// Accessors And Mutators
//--------------------------------------------------------------------
public:
LLAssetType::EType getPreferredType() const;
void setPreferredType(LLAssetType::EType type);
// For messaging system support
LLSD asLLSD() const;
bool fromLLSD(const LLSD& sd);
//--------------------------------------------------------------------
// Messaging
//--------------------------------------------------------------------
public:
virtual void packMessage(LLMessageSystem* msg) const;
virtual void unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num = 0);
LLSD asLLSD() const;
bool fromLLSD(LLSD& sd);
// file support
//--------------------------------------------------------------------
// File Support
//--------------------------------------------------------------------
public:
virtual BOOL importFile(LLFILE* fp);
virtual BOOL exportFile(LLFILE* fp, BOOL include_asset_key = TRUE) const;
virtual BOOL importLegacyStream(std::istream& input_stream);
virtual BOOL exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key = TRUE) const;
//--------------------------------------------------------------------
// Member Variables
//--------------------------------------------------------------------
protected:
// The type of asset that this category was "meant" to hold
// (although it may in fact hold any type).
LLAssetType::EType mPreferredType;
LLAssetType::EType mPreferredType; // Type that this category was "meant" to hold (although it may hold any type).
};
@@ -404,8 +373,8 @@ struct SetNotForSale
if(LLAssetType::AT_OBJECT == item->getType())
{
U32 flags = item->getFlags();
flags |= LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
flags |= LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
item->setFlags(flags);
}

View File

@@ -0,0 +1,38 @@
/**
* @file llinventorydefines.cpp
* @brief Implementation of the inventory defines.
*
* $LicenseInfo:firstyear=2001&license=viewergpl$
*
* Copyright (c) 2001-2010, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlife.com/developers/opensource/gplv2
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlife.com/developers/opensource/flossexception
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*
*/
#include "linden_common.h"
#include "llinventorydefines.h"
const U8 TASK_INVENTORY_ITEM_KEY = 0;
const U8 TASK_INVENTORY_ASSET_KEY = 1;

View File

@@ -0,0 +1,107 @@
/**
* @file llinventorydefines.h
* @brief LLInventoryDefines
*
* $LicenseInfo:firstyear=2001&license=viewergpl$
*
* Copyright (c) 2001-2010, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlife.com/developers/opensource/gplv2
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlife.com/developers/opensource/flossexception
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*
*/
#ifndef LL_LLINVENTORYDEFINES_H
#define LL_LLINVENTORYDEFINES_H
// Consts for "key" field in the task inventory update message
extern const U8 TASK_INVENTORY_ITEM_KEY;
extern const U8 TASK_INVENTORY_ASSET_KEY;
// Max inventory buffer size (for use in packBinaryBucket)
enum
{
MAX_INVENTORY_BUFFER_SIZE = 1024
};
//--------------------------------------------------------------------
// Inventory item flags enums
// The shared flags at the top are shared among all inventory
// types. After that section, all values of flags are type
// dependent. The shared flags will start at 2^30 and work
// down while item type specific flags will start at 2^0 and work up.
//--------------------------------------------------------------------
class LLInventoryItemFlags
{
public:
enum EType
{
II_FLAGS_NONE = 0,
II_FLAGS_SHARED_SINGLE_REFERENCE = 0x40000000,
// The asset has only one reference in the system. If the
// inventory item is deleted, or the assetid updated, then we
// can remove the old reference.
II_FLAGS_LANDMARK_VISITED = 1,
II_FLAGS_OBJECT_SLAM_PERM = 0x100,
// Object permissions should have next owner perm be more
// restrictive on rez. We bump this into the second byte of the
// flags since the low byte is used to track attachment points.
II_FLAGS_OBJECT_SLAM_SALE = 0x1000,
// The object sale information has been changed.
II_FLAGS_OBJECT_PERM_OVERWRITE_BASE = 0x010000,
II_FLAGS_OBJECT_PERM_OVERWRITE_OWNER = 0x020000,
II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP = 0x040000,
II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE = 0x080000,
II_FLAGS_OBJECT_PERM_OVERWRITE_NEXT_OWNER = 0x100000,
// Specify which permissions masks to overwrite
// upon rez. Normally, if no permissions slam (above) or
// overwrite flags are set, the asset's permissions are
// used and the inventory's permissions are ignored. If
// any of these flags are set, the inventory's permissions
// take precedence.
II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS = 0x200000,
// Whether a returned object is composed of multiple items.
II_FLAGS_WEARABLES_MASK = 0xff,
// Wearables use the low order byte of flags to store the
// LLWearableType::EType enumeration found in newview/llwearable.h
II_FLAGS_PERM_OVERWRITE_MASK = (II_FLAGS_OBJECT_SLAM_PERM |
II_FLAGS_OBJECT_SLAM_SALE |
II_FLAGS_OBJECT_PERM_OVERWRITE_BASE |
II_FLAGS_OBJECT_PERM_OVERWRITE_OWNER |
II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP |
II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE |
II_FLAGS_OBJECT_PERM_OVERWRITE_NEXT_OWNER),
// These bits need to be cleared whenever the asset_id is updated
// on a pre-existing inventory item (DEV-28098 and DEV-30997)
};
};
#endif // LL_LLINVENTORYDEFINES_H

View File

@@ -33,66 +33,64 @@
#include "linden_common.h"
#include "llinventorytype.h"
#include "lldictionary.h"
#include "llmemory.h"
static const std::string empty_string;
///----------------------------------------------------------------------------
/// Class LLInventoryType
///----------------------------------------------------------------------------
// Unlike asset type names, not limited to 8 characters.
// Need not match asset type names.
static const char* INVENTORY_TYPE_NAMES[LLInventoryType::IT_COUNT] =
{
"texture", // 0
"sound",
"callcard",
"landmark",
NULL,
NULL, // 5
"object",
"notecard",
"category",
"root",
"script", // 10
NULL,
NULL,
NULL,
NULL,
"snapshot", // 15
NULL,
"attach",
"wearable",
"animation",
"gesture", // 20
struct InventoryEntry : public LLDictionaryEntry
{
InventoryEntry(const std::string &name, // unlike asset type names, not limited to 8 characters; need not match asset type names
const std::string &human_name, // for decoding to human readable form; put any and as many printable characters you want in each one.
int num_asset_types = 0, ...)
:
LLDictionaryEntry(name),
mHumanName(human_name)
{
va_list argp;
va_start(argp, num_asset_types);
// Read in local textures
for (U8 i=0; i < num_asset_types; i++)
{
LLAssetType::EType t = (LLAssetType::EType)va_arg(argp,int);
mAssetTypes.push_back(t);
}
}
const std::string mHumanName;
typedef std::vector<LLAssetType::EType> asset_vec_t;
asset_vec_t mAssetTypes;
};
// This table is meant for decoding to human readable form. Put any
// and as many printable characters you want in each one.
// See also LLAssetType::mAssetTypeHumanNames
static const char* INVENTORY_TYPE_HUMAN_NAMES[LLInventoryType::IT_COUNT] =
{
"texture", // 0
"sound",
"calling card",
"landmark",
NULL,
NULL, // 5
"object",
"note card",
"folder",
"root",
"script", // 10
NULL,
NULL,
NULL,
NULL,
"snapshot", // 15
NULL,
"attachment",
"wearable",
"animation",
"gesture", // 20
class LLInventoryDictionary : public LLSingleton<LLInventoryDictionary>,
public LLDictionary<LLInventoryType::EType, InventoryEntry>
{
public:
LLInventoryDictionary();
};
LLInventoryDictionary::LLInventoryDictionary()
{
addEntry(LLInventoryType::IT_TEXTURE, new InventoryEntry("texture", "texture", 1, LLAssetType::AT_TEXTURE));
addEntry(LLInventoryType::IT_SOUND, new InventoryEntry("sound", "sound", 1, LLAssetType::AT_SOUND));
addEntry(LLInventoryType::IT_CALLINGCARD, new InventoryEntry("callcard", "calling card", 1, LLAssetType::AT_CALLINGCARD));
addEntry(LLInventoryType::IT_LANDMARK, new InventoryEntry("landmark", "landmark", 1, LLAssetType::AT_LANDMARK));
addEntry(LLInventoryType::IT_OBJECT, new InventoryEntry("object", "object", 1, LLAssetType::AT_OBJECT));
addEntry(LLInventoryType::IT_NOTECARD, new InventoryEntry("notecard", "note card", 1, LLAssetType::AT_NOTECARD));
addEntry(LLInventoryType::IT_CATEGORY, new InventoryEntry("category", "folder" ));
addEntry(LLInventoryType::IT_ROOT_CATEGORY, new InventoryEntry("root", "root" ));
addEntry(LLInventoryType::IT_LSL, new InventoryEntry("script", "script", 2, LLAssetType::AT_LSL_TEXT, LLAssetType::AT_LSL_BYTECODE));
addEntry(LLInventoryType::IT_SNAPSHOT, new InventoryEntry("snapshot", "snapshot", 1, LLAssetType::AT_TEXTURE));
addEntry(LLInventoryType::IT_ATTACHMENT, new InventoryEntry("attach", "attachment", 1, LLAssetType::AT_OBJECT));
addEntry(LLInventoryType::IT_WEARABLE, new InventoryEntry("wearable", "wearable", 2, LLAssetType::AT_CLOTHING, LLAssetType::AT_BODYPART));
addEntry(LLInventoryType::IT_ANIMATION, new InventoryEntry("animation", "animation", 1, LLAssetType::AT_ANIMATION));
addEntry(LLInventoryType::IT_GESTURE, new InventoryEntry("gesture", "gesture", 1, LLAssetType::AT_GESTURE));
}
// Maps asset types to the default inventory type for that kind of asset.
// Thus, "Lost and Found" is a "Category"
static const LLInventoryType::EType
@@ -149,74 +147,28 @@ DEFAULT_ASSET_FOR_INV_TYPE[LLAssetType::AT_COUNT] =
LLInventoryType::IT_NONE // AT_MY_OUTFITS
};
static const int MAX_POSSIBLE_ASSET_TYPES = 2;
static const LLAssetType::EType
INVENTORY_TO_ASSET_TYPE[LLInventoryType::IT_COUNT][MAX_POSSIBLE_ASSET_TYPES] =
{
{ LLAssetType::AT_TEXTURE, LLAssetType::AT_NONE }, // IT_TEXTURE
{ LLAssetType::AT_SOUND, LLAssetType::AT_NONE }, // IT_SOUND
{ LLAssetType::AT_CALLINGCARD, LLAssetType::AT_NONE }, // IT_CALLINGCARD
{ LLAssetType::AT_LANDMARK, LLAssetType::AT_NONE }, // IT_LANDMARK
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE },
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE },
{ LLAssetType::AT_OBJECT, LLAssetType::AT_NONE }, // IT_OBJECT
{ LLAssetType::AT_NOTECARD, LLAssetType::AT_NONE }, // IT_NOTECARD
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE }, // IT_CATEGORY
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE }, // IT_ROOT_CATEGORY
{ LLAssetType::AT_LSL_TEXT, LLAssetType::AT_LSL_BYTECODE }, // IT_LSL
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE },
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE },
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE },
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE },
{ LLAssetType::AT_TEXTURE, LLAssetType::AT_NONE }, // IT_SNAPSHOT
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE },
{ LLAssetType::AT_OBJECT, LLAssetType::AT_NONE }, // IT_ATTACHMENT
{ LLAssetType::AT_CLOTHING, LLAssetType::AT_BODYPART }, // IT_WEARABLE
{ LLAssetType::AT_ANIMATION, LLAssetType::AT_NONE }, // IT_ANIMATION
{ LLAssetType::AT_GESTURE, LLAssetType::AT_NONE }, // IT_GESTURE
};
// static
const char* LLInventoryType::lookup(EType type)
const std::string &LLInventoryType::lookup(EType type)
{
if((type >= 0) && (type < IT_COUNT))
{
return INVENTORY_TYPE_NAMES[S32(type)];
}
else
{
return NULL;
}
const InventoryEntry *entry = LLInventoryDictionary::getInstance()->lookup(type);
if (!entry) return empty_string;
return entry->mName;
}
// static
LLInventoryType::EType LLInventoryType::lookup(const std::string& name)
{
for(S32 i = 0; i < IT_COUNT; ++i)
{
if((INVENTORY_TYPE_NAMES[i])
&& (name == INVENTORY_TYPE_NAMES[i]))
{
// match
return (EType)i;
}
}
return IT_NONE;
return LLInventoryDictionary::getInstance()->lookup(name);
}
// XUI:translate
// translation from a type to a human readable form.
// static
const char* LLInventoryType::lookupHumanReadable(EType type)
const std::string &LLInventoryType::lookupHumanReadable(EType type)
{
if((type >= 0) && (type < IT_COUNT))
{
return INVENTORY_TYPE_HUMAN_NAMES[S32(type)];
}
else
{
return NULL;
}
const InventoryEntry *entry = LLInventoryDictionary::getInstance()->lookup(type);
if (!entry) return empty_string;
return entry->mHumanName;
}
// return the default inventory for the given asset type.
@@ -233,21 +185,40 @@ LLInventoryType::EType LLInventoryType::defaultForAssetType(LLAssetType::EType a
}
}
bool inventory_and_asset_types_match(
LLInventoryType::EType inventory_type,
LLAssetType::EType asset_type)
// add any types that we don't want the user to be able to change permissions on.
// static
bool LLInventoryType::cannotRestrictPermissions(LLInventoryType::EType type)
{
bool rv = false;
if((inventory_type >= 0) && (inventory_type < LLInventoryType::IT_COUNT))
switch(type)
{
for(S32 i = 0; i < MAX_POSSIBLE_ASSET_TYPES; ++i)
case IT_CALLINGCARD:
case IT_LANDMARK:
return true;
default:
return false;
}
}
bool inventory_and_asset_types_match(LLInventoryType::EType inventory_type,
LLAssetType::EType asset_type)
{
// Links can be of any inventory type.
if (LLAssetType::lookupIsLinkType(asset_type))
return true;
const InventoryEntry *entry = LLInventoryDictionary::getInstance()->lookup(inventory_type);
if (!entry) return false;
for (InventoryEntry::asset_vec_t::const_iterator iter = entry->mAssetTypes.begin();
iter != entry->mAssetTypes.end();
iter++)
{
const LLAssetType::EType type = (*iter);
if(type == asset_type)
{
if(INVENTORY_TO_ASSET_TYPE[inventory_type][i] == asset_type)
{
rv = true;
break;
}
return true;
}
}
return rv;
return false;
}

View File

@@ -74,14 +74,16 @@ public:
// machine transation between type and strings
static EType lookup(const std::string& name);
static const char* lookup(EType type);
static const std::string &lookup(EType type);
// translation from a type to a human readable form.
static const char* lookupHumanReadable(EType type);
static const std::string &lookupHumanReadable(EType type);
// return the default inventory for the given asset type.
static EType defaultForAssetType(LLAssetType::EType asset_type);
// true if this type cannot have restricted permissions.
static bool cannotRestrictPermissions(EType type);
private:
// don't instantiate or derive one of these objects
LLInventoryType( void );
@@ -91,8 +93,7 @@ private:
// helper function which returns true if inventory type and asset type
// are potentially compatible. For example, an attachment must be an
// object, but a wearable can be a bodypart or clothing asset.
bool inventory_and_asset_types_match(
LLInventoryType::EType inventory_type,
LLAssetType::EType asset_type);
bool inventory_and_asset_types_match(LLInventoryType::EType inventory_type,
LLAssetType::EType asset_type);
#endif

View File

@@ -40,7 +40,7 @@
std::pair<LLUUID, U64> LLLandmark::mLocalRegion;
LLLandmark::region_map_t LLLandmark::mRegions;
LLLandmark::region_callback_t LLLandmark::mRegionCallback;
LLLandmark::region_callback_map_t LLLandmark::sRegionCallbackMap;
LLLandmark::LLLandmark() :
mGlobalPositionKnown(false)
@@ -177,7 +177,7 @@ void LLLandmark::requestRegionHandle(
LLMessageSystem* msg,
const LLHost& upstream_host,
const LLUUID& region_id,
LLRegionHandleCallback* callback)
region_handle_callback_t callback)
{
if(region_id.isNull())
{
@@ -186,7 +186,7 @@ void LLLandmark::requestRegionHandle(
if(callback)
{
const U64 U64_ZERO = 0;
callback->dataReady(region_id, U64_ZERO);
callback(region_id, U64_ZERO);
}
}
else
@@ -196,7 +196,7 @@ void LLLandmark::requestRegionHandle(
lldebugs << "requestRegionHandle: local" << llendl;
if(callback)
{
callback->dataReady(region_id, mLocalRegion.second);
callback(region_id, mLocalRegion.second);
}
}
else
@@ -207,8 +207,8 @@ void LLLandmark::requestRegionHandle(
lldebugs << "requestRegionHandle: upstream" << llendl;
if(callback)
{
region_callback_t::value_type vt(region_id, callback);
mRegionCallback.insert(vt);
region_callback_map_t::value_type vt(region_id, callback);
sRegionCallbackMap.insert(vt);
}
lldebugs << "Landmark requesting information about: "
<< region_id << llendl;
@@ -221,7 +221,7 @@ void LLLandmark::requestRegionHandle(
{
// we have the answer locally - just call the callack.
lldebugs << "requestRegionHandle: ready" << llendl;
callback->dataReady(region_id, (*it).second.mRegionHandle);
callback(region_id, (*it).second.mRegionHandle);
}
}
}
@@ -259,11 +259,11 @@ void LLLandmark::processRegionIDAndHandle(LLMessageSystem* msg, void**)
#endif
// make all the callbacks here.
region_callback_t::iterator it;
while((it = mRegionCallback.find(region_id)) != mRegionCallback.end())
region_callback_map_t::iterator it;
while((it = sRegionCallbackMap.find(region_id)) != sRegionCallbackMap.end())
{
(*it).second->dataReady(region_id, info.mRegionHandle);
mRegionCallback.erase(it);
(*it).second(region_id, info.mRegionHandle);
sRegionCallbackMap.erase(it);
}
}

View File

@@ -35,6 +35,7 @@
#define LL_LLLANDMARK_H
#include <map>
#include <boost/function.hpp>
#include "llframetimer.h"
#include "lluuid.h"
#include "v3dmath.h"
@@ -42,24 +43,12 @@
class LLMessageSystem;
class LLHost;
// virutal base class used for calling back interested parties when a
// region handle comes back.
class LLRegionHandleCallback
{
public:
LLRegionHandleCallback() {}
virtual ~LLRegionHandleCallback() {}
virtual bool dataReady(
const LLUUID& region_id,
const U64& region_handle)
{
return true;
}
};
class LLLandmark
{
public:
// for calling back interested parties when a region handle comes back.
typedef boost::function<void(const LLUUID& region_id, const U64& region_handle)> region_handle_callback_t;
~LLLandmark() {}
// returns true if the position is known.
@@ -90,7 +79,7 @@ public:
LLMessageSystem* msg,
const LLHost& upstream_host,
const LLUUID& region_id,
LLRegionHandleCallback* callback);
region_handle_callback_t callback);
// Call this method to create a lookup for this region. This
// simplifies a lot of the code.
@@ -118,8 +107,8 @@ private:
static std::pair<LLUUID, U64> mLocalRegion;
typedef std::map<LLUUID, CacheInfo> region_map_t;
static region_map_t mRegions;
typedef std::multimap<LLUUID, LLRegionHandleCallback*> region_callback_t;
static region_callback_t mRegionCallback;
typedef std::multimap<LLUUID, region_handle_callback_t> region_callback_map_t;
static region_callback_map_t sRegionCallbackMap;
};
#endif

View File

@@ -35,7 +35,9 @@
#include "llstreamtools.h"
LLNotecard::LLNotecard(S32 max_text)
: mMaxText(max_text)
: mMaxText(max_text),
mVersion(0),
mEmbeddedVersion(0)
{
}
@@ -203,7 +205,7 @@ bool LLNotecard::importStream(std::istream& str)
return FALSE;
}
if(text_len > mMaxText)
if(text_len > mMaxText || text_len < 0)
{
llwarns << "Invalid Linden text length: " << text_len << llendl;
return FALSE;

View File

@@ -79,23 +79,25 @@ static const std::string PARCEL_CATEGORY_STRING[LLParcel::C_COUNT] =
"shopping",
"stage",
"other",
"rental"
};
static const std::string PARCEL_CATEGORY_UI_STRING[LLParcel::C_COUNT + 1] =
{
"None",
"Linden Location",
"Adult",
"Arts & Culture",
"Arts and Culture",
"Business",
"Educational",
"Gaming",
"Hangout",
"Newcomer Friendly",
"Parks & Nature",
"Parks and Nature",
"Residential",
"Shopping",
"Stage",
"Other",
"Rental",
"Any", // valid string for parcel searches
};
@@ -195,8 +197,6 @@ void LLParcel::init(const LLUUID &owner_id,
mMediaID.setNull();
mMediaAutoScale = 0;
mMediaLoop = TRUE;
mObscureMedia = 1;
mObscureMusic = 1;
mMediaWidth = 0;
mMediaHeight = 0;
setMediaCurrentURL(LLStringUtil::null);
@@ -692,8 +692,8 @@ void LLParcel::packMessage(LLSD& msg)
msg["auto_scale"] = getMediaAutoScale();
msg["media_loop"] = getMediaLoop();
msg["media_current_url"] = getMediaCurrentURL();
msg["obscure_media"] = getObscureMedia();
msg["obscure_music"] = getObscureMusic();
msg["obscure_media"] = false; // OBSOLETE - no longer used
msg["obscure_music"] = false; // OBSOLETE - no longer used
msg["media_id"] = getMediaID();
msg["media_allow_navigate"] = getMediaAllowNavigate();
msg["media_prevent_camera_zoom"] = getMediaPreventCameraZoom();
@@ -757,16 +757,12 @@ void LLParcel::unpackMessage(LLMessageSystem* msg)
msg->getS32("MediaData", "MediaWidth", mMediaWidth);
msg->getS32("MediaData", "MediaHeight", mMediaHeight);
msg->getU8 ( "MediaData", "MediaLoop", mMediaLoop );
msg->getU8 ( "MediaData", "ObscureMedia", mObscureMedia );
msg->getU8 ( "MediaData", "ObscureMusic", mObscureMusic );
}
else
{
setMediaType(std::string("video/vnd.secondlife.qt.legacy"));
setMediaDesc(std::string("No Description available without Server Upgrade"));
mMediaLoop = true;
mObscureMedia = true;
mObscureMusic = true;
}
if(msg->getNumberOfBlocks("MediaLinkSharing") > 0)
@@ -1232,8 +1228,6 @@ void LLParcel::clearParcel()
setMediaDesc(LLStringUtil::null);
setMediaAutoScale(0);
setMediaLoop(TRUE);
mObscureMedia = 1;
mObscureMusic = 1;
mMediaWidth = 0;
mMediaHeight = 0;
setMediaCurrentURL(LLStringUtil::null);

View File

@@ -170,6 +170,7 @@ public:
C_SHOPPING,
C_STAGE,
C_OTHER,
C_RENTAL,
C_COUNT,
C_ANY = -1 // only useful in queries
};
@@ -243,8 +244,6 @@ public:
void setMediaID(const LLUUID& id) { mMediaID = id; }
void setMediaAutoScale ( U8 flagIn ) { mMediaAutoScale = flagIn; }
void setMediaLoop (U8 loop) { mMediaLoop = loop; }
void setObscureMedia( U8 flagIn ) { mObscureMedia = flagIn; }
void setObscureMusic( U8 flagIn ) { mObscureMusic = flagIn; }
void setMediaWidth(S32 width);
void setMediaHeight(S32 height);
void setMediaCurrentURL(const std::string& url);
@@ -351,8 +350,6 @@ public:
U8 getMediaAutoScale() const { return mMediaAutoScale; }
U8 getMediaLoop() const { return mMediaLoop; }
const std::string& getMediaCurrentURL() const { return mMediaCurrentURL; }
U8 getObscureMedia() const { return mObscureMedia; }
U8 getObscureMusic() const { return mObscureMusic; }
U8 getMediaURLFilterEnable() const { return mMediaURLFilterEnable; }
LLSD getMediaURLFilterList() const { return mMediaURLFilterList; }
U8 getMediaAllowNavigate() const { return mMediaAllowNavigate; }
@@ -538,7 +535,7 @@ public:
static bool isAgentBlockedFromParcel(LLParcel* parcelp,
const LLUUID& agent_id,
const std::vector<LLUUID>& group_ids,
const uuid_vec_t& group_ids,
const BOOL is_agent_identified,
const BOOL is_agent_transacted,
const BOOL is_agent_ageverified);
@@ -644,8 +641,6 @@ protected:
U8 mMediaAutoScale;
U8 mMediaLoop;
std::string mMediaCurrentURL;
U8 mObscureMedia;
U8 mObscureMusic;
LLUUID mMediaID;
U8 mMediaURLFilterEnable;
LLSD mMediaURLFilterList;

View File

@@ -83,6 +83,17 @@ void LLPermissions::initMasks(PermissionMask base, PermissionMask owner,
fix();
}
// ! BACKWARDS COMPATIBILITY ! Override masks for inventory types that
// no longer can have restricted permissions. This takes care of previous
// version landmarks that could have had no copy/mod/transfer bits set.
void LLPermissions::initMasks(LLInventoryType::EType type)
{
if (LLInventoryType::cannotRestrictPermissions(type))
{
initMasks(PERM_ALL, PERM_ALL, PERM_ALL, PERM_ALL, PERM_ALL);
}
}
BOOL LLPermissions::getOwnership(LLUUID& owner_id, BOOL& is_group_owned) const
{
if(mOwner.notNull())
@@ -277,6 +288,17 @@ BOOL LLPermissions::setOwnerAndGroup(
return allowed;
}
//Fix for DEV-33917, last owner isn't used much and has little impact on
//permissions so it's reasonably safe to do this, however, for now,
//limiting the functionality of this routine to objects which are
//group owned.
void LLPermissions::setLastOwner(const LLUUID& last_owner)
{
if (isGroupOwned())
mLastOwner = last_owner;
}
// only call this if you know what you're doing
// there are usually perm-bit consequences when the
// ownerhsip changes
@@ -457,7 +479,7 @@ BOOL LLPermissions::setNextOwnerBits(const LLUUID& agent, const LLUUID& group, B
return ownership;
}
BOOL LLPermissions::allowOperationBy(PermissionBit op, const LLUUID& requester, const LLUUID& group) const
bool LLPermissions::allowOperationBy(PermissionBit op, const LLUUID& requester, const LLUUID& group) const
{
if(requester.isNull())
{

View File

@@ -38,6 +38,7 @@
#include "lluuid.h"
#include "llxmlnode.h"
#include "reflective.h"
#include "llinventorytype.h"
// prototypes
class LLMessageSystem;
@@ -129,6 +130,8 @@ public:
void initMasks(PermissionMask base, PermissionMask owner,
PermissionMask everyone, PermissionMask group,
PermissionMask next);
// adjust permissions based on inventory type.
void initMasks(LLInventoryType::EType type);
//
// ACCESSORS
@@ -229,6 +232,9 @@ public:
// ownerhsip changes
void yesReallySetOwner(const LLUUID& owner, bool group_owned);
// Last owner doesn't have much in the way of permissions so it's
//not too dangerous to do this.
void setLastOwner(const LLUUID& last_owner);
// saves last owner, sets owner to uuid null, sets group
// owned. group_id must be the group of the object (that's who it
// is being deeded to) and the object must be group
@@ -249,7 +255,11 @@ public:
BOOL setGroupBits( const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits);
BOOL setEveryoneBits(const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits);
BOOL setNextOwnerBits(const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits);
// This is currently only used in the Viewer to handle calling cards
// where the creator is actually used to store the target. Use with care.
void setCreator(const LLUUID& creator) { mCreator = creator; }
//
// METHODS
//
@@ -261,18 +271,18 @@ public:
// They also return true if the object isn't owned, or the
// requesting agent is a system agent. See llpermissionsflags.h
// for bits.
BOOL allowOperationBy(PermissionBit op, const LLUUID& agent, const LLUUID& group = LLUUID::null) const;
bool allowOperationBy(PermissionBit op, const LLUUID& agent, const LLUUID& group = LLUUID::null) const;
inline BOOL allowModifyBy(const LLUUID &agent_id) const;
inline BOOL allowCopyBy(const LLUUID& agent_id) const;
inline BOOL allowMoveBy(const LLUUID& agent_id) const;
inline BOOL allowModifyBy(const LLUUID &agent_id, const LLUUID& group) const;
inline BOOL allowCopyBy(const LLUUID& agent_id, const LLUUID& group) const;
inline BOOL allowMoveBy(const LLUUID &agent_id, const LLUUID &group) const;
inline bool allowModifyBy(const LLUUID &agent_id) const;
inline bool allowCopyBy(const LLUUID& agent_id) const;
inline bool allowMoveBy(const LLUUID& agent_id) const;
inline bool allowModifyBy(const LLUUID &agent_id, const LLUUID& group) const;
inline bool allowCopyBy(const LLUUID& agent_id, const LLUUID& group) const;
inline bool allowMoveBy(const LLUUID &agent_id, const LLUUID &group) const;
// This somewhat specialized function is meant for testing if the
// current owner is allowed to transfer to the specified agent id.
inline BOOL allowTransferTo(const LLUUID &agent_id) const;
inline bool allowTransferTo(const LLUUID &agent_id) const;
//
// DEPRECATED.
@@ -328,38 +338,38 @@ public:
};
// Inlines
BOOL LLPermissions::allowModifyBy(const LLUUID& agent, const LLUUID& group) const
bool LLPermissions::allowModifyBy(const LLUUID& agent, const LLUUID& group) const
{
return allowOperationBy(PERM_MODIFY, agent, group);
}
BOOL LLPermissions::allowCopyBy(const LLUUID& agent, const LLUUID& group) const
bool LLPermissions::allowCopyBy(const LLUUID& agent, const LLUUID& group) const
{
return allowOperationBy(PERM_COPY, agent, group);
}
BOOL LLPermissions::allowMoveBy(const LLUUID& agent, const LLUUID& group) const
bool LLPermissions::allowMoveBy(const LLUUID& agent, const LLUUID& group) const
{
return allowOperationBy(PERM_MOVE, agent, group);
}
BOOL LLPermissions::allowModifyBy(const LLUUID& agent) const
bool LLPermissions::allowModifyBy(const LLUUID& agent) const
{
return allowOperationBy(PERM_MODIFY, agent, LLUUID::null);
}
BOOL LLPermissions::allowCopyBy(const LLUUID& agent) const
bool LLPermissions::allowCopyBy(const LLUUID& agent) const
{
return allowOperationBy(PERM_COPY, agent, LLUUID::null);
}
BOOL LLPermissions::allowMoveBy(const LLUUID& agent) const
bool LLPermissions::allowMoveBy(const LLUUID& agent) const
{
return allowOperationBy(PERM_MOVE, agent, LLUUID::null);
}
BOOL LLPermissions::allowTransferTo(const LLUUID &agent_id) const
bool LLPermissions::allowTransferTo(const LLUUID &agent_id) const
{
if (mIsGroupOwned)
{

View File

@@ -111,7 +111,7 @@ LLSD LLSaleInfo::asLLSD() const
return sd;
}
bool LLSaleInfo::fromLLSD(LLSD& sd, BOOL& has_perm_mask, U32& perm_mask)
bool LLSaleInfo::fromLLSD(const LLSD& sd, BOOL& has_perm_mask, U32& perm_mask)
{
const char *w;

View File

@@ -98,7 +98,7 @@ public:
BOOL exportLegacyStream(std::ostream& output_stream) const;
LLSD asLLSD() const;
operator LLSD() const { return asLLSD(); }
bool fromLLSD(LLSD& sd, BOOL& has_perm_mask, U32& perm_mask);
bool fromLLSD(const LLSD& sd, BOOL& has_perm_mask, U32& perm_mask);
BOOL importLegacyStream(std::istream& input_stream, BOOL& has_perm_mask, U32& perm_mask);
LLXMLNode *exportFileXML() const;

View File

@@ -45,6 +45,7 @@
// Money transaction failure codes
const U8 TRANS_FAIL_SIMULATOR_TIMEOUT = 1;
const U8 TRANS_FAIL_DATASERVER_TIMEOUT = 2;
const U8 TRANS_FAIL_APPLICATION = 3;
// Codes up to 999 for error conditions
const S32 TRANS_NULL = 0;
@@ -68,6 +69,11 @@ const S32 TRANS_PARCEL_DIR_FEE = 2003;
const S32 TRANS_GROUP_TAX = 2004; // Taxes incurred as part of group membership
const S32 TRANS_CLASSIFIED_RENEW = 2005;
// Codes 2100-2999 reserved for recurring billing services
// New codes can be created through an admin interface so may not
// automatically end up in the list below :-(
// So make sure you check the transaction_description table
const S32 TRANS_RECURRING_GENERIC = 2100;
// Codes 3000-3999 reserved for inventory transactions
const S32 TRANS_GIVE_INVENTORY = 3000;
@@ -83,6 +89,12 @@ const S32 TRANS_DWELL_BONUS = 5007;
const S32 TRANS_PAY_OBJECT = 5008;
const S32 TRANS_OBJECT_PAYS = 5009;
// Codes 5100-5999 reserved for recurring billing transfers between users
// New codes can be created through an admin interface so may not
// automatically end up in the list below :-(
// So make sure you check the transaction_description table
const S32 TRANS_RECURRING_GENERIC_USER = 5100;
// Codes 6000-6999 reserved for group transactions
//const S32 TRANS_GROUP_JOIN = 6000; //reserved for future use
const S32 TRANS_GROUP_LAND_DEED = 6001;

View File

@@ -44,7 +44,12 @@
#define OCT_ERRS LL_WARNS("OctreeErrors")
#endif
#if LL_DEBUG
#define LL_OCTREE_PARANOIA_CHECK 0
#else
#define LL_OCTREE_PARANOIA_CHECK 0
#endif
#define LL_OCTREE_MAX_CAPACITY 128
template <class T> class LLOctreeNode;
@@ -295,7 +300,7 @@ public:
//if this is a redundant insertion, error out (should never happen)
if (mData.find(data) != mData.end())
{
llwarns << "Redundant octree insertion detected. " << data << llendl;
llerrs << "Redundant octree insertion detected. " << data << llendl;
return false;
}
#endif
@@ -313,16 +318,9 @@ public:
child = getChild(i);
if (child->isInside(data->getPositionGroup()))
{
// <edit>
// tempfix, test, shitsux
//child->insert(data);
if(child->getElementCount() < LL_OCTREE_MAX_CAPACITY)
{
child->insert(data);
return false;
}
//return false;
// </edit>
llassert(child->getElementCount() <= LL_OCTREE_MAX_CAPACITY);
child->insert(data);
return false;
}
}

View File

@@ -52,6 +52,8 @@
//
// Sorry the code is such a mess. JC
#include "llpreprocessor.h"
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// LLV4MATH - GNUC

View File

@@ -562,14 +562,13 @@ void LLAvatarNameCache::idle()
bool LLAvatarNameCache::isRequestPending(const LLUUID& agent_id)
{
const F64 PENDING_TIMEOUT_SECS = 5.0 * 60.0;
F64 now = LLFrameTimer::getTotalSeconds();
F64 expire_time = now - PENDING_TIMEOUT_SECS;
pending_queue_t::const_iterator it = sPendingQueue.find(agent_id);
if (it != sPendingQueue.end())
{
bool request_expired = (it->second < expire_time);
return !request_expired;
// in the list of requests in flight, retry if too old
F64 expire_time = LLFrameTimer::getTotalSeconds() - PENDING_TIMEOUT_SECS;
return it->second > expire_time;
}
return false;
}
@@ -578,14 +577,12 @@ void LLAvatarNameCache::eraseExpired()
{
F64 now = LLFrameTimer::getTotalSeconds();
cache_t::iterator it = sCache.begin();
while (it != sCache.end())
for (cache_t::iterator it = sCache.begin(); it != sCache.end(); ++it)
{
cache_t::iterator cur = it;
++it;
const LLAvatarName& av_name = cur->second;
const LLAvatarName& av_name = it->second;
if (av_name.mExpires < now)
{
sCache.erase(cur);
sCache.erase(it);
}
}
}

View File

@@ -1085,8 +1085,7 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys, int shield, std::strin
U8 packed_buffer[MAX_TE_BUFFER];
U8 *cur_ptr = packed_buffer;
S32 last_face_index = getNumTEs() - 1;
S32 last_face_index = llmin((U32) getNumTEs(), MAX_TES) - 1;
if (client_str == "c228d1cf-4b5d-4ba8-84f4-899a0796aa97") shield = 0;
@@ -1380,7 +1379,7 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp)
return retval;
}
face_count = getNumTEs();
face_count = llmin((U32) getNumTEs(), MAX_TES);
U32 i;
cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)image_data, 16, face_count, MVT_LLUUID);

View File

@@ -70,7 +70,7 @@ hasGamma(false), hasLighting(false), calculatesAtmospherics(false)
// LLGLSL Shader implementation
//===============================
LLGLSLShader::LLGLSLShader(S32 shader_class)
: mProgramObject(0), mShaderClass(shader_class), mShaderLevel(0), mShaderGroup(SG_DEFAULT)
: mProgramObject(0), mShaderClass(shader_class), mActiveTextureChannels(0), mShaderLevel(0), mShaderGroup(SG_DEFAULT), mUniformsDirty(FALSE)
{
LLShaderMgr::getGlobalShaderList().push_back(this);
}

View File

@@ -238,9 +238,11 @@ public:
class LLGLSSpecular
{
public:
F32 mShininess;
LLGLSSpecular(const LLColor4& color, F32 shininess)
{
if (shininess > 0.0f)
mShininess = shininess;
if (mShininess > 0.0f)
{
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, color.mV);
S32 shiny = (S32)(shininess*128.f);
@@ -250,8 +252,11 @@ public:
}
~LLGLSSpecular()
{
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, LLColor4(0.f,0.f,0.f,0.f).mV);
glMateriali(GL_FRONT_AND_BACK, GL_SHININESS, 0);
if (mShininess > 0.f)
{
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, LLColor4(0.f,0.f,0.f,0.f).mV);
glMateriali(GL_FRONT_AND_BACK, GL_SHININESS, 0);
}
}
};

View File

@@ -289,11 +289,13 @@ S32 LLImageGL::updateBoundTexMem(const S32 mem, const S32 ncomponents, S32 categ
//static
void LLImageGL::destroyGL(BOOL save_state)
{
deleteDeadTextures(); //Dump unimportant textures.
for (S32 stage = 0; stage < gGLManager.mNumTextureUnits; stage++)
{
gGL.getTexUnit(stage)->unbind(LLTexUnit::TT_TEXTURE);
}
int stored_count = 0;
sAllowReadBackRaw = true ;
for (std::set<LLImageGL*>::iterator iter = sImageList.begin();
iter != sImageList.end(); iter++)
@@ -308,18 +310,24 @@ void LLImageGL::destroyGL(BOOL save_state)
{
glimage->mSaveData = NULL ;
}
else
stored_count++;
}
glimage->destroyGLTexture();
stop_glerror();
}
}
llinfos << "Storing " << stored_count << " images..." << llendl;
sAllowReadBackRaw = false ;
deleteDeadTextures();//Now, actually call glDeleteTextures for everything.
}
//static
void LLImageGL::restoreGL()
{
int recovered_count = 0;
for (std::set<LLImageGL*>::iterator iter = sImageList.begin();
iter != sImageList.end(); iter++)
{
@@ -334,10 +342,12 @@ void LLImageGL::restoreGL()
{
glimage->createGLTexture(glimage->mCurrentDiscardLevel, glimage->mSaveData, 0, TRUE, glimage->getCategory());
stop_glerror();
recovered_count++;
}
glimage->mSaveData = NULL; // deletes data
}
}
llinfos << "Restored " << recovered_count << " images" << llendl;
}
//static
@@ -1250,7 +1260,7 @@ BOOL LLImageGL::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compre
llverify(gGL.getTexUnit(0)->bindManual(mBindTarget, mTexName));
//debug code, leave it there commented.
//checkTexSize() ;
checkTexSize() ;
LLGLint glwidth = 0;
glGetTexLevelParameteriv(mTarget, gl_discard, GL_TEXTURE_WIDTH, (GLint*)&glwidth);

View File

@@ -832,15 +832,21 @@ void LLRender::setColorMask(bool writeColorR, bool writeColorG, bool writeColorB
{
flush();
mCurrColorMask[0] = writeColorR;
mCurrColorMask[1] = writeColorG;
mCurrColorMask[2] = writeColorB;
if (mCurrColorMask[0] != writeColorR ||
mCurrColorMask[1] != writeColorG ||
mCurrColorMask[2] != writeColorB ||
mCurrColorMask[3] != writeAlpha)
{
mCurrColorMask[0] = writeColorR;
mCurrColorMask[1] = writeColorG;
mCurrColorMask[2] = writeColorB;
mCurrColorMask[3] = writeAlpha;
glColorMask(writeColorR ? GL_TRUE : GL_FALSE,
writeColorG ? GL_TRUE : GL_FALSE,
writeColorB ? GL_TRUE : GL_FALSE,
writeAlpha ? GL_TRUE : GL_FALSE);
writeColorB ? GL_TRUE : GL_FALSE,
writeAlpha ? GL_TRUE : GL_FALSE);
}
}
void LLRender::setSceneBlendType(eBlendType type)
@@ -878,15 +884,19 @@ void LLRender::setAlphaRejectSettings(eCompareFunc func, F32 value)
{
flush();
mCurrAlphaFunc = func;
mCurrAlphaFuncVal = value;
if (func == CF_DEFAULT)
if (mCurrAlphaFunc != func ||
mCurrAlphaFuncVal != value)
{
glAlphaFunc(GL_GREATER, 0.01f);
}
else
{
glAlphaFunc(sGLCompareFunc[func], value);
mCurrAlphaFunc = func;
mCurrAlphaFuncVal = value;
if (func == CF_DEFAULT)
{
glAlphaFunc(GL_GREATER, 0.01f);
}
else
{
glAlphaFunc(sGLCompareFunc[func], value);
}
}
}

View File

@@ -1299,7 +1299,31 @@ void LLVertexBuffer::setupVertexBuffer(U32 data_mask) const
if ((data_mask & mTypeMask) != data_mask)
{
llerrs << "LLVertexBuffer::setupVertexBuffer missing required components for supplied data mask." << llendl;
llerrs << "LLVertexBuffer::setupVertexBuffer missing required components for supplied data mask. Missing: ";
static const char* mask_names[] = {"VERTEX","NORMAL","TEXCOORD0","TEXCOORD1","TEXCOORD2","TEXCOORD3","COLOR","BINORMAL","WEIGHT","CLOTH_WEIGHT"};
for(int i = 0; i < 32; ++i)
{
if((data_mask & (1<<i)) && !(mTypeMask & (1<<i)))
{
if(i < (sizeof(mask_names)/sizeof(mask_names[0])))
llcont << "MAP_" << mask_names[i] << ", ";
else
llcont << "MAP_UNKNOWN (1<<" << i << "), ";
}
}
llcont << "\n Has: ";
for(int i = 0; i < 32; ++i)
{
if(mTypeMask & (1<<i))
{
if(i < (sizeof(mask_names)/sizeof(mask_names[0])))
llcont << "MASK_" << mask_names[i] << ", ";
else
llcont << "MAP_UNKNOWN (1<<" << i << "), ";
}
}
llcont << llendl;
}
if (data_mask & MAP_NORMAL)

View File

@@ -248,6 +248,8 @@ void LLComboBox::onCommit()
mTextEntry->setValue(getSimple());
mTextEntry->setTentative(FALSE);
}
setControlValue(getValue());
LLUICtrl::onCommit();
}

View File

@@ -55,6 +55,7 @@
#include "llui.h"
#include "lluictrlfactory.h"
#include "llclipboard.h"
#include "../newview/lgghunspell_wrapper.h"
//
// Imported globals
@@ -118,6 +119,7 @@ LLLineEditor::LLLineEditor(const std::string& name, const LLRect& rect,
mLastSelectionY(-1),
mLastSelectionStart(-1),
mLastSelectionEnd(-1),
mLastContextMenuX(-1),
mPrevalidateFunc( prevalidate_func ),
mCursorColor( LLUI::sColorsGroup->getColor( "TextCursorColor" ) ),
mFgColor( LLUI::sColorsGroup->getColor( "TextFgColor" ) ),
@@ -137,7 +139,8 @@ LLLineEditor::LLLineEditor(const std::string& name, const LLRect& rect,
mReadOnly(FALSE),
mHaveHistory(FALSE),
mImage( sImage ),
mReplaceNewlinesWithSpaces( TRUE )
mReplaceNewlinesWithSpaces( TRUE ),
mSpellCheckable( FALSE )
{
llassert( max_length_bytes > 0 );
@@ -187,10 +190,7 @@ LLLineEditor::LLLineEditor(const std::string& name, const LLRect& rect,
menu->append(new LLMenuItemCallGL("Paste", context_paste, NULL, this));
menu->append(new LLMenuItemCallGL("Delete", context_delete, NULL, this));
menu->append(new LLMenuItemCallGL("Select All", context_selectall, NULL, this));
menu->appendSeparator("Transep");
LLMenuGL* translatemenu = new LLMenuGL("Translate To");
translatemenu->setCanTearOff(FALSE);
menu->appendSeparator("Spelsep");
//menu->setBackgroundColor(gColors.getColor("MenuPopupBgColor"));
menu->setCanTearOff(FALSE);
menu->setVisible(FALSE);
@@ -454,6 +454,89 @@ void LLLineEditor::context_copy(void* data)
if(line)line->copy();
}
void LLLineEditor::spell_correct(void* data)
{
SpellMenuBind* tempBind = (SpellMenuBind*)data;
LLLineEditor* line = tempBind->origin;
if(tempBind && line)
{
llinfos << ((LLMenuItemCallGL *)(tempBind->menuItem))->getName() << " : " << tempBind->origin->getName() << " : " << tempBind->word << llendl;
if(line)line->spellReplace(tempBind);
}
}
void LLLineEditor::spell_show(void * data)
{
SpellMenuBind* tempBind = (SpellMenuBind*)data;
LLLineEditor* line = tempBind->origin;
if (tempBind && line)
{
BOOL show = (tempBind->word == "Show Misspellings");
glggHunSpell->setSpellCheckHighlight(show);
}
}
std::vector<S32> LLLineEditor::getMisspelledWordsPositions()
{
std::vector<S32> thePosesOfBadWords;
const LLWString& text = mText.getWString();
//llinfos << "end of box is at " << cursorloc << " and end of text is at " << text.length() << llendl;
S32 wordStart=0;
S32 wordEnd=mStartSpellHere;
while(wordEnd < mEndSpellHere)
{
//go through all the chars... XD
if( LLTextEditor::isPartOfWord( text[wordEnd] ) )
{
// Select word the cursor is over
while ((wordEnd > 0) && LLTextEditor::isPartOfWord(text[wordEnd-1]))
{
wordEnd--;
}
wordStart=wordEnd;
while ((wordEnd < (S32)text.length()) && LLTextEditor::isPartOfWord( text[wordEnd] ) )
{
wordEnd++;
}
//got a word :D
std::string selectedWord(std::string(text.begin(),
text.end()).substr(wordStart,wordEnd-wordStart));
if(!glggHunSpell->isSpelledRight(selectedWord))
{
//misspelled word here, and you have just right clicked on it!
//get the center of this word..
//S32 center = llround( (wordEnd-wordStart)/2 ) + wordStart;
//turn this cursor position into a pixel pos
//center = findPixelNearestPos(center-getCursor());
thePosesOfBadWords.push_back(
wordStart);
thePosesOfBadWords.push_back(wordEnd);
}
}
wordEnd++;
}
return thePosesOfBadWords;
}
void LLLineEditor::spell_add(void* data)
{
SpellMenuBind* tempBind = (SpellMenuBind*)data;
if(tempBind)
{
glggHunSpell->addWordToCustomDictionary(tempBind->word);
tempBind->origin->mPrevSpelledText="";//make it update
}
}
void LLLineEditor::context_paste(void* data)
{
LLLineEditor* line = (LLLineEditor*)data;
@@ -568,6 +651,10 @@ BOOL LLLineEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
setFocus(TRUE);
//setCursorAtLocalPos( x);
S32 wordStart = 0;
S32 wordLen = 0;
S32 pos = calculateCursorFromMouse(x);
LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get();
if (menu)
{
@@ -575,7 +662,81 @@ BOOL LLLineEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
{
menu->setVisible(FALSE);
}
for (int i = 0;i<(int)suggestionMenuItems.size();i++)
{
SpellMenuBind * tempBind = suggestionMenuItems[i];
if(tempBind)
{
menu->remove((LLMenuItemCallGL *)tempBind->menuItem);
((LLMenuItemCallGL *)tempBind->menuItem)->die();
//delete tempBind->menuItem;
//tempBind->menuItem = NULL;
delete tempBind;
}
}
suggestionMenuItems.clear();
// spell_check="true" in xui
menu->setItemVisible("Spelsep", !mReadOnly && mSpellCheckable);
if (!mReadOnly && mSpellCheckable)
{
// search for word matches
bool is_word_part = getWordBoundriesAt(pos, &wordStart, &wordLen);
if (is_word_part)
{
const LLWString& text = mText.getWString();
std::string selectedWord(std::string(text.begin(), text.end()).substr(wordStart,wordLen));
if (!glggHunSpell->isSpelledRight(selectedWord))
{
//misspelled word here, and you have just right clicked on it!
std::vector<std::string> suggs = glggHunSpell->getSuggestionList(selectedWord);
for (int i = 0; i<(int)suggs.size() ;i++)
{
SpellMenuBind * tempStruct = new SpellMenuBind;
tempStruct->origin = this;
tempStruct->word = suggs[i];
tempStruct->wordPositionEnd = wordStart + wordLen;
tempStruct->wordPositionStart=wordStart;
LLMenuItemCallGL * suggMenuItem = new LLMenuItemCallGL(
tempStruct->word, spell_correct, NULL, tempStruct);
//new LLMenuItemCallGL("Select All", context_selectall, NULL, this));
tempStruct->menuItem = suggMenuItem;
suggestionMenuItems.push_back(tempStruct);
menu->append(suggMenuItem);
}
SpellMenuBind * tempStruct = new SpellMenuBind;
tempStruct->origin = this;
tempStruct->word = selectedWord;
tempStruct->wordPositionEnd = wordStart + wordLen;
tempStruct->wordPositionStart=wordStart;
LLMenuItemCallGL * suggMenuItem = new LLMenuItemCallGL(
"Add Word", spell_add, NULL, tempStruct);
tempStruct->menuItem = suggMenuItem;
suggestionMenuItems.push_back(tempStruct);
menu->append(suggMenuItem);
}
}
SpellMenuBind * tempStruct = new SpellMenuBind;
tempStruct->origin = this;
if (glggHunSpell->getSpellCheckHighlight())
{
tempStruct->word = "Hide Misspellings";
}
else
{
tempStruct->word = "Show Misspellings";
}
LLMenuItemCallGL * suggMenuItem = new LLMenuItemCallGL(
tempStruct->word, spell_show, NULL, tempStruct);
tempStruct->menuItem = suggMenuItem;
suggestionMenuItems.push_back(tempStruct);
menu->append(suggMenuItem);
}
mLastContextMenuX = x;
menu->buildDrawLabels();
menu->updateParent(LLMenuGL::sMenuContainer);
LLMenuGL::showPopup(this, menu, x, y);
@@ -892,6 +1053,26 @@ S32 LLLineEditor::nextWordPos(S32 cursorPos) const
return cursorPos;
}
BOOL LLLineEditor::getWordBoundriesAt(const S32 at, S32* word_begin, S32* word_length) const
{
const LLWString& wtext = mText.getWString();
S32 pos = at;
if (LLTextEditor::isPartOfWord(wtext[pos]))
{
while ( (pos > 0) && LLTextEditor::isPartOfWord(wtext[pos - 1]) )
{
pos--;
}
*word_begin = pos;
while ( (pos < (S32)wtext.length()) && LLTextEditor::isPartOfWord(wtext[pos]) )
{
pos++;
}
*word_length = pos - *word_begin;
return TRUE;
}
return FALSE;
}
BOOL LLLineEditor::handleSelectionKey(KEY key, MASK mask)
{
@@ -1046,6 +1227,16 @@ void LLLineEditor::copy()
}
}
void LLLineEditor::spellReplace(SpellMenuBind* spellData)
{
mText.erase(spellData->wordPositionStart,
spellData->wordPositionEnd - spellData->wordPositionStart);
insert(spellData->word,spellData->wordPositionStart);
mCursorPos+=spellData->word.length() - (spellData->wordPositionEnd-spellData->wordPositionStart);
}
void LLLineEditor::insert(std::string what, S32 wher)
{
LLLineEditorRollback rollback(this);
@@ -1063,6 +1254,7 @@ void LLLineEditor::insert(std::string what, S32 wher)
else if( mKeystrokeCallback )
mKeystrokeCallback( this, mCallbackUserData );
}
BOOL LLLineEditor::canPaste() const
{
return !mReadOnly && gClipboard.canPasteString();
@@ -1588,6 +1780,57 @@ void LLLineEditor::doDelete()
}
void LLLineEditor::drawMisspelled(LLRect background)
{
if (!mReadOnly && mSpellCheckable)
{
S32 newStartSpellHere =mScrollHPos;
S32 cursorloc =calculateCursorFromMouse(mMaxHPixels);
S32 newStopSpellHere = ( ((S32)mText.length())>cursorloc)?cursorloc:(S32)mText.length();
F32 elapsed = mSpellTimer.getElapsedTimeF32();
if(S32(elapsed / 1) & 1)
{
if(isSpellDirty()||(newStartSpellHere!=mStartSpellHere)||(newStopSpellHere!=mEndSpellHere))
{
mStartSpellHere=newStartSpellHere;
mEndSpellHere= newStopSpellHere;
resetSpellDirty();
misspellLocations=getMisspelledWordsPositions();
}
}
if (glggHunSpell->getSpellCheckHighlight())
{
for (int i =0; i<(int)misspellLocations.size(); i++)
{
S32 wstart =findPixelNearestPos( misspellLocations[i]-getCursor());
S32 wend = findPixelNearestPos(misspellLocations[++i]-getCursor());
S32 maxw = getRect().getWidth();
if (wend > maxw)
{
wend = maxw;
}
if (wstart > maxw)
{
wstart = maxw;
}
gGL.color4ub(255,0,0,200);
//3 line zig zags..
while (wstart < wend)
{
gl_line_2d(wstart, background.mBottom-1, wstart+3, background.mBottom+2);
gl_line_2d(wstart+3, background.mBottom+2, wstart+6, background.mBottom-1);
wstart+=6;
}
}
}
}
}
void LLLineEditor::draw()
{
S32 text_len = mText.length();
@@ -1776,6 +2019,9 @@ void LLLineEditor::draw()
mBorder->setVisible(FALSE); // no more programmatic art.
#endif
drawMisspelled(background);
resetSpellDirty();
// If we're editing...
if( gFocusMgr.getKeyboardFocus() == this)
{
@@ -2455,6 +2701,11 @@ LLView* LLLineEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory
{
line_editor->setCommitOnFocusLost(commit_on_focus_lost);
}
BOOL spell_checking = FALSE;
if (node->getAttributeBOOL("spell_check", spell_checking))
{
line_editor->setSpellCheckable(spell_checking);
}
line_editor->setColorParameters(node);

View File

@@ -96,6 +96,16 @@ public:
/*virtual*/ BOOL handleUnicodeCharHere(llwchar uni_char);
/*virtual*/ void onMouseCaptureLost();
struct SpellMenuBind
{
LLLineEditor* origin;
void * menuItem;
std::string word;
S32 wordPositionStart;
S32 wordPositionEnd;
};
virtual void spellReplace(SpellMenuBind* spellData);
virtual void insert(std::string what,S32 wher);
// LLEditMenuHandler overrides
@@ -127,8 +137,14 @@ public:
static void context_paste(void* data);
static void context_delete(void* data);
static void context_selectall(void* data);
static void spell_correct(void* data);
static void spell_show(void* data);
static void spell_add(void* data);
std::vector<S32> getMisspelledWordsPositions();
// view overrides
virtual void draw();
void drawMisspelled(LLRect background);
virtual void reshape(S32 width,S32 height,BOOL called_from_parent=TRUE);
virtual void onFocusReceived();
virtual void onFocusLost();
@@ -143,6 +159,8 @@ public:
virtual void onCommit();
virtual BOOL isDirty() const { return mText.getString() != mPrevText; } // Returns TRUE if user changed value at all
virtual void resetDirty() { mPrevText = mText.getString(); } // Clear dirty state
virtual BOOL isSpellDirty() const { return mText.getString() != mPrevSpelledText; } // Returns TRUE if user changed value at all
virtual void resetSpellDirty() { mPrevSpelledText = mText.getString(); } // Clear dirty state
// assumes UTF8 text
virtual void setValue(const LLSD& value ) { setText(value.asString()); }
@@ -178,6 +196,7 @@ public:
void setWriteableBgColor( const LLColor4& c ) { mWriteableBgColor = c; }
void setReadOnlyBgColor( const LLColor4& c ) { mReadOnlyBgColor = c; }
void setFocusBgColor(const LLColor4& c) { mFocusBgColor = c; }
void setSpellCheckable(BOOL b) { mSpellCheckable = b; }
const LLColor4& getFgColor() const { return mFgColor; }
const LLColor4& getReadOnlyFgColor() const { return mReadOnlyFgColor; }
@@ -194,6 +213,7 @@ public:
// get the cursor position of the beginning/end of the prev/next word in the text
S32 prevWordPos(S32 cursorPos) const;
S32 nextWordPos(S32 cursorPos) const;
BOOL getWordBoundriesAt(const S32 at, S32* word_begin, S32* word_length) const;
BOOL hasSelection() const { return (mSelectionStart != mSelectionEnd); }
void startSelection();
@@ -268,6 +288,14 @@ protected:
LLUIString mText; // The string being edited.
std::string mPrevText; // Saved string for 'ESC' revert
LLUIString mLabel; // text label that is visible when no user text provided
std::string mPrevSpelledText; // saved string so we know whether to respell or not
std::vector<S32> misspellLocations; // where all the misspelled words are
S32 mStartSpellHere; // the position of the first char on the screen, stored so we know when to update
S32 mEndSpellHere; // the location of the last char on the screen
BOOL mSpellCheckable; // set in xui as "spell_check". Default value for a field
LLFrameTimer mSpellTimer;
std::vector<SpellMenuBind* > suggestionMenuItems;
S32 mLastContextMenuX;
// line history support:
BOOL mHaveHistory; // flag for enabled line history

View File

@@ -2525,6 +2525,11 @@ BOOL LLMenuGL::handleJumpKey(KEY key)
// Add the menu item to this menu.
BOOL LLMenuGL::append( LLMenuItemGL* item )
{
if (mSpilloverMenu)
{
return mSpilloverMenu->append(item);
}
mItems.push_back( item );
addChild( item );
arrange();
@@ -2572,6 +2577,31 @@ BOOL LLMenuGL::appendMenu( LLMenuGL* menu )
return success;
}
// Remove a menu item from this menu.
BOOL LLMenuGL::remove( LLMenuItemGL* item )
{
if (mSpilloverMenu)
{
cleanupSpilloverBranch();
}
item_list_t::iterator found_iter = std::find(mItems.begin(), mItems.end(), item);
if (found_iter != mItems.end())
{
mItems.erase(found_iter);
}
removeChild( item );
// We keep it around in case someone is pointing at it.
// The caller can delete it if it's safe.
// Note that getMenu() will still not work since its parent isn't a menu.
sMenuContainer->addChild( item );
arrange();
return TRUE;
}
void LLMenuGL::setEnabledSubMenus(BOOL enable)
{
setEnabled(enable);
@@ -2829,6 +2859,11 @@ void LLMenuGL::updateParent(LLView* parentp)
{
(*item_iter)->updateBranchParent(parentp);
}
if (mSpilloverMenu)
{
mSpilloverMenu->updateParent(parentp);
}
}
BOOL LLMenuGL::handleAcceleratorKey(KEY key, MASK mask)

View File

@@ -442,6 +442,9 @@ public:
// Add the menu item to this menu.
virtual BOOL append( LLMenuItemGL* item );
// Remove a menu item from this menu.
virtual BOOL remove( LLMenuItemGL* item );
// *NOTE:Mani - appendNoArrange() should be removed when merging to skinning/viewer2.0
// Its added as a fix to a viewer 1.23 bug that has already been address by skinning work.
virtual BOOL appendNoArrange( LLMenuItemGL* item );

View File

@@ -60,12 +60,12 @@
#include "lltextparser.h"
#include <queue>
#include "llmenugl.h"
#include "../newview/lgghunspell_wrapper.h"
//
// Globals
//
static LLRegisterWidget<LLTextEditor> r("simple_text_editor");
BOOL gDebugTextEditorTips = FALSE;
//
@@ -289,8 +289,11 @@ LLTextEditor::LLTextEditor(
mMouseDownY(0),
mLastSelectionX(-1),
mLastSelectionY(-1),
mLastContextMenuX(-1),
mLastContextMenuY(-1),
mReflowNeeded(FALSE),
mScrollNeeded(FALSE)
mScrollNeeded(FALSE),
mSpellCheckable(FALSE)
{
mSourceID.generate();
@@ -354,6 +357,7 @@ LLTextEditor::LLTextEditor(
menu->append(new LLMenuItemCallGL("Paste", context_paste, NULL, this));
menu->append(new LLMenuItemCallGL("Delete", context_delete, NULL, this));
menu->append(new LLMenuItemCallGL("Select All", context_selectall, NULL, this));
menu->appendSeparator("Spelsep");
menu->setCanTearOff(FALSE);
menu->setVisible(FALSE);
mPopupMenuHandle = menu->getHandle();
@@ -387,6 +391,85 @@ void LLTextEditor::context_copy(void* data)
LLTextEditor* line = (LLTextEditor*)data;
if(line)line->copy();
}
void LLTextEditor::spell_correct(void* data)
{
SpellMenuBind* tempBind = (SpellMenuBind*)data;
LLTextEditor* line = tempBind->origin;
if(tempBind && line)
{
llinfos << tempBind->menuItem->getName() << " : " << tempBind->origin->getName() << " : " << tempBind->word << llendl;
if(line)line->spellReplace(tempBind);
}
}
void LLTextEditor::spell_show(void * data)
{
SpellMenuBind* tempBind = (SpellMenuBind*)data;
LLTextEditor* line = tempBind->origin;
if(tempBind && line)
{
BOOL show = (tempBind->word == "Show Misspellings");
glggHunSpell->setSpellCheckHighlight(show);
}
}
std::vector<S32> LLTextEditor::getMisspelledWordsPositions()
{
resetSpellDirty();
std::vector<S32> thePosesOfBadWords;
LLWString& text = mWText;
S32 wordStart=0;
S32 wordEnd=spellStart;//start at the scroll start
while(wordEnd < spellEnd)
{
//go through all the chars... XD
if( LLTextEditor::isPartOfWord( text[wordEnd] ) )
{
// Select word the cursor is over
while ((wordEnd > 0) && LLTextEditor::isPartOfWord(text[wordEnd-1]))
{
wordEnd--;
}
wordStart=wordEnd;
while ((wordEnd < (S32)text.length()) && LLTextEditor::isPartOfWord( text[wordEnd] ) )
{
wordEnd++;
}
//got a word :D
std::string regText(text.begin(),text.end());
std::string selectedWord(regText.substr(wordStart,wordEnd-wordStart));
if(!glggHunSpell->isSpelledRight(selectedWord))
{
//misspelled word here, and you have just right clicked on it
thePosesOfBadWords.push_back(wordStart);
thePosesOfBadWords.push_back(wordEnd);
}
}
wordEnd++;
}
return thePosesOfBadWords;
}
void LLTextEditor::spell_add(void* data)
{
SpellMenuBind* tempBind = (SpellMenuBind*)data;
if(tempBind)
{
glggHunSpell->addWordToCustomDictionary(tempBind->word);
tempBind->origin->mPrevSpelledText.erase();//make it update
}
}
void LLTextEditor::context_paste(void* data)
{
LLTextEditor* line = (LLTextEditor*)data;
@@ -779,6 +862,26 @@ S32 LLTextEditor::nextWordPos(S32 cursorPos) const
return cursorPos;
}
BOOL LLTextEditor::getWordBoundriesAt(const S32 at, S32* word_begin, S32* word_length) const
{
S32 pos = at;
if (isPartOfWord(mWText[pos]))
{
while ( (pos > 0) && isPartOfWord(mWText[pos - 1]) )
{
pos--;
}
*word_begin = pos;
while ( (pos < getLength()) && isPartOfWord(mWText[pos]) )
{
pos++;
}
*word_length = pos - *word_begin;
return TRUE;
}
return FALSE;
}
S32 LLTextEditor::getLineStart( S32 line ) const
{
S32 num_lines = getLineCount();
@@ -1268,11 +1371,91 @@ BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
BOOL LLTextEditor::handleRightMouseDown( S32 x, S32 y, MASK mask )
{
setFocus(TRUE);
llinfos << "Right mouse click - Opening menu." << llendl;
//setCursorAtLocalPos( x, y, TRUE );
S32 wordStart = 0;
S32 wordLen = 0;
S32 pos = getCursorPosFromLocalCoord(x,y,TRUE);
LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get();
if (menu)
{
for(int i = 0;i<(int)suggestionMenuItems.size();i++)
{
SpellMenuBind * tempBind = suggestionMenuItems[i];
if(tempBind)
{
menu->remove(tempBind->menuItem);
tempBind->menuItem->die();
//delete tempBind->menuItem;
//tempBind->menuItem = NULL;
delete tempBind;
}
}
suggestionMenuItems.clear();
// spell_check="true" in xui
menu->setItemVisible("Spelsep", !mReadOnly && mSpellCheckable);
if (!mReadOnly && mSpellCheckable)
{
bool is_word_part = getWordBoundriesAt(pos, &wordStart, &wordLen);
if (is_word_part)
{
const LLWString &text = mWText;
std::string selectedWord(std::string(text.begin(), text.end()).substr(wordStart,wordLen));
if (!glggHunSpell->isSpelledRight(selectedWord))
{
//misspelled word here, and you have just right clicked on it!
std::vector<std::string> suggs = glggHunSpell->getSuggestionList(selectedWord);
for (int i = 0; i<(int)suggs.size(); i++)
{
SpellMenuBind * tempStruct = new SpellMenuBind;
tempStruct->origin = this;
tempStruct->word = suggs[i];
tempStruct->wordPositionEnd = wordStart + wordLen;
tempStruct->wordPositionStart=wordStart;
tempStruct->wordY=y;
LLMenuItemCallGL * suggMenuItem = new LLMenuItemCallGL(
tempStruct->word, spell_correct, NULL, tempStruct);
tempStruct->menuItem = suggMenuItem;
suggestionMenuItems.push_back(tempStruct);
menu->append(suggMenuItem);
}
SpellMenuBind * tempStruct = new SpellMenuBind;
tempStruct->origin = this;
tempStruct->word = selectedWord;
tempStruct->wordPositionEnd = wordStart + wordLen;
tempStruct->wordPositionStart=wordStart;
tempStruct->wordY=y;
LLMenuItemCallGL * suggMenuItem = new LLMenuItemCallGL(
"Add Word", spell_add, NULL, tempStruct);
tempStruct->menuItem = suggMenuItem;
suggestionMenuItems.push_back(tempStruct);
menu->append(suggMenuItem);
}
}
SpellMenuBind * tempStruct = new SpellMenuBind;
tempStruct->origin = this;
if (glggHunSpell->getSpellCheckHighlight())
{
tempStruct->word = "Hide Misspellings";
}
else
{
tempStruct->word = "Show Misspellings";
}
LLMenuItemCallGL * suggMenuItem = new LLMenuItemCallGL(
tempStruct->word, spell_show, NULL, tempStruct);
tempStruct->menuItem = suggMenuItem;
suggestionMenuItems.push_back(tempStruct);
menu->append(suggMenuItem);
}
mLastContextMenuX = x;
mLastContextMenuY = y;
menu->buildDrawLabels();
menu->updateParent(LLMenuGL::sMenuContainer);
LLMenuGL::showPopup(this, menu, x, y);
@@ -1971,6 +2154,17 @@ BOOL LLTextEditor::canPaste() const
}
void LLTextEditor::spellReplace(SpellMenuBind* spellData)
{
remove( spellData->wordPositionStart,
spellData->wordPositionEnd - spellData->wordPositionStart, TRUE );
LLWString clean_string = utf8str_to_wstring(spellData->word);
insert(spellData->wordPositionStart, clean_string, FALSE);
mCursorPos+=clean_string.length() - (spellData->wordPositionEnd-spellData->wordPositionStart);
needsReflow();
}
// paste from clipboard
void LLTextEditor::paste()
{
@@ -2823,6 +3017,106 @@ void LLTextEditor::drawSelectionBackground()
}
}
void LLTextEditor::drawMisspelled()
{
if (!mReadOnly && mSpellCheckable)
{
if(
( ((getLength()<400)||(false)) &&( (S32(mSpellTimer.getElapsedTimeF32() / 1) & 1) ))
||
(S32(mKeystrokeTimer.getElapsedTimeF32() / 1) & 1)
)
{
S32 newSpellStart = getLineStart(mScrollbar->getDocPos());//start at the scroll start
S32 newSpellEnd = getLineStart(mScrollbar->getDocPos() + 1 + mScrollbar->getDocSize()-mScrollbar->getDocPosMax());//end at the end o.o
if (mScrollbar->getDocPos() == mScrollbar->getDocPosMax())
{
newSpellEnd = (S32)mWText.length();
}
if (isSpellDirty() || (newSpellEnd!=spellEnd || newSpellStart!=spellStart))
{
spellEnd = newSpellEnd;
spellStart = newSpellStart;
misspellLocations = getMisspelledWordsPositions();
}
}
//draw
if (glggHunSpell->getSpellCheckHighlight())
{
for (int i = 0; i<(int)misspellLocations.size() ;i++)
{
S32 wstart = misspellLocations[i];
S32 wend = misspellLocations[++i];
//start curor code mod
const LLWString &text = mWText;
const S32 text_len = getLength();
// Skip through the lines we aren't drawing.
S32 search_pos = mScrollbar->getDocPos();
S32 num_lines = getLineCount();
if (search_pos >= num_lines)
{
return;
}
S32 line_start = getLineStart(search_pos);
F32 line_height = mGLFont->getLineHeight();
F32 text_y = (F32)(mTextRect.mTop) - line_height;
F32 word_left = 0.f;
F32 word_right = 0.f;
F32 word_bottom = 0.f;
BOOL word_visible = FALSE;
S32 line_end = 0;
// Determine if the cursor is visible and if so what its coordinates are.
while( (mTextRect.mBottom <= llround(text_y)) && (search_pos < num_lines))
{
line_end = text_len + 1;
S32 next_line = -1;
if ((search_pos + 1) < num_lines)
{
next_line = getLineStart(search_pos + 1);
line_end = next_line - 1;
}
const llwchar* line = text.c_str() + line_start;
// Find the cursor and selection bounds
if( line_start <= wstart && wend <= line_end )
{
word_visible = TRUE;
word_left = (F32)mTextRect.mLeft + mGLFont->getWidthF32(line, 0, wstart - line_start, mAllowEmbeddedItems )-1.f;
word_right = (F32)mTextRect.mLeft + mGLFont->getWidthF32(line, 0, wend - line_start, mAllowEmbeddedItems )+1.f;
word_bottom = text_y;
break;
}
// move down one line
text_y -= line_height;
line_start = next_line;
search_pos++;
}
if (mShowLineNumbers)
{
word_left += UI_TEXTEDITOR_LINE_NUMBER_MARGIN;
word_right += UI_TEXTEDITOR_LINE_NUMBER_MARGIN;
}
// Draw the cursor
if (word_visible)
{
//end cursor code mod
gGL.color4ub(255,0,0,200);
while (word_left<word_right)
{
gl_line_2d(word_left,word_bottom-2, word_left+3,word_bottom+1);
gl_line_2d(word_left+3,word_bottom+1, word_left+6,word_bottom-2);
word_left += 6;
}
}
}
}
}
}
void LLTextEditor::drawCursor()
{
if( gFocusMgr.getKeyboardFocus() == this
@@ -3305,7 +3599,8 @@ void LLTextEditor::draw()
drawPreeditMarker();
drawText();
drawCursor();
drawMisspelled();
resetSpellDirty();
unbindEmbeddedChars(mGLFont);
//RN: the decision was made to always show the orange border for keyboard focus but do not put an insertion caret
@@ -4474,6 +4769,8 @@ void LLTextEditor::setTextEditorParameters(LLXMLNodePtr node)
node->getAttributeBOOL("track_bottom", mTrackBottom);
node->getAttributeBOOL("spell_check", mSpellCheckable);
LLColor4 color;
if (LLUICtrlFactory::getAttributeColor(node,"cursor_color", color))
{

View File

@@ -110,7 +110,19 @@ public:
virtual void setFocus( BOOL b );
virtual BOOL acceptsTextInput() const;
virtual BOOL isDirty() const { return( mLastCmd != NULL || (mPristineCmd && (mPristineCmd != mLastCmd)) ); }
BOOL isSpellDirty() const { return mWText != mPrevSpelledText; } // Returns TRUE if user changed value at all
void resetSpellDirty() { mPrevSpelledText = mWText; } // Clear dirty state
struct SpellMenuBind
{
LLTextEditor* origin;
LLMenuItemCallGL * menuItem;
std::string word;
S32 wordPositionStart;
S32 wordPositionEnd;
S32 wordY;
};
// LLEditMenuHandler interface
virtual void undo();
virtual BOOL canUndo() const;
@@ -123,6 +135,8 @@ public:
virtual void paste();
virtual BOOL canPaste() const;
virtual void spellReplace(SpellMenuBind* spellData);
virtual void updatePrimary();
virtual void copyPrimary();
virtual void pastePrimary();
@@ -140,6 +154,10 @@ public:
static void context_paste(void* data);
static void context_delete(void* data);
static void context_selectall(void* data);
static void spell_correct(void* data);
static void spell_add(void* data);
static void spell_show(void* data);
std::vector<S32> getMisspelledWordsPositions();
void selectNext(const std::string& search_text_in, BOOL case_insensitive, BOOL wrap = TRUE);
BOOL replaceText(const std::string& search_text, const std::string& replace_text, BOOL case_insensitive, BOOL wrap = TRUE);
@@ -206,6 +224,7 @@ public:
void setHighlightColor( const LLColor4& color );
void setShadowColor( const LLColor4& color );
LLColor4 getReadOnlyFgColor() { return mReadOnlyFgColor; }
void setSpellCheckable(BOOL b) { mSpellCheckable = b; }
// Hacky methods to make it into a word-wrapping, potentially scrolling,
// read-only text box.
@@ -272,7 +291,7 @@ public:
const LLTextSegment* getPreviousSegment() const;
void getSelectedSegments(std::vector<const LLTextSegment*>& segments) const;
static bool isPartOfWord(llwchar c) { return (c == '_') || LLStringOps::isAlnum((char)c); }
static bool isPartOfWord(llwchar c) { return ( (c == '_') || (c == '\'') || LLStringOps::isAlnum((char)c)); }
BOOL isReadOnly() { return mReadOnly; }
protected:
@@ -329,6 +348,7 @@ protected:
S32 prevWordPos(S32 cursorPos) const;
S32 nextWordPos(S32 cursorPos) const;
BOOL getWordBoundriesAt(const S32 at, S32* word_begin, S32* word_length) const;
S32 getLineCount() const { return mLineStartList.size(); }
S32 getLineStart( S32 line ) const;
@@ -467,6 +487,7 @@ private:
void drawBackground();
void drawSelectionBackground();
void drawCursor();
void drawMisspelled();
void drawText();
void drawClippedSegment(const LLWString &wtext, S32 seg_start, S32 seg_end, F32 x, F32 y, S32 selection_left, S32 selection_right, const LLStyleSP& color, F32* right_x);
@@ -497,6 +518,12 @@ private:
mutable std::string mUTF8Text;
mutable BOOL mTextIsUpToDate;
LLWString mPrevSpelledText; // saved string so we know whether to respell or not
S32 spellStart;
S32 spellEnd;
std::vector<S32> misspellLocations; // where all the mispelled words are
BOOL mSpellCheckable; // set in xui as "spell_check". Default value for a field
S32 mMaxTextByteLength; // Maximum length mText is allowed to be in bytes
const LLFontGL* mGLFont;
@@ -533,11 +560,18 @@ private:
}
};
typedef std::vector<line_info> line_list_t;
//to keep track of what we have to remove before showing menu
std::vector<SpellMenuBind* > suggestionMenuItems;
S32 mLastContextMenuX;
S32 mLastContextMenuY;
line_list_t mLineStartList;
BOOL mReflowNeeded;
BOOL mScrollNeeded;
LLFrameTimer mKeystrokeTimer;
LLFrameTimer mSpellTimer;
LLColor4 mCursorColor;

View File

@@ -75,7 +75,6 @@ LLHtmlHelp* LLUI::sHtmlHelp = NULL;
BOOL LLUI::sShowXUINames = FALSE;
std::stack<LLRect> LLScreenClipRect::sClipRectStack;
BOOL LLUI::sQAMode = FALSE;
S32 LLUI::sDefaultIconPriority = 0;
//
// Functions
@@ -1559,8 +1558,8 @@ void LLUI::initClass(LLControlGroup* config,
LLImageProviderInterface* image_provider,
LLUIAudioCallback audio_callback,
const LLVector2* scale_factor,
const std::string& language,
const S32 default_icon_priority)
const std::string& language
)
{
sConfigGroup = config;
sIgnoresGroup = ignores;
@@ -1578,7 +1577,6 @@ void LLUI::initClass(LLControlGroup* config,
sGLScaleFactor = (scale_factor == NULL) ? LLVector2(1.f, 1.f) : *scale_factor;
sWindow = NULL; // set later in startup
LLFontGL::sShadowColor = colors->getColor("ColorDropShadow");
sDefaultIconPriority = default_icon_priority;
LLUI::sShowXUINames = LLUI::sConfigGroup->getBOOL("ShowXUINames");
LLUI::sConfigGroup->getControl("ShowXUINames")->getSignal()->connect(&handleShowXUINamesChanged);

View File

@@ -162,8 +162,7 @@ public:
LLImageProviderInterface* image_provider,
LLUIAudioCallback audio_callback = NULL,
const LLVector2 *scale_factor = NULL,
const std::string& language = LLStringUtil::null,
const S32 default_icon_priority = 0);
const std::string& language = LLStringUtil::null);
static void cleanupClass();
static void pushMatrix();
@@ -182,8 +181,8 @@ public:
static void getCursorPositionLocal(const LLView* viewp, S32 *x, S32 *y);
static void setScaleFactor(const LLVector2& scale_factor);
static void setLineWidth(F32 width);
static LLPointer<LLUIImage> getUIImageByID(const LLUUID& image_id, S32 priority = LLUI::sDefaultIconPriority);
static LLPointer<LLUIImage> getUIImage(const std::string& name, S32 priority = LLUI::sDefaultIconPriority);
static LLPointer<LLUIImage> getUIImageByID(const LLUUID& image_id, S32 priority = 0);
static LLPointer<LLUIImage> getUIImage(const std::string& name, S32 priority = 0);
static LLVector2 getWindowSize();
static void screenPointToGL(S32 screen_x, S32 screen_y, S32 *gl_x, S32 *gl_y);
static void glPointToScreen(S32 gl_x, S32 gl_y, S32 *screen_x, S32 *screen_y);
@@ -204,8 +203,6 @@ public:
static BOOL sShowXUINames;
static LLHtmlHelp* sHtmlHelp;
static S32 sDefaultIconPriority;
// *TODO: remove the following when QAR-369 settings clean-up work is in.
// Also remove the call to this method which will then be obsolete.
// Search for QAR-369 below to enable the proper accessing of this feature. -MG

View File

@@ -563,8 +563,8 @@ void LLDir::setLindenUserDir(const std::string &grid, const std::string &first,
{
std::string gridlower(grid);
LLStringUtil::toLower(gridlower);
mPerAccountChatLogsDir += "@";
mPerAccountChatLogsDir += gridlower;
mLindenUserDir += "@";
mLindenUserDir += gridlower;
}
}
else

View File

@@ -235,6 +235,15 @@ void LLDir_Linux::initAppDirs(const std::string &app_name)
}
}
res = LLFile::mkdir(getExpandedFilename(LL_PATH_USER_SETTINGS, "dictionaries"));
if (res == -1)
{
if (errno != EEXIST)
{
llwarns << "Couldn't create LL_PATH_USER_SETTINGS/dictionaries dir " << getExpandedFilename(LL_PATH_MOZILLA_PROFILE,"") << llendl;
}
}
mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem");
}

View File

@@ -247,6 +247,15 @@ void LLDir_Solaris::initAppDirs(const std::string &app_name)
}
}
res = LLFile::mkdir(getExpandedFilename(LL_PATH_USER_SETTINGS, "dictionaries"));
if (res == -1)
{
if (errno != EEXIST)
{
llwarns << "Couldn't create LL_PATH_USER_SETTINGS/dictionaries dir " << getExpandedFilename(LL_PATH_MOZILLA_PROFILE,"") << llendl;
}
}
mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem");
}

View File

@@ -207,7 +207,16 @@ void LLDir_Win32::initAppDirs(const std::string &app_name)
llwarns << "Couldn't create LL_PATH_MOZILLA_PROFILE dir " << getExpandedFilename(LL_PATH_MOZILLA_PROFILE,"") << llendl;
}
}
res = LLFile::mkdir(getExpandedFilename(LL_PATH_USER_SETTINGS, "dictionaries"));
if (res == -1)
{
if (errno != EEXIST)
{
llwarns << "Couldn't create LL_PATH_USER_SETTINGS/dictionaries dir " << getExpandedFilename(LL_PATH_MOZILLA_PROFILE,"") << llendl;
}
}
mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem");
}

View File

@@ -2841,8 +2841,16 @@ void LLSplashScreenWin32::updateImpl(const std::string& mesg)
{
if (!mWindow) return;
WCHAR w_mesg[1024];
mbstowcs(w_mesg, mesg.c_str(), 1024);
int output_str_len = MultiByteToWideChar(CP_UTF8, 0, mesg.c_str(), mesg.length(), NULL, 0);
if( output_str_len>1024 )
return;
WCHAR w_mesg[1025];//big enought to keep null terminatos
MultiByteToWideChar (CP_UTF8, 0, mesg.c_str(), mesg.length(), w_mesg, output_str_len);
//looks like MultiByteToWideChar didn't add null terminator to converted string, see EXT-4858
w_mesg[output_str_len] = 0;
SendDlgItemMessage(mWindow,
666, // HACK: text id
@@ -2970,78 +2978,6 @@ void LLWindowWin32::spawnWebBrowser(const std::string& escaped_url )
sei.lpFile = url_utf16.c_str();
ShellExecuteEx( &sei );
//// TODO: LEAVING OLD CODE HERE SO I DON'T BONE OTHER MERGES
//// DELETE THIS ONCE THE MERGES ARE DONE
// Figure out the user's default web browser
// HKEY_CLASSES_ROOT\http\shell\open\command
/*
std::string reg_path_str = gURLProtocolWhitelistHandler[i] + "\\shell\\open\\command";
WCHAR reg_path_wstr[256];
mbstowcs( reg_path_wstr, reg_path_str.c_str(), LL_ARRAY_SIZE(reg_path_wstr) );
HKEY key;
WCHAR browser_open_wstr[1024];
DWORD buffer_length = 1024;
RegOpenKeyEx(HKEY_CLASSES_ROOT, reg_path_wstr, 0, KEY_QUERY_VALUE, &key);
RegQueryValueEx(key, NULL, NULL, NULL, (LPBYTE)browser_open_wstr, &buffer_length);
RegCloseKey(key);
// Convert to STL string
LLWString browser_open_wstring = utf16str_to_wstring(browser_open_wstr);
if (browser_open_wstring.length() < 2)
{
LL_WARNS("Window") << "Invalid browser executable in registry " << browser_open_wstring << LL_ENDL;
return;
}
// Extract the process that's supposed to be launched
LLWString browser_executable;
if (browser_open_wstring[0] == '"')
{
// executable is quoted, find the matching quote
size_t quote_pos = browser_open_wstring.find('"', 1);
// copy out the string including both quotes
browser_executable = browser_open_wstring.substr(0, quote_pos+1);
}
else
{
// executable not quoted, find a space
size_t space_pos = browser_open_wstring.find(' ', 1);
browser_executable = browser_open_wstring.substr(0, space_pos);
}
LL_DEBUGS("Window") << "Browser reg key: " << wstring_to_utf8str(browser_open_wstring) << LL_ENDL;
LL_INFOS("Window") << "Browser executable: " << wstring_to_utf8str(browser_executable) << LL_ENDL;
// Convert URL to wide string for Windows API
// Assume URL is UTF8, as can come from scripts
LLWString url_wstring = utf8str_to_wstring(escaped_url);
llutf16string url_utf16 = wstring_to_utf16str(url_wstring);
// Convert executable and path to wide string for Windows API
llutf16string browser_exec_utf16 = wstring_to_utf16str(browser_executable);
// ShellExecute returns HINSTANCE for backwards compatiblity.
// MS docs say to cast to int and compare to 32.
HWND our_window = NULL;
LPCWSTR directory_wstr = NULL;
int retval = (int) ShellExecute(our_window, // Flawfinder: ignore
L"open",
browser_exec_utf16.c_str(),
url_utf16.c_str(),
directory_wstr,
SW_SHOWNORMAL);
if (retval > 32)
{
LL_DEBUGS("Window") << "load_url success with " << retval << LL_ENDL;
}
else
{
LL_INFOS("Window") << "load_url failure with " << retval << LL_ENDL;
}
*/
}

View File

@@ -405,7 +405,15 @@ template <> inline void LLCachedControl<LLColor4>::setValue(const LLSD& newvalue
else
this->mCachedValue = (const LLColor4 &)newvalue;
}
template <> inline void LLCachedControl<U32>::setValue(const LLSD& newvalue)
{
if(mControl->isType(TYPE_U32) || mControl->isType(TYPE_S32)) //LLSD does not support U32 fully
mCachedValue = (U32)newvalue.asInteger();
else if(this->mControl->isType(TYPE_F32))
mCachedValue = (U32)newvalue.asReal();
else
mCachedValue = (U32)0; //What to do...
}
//Following is actually defined in newview/llviewercontrol.cpp, but extern access is fine (Unless GCC bites me)
template <> eControlType get_control_type<U32>(const U32& in, LLSD& out);

View File

@@ -9,6 +9,7 @@ include(DirectX)
include(ELFIO)
include(FMOD)
include(OPENAL)
include(HUNSPELL)
include(FindOpenGL)
include(JsonCpp)
include(LLAddBuildTest)
@@ -43,6 +44,7 @@ endif (WINDOWS)
include_directories(
${DBUSGLIB_INCLUDE_DIRS}
${HUNSPELL_INCLUDE_DIR}
${ELFIO_INCLUDE_DIR}
${JSONCPP_INCLUDE_DIRS}
${LLAUDIO_INCLUDE_DIRS}
@@ -64,8 +66,12 @@ include_directories(
)
set(viewer_SOURCE_FILES
llviewerobjectbackup.cpp
slfloatermediafilter.cpp
floaterlocalassetbrowse.cpp
aoremotectrl.cpp
lgghunspell_wrapper.cpp
lggdicdownload.cpp
floaterao.cpp
floatervoicelicense.cpp
cofmgr.cpp
@@ -73,7 +79,6 @@ set(viewer_SOURCE_FILES
ascentfloatercontactgroups.cpp
ascentprefssys.cpp
ascentprefsvan.cpp
ascentuploadbrowser.cpp
dhparam.cpp
dsaparam.cpp
emerald.cpp
@@ -183,7 +188,6 @@ set(viewer_SOURCE_FILES
llfloatereditui.cpp
llfloaterenvsettings.cpp
llfloaterevent.cpp
llfloaterexport.cpp
llfloaterexploreanimations.cpp
llfloaterexploresounds.cpp
llfloaterfriends.cpp
@@ -200,7 +204,6 @@ set(viewer_SOURCE_FILES
llfloaterhtmlsimple.cpp
llfloaterhud.cpp
llfloaterimagepreview.cpp
llfloaterimport.cpp
llfloaterinspect.cpp
llfloaterjoystick.cpp
llfloaterlagmeter.cpp
@@ -268,7 +271,6 @@ set(viewer_SOURCE_FILES
llhudtext.cpp
llhudview.cpp
llimpanel.cpp
llimportobject.cpp
llimview.cpp
llinventoryactions.cpp
llinventorybackup.cpp
@@ -346,6 +348,7 @@ set(viewer_SOURCE_FILES
llpanelweb.cpp
llparcelselection.cpp
llpatchvertexarray.cpp
llphysicsmotion.cpp
llpolymesh.cpp
llpolymorph.cpp
llprefschat.cpp
@@ -538,6 +541,8 @@ set(viewer_HEADER_FILES
CMakeLists.txt
ViewerInstall.cmake
llviewerobjectbackup.h
slfloatermediafilter.h
floaterlocalassetbrowse.h
aoremotectrl.h
floaterao.h
@@ -547,7 +552,6 @@ set(viewer_HEADER_FILES
ascentfloatercontactgroups.h
ascentprefssys.h
ascentprefsvan.h
ascentuploadbrowser.h
emerald.h
emeraldboobutils.h
dofloaterhex.h
@@ -561,6 +565,8 @@ set(viewer_HEADER_FILES
hipporestrequest.h
hippopanelgrids.h
jcfloaterareasearch.h
lggdicdownload.h
lgghunspell_wrapper.h
chatbar_as_cmdline.h
qtoolalign.h
llagent.h
@@ -656,7 +662,6 @@ set(viewer_HEADER_FILES
llfloaterdirectory.h
llfloatereditui.h
llfloaterenvsettings.h
llfloaterexport.h
llfloaterexploreanimations.h
llfloaterexploresounds.h
llfloaterevent.h
@@ -674,7 +679,6 @@ set(viewer_HEADER_FILES
llfloaterhtmlsimple.h
llfloaterhud.h
llfloaterimagepreview.h
llfloaterimport.h
llfloaterinspect.h
llfloaterjoystick.h
llfloaterlagmeter.h
@@ -741,7 +745,6 @@ set(viewer_HEADER_FILES
llhudtext.h
llhudview.h
llimpanel.h
llimportobject.h
llimview.h
llinventorybackup.h
llinventorybridge.h
@@ -820,6 +823,7 @@ set(viewer_HEADER_FILES
llpanelweb.h
llparcelselection.h
llpatchvertexarray.h
llphysicsmotion.h
llpolymesh.h
llpolymorph.h
llprefschat.h
@@ -1307,7 +1311,10 @@ add_executable(${VIEWER_BINARY_NAME}
MACOSX_BUNDLE
${viewer_SOURCE_FILES}
)
check_message_template(${VIEWER_BINARY_NAME})
if (!DISABLE_TEMPLATE_CHECK)
check_message_template(${VIEWER_BINARY_NAME})
endif (!DISABLE_TEMPLATE_CHECK)
if (LLKDU_LIBRARY)
add_dependencies(${VIEWER_BINARY_NAME} ${LLKDU_LIBRARY})
@@ -1442,6 +1449,7 @@ target_link_libraries(${VIEWER_BINARY_NAME}
${WINDOWS_LIBRARIES}
${XMLRPCEPI_LIBRARIES}
${ELFIO_LIBRARIES}
${HUNSPELL_LIBRARY}
)
if (LINUX)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,201 @@
SET ISO8859-1
TRY esianrtolcdugmphbyfvkwzESIANRTOLCDUGMPHBYFVKWZ'
NOSUGGEST !
# ordinal numbers
COMPOUNDMIN 1
# only in compounds: 1th, 2th, 3th
ONLYINCOMPOUND c
# compound rules:
# 1. [0-9]*1[0-9]th (10th, 11th, 12th, 56714th, etc.)
# 2. [0-9]*[02-9](1st|2nd|3rd|[4-9]th) (21st, 22nd, 123rd, 1234th, etc.)
COMPOUNDRULE 2
COMPOUNDRULE n*1t
COMPOUNDRULE n*mp
WORDCHARS 0123456789
PFX A Y 1
PFX A 0 re .
PFX I Y 1
PFX I 0 in .
PFX U Y 1
PFX U 0 un .
PFX C Y 1
PFX C 0 de .
PFX E Y 1
PFX E 0 dis .
PFX F Y 1
PFX F 0 con .
PFX K Y 1
PFX K 0 pro .
SFX V N 2
SFX V e ive e
SFX V 0 ive [^e]
SFX N Y 3
SFX N e ion e
SFX N y ication y
SFX N 0 en [^ey]
SFX X Y 3
SFX X e ions e
SFX X y ications y
SFX X 0 ens [^ey]
SFX H N 2
SFX H y ieth y
SFX H 0 th [^y]
SFX Y Y 1
SFX Y 0 ly .
SFX G Y 2
SFX G e ing e
SFX G 0 ing [^e]
SFX J Y 2
SFX J e ings e
SFX J 0 ings [^e]
SFX D Y 4
SFX D 0 d e
SFX D y ied [^aeiou]y
SFX D 0 ed [^ey]
SFX D 0 ed [aeiou]y
SFX T N 4
SFX T 0 st e
SFX T y iest [^aeiou]y
SFX T 0 est [aeiou]y
SFX T 0 est [^ey]
SFX R Y 4
SFX R 0 r e
SFX R y ier [^aeiou]y
SFX R 0 er [aeiou]y
SFX R 0 er [^ey]
SFX Z Y 4
SFX Z 0 rs e
SFX Z y iers [^aeiou]y
SFX Z 0 ers [aeiou]y
SFX Z 0 ers [^ey]
SFX S Y 4
SFX S y ies [^aeiou]y
SFX S 0 s [aeiou]y
SFX S 0 es [sxzh]
SFX S 0 s [^sxzhy]
SFX P Y 3
SFX P y iness [^aeiou]y
SFX P 0 ness [aeiou]y
SFX P 0 ness [^y]
SFX M Y 1
SFX M 0 's .
SFX B Y 3
SFX B 0 able [^aeiou]
SFX B 0 able ee
SFX B e able [^aeiou]e
SFX L Y 1
SFX L 0 ment .
REP 88
REP a ei
REP ei a
REP a ey
REP ey a
REP ai ie
REP ie ai
REP are air
REP are ear
REP are eir
REP air are
REP air ere
REP ere air
REP ere ear
REP ere eir
REP ear are
REP ear air
REP ear ere
REP eir are
REP eir ere
REP ch te
REP te ch
REP ch ti
REP ti ch
REP ch tu
REP tu ch
REP ch s
REP s ch
REP ch k
REP k ch
REP f ph
REP ph f
REP gh f
REP f gh
REP i igh
REP igh i
REP i uy
REP uy i
REP i ee
REP ee i
REP j di
REP di j
REP j gg
REP gg j
REP j ge
REP ge j
REP s ti
REP ti s
REP s ci
REP ci s
REP k cc
REP cc k
REP k qu
REP qu k
REP kw qu
REP o eau
REP eau o
REP o ew
REP ew o
REP oo ew
REP ew oo
REP ew ui
REP ui ew
REP oo ui
REP ui oo
REP ew u
REP u ew
REP oo u
REP u oo
REP u oe
REP oe u
REP u ieu
REP ieu u
REP ue ew
REP ew ue
REP uff ough
REP oo ieu
REP ieu oo
REP ier ear
REP ear ier
REP ear air
REP air ear
REP w qu
REP qu w
REP z ss
REP ss z
REP shun tion
REP shun sion
REP shun cion

File diff suppressed because it is too large Load Diff

View File

@@ -40,14 +40,14 @@ not_at_rot_target not_at_rot_target():Result of LLRotTarget library function cal
money money(key id, integer amount):Triggered when L$ is given to task
email email(string time, string address, string subj, string message, integer num_left):Triggered when task receives email
run_time_permissions run_time_permissions(integer perm):Triggered when an agent grants run time permissions to task
attach attach(key id):Triggered when an agent attaches or detaches from agent
attach attach(key id):Triggered when task attaches or detaches from agent
dataserver dataserver(key queryid, string data):Triggered when task receives asynchronous data
moving_start moving_start():Triggered when task begins moving
moving_end moving_end():Triggered when task stops moving
on_rez on_rez(integer start_param):Triggered when task is rezed in from inventory or another task
object_rez object_rez(key id):Triggered when task rezes in another task
link_message link_message(integer sender_num, integer num, string str, key id):Triggered when task receives a link message via LLMessageLinked library function call
changed changed( integer change ):Triggered various event change the task:(test change with CHANGED_INVENTORY, CHANGED_COLOR, CHANGED_SHAPE, CHANGED_SCALE, CHANGED_TEXTURE, CHANGED_LINK, CHANGED_ALLOWED_DROP, CHANGED_OWNER, CHANGED_REGION, CHANGED_TELEPORT)
changed changed( integer change ):Triggered various event change the task:(test change with CHANGED_INVENTORY, CHANGED_COLOR, CHANGED_SHAPE, CHANGED_SCALE, CHANGED_TEXTURE, CHANGED_LINK, CHANGED_ALLOWED_DROP, CHANGED_OWNER, CHANGED_REGION, CHANGED_TELEPORT, CHANGED_REGION_START, CHANGED_MEDIA)
remote_data remote_data(integer event_type, key channel, key message_id, string sender,integer idata, string sdata):Triggered by various XML-RPC calls (event_type will be one of REMOTE_DATA_CHANNEL, REMOTE_DATA_REQUEST, REMOTE_DATA_REPLY)
http_response http_response(key request_id, integer status, list metadata, string body):Triggered when task receives a response to one of its llHTTPRequests
http_request http_request(key id, string method, string body):Triggered when task receives an http request against a public URL
@@ -66,7 +66,9 @@ STATUS_BLOCK_GRAB Passed in the llSetStatus library function. If TRUE, object c
STATUS_DIE_AT_EDGE Passed in the llSetStatus library function. If TRUE, objects that reach the edge of the world just die:rather than teleporting back to the owner
STATUS_RETURN_AT_EDGE Passed in the llSetStatus library function. If TRUE, script rezzed objects that reach the edge of the world:are returned rather than killed:STATUS_RETURN_AT_EDGE trumps STATUS_DIE_AT_EDGE if both are set
STATUS_CAST_SHADOWS Passed in the llSetStatus library function. If TRUE, object casts shadows on other objects
AGENT Passed in llSensor library function to look for other Agents
AGENT Passed in llSensor library function to look for other Agents; DEPRECATED: Use AGENT_BY_LEGACY_NAME
AGENT_BY_USERNAME Passed in llSensor library function to look for other Agents by username
AGENT_BY_LEGACY_NAME Passed in llSensor library function to look for other Agents by legacy name
ACTIVE Passed in llSensor library function to look for moving objects
PASSIVE Passed in llSensor library function to look for objects that aren't moving
SCRIPTED Passed in llSensor library function to look for scripted objects
@@ -108,6 +110,7 @@ AGENT_TYPING Returned by llGetAgentInfo if the Agent is typing
AGENT_CROUCHING Returned by llGetAgentInfo if the Agent is crouching
AGENT_BUSY Returned by llGetAgentInfo if the Agent is busy
AGENT_ALWAYS_RUN Returned by llGetAgentInfo if the Agent has 'Always Run' enabled
AGENT_AUTOPILOT Returned by llGetAgentInfo if the Agent is under autopilot control
PSYS_PART_FLAGS
PSYS_PART_START_COLOR
@@ -319,6 +322,7 @@ CHANGED_OWNER Parameter of changed event handler used to indicate change to tas
CHANGED_REGION Parameter of changed event handler used to indicate the region has changed
CHANGED_TELEPORT Parameter of changed event handler used to indicate teleport has completed
CHANGED_REGION_START Parameter of changed event handler used to indicate the region has been restarted
CHANGED_MEDIA Parameter of changed event handler used to indicate that media has changed on a face of the task
TYPE_INTEGER Indicates that the list entry is holding an integer
TYPE_FLOAT Indicates that the list entry is holding an float
@@ -351,6 +355,9 @@ PRIM_BUMP_SHINY Followed by an integer face, one of PRIM_SHINY_NONE, PRIM_SHINY
PRIM_FULLBRIGHT Followed by an integer face, and TRUE or FALSE
PRIM_TEXGEN Followed by an integer face, and one of PRIM_TEXGEN_DEFAULT or PRIM_TEXGEN_PLANAR
PRIM_GLOW Followed by an integer face, and a float from 0.0 to 1.0 specifying glow amount
PRIM_TEXT For primitive hovertext. Followed by a string, a vector color and a float alpha
PRIM_NAME For primitive name (from server v1.40 onwards). Followed by a string.
PRIM_DESC For primitive description (from server v1.40 onwards). Followed by a string.
PRIM_TYPE_BOX Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear
PRIM_TYPE_CYLINDER Followed by integer hole shape, vector cut, float hollow, vector twist,:vector top size, and vector top shear
@@ -457,6 +464,7 @@ PARCEL_FLAG_ALLOW_LANDMARK Used with llGetParcelFlags to find if a parcel allo
PARCEL_FLAG_ALLOW_TERRAFORM Used with llGetParcelFlags to find if a parcel allows anyone to terraform the land
PARCEL_FLAG_ALLOW_DAMAGE Used with llGetParcelFlags to find if a parcel allows damage
PARCEL_FLAG_ALLOW_CREATE_OBJECTS Used with llGetParcelFlags to find if a parcel allows anyone to create objects
PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS Used with llGetParcelFlags to find if a parcel allows group members or objects to create objects
PARCEL_FLAG_USE_ACCESS_GROUP Used with llGetParcelFlags to find if a parcel limits access to a group
PARCEL_FLAG_USE_ACCESS_LIST Used with llGetParcelFlags to find if a parcel limits access to a list of residents
PARCEL_FLAG_USE_BAN_LIST Used with llGetParcelFlags to find if a parcel uses a ban list
@@ -507,11 +515,52 @@ CLICK_ACTION_PAY Used with llSetClickAction to set pay as the default act
CLICK_ACTION_OPEN Used with llSetClickAction to set open as the default action when object is clicked
CLICK_ACTION_PLAY Used with llSetClickAction to set play as the default action when object is clicked
CLICK_ACTION_OPEN_MEDIA Used with llSetClickAction to set open-media as the default action when object is clicked
CLICK_ACTION_ZOOM Used with llSetClickAction to set zoom in as the default action when object is clicked
TOUCH_INVALID_TEXCOORD Value returned by llDetectedTouchUV() and llDetectedTouchST() when the touch position is not valid.
TOUCH_INVALID_VECTOR Value returned by llDetectedTouchPos(), llDetectedTouchNormal(), and llDetectedTouchBinormal() when the touch position is not valid.
TOUCH_INVALID_FACE Value returned by llDetectedTouchFace() when the touch position is not valid.
PRIM_MEDIA_ALT_IMAGE_ENABLE Used with ll{Get,Set}PrimMediaParams to enable the default alt image for media
PRIM_MEDIA_CONTROLS Used with ll{Get,Set}PrimMediaParams to determine the controls shown for media
PRIM_MEDIA_CURRENT_URL Used with ll{Get,Set}PrimMediaParams to navigate/access the current URL
PRIM_MEDIA_HOME_URL Used with ll{Get,Set}PrimMediaParams to access the home URL
PRIM_MEDIA_AUTO_LOOP Used with ll{Get,Set}PrimMediaParams to determine if media should auto-loop (if applicable)
PRIM_MEDIA_AUTO_PLAY Used with ll{Get,Set}PrimMediaParams to determine if media should start playing as soon as it is created
PRIM_MEDIA_AUTO_SCALE Used with ll{Get,Set}PrimMediaParams to determine if media should scale to fit the face it is on
PRIM_MEDIA_AUTO_ZOOM Used with ll{Get,Set}PrimMediaParams to determine if the user would zoom in when viewing media
PRIM_MEDIA_FIRST_CLICK_INTERACT Used with ll{Get,Set}PrimMediaParams to determine whether the user interacts with media or not when she first clicks it (versus selection)
PRIM_MEDIA_WIDTH_PIXELS Used with ll{Get,Set}PrimMediaParams to access the media's width in pixels
PRIM_MEDIA_HEIGHT_PIXELS Used with ll{Get,Set}PrimMediaParams to access the media's height in pixels
PRIM_MEDIA_WHITELIST_ENABLE Used with ll{Get,Set}PrimMediaParams to determine if the domain whitelist is enabled
PRIM_MEDIA_WHITELIST Used with ll{Get,Set}PrimMediaParams to access the media's list of allowable URL prefixes to navigate to
PRIM_MEDIA_PERMS_INTERACT Used with ll{Get,Set}PrimMediaParams to determine the permissions for who can interact with the media
PRIM_MEDIA_PERMS_CONTROL Used with ll{Get,Set}PrimMediaParams to determine the permissions for who has controls
PRIM_MEDIA_PARAM_MAX The value of the largest media param
PRIM_MEDIA_CONTROLS_STANDARD Used with ll{Get,Set}PrimMediaParams, a PRIM_MEDIA_CONTROLS value meaning "standard controls"
PRIM_MEDIA_CONTROLS_MINI Used with ll{Get,Set}PrimMediaParams, a PRIM_MEDIA_CONTROLS value meaning "mini controls"
PRIM_MEDIA_PERM_NONE Used with ll{Get,Set}PrimMediaParams, a PRIM_MEDIA_PERMS_INTERACT or PRIM_MEDIA_PERMS_CONTROL bit, no permissions
PRIM_MEDIA_PERM_OWNER Used with ll{Get,Set}PrimMediaParams, a PRIM_MEDIA_PERMS_INTERACT or PRIM_MEDIA_PERMS_CONTROL bit, owner permissions
PRIM_MEDIA_PERM_GROUP Used with ll{Get,Set}PrimMediaParams, a PRIM_MEDIA_PERMS_INTERACT or PRIM_MEDIA_PERMS_CONTROL bit, group permissions
PRIM_MEDIA_PERM_ANYONE Used with ll{Get,Set}PrimMediaParams, a PRIM_MEDIA_PERMS_INTERACT or PRIM_MEDIA_PERMS_CONTROL bit, anyone has permissions
PRIM_MEDIA_MAX_URL_LENGTH Used with ll{Get,Set}PrimMediaParams, the maximum length of PRIM_MEDIA_CURRENT_URL or PRIM_MEDIA_HOME_URL
PRIM_MEDIA_MAX_WHITELIST_SIZE Used with ll{Get,Set}PrimMediaParams, the maximum length, in bytes, of PRIM_MEDIA_WHITELIST
PRIM_MEDIA_MAX_WHITELIST_COUNT Used with ll{Get,Set}PrimMediaParams, the maximum number of items allowed in PRIM_MEDIA_WHITELIST
PRIM_MEDIA_MAX_WIDTH_PIXELS Used with ll{Get,Set}PrimMediaParams, the maximum width allowed in PRIM_MEDIA_WIDTH_PIXELS
PRIM_MEDIA_MAX_HEIGHT_PIXELS Used with ll{Get,Set}PrimMediaParams, the maximum width allowed in PRIM_MEDIA_HEIGHT_PIXELS
STATUS_OK Result of function call was success
STATUS_MALFORMED_PARAMS Function was called with malformed params
STATUS_TYPE_MISMATCH Argument(s) passed to function had a type mismatch
STATUS_BOUNDS_ERROR Argument(s) passed to function had a bounds error
STATUS_NOT_FOUND Object or other item was not found
STATUS_NOT_SUPPORTED Feature not supported
STATUS_INTERNAL_ERROR An internal error occurred
STATUS_WHITELIST_FAILED URL failed to pass whitelist
WL_WATER_COLOR Windlight Water Colour
WL_WATER_FOG_DENSITY_EXPONENT Windlight Water Fog Density Exponent
WL_UNDERWATER_FOG_MODIFIER Windlight Underwater Fog Modifier
@@ -532,6 +581,7 @@ WL_DENSITY_MULTIPLIER Windlight Density Multiplier
WL_DISTANCE_MULTIPLIER Windlight Distance Multiplier
WL_MAX_ALTITUDE Windlight Max Altitude
WL_SUN_MOON_COLOR Windlight Sun/Moon Colour
WL_SUN_MOON_POSITION Windlight Sun/Moon Position
WL_AMBIENT Windlight Ambient Colour
WL_EAST_ANGLE Windlight Sun/Position East
WL_SUN_GLOW_FOCUS Windlight Sun Glow Focus
@@ -554,7 +604,8 @@ WL_DRAW_CLASSIC_CLOUDS Windlight Draw Classic Clouds
NULL_KEY Indicates an empty key
EOF Indicates the last line of a notecard was read
TEXTURE_BLANK UUID for the "Blank" texture
TEXTURE_DEFAULT UUID for the "Default Media" texture
TEXTURE_DEFAULT Alias for TEXTURE_PLYWOOD
TEXTURE_MEDIA UUID for the "Default Media" texture
TEXTURE_PLYWOOD UUID for the default "Plywood" texture
TEXTURE_TRANSPARENT UUID for the "White - Transparent" texture
@@ -593,9 +644,11 @@ return Leave current function or event handler
# Comment
[one_sided_delimiter .8, .3, .15]
// Comment:Non-functional commentary or disabled code
[two_sided_delimiter .8, .3, .15]
/* */ Comment:Non-functional commentary or disabled code
# String literals
[two_sided_delimiter 0, .2, 0]
" String literal
[two_sided_delimiter_esc 0, .2, 0]
" " String literal
#functions are supplied by the program now.

View File

@@ -9,6 +9,106 @@
<string>settings_rlv.xml</string>
</array>
<key>SpellDownloadURL</key>
<map>
<key>Comment</key>
<string>Base url for download dictionaries</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>http://app.singularityviewer.org/dict/</string>
</map>
<key>SpellDisplay</key>
<map>
<key>Comment</key>
<string>Turn on to highlight misspelled text in line edit boxes</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>SpellInstalled</key>
<map>
<key>Comment</key>
<string>The list of installed dictionaries</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>EN_SL</string>
</map>
<key>SpellBase</key>
<map>
<key>Comment</key>
<string>The base dictionary to spell check with</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>English (United States of America)</string>
</map>
<key>ScriptsCanShowUI</key>
<map>
<key>Comment</key>
<string>Allow LSL calls (such as LLMapDestination) to spawn viewer UI</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>FloaterObjectBackuptRect</key>
<map>
<key>Comment</key>
<string>Rectangle for the object backup floater</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Rect</string>
<key>Value</key>
<array>
<integer>0</integer>
<integer>0</integer>
<integer>0</integer>
<integer>0</integer>
</array>
</map>
<key>MediaEnableFilter</key>
<map>
<key>Comment</key>
<string>Enable media domain filtering</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>MediaFilterRect</key>
<map>
<key>Comment</key>
<string>Rectangle for Media Filter floater</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Rect</string>
<key>Value</key>
<array>
<integer>0</integer>
<integer>100</integer>
<integer>100</integer>
<integer>100</integer>
</array>
</map>
<key>UseServersideWindlightSettings</key>
<map>
@@ -1684,6 +1784,17 @@
<key>Value</key>
<integer>2</integer>
</map>
<key>AvatarPhysics</key>
<map>
<key>Comment</key>
<string>Enable avatar wearable physics.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>AvatarSex</key>
<map>
<key>Comment</key>
@@ -8787,6 +8898,17 @@
<key>Value</key>
<integer>35</integer>
</map>
<key>RenderAvatarPhysicsLODFactor</key>
<map>
<key>Comment</key>
<string>Controls level of detail of avatar physics (such as breast physics).</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<integer>1.0</integer>
</map>
<key>RenderAvatarInvisible</key>
<map>
<key>Comment</key>
@@ -10904,7 +11026,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
<integer>0</integer>
</map>
<key>ShowStartLocation</key>
<map>
@@ -12955,7 +13077,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
<integer>1</integer>
</map>
<key>VectorizePerfTest</key>
<map>

View File

@@ -663,7 +663,7 @@
<integer>1</integer>
</map>
<key>LogFileNamewithDate</key>
<map>
<map>
<key>Comment</key>
<string>Add Date Stamp to chat and IM Logs with format chat-YYYY-MM-DD and 'IM file name'-YYYY-MM. To view old logs goto ..\Second Life\[login name]</string>
<key>Persist</key>
@@ -672,6 +672,6 @@
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
</map>
</map>
</llsd>

View File

@@ -68,17 +68,6 @@
<key>Value</key>
<real>2.0</real>
</map>
<key>SHHighResSnapshotForceTile</key>
<map>
<key>Comment</key>
<string>Force tiling of snapshots (enables AA and supersampling)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>SHHighResSnapshotSuperSample</key>
<map>
<key>Comment</key>
@@ -91,5 +80,93 @@
<real>1.0</real>
</map>
</map>
<key>SGBlockGeneralSpam</key>
<map>
<key>Comment</key>
<string>Enable automatic general spam blocking</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>SGBlockCardSpam</key>
<map>
<key>Comment</key>
<string>Enable automatic calling card spam blocking</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>SGBlockChatSpam</key>
<map>
<key>Comment</key>
<string>Enable automatic chat spam blocking</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>SGBlockDialogSpam</key>
<map>
<key>Comment</key>
<string>Enable automatic dialog spam blocking</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>SGSpamTime</key>
<map>
<key>Comment</key>
<string>Time of Evalulating spam. (Default: 1.000)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>1.0</real>
</map>
<key>SGSpamCount</key>
<map>
<key>Comment</key>
<string>Number of items spammed per time period in SGSpamTime. (Default: 4)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
<real>4</real>
</map>
<key>SGChatSpamTime</key>
<map>
<key>Comment</key>
<string>Time of Evalulating spam. (Default: 1.000)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>1.0</real>
</map>
<key>SGChatSpamCount</key>
<map>
<key>Comment</key>
<string>Number of items spammed per time set in SGSpamTime. (Default: 10)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
<real>10.0</real>
</map>
</map>
</llsd>

View File

@@ -5,6 +5,8 @@
* $License$
*/
#version 120
uniform sampler2D diffuseMap;
uniform float glowStrength;

View File

@@ -5,6 +5,8 @@
* $License$
*/
#extension GL_ARB_texture_rectangle : enable
uniform sampler2DRect RenderTexture;
uniform float bloomStrength;

View File

@@ -5,6 +5,8 @@
* $License$
*/
#extension GL_ARB_texture_rectangle : enable
uniform sampler2DRect RenderTexture;
uniform float brightness;
uniform float contrast;

View File

@@ -5,6 +5,8 @@
* $License$
*/
#extension GL_ARB_texture_rectangle : enable
uniform sampler2DRect RenderTexture;
uniform float extractLow;
uniform float extractHigh;

View File

@@ -1,3 +1,6 @@
#extension GL_ARB_texture_rectangle : enable
uniform sampler2DRect RenderTexture;
uniform int horizontalPass;

View File

@@ -4,6 +4,8 @@
* Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
* $License$
*/
#extension GL_ARB_texture_rectangle : enable
uniform sampler2DRect RenderTexture;
uniform sampler2D NoiseTexture;

View File

@@ -5,6 +5,8 @@
* $License$
*/
#extension GL_ARB_texture_rectangle : enable
uniform sampler2DRect RenderTexture;
void main(void)

View File

@@ -48,67 +48,11 @@
#include "llwind.h"
#include "llviewernetwork.h"
#include "pipeline.h"
//System page ------------------------------------------------------------------------------ -HgB
class LLPrefsAscentSysImpl : public LLPanel
{
public:
LLPrefsAscentSysImpl();
/*virtual*/ ~LLPrefsAscentSysImpl() { };
virtual void refresh();
void apply();
void cancel();
private:
static void onCommitCheckBox(LLUICtrl* ctrl, void* user_data);
void refreshValues();
//General -----------------------------------------------------------------------------
BOOL mDoubleClickTeleport;
BOOL mResetCameraAfterTP;
BOOL mOffsetTPByUserHeight;
BOOL mPreviewAnimInWorld;
BOOL mSaveScriptsAsMono;
BOOL mAlwaysRezInGroup;
//Disable Teleport Progress
//Disable Logout progress
//always show Build
BOOL mAlwaysShowFly;
//Disable camera minimum distance
BOOL mPowerUser;
BOOL mUseSystemFolder;
BOOL mUploadToSystem;
//Chat/IM -----------------------------------------------------------------------------
BOOL mHideNotificationsInChat;
BOOL mPlayTypingSound;
BOOL mHideTypingNotification;
BOOL mEnableMUPose;
BOOL mEnableOOCAutoClose;
U32 mLinksForChattingObjects;
U32 mTimeFormat;
U32 mDateFormat;
BOOL mSecondsInChatAndIMs;
//Performance -------------------------------------------------------------------------
BOOL mFetchInventoryOnLogin;
BOOL mEnableLLWind;
BOOL mEnableClouds;
BOOL mEnableClassicClouds;
BOOL mSpeedRez;
U32 mSpeedRezInterval;
//Command Line ------------------------------------------------------------------------
//Privacy -----------------------------------------------------------------------------
BOOL mBroadcastViewerEffects;
BOOL mDisablePointAtAndBeam;
BOOL mPrivateLookAt;
BOOL mShowLookAt;
BOOL mRevokePermsOnStandUp;
BOOL mDisableClickSit;
};
#include "lgghunspell_wrapper.h"
LLPrefsAscentSysImpl::LLPrefsAscentSysImpl()
: LLPanel(std::string("Ascent"))
LLPrefsAscentSys::LLPrefsAscentSys()
{
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_system.xml");
childSetCommitCallback("speed_rez_check", onCommitCheckBox, this);
@@ -117,18 +61,28 @@ LLPrefsAscentSysImpl::LLPrefsAscentSysImpl()
childSetCommitCallback("show_look_at_check", onCommitCheckBox, this);
childSetCommitCallback("enable_clouds", onCommitCheckBox, this);
childSetCommitCallback("SpellBase", onSpellBaseComboBoxCommit, this);
childSetAction("EmSpell_EditCustom", onSpellEditCustom, this);
childSetAction("EmSpell_GetMore", onSpellGetMore, this);
childSetAction("EmSpell_Add", onSpellAdd, this);
childSetAction("EmSpell_Remove", onSpellRemove, this);
refreshValues();
refresh();
}
//static
void LLPrefsAscentSysImpl::onCommitCheckBox(LLUICtrl* ctrl, void* user_data)
LLPrefsAscentSys::~LLPrefsAscentSys()
{
LLPrefsAscentSysImpl* self = (LLPrefsAscentSysImpl*)user_data;
}
//static
void LLPrefsAscentSys::onCommitCheckBox(LLUICtrl* ctrl, void* user_data)
{
LLPrefsAscentSys* self = (LLPrefsAscentSys*)user_data;
llinfos << "Change to " << ctrl->getControlName() << " aka " << ctrl->getName() << llendl;
if (ctrl->getControlName() == "SpeedRez")
if (ctrl->getName() == "speed_rez_check") // Why is this one getControlName() and the rest are getName()?
{
bool enabled = self->childGetValue("speed_rez_check").asBoolean();
self->childSetEnabled("speed_rez_interval", enabled);
@@ -158,7 +112,51 @@ void LLPrefsAscentSysImpl::onCommitCheckBox(LLUICtrl* ctrl, void* user_data)
}
}
void LLPrefsAscentSysImpl::refreshValues()
void LLPrefsAscentSys::onSpellAdd(void* data)
{
LLPrefsAscentSys* self = (LLPrefsAscentSys*)data;
if(self)
{
glggHunSpell->addButton(self->childGetValue("EmSpell_Avail").asString());
}
self->refresh();
}
void LLPrefsAscentSys::onSpellRemove(void* data)
{
LLPrefsAscentSys* self = (LLPrefsAscentSys*)data;
if(self)
{
glggHunSpell->removeButton(self->childGetValue("EmSpell_Installed").asString());
}
self->refresh();
}
void LLPrefsAscentSys::onSpellGetMore(void* data)
{
glggHunSpell->getMoreButton(data);
}
void LLPrefsAscentSys::onSpellEditCustom(void* data)
{
glggHunSpell->editCustomButton();
}
void LLPrefsAscentSys::onSpellBaseComboBoxCommit(LLUICtrl* ctrl, void* userdata)
{
LLComboBox* box = (LLComboBox*)ctrl;
if (box)
{
glggHunSpell->newDictSelection(box->getValue().asString());
}
}
void LLPrefsAscentSys::refreshValues()
{
//General -----------------------------------------------------------------------------
mDoubleClickTeleport = gSavedSettings.getBOOL("DoubleClickTeleport");
@@ -204,9 +202,11 @@ void LLPrefsAscentSysImpl::refreshValues()
mShowLookAt = LLHUDEffectLookAt::sDebugLookAt;
mRevokePermsOnStandUp = gSavedSettings.getBOOL("RevokePermsOnStandUp");
mDisableClickSit = gSavedSettings.getBOOL("DisableClickSit");
//Text Options ------------------------------------------------------------------------
mSpellDisplay = gSavedSettings.getBOOL("SpellDisplay");
}
void LLPrefsAscentSysImpl::refresh()
void LLPrefsAscentSys::refresh()
{
//General -----------------------------------------------------------------------------
childSetValue("double_click_teleport_check", mDoubleClickTeleport);
@@ -309,9 +309,59 @@ void LLPrefsAscentSysImpl::refresh()
childSetValue("show_look_at_check", mShowLookAt);
childSetValue("revoke_perms_on_stand_up_check", mRevokePermsOnStandUp);
childSetValue("disable_click_sit_check", mDisableClickSit);
//Text Options ------------------------------------------------------------------------
combo = getChild<LLComboBox>("SpellBase");
if (combo != NULL)
{
combo->removeall();
std::vector<std::string> names = glggHunSpell->getDicts();
for (int i = 0; i < (int)names.size(); i++)
{
combo->add(names[i]);
}
combo->setSimple(gSavedSettings.getString("SpellBase"));
}
combo = getChild<LLComboBox>("EmSpell_Avail");
if (combo != NULL)
{
combo->removeall();
combo->add("");
std::vector<std::string> names = glggHunSpell->getAvailDicts();
for (int i = 0; i < (int)names.size(); i++)
{
combo->add(names[i]);
}
combo->setSimple(std::string(""));
}
combo = getChild<LLComboBox>("EmSpell_Installed");
if (combo != NULL)
{
combo->removeall();
combo->add("");
std::vector<std::string> names = glggHunSpell->getInstalledDicts();
for (int i = 0; i < (int)names.size(); i++)
{
combo->add(names[i]);
}
combo->setSimple(std::string(""));
}
}
void LLPrefsAscentSysImpl::cancel()
void LLPrefsAscentSys::cancel()
{
//General -----------------------------------------------------------------------------
childSetValue("double_click_teleport_check", mDoubleClickTeleport);
@@ -359,9 +409,12 @@ void LLPrefsAscentSysImpl::cancel()
childSetValue("enable_classic_clouds", mEnableClassicClouds);
gLLWindEnabled = mEnableLLWind;
//Text Options ------------------------------------------------------------------------
childSetValue("SpellDisplay", mSpellDisplay);
}
void LLPrefsAscentSysImpl::apply()
void LLPrefsAscentSys::apply()
{
std::string short_date, long_date, short_time, long_time, timestamp;
@@ -394,7 +447,7 @@ void LLPrefsAscentSysImpl::apply()
//Missing the echo/log option.
gSavedSettings.setBOOL("PlayTypingSound", childGetValue("play_typing_sound_check"));
gSavedSettings.setBOOL("AscentHideTypingNotification", childGetValue("hide_typing_check"));
gSavedSettings.setBOOL("AscentInstantMessageAnnounceIncoming", childGetValue("AscentInstantMessageAnnounceIncoming").asBoolean());
gSavedPerAccountSettings.setBOOL("AscentInstantMessageAnnounceIncoming", childGetValue("AscentInstantMessageAnnounceIncoming").asBoolean());
gSavedSettings.setBOOL("AscentAllowMUpose", childGetValue("allow_mu_pose_check").asBoolean());
gSavedSettings.setBOOL("AscentAutoCloseOOC", childGetValue("close_ooc_check").asBoolean());
//gSavedSettings.setU32("LinksForChattingObjects", childGetValue("objects_link"). );
@@ -500,30 +553,3 @@ void LLPrefsAscentSysImpl::apply()
refreshValues();
refresh();
}
//---------------------------------------------------------------------------
LLPrefsAscentSys::LLPrefsAscentSys()
: impl(* new LLPrefsAscentSysImpl())
{
}
LLPrefsAscentSys::~LLPrefsAscentSys()
{
delete &impl;
}
void LLPrefsAscentSys::apply()
{
impl.apply();
}
void LLPrefsAscentSys::cancel()
{
impl.cancel();
}
LLPanel* LLPrefsAscentSys::getPanel()
{
return &impl;
}

View File

@@ -32,10 +32,11 @@
#ifndef ASCENTPREFSSYS_H
#define ASCENTPREFSSYS_H
class LLPanel;
class LLPrefsAscentSysImpl;
class LLPrefsAscentSys
#include "llpanel.h"
class LLPrefsAscentSys : public LLPanel
{
public:
LLPrefsAscentSys();
@@ -43,11 +44,60 @@ public:
void apply();
void cancel();
void refresh();
LLPanel* getPanel();
protected:
LLPrefsAscentSysImpl& impl;
static void onCommitCheckBox(LLUICtrl* ctrl, void* user_data);
static void onSpellAdd(void* data);
static void onSpellRemove(void* data);
static void onSpellGetMore(void* data);
static void onSpellEditCustom(void* data);
static void onSpellBaseComboBoxCommit(LLUICtrl* ctrl, void* userdata);
void refreshValues();
//General -----------------------------------------------------------------------------
BOOL mDoubleClickTeleport;
BOOL mResetCameraAfterTP;
BOOL mOffsetTPByUserHeight;
BOOL mPreviewAnimInWorld;
BOOL mSaveScriptsAsMono;
BOOL mAlwaysRezInGroup;
//Disable Teleport Progress
//Disable Logout progress
//always show Build
BOOL mAlwaysShowFly;
//Disable camera minimum distance
BOOL mPowerUser;
BOOL mUseSystemFolder;
BOOL mUploadToSystem;
//Chat/IM -----------------------------------------------------------------------------
BOOL mHideNotificationsInChat;
BOOL mPlayTypingSound;
BOOL mHideTypingNotification;
BOOL mEnableMUPose;
BOOL mEnableOOCAutoClose;
U32 mLinksForChattingObjects;
U32 mTimeFormat;
U32 mDateFormat;
BOOL mSecondsInChatAndIMs;
//Performance -------------------------------------------------------------------------
BOOL mFetchInventoryOnLogin;
BOOL mEnableLLWind;
BOOL mEnableClouds;
BOOL mEnableClassicClouds;
BOOL mSpeedRez;
U32 mSpeedRezInterval;
//Command Line ------------------------------------------------------------------------
//Privacy -----------------------------------------------------------------------------
BOOL mBroadcastViewerEffects;
BOOL mDisablePointAtAndBeam;
BOOL mPrivateLookAt;
BOOL mShowLookAt;
BOOL mRevokePermsOnStandUp;
BOOL mDisableClickSit;
//Text Options ------------------------------------------------------------------------
BOOL mSpellDisplay;
};
#endif

View File

@@ -1,366 +0,0 @@
/**
* @file ascentuploadbrowser.h
* @Author Duncan Garrett (Hg Beeks)
* Meant as a replacement to using a system file browser for uploads.
*
* Created August 27 2010
*
* ALL SOURCE CODE IS PROVIDED "AS IS." THE CREATOR MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* k ilu bye
*/
#include "llviewerprecompiledheaders.h"
#include "ascentuploadbrowser.h"
//UI Elements
#include "llbutton.h" //Buttons
#include "llcombobox.h" //Combo dropdowns
#include "llscrolllistctrl.h" //List box for filenames
#include "lluictrlfactory.h" //Loads the XUI
// project includes
#include "llresmgr.h"
#include "llsdserialize.h" //XML Parsing - Probably not needed
#include "llviewercontrol.h"
#include "llviewerwindow.h"
///----------------------------------------------------------------------------
/// Local function declarations, constants, enums, and typedefs
///----------------------------------------------------------------------------
LLSD ASFloaterUploadBrowser::mUploaderSettings;
ASFloaterUploadBrowser* ASFloaterUploadBrowser::sInstance = NULL;
///----------------------------------------------------------------------------
/// Class ASFloaterUploadBrowser
///----------------------------------------------------------------------------
// Default constructor
ASFloaterUploadBrowser::ASFloaterUploadBrowser()
: LLFloater(std::string("floater_upload_browser"),
std::string("FloaterUploadRect"),
LLStringUtil::null)
{
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_upload_browser.xml");
mUploaderSettings.clear();
mUploaderSettings = gSavedSettings.getLLSD("AscentUploadSettings");
mPathName = mUploaderSettings["ActivePath"].asString();
if (mPathName == "None")
mPathName = gDirUtilp->getExecutableDir();
mFilterType = "None";
//File list ------------------------------------------------------
mFileList = getChild<LLScrollListCtrl>("file_list");
childSetCommitCallback("file_list", onClickFile, this);
childSetDoubleClickCallback("file_list", onDoubleClick);
//Above File List ------------------------------------------------
mBookmarkCombo = getChild<LLComboBox>("bookmark_combo");
S32 index;
for (index = 0; index < mUploaderSettings["Bookmarks"].size(); index++)
{
std::string bookmark = mUploaderSettings["Bookmarks"][index].asString();
if (bookmark != "")
mBookmarkCombo->add(bookmark, ADD_BOTTOM);
}
mDriveCombo = getChild<LLComboBox>("drive_combo");
childSetCommitCallback("drive_combo", onChangeDrives, this);
//This is so unbelievably shitty I can't handle it -HgB
std::string drive_letters[] = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}; //Oh my god it's somehow worse now -HgB
mDriveCombo->removeall();
for (index = 0; index < 26; index++)
{
std::string dir = drive_letters[index] + ":";
S32 file_count = gDirUtilp->countFilesInDir(dir + gDirUtilp->getDirDelimiter(), "*.*");
if(file_count)
{
mDriveCombo->add(dir, ADD_BOTTOM);
}
}
childSetAction("directory_button", onClickFilepathGoto, this);
childSetCommitCallback("dir_path", onDirCommit, (void*)this);
//Below File List ------------------------------------------------
childSetCommitCallback("file_filter_combo", onUpdateFilter, this);
refresh();
mFileList->sortByColumn(std::string("file_name"), TRUE);
mFileList->sortByColumn(std::string("file_type"), TRUE);
childHide("multiple_uploads_label");
childHide("bad_image_text");
}
// Destroys the object
ASFloaterUploadBrowser::~ASFloaterUploadBrowser()
{
sInstance = NULL;
}
void ASFloaterUploadBrowser::onDirCommit(LLUICtrl* ctrl, void* data)
{
ASFloaterUploadBrowser* panelp = (ASFloaterUploadBrowser*)data;
if (panelp)
{
panelp->onClickFilepathGoto(data);
}
}
void ASFloaterUploadBrowser::updateBrowser(void* data, std::string new_path)
{
ASFloaterUploadBrowser* panelp = (ASFloaterUploadBrowser*)data;
if ((new_path != panelp->mPathName)||(new_path == ""))
{
panelp->mPathName = new_path;
panelp->refresh();
panelp->mFileList->selectFirstItem();
panelp->childSetValue("asset_name", "");
}
}
//static
void ASFloaterUploadBrowser::onClickFilepathGoto(void* data)
{
ASFloaterUploadBrowser* panelp = (ASFloaterUploadBrowser*)data;
std::string new_path = panelp->childGetValue("dir_path");
panelp->updateBrowser(data, new_path);
}
void ASFloaterUploadBrowser::onClickFile(LLUICtrl* ctrl, void* user_data)
{
ASFloaterUploadBrowser* panelp = (ASFloaterUploadBrowser*)user_data;
panelp->refreshUploadOptions();
}
void ASFloaterUploadBrowser::onChangeDrives(LLUICtrl* ctrl, void* user_data)
{
ASFloaterUploadBrowser* panelp = (ASFloaterUploadBrowser*)user_data;
if (panelp->mDriveCombo->getSelectedValue().asString() != panelp->mFilterType)
{
panelp->updateBrowser(user_data, panelp->mDriveCombo->getSelectedValue().asString());
}
}
void ASFloaterUploadBrowser::onUpdateFilter(LLUICtrl* ctrl, void* user_data)
{
ASFloaterUploadBrowser* panelp = (ASFloaterUploadBrowser*)user_data;
LLComboBox* combo = panelp->getChild<LLComboBox>("file_filter_combo");
if (combo->getSelectedValue().asString() != panelp->mFilterType)
{
panelp->mFilterType = "";
panelp->mFilterType = combo->getSelectedValue().asString();
panelp->updateBrowser(user_data, "");
}
}
void ASFloaterUploadBrowser::refreshUploadOptions()
{
if (!mFileList->isEmpty())
{
if(!mFileList->getSelectedIDs().count())
{
llinfos << "No selection, clearing field." << llendl;
childSetValue("asset_name", "");
}
else
{
if (mFileList->getFirstSelected()->getColumn(LIST_ASSET_TYPE)->getValue().asInteger() == LIST_TYPE_FILE)
{
std::string name;
bool show_tex = false;
bool show_snd = false;
bool show_anm = false;
bool show_multiple = false;
if (mFileList->getAllSelected().size() > 1)
{
llinfos << "Selected multiple files." << llendl;
name = "(Multiple)";
show_multiple = true;
/*LLButton* expand_button = getChild<LLButton>("expand_collapse_btn");
expand_button->setLabelArg("[COST]", std::string(mFileList->getAllSelected().size() * 10));*/
childSetValue("multiple_uploads_label", "Multiple files selected. Total cost is: " + llformat("%d", mFileList->getAllSelected().size() * 10));
}
else
{
int type = mFileList->getFirstSelected()->getColumn(LIST_FILE_TYPE)->getValue().asInteger();
llinfos << "Selected a file, type" << type << llendl;
if (type == FILE_TEXTURE)
{
show_tex = true;
}
else if (type == FILE_SOUND)
{
show_snd = true;
}
else if (type == FILE_ANIMATION)
{
show_anm = true;
}
name = mFileList->getFirstSelected()->getColumn(LIST_FILE_NAME)->getValue().asString();
}
childSetVisible("texture_preview_label", (show_tex && !show_multiple));
childSetVisible("texture_preview_combo", (show_tex && !show_multiple));
childSetVisible("multiple_uploads_label", show_multiple);
childSetValue("asset_name", name);
}
}
}
}
void ASFloaterUploadBrowser::onDoubleClick(void* user_data)
{
ASFloaterUploadBrowser* panelp = (ASFloaterUploadBrowser*)user_data;
panelp->handleDoubleClick();
}
void ASFloaterUploadBrowser::handleDoubleClick()
{
if (mFileList->getFirstSelected()->getColumn(LIST_ASSET_TYPE)->getValue().asInteger() == LIST_TYPE_PARENT)
{
S32 dirLimiterIndex = mPathName.find_last_of(gDirUtilp->getDirDelimiter());
mPathName = mPathName.substr(0, dirLimiterIndex);
refresh();
mFileList->selectFirstItem();
}
else if (mFileList->getFirstSelected()->getColumn(LIST_ASSET_TYPE)->getValue().asInteger() == LIST_TYPE_FOLDER)
{
//Make sure that it's an actual folder so you don't get stuck - Specifically meant for files with no extension. -HgB
std::string new_path = mPathName + gDirUtilp->getDirDelimiter() + mFileList->getFirstSelected()->getColumn(LIST_FILE_NAME)->getValue().asString();
S32 file_count = gDirUtilp->countFilesInDir(new_path, "*.*");
if(!file_count)
return;
mPathName = mPathName + gDirUtilp->getDirDelimiter() + mFileList->getFirstSelected()->getColumn(LIST_FILE_NAME)->getValue().asString();
refresh();
mFileList->selectFirstItem();
}
childSetValue("asset_name", "");
}
void ASFloaterUploadBrowser::refresh()
{
std::string filename;
std::string fullPath = mPathName + gDirUtilp->getDirDelimiter();
mFileList->deselectAllItems();
mFileList->deleteAllItems();
childSetValue("dir_path", gDirUtilp->getDirName(fullPath));
mUploaderSettings["ActivePath"] = mPathName;
gSavedSettings.setLLSD("AscentUploadSettings", mUploaderSettings);
gDirUtilp->getNextFileInDir(gDirUtilp->getChatLogsDir(),"*", filename, false); //Clears the last file
bool found = true;
S32 file_count = 0;
while(found)
{
found = gDirUtilp->getNextFileInDir(fullPath, "*.*", filename, false);
if(found)
{
S32 periodIndex = filename.find_last_of(".");
std::string extension = filename.substr(periodIndex + 1, filename.length() - 1);
std::string extensionL = utf8str_tolower(extension);
LLSD element;
element["path"] = mPathName + filename;
LLSD& filename_column = element["columns"][LIST_FILE_NAME];
filename_column["column"] = "file_name";
filename_column["font"] = "SANSSERIF";
filename_column["font-style"] = "NORMAL";
LLSD& filetype_column = element["columns"][LIST_FILE_TYPE];
filetype_column["column"] = "file_type";
filetype_column["type"] = "number";
LLSD& assettype_column = element["columns"][LIST_ASSET_TYPE];
assettype_column["column"] = "asset_type";
assettype_column["type"] = "number";
LLSD& invtype_column = element["columns"][LIST_INVENTORY_TYPE];
invtype_column["column"] = "icon_inventory_type";
invtype_column["type"] = "icon";
invtype_column["value"] = "inv_folder_trash.tga";
if (((extensionL == "jpeg")||(extensionL == "jpg")||(extensionL == "tga")
||(extensionL == "png")||(extensionL == "bmp"))&&((mFilterType == "None")||(mFilterType == "Texture")))
{
invtype_column["value"] = "inv_item_texture.tga";
filename_column["value"] = filename.substr(0, periodIndex);
filetype_column["value"] = FILE_TEXTURE;
assettype_column["value"] = LIST_TYPE_FILE;
}
else if ((extensionL == "wav")&&((mFilterType == "None")||(mFilterType == "Sound")))
{
invtype_column["value"] = "inv_item_sound.tga";
filename_column["value"] = filename.substr(0, periodIndex);
filetype_column["value"] = FILE_SOUND;
assettype_column["value"] = LIST_TYPE_FILE;
}
else if (((extensionL == "bvh")||(extensionL == "anim"))&&((mFilterType == "None")||(mFilterType == "Animation")))
{
invtype_column["value"] = "inv_item_animation.tga";
filename_column["value"] = filename.substr(0, periodIndex);
filetype_column["value"] = FILE_ANIMATION;
assettype_column["value"] = LIST_TYPE_FILE;
}
else if ((extension == filename.substr(0, filename.length() - 1))&&(filename != "."))
{
std::string test_path = mPathName + gDirUtilp->getDirDelimiter() + filename + gDirUtilp->getDirDelimiter();
S32 file_count = gDirUtilp->countFilesInDir(test_path, "*.*");
if(file_count)
{
invtype_column["value"] = "inv_folder_plain_closed.tga";
filename_column["value"] = filename;
filetype_column["value"] = FOLDER;
assettype_column["value"] = LIST_TYPE_FOLDER;
}
}
else if (filename == "..")
{
invtype_column["value"] = "inv_folder_plain_open.tga";
filename_column["value"] = filename;
filetype_column["value"] = FOLDER;
assettype_column["value"] = LIST_TYPE_PARENT;
}
if (invtype_column["value"].asString() != "inv_folder_trash.tga")
{
mFileList->addElement(element, ADD_BOTTOM);
if (assettype_column["value"].asInteger() == LIST_TYPE_FILE)
{
file_count++;
}
}
}
}
std::string result;
LLResMgr::getInstance()->getIntegerString(result, file_count);
if (result == "")
result = "0";
childSetTextArg("result_label", "[COUNT]", result);
mFileList->sortItems();
llinfos << "Total files loaded: " << result << "." << llendl;
}
// static
void ASFloaterUploadBrowser::show(void*)
{
if (!sInstance)
{
sInstance = new ASFloaterUploadBrowser();
}
sInstance->open(); /*Flawfinder: ignore*/
}

View File

@@ -1,78 +0,0 @@
/**
* @file ascentuploadbrowser.h
* @Author Duncan Garrett
* Meant as a replacement to using Windows' file browser for uploads.
*
* Created August 27 2010
*
* ALL SOURCE CODE IS PROVIDED "AS IS." THE CREATOR MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* k ilu bye
*/
#ifndef ASCENT_UPLOAD_BROWSER
#define ASCENT_UPLOAD_BROWSER
#include "llfloater.h"
#include "llcombobox.h"
class LLScrollListCtrl;
class ASFloaterUploadBrowser : public LLFloater
{
public:
using LLFloater::handleDoubleClick;
ASFloaterUploadBrowser();
virtual ~ASFloaterUploadBrowser();
//File list
static void onClickFile(LLUICtrl* ctrl, void* user_data);
static void onUpdateFilter(LLUICtrl* ctrl, void* user_data);
static void onDoubleClick(void* user_data);
static void onDirCommit (LLUICtrl* ctrl, void* data);
static void onChangeDrives(LLUICtrl* ctrl, void* user_data);
static void onClickFilepathGoto(void* data);
void updateBrowser(void* data, std::string new_path);
void refresh();
void refreshUploadOptions();
void handleDoubleClick();
static void show(void*);
std::vector<LLSD> datas;
private:
static LLSD mUploaderSettings;
static ASFloaterUploadBrowser* sInstance;
enum FILE_COLUMN_ORDER
{
LIST_FILE_TYPE,
LIST_ASSET_TYPE,
LIST_INVENTORY_TYPE,
LIST_FILE_NAME,
LIST_DATA
};
enum FILE_TYPE_ORDER
{
LIST_TYPE_PARENT,
LIST_TYPE_FOLDER,
LIST_TYPE_FILE
};
enum FILE_TYPE
{
FOLDER,
FILE_TEXTURE,
FILE_SOUND,
FILE_ANIMATION
};
LLScrollListCtrl* mFileList;
LLComboBox* mDriveCombo;
LLComboBox* mBookmarkCombo;
std::string mPathName;
std::string mFilterType;
};
#endif // ASCENT_UPLOAD_BROWSER

View File

@@ -2923,6 +2923,8 @@
id="40"
group="1"
name="Male_Head"
wearable="shape"
edit_group="driven"
value_min="0"
value_max="1">
<param_morph />
@@ -3508,6 +3510,8 @@
id="104"
group="1"
name="Big_Belly_Torso"
wearable="shape"
edit_group="driven"
value_min="0"
value_max="1">
<param_morph>
@@ -3824,6 +3828,8 @@
id="855"
group="1"
name="Love_Handles"
wearable="shape"
edit_group="driven"
value_default="0"
value_min="-1"
value_max="2">
@@ -3879,6 +3885,8 @@
id="100"
group="1"
name="Male_Torso"
wearable="shape"
edit_group="driven"
label_min="Male_Torso"
value_min="0"
value_max="1">
@@ -4047,9 +4055,66 @@
<param_morph />
</param>
<!--
#end morph targets
-->
<!--
#############
# physics morphs (not user controlled)
#############
-->
<param
id="1200"
group="1"
sex="female"
name="Breast_Physics_UpDown_Driven"
wearable="shape"
edit_group="driven"
value_default="0"
value_min="-3"
value_max="3">
<param_morph />
</param>
<param
id="1201"
group="1"
sex="female"
name="Breast_Physics_InOut_Driven"
wearable="shape"
edit_group="driven"
value_default="0"
value_min="-1.25"
value_max="1.25">
<param_morph />
</param>
<param
id="1204"
group="1"
name="Belly_Physics_Torso_UpDown_Driven"
wearable="physics"
cross_wearable="true"
edit_group="driven"
value_default="0"
value_min="-1"
value_max="1">
<param_morph />
</param>
<param
id="1207"
group="1"
name="Breast_Physics_LeftRight_Driven"
wearable="physics"
cross_wearable="true"
edit_group="driven"
value_default="0"
value_min="-2"
value_max="2">
<param_morph />
</param>
<!--
#end morph targets
-->
</mesh>
<mesh
@@ -4103,11 +4168,14 @@
id="156"
group="1"
name="Big_Belly_Legs"
wearable="shape"
edit_group="driven"
value_min="0"
value_max="1">
<param_morph />
</param>
<param
id="151"
group="1"
@@ -4499,6 +4567,8 @@
id="854"
group="1"
name="Saddlebags"
wearable="shape"
edit_group="driven"
value_min="-.5"
value_max="3">
<param_morph>
@@ -4537,15 +4607,62 @@
id="153"
group="1"
name="Male_Legs"
wearable="shape"
edit_group="driven"
value_min="0"
value_max="1">
<param_morph />
</param>
<!--
#end morph targets
-->
</mesh>
<!--
#############
# physics morphs (not user controlled)
#############
-->
<param
id="1202"
group="1"
name="Belly_Physics_Legs_UpDown_Driven"
wearable="physics"
cross_wearable="true"
edit_group="driven"
value_min="-1"
value_max="1">
<param_morph />
</param>
<param
id="1205"
group="1"
name="Butt_Physics_UpDown_Driven"
wearable="physics"
cross_wearable="true"
edit_group="driven"
value_default="0"
value_min="-1"
value_max="1">
<param_morph />
</param>
<param
id="1206"
group="1"
name="Butt_Physics_LeftRight_Driven"
wearable="physics"
cross_wearable="true"
edit_group="driven"
value_default="0"
value_min="-1"
value_max="1">
<param_morph />
</param>
<!--
#end morph targets
-->
</mesh>
<mesh
type="lowerBodyMesh"
@@ -4818,6 +4935,7 @@
name="skirt_bowlegs"
label="legs skirt"
wearable="skirt"
edit_group="driven"
value_min="-1"
value_max="1"
value_default="0">
@@ -4828,6 +4946,8 @@
id="852"
group="1"
name="skirt_bigbutt"
wearable="skirt"
edit_group="driven"
label="bigbutt skirt"
label_min="less"
label_max="more"
@@ -4840,6 +4960,8 @@
id="849"
group="1"
name="skirt_belly"
wearable="skirt"
edit_group="driven"
label="big belly skirt"
value_min="0"
value_max="1">
@@ -4849,6 +4971,8 @@
<param
id="850"
group="1"
wearable="skirt"
edit_group="driven"
name="skirt_saddlebags"
value_min="-.5"
value_max="3">
@@ -4859,6 +4983,8 @@
id="851"
group="1"
name="skirt_chubby"
wearable="skirt"
edit_group="driven"
label_min="less"
label_max="more"
value_min="0"
@@ -4871,6 +4997,8 @@
id="856"
group="1"
name="skirt_lovehandles"
wearable="skirt"
edit_group="driven"
label_min="less"
label_max="more"
value_min="-1"
@@ -4888,11 +5016,32 @@
id="857"
group="1"
name="skirt_male"
wearable="skirt"
edit_group="driven"
value_min="0"
value_max="1">
<param_morph />
</param>
</mesh>
<param_morph />
</param>
<!--
#############
# physics morphs (not user controlled)
#############
-->
<param
id="1203"
group="1"
name="Belly_Physics_Skirt_UpDown_Driven"
wearable="physics"
cross_wearable="true"
edit_group="driven"
value_default="0"
value_min="-1"
value_max="1">
<param_morph />
</param>
</mesh>
<mesh
type="skirtMesh"
@@ -5564,6 +5713,7 @@
<param
id="1003"
group="1"
wearable="hair"
edit_group="driven"
name="Eyebrow Density"
value_min="0"
@@ -6212,6 +6362,7 @@
id="1005"
sex="male"
group="1"
wearable="hair"
edit_group="driven"
name="Sideburns"
value_min="0"
@@ -6226,6 +6377,7 @@
id="1007"
sex="male"
group="1"
wearable="hair"
edit_group="driven"
name="Moustache"
value_min="0"
@@ -6240,6 +6392,7 @@
id="1009"
sex="male"
group="1"
wearable="hair"
edit_group="driven"
name="Soulpatch"
value_min="0"
@@ -6254,6 +6407,7 @@
id="1011"
sex="male"
group="1"
wearable="hair"
edit_group="driven"
name="Chin Curtains"
value_min="0"
@@ -9050,7 +9204,7 @@
wearable="skin"
edit_group="skin_facedetail"
edit_group_order="3"
name="wrinkles"
name="Wrinkles"
label_min="Less"
label_max="More"
value_min="0"
@@ -11150,6 +11304,523 @@
</param_driver>
</param>
<!-- ==PHYSICS PARAMETERS======================================= -->
<param
id="1100"
group="1"
sex="female"
wearable="physics"
name="Breast_Physics_UpDown_Controller"
label="Breast Physics UpDown Controller"
value_min="-1"
value_max="1"
value_default="0">
<param_driver>
<driven
id="1200" />
</param_driver>
</param>
<param
id="1101"
group="1"
sex="female"
wearable="physics"
name="Breast_Physics_InOut_Controller"
label="Breast Physics InOut Controller"
value_min="-1"
value_max="1"
value_default="0">
<param_driver>
<driven
id="1201" />
</param_driver>
</param>
<param
id="1102"
group="1"
wearable="physics"
name="Belly_Physics_UpDown_Controller"
label="Belly Physics UpDown Controller"
value_min="-1"
value_max="1"
value_default="0">
<param_driver>
<driven
id="1202" />
<driven
id="1203" />
<driven
id="1204" />
</param_driver>
</param>
<param
id="1103"
group="1"
wearable="shape"
name="Butt_Physics_UpDown_Controller"
label="Butt Physics UpDown Controller"
value_min="-1"
value_max="1"
value_default="0">
<param_driver>
<driven
id="1205" />
</param_driver>
</param>
<param
id="1104"
group="1"
wearable="shape"
name="Butt_Physics_LeftRight_Controller"
label="Butt Physics LeftRight Controller"
value_min="-1"
value_max="1"
value_default="0">
<param_driver>
<driven
id="1206" />
</param_driver>
</param>
<param
id="1105"
group="1"
wearable="shape"
name="Breast_Physics_LeftRight_Controller"
label="Breast Physics LeftRight Controller"
value_min="-1"
value_max="1"
value_default="0">
<param_driver>
<driven
id="1207" />
</param_driver>
</param>
<param
id="10000"
group="0"
sex="female"
name="Breast_Physics_Mass"
label="Breast Mass"
wearable="physics"
edit_group="physics_advanced"
value_default=".1"
value_min=".1"
value_max="1">
<param_driver />
</param>
<param
id="10001"
group="0"
sex="female"
name="Breast_Physics_Gravity"
label="Breast Gravity"
wearable="physics"
edit_group="physics_advanced"
value_default="0"
value_min="0"
value_max="30">
<param_driver />
</param>
<param
id="10002"
group="0"
sex="female"
name="Breast_Physics_Drag"
label="Breast Drag"
wearable="physics"
edit_group="physics_advanced"
value_default="1"
value_min="0"
value_max="10">
<param_driver />
</param>
<param
id="10003"
group="0"
sex="female"
name="Breast_Physics_UpDown_Max_Effect"
label="Max Effect"
wearable="physics"
edit_group="physics_breasts_updown"
value_default="0"
value_min="0"
value_max="3">
<param_driver />
</param>
<param
id="10004"
group="0"
sex="female"
name="Breast_Physics_UpDown_Spring"
label="Spring"
wearable="physics"
edit_group="physics_breasts_updown"
value_default="10"
value_min="0"
value_max="100">
<param_driver />
</param>
<param
id="10005"
group="0"
sex="female"
name="Breast_Physics_UpDown_Gain"
label="Gain"
wearable="physics"
edit_group="physics_breasts_updown"
value_default="10"
value_min="1"
value_max="100">
<param_driver />
</param>
<param
id="10006"
group="0"
sex="female"
name="Breast_Physics_UpDown_Damping"
label="Damping"
wearable="physics"
edit_group="physics_breasts_updown"
value_default=".2"
value_min="0"
value_max="1">
<param_driver />
</param>
<param
id="10007"
group="0"
sex="female"
name="Breast_Physics_InOut_Max_Effect"
label="Max Effect"
wearable="physics"
edit_group="physics_breasts_inout"
value_default="0"
value_min="0"
value_max="3">
<param_driver />
</param>
<param
id="10008"
group="0"
sex="female"
name="Breast_Physics_InOut_Spring"
label="Spring"
wearable="physics"
edit_group="physics_breasts_inout"
value_default="10"
value_min="0"
value_max="100">
<param_driver />
</param>
<param
id="10009"
group="0"
sex="female"
name="Breast_Physics_InOut_Gain"
label="Gain"
wearable="physics"
edit_group="physics_breasts_inout"
value_default="10"
value_min="1"
value_max="100">
<param_driver />
</param>
<param
id="10010"
group="0"
sex="female"
name="Breast_Physics_InOut_Damping"
label="Damping"
wearable="physics"
edit_group="physics_breasts_inout"
value_default=".2"
value_min="0"
value_max="1">
<param_driver />
</param>
<param
id="10011"
group="0"
name="Belly_Physics_Mass"
label="Belly Mass"
wearable="physics"
edit_group="physics_advanced"
value_default=".1"
value_min=".1"
value_max="1">
<param_driver />
</param>
<param
id="10012"
group="0"
name="Belly_Physics_Gravity"
label="Belly Gravity"
wearable="physics"
edit_group="physics_advanced"
value_default="0"
value_min="0"
value_max="30">
<param_driver />
</param>
<param
id="10013"
group="0"
name="Belly_Physics_Drag"
label="Belly Drag"
wearable="physics"
edit_group="physics_advanced"
value_default="1"
value_min="0"
value_max="10">
<param_driver />
</param>
<param
id="10014"
group="0"
name="Belly_Physics_UpDown_Max_Effect"
label="Max Effect"
wearable="physics"
edit_group="physics_belly_updown"
value_default="0"
value_min="0"
value_max="3">
<param_driver />
</param>
<param
id="10015"
group="0"
name="Belly_Physics_UpDown_Spring"
label="Spring"
wearable="physics"
edit_group="physics_belly_updown"
value_default="10"
value_min="0"
value_max="100">
<param_driver />
</param>
<param
id="10016"
group="0"
name="Belly_Physics_UpDown_Gain"
label="Gain"
wearable="physics"
edit_group="physics_belly_updown"
value_default="10"
value_min="1"
value_max="100">
<param_driver />
</param>
<param
id="10017"
group="0"
name="Belly_Physics_UpDown_Damping"
label="Damping"
wearable="physics"
edit_group="physics_belly_updown"
value_default=".2"
value_min="0"
value_max="1">
<param_driver />
</param>
<param
id="10018"
group="0"
name="Butt_Physics_Mass"
label="Butt Mass"
wearable="physics"
edit_group="physics_advanced"
value_default=".1"
value_min=".1"
value_max="1">
<param_driver />
</param>
<param
id="10019"
group="0"
name="Butt_Physics_Gravity"
label="Butt Gravity"
wearable="physics"
edit_group="physics_advanced"
value_default="0"
value_min="0"
value_max="30">
<param_driver />
</param>
<param
id="10020"
group="0"
name="Butt_Physics_Drag"
label="Butt Drag"
wearable="physics"
edit_group="physics_advanced"
value_default="1"
value_min="0"
value_max="10">
<param_driver />
</param>
<param
id="10021"
group="0"
name="Butt_Physics_UpDown_Max_Effect"
label="Max Effect"
wearable="physics"
edit_group="physics_butt_updown"
value_default="0"
value_min="0"
value_max="3">
<param_driver />
</param>
<param
id="10022"
group="0"
name="Butt_Physics_UpDown_Spring"
label="Spring"
wearable="physics"
edit_group="physics_butt_updown"
value_default="10"
value_min="0"
value_max="100">
<param_driver />
</param>
<param
id="10023"
group="0"
name="Butt_Physics_UpDown_Gain"
label="Gain"
wearable="physics"
edit_group="physics_butt_updown"
value_default="10"
value_min="1"
value_max="100">
<param_driver />
</param>
<param
id="10024"
group="0"
name="Butt_Physics_UpDown_Damping"
label="Damping"
wearable="physics"
edit_group="physics_butt_updown"
value_default=".2"
value_min="0"
value_max="1">
<param_driver />
</param>
<param
id="10025"
group="0"
name="Butt_Physics_LeftRight_Max_Effect"
label="Max Effect"
wearable="physics"
edit_group="physics_butt_leftright"
value_default="0"
value_min="0"
value_max="3">
<param_driver />
</param>
<param
id="10026"
group="0"
name="Butt_Physics_LeftRight_Spring"
label="Spring"
wearable="physics"
edit_group="physics_butt_leftright"
value_default="10"
value_min="0"
value_max="100">
<param_driver />
</param>
<param
id="10027"
group="0"
name="Butt_Physics_LeftRight_Gain"
label="Gain"
wearable="physics"
edit_group="physics_butt_leftright"
value_default="10"
value_min="1"
value_max="100">
<param_driver />
</param>
<param
id="10028"
group="0"
name="Butt_Physics_LeftRight_Damping"
label="Damping"
wearable="physics"
edit_group="physics_butt_leftright"
value_default=".2"
value_min="0"
value_max="1">
<param_driver />
</param>
<param
id="10029"
group="0"
sex="female"
name="Breast_Physics_LeftRight_Max_Effect"
label="Max Effect"
wearable="physics"
edit_group="physics_breasts_leftright"
value_default="0"
value_min="0"
value_max="3">
<param_driver />
</param>
<param
id="10030"
group="0"
sex="female"
name="Breast_Physics_LeftRight_Spring"
label="Spring"
wearable="physics"
edit_group="physics_breasts_leftright"
value_default="10"
value_min="0"
value_max="100">
<param_driver />
</param>
<param
id="10031"
group="0"
sex="female"
name="Breast_Physics_LeftRight_Gain"
label="Gain"
wearable="physics"
edit_group="physics_breasts_leftright"
value_default="10"
value_min="1"
value_max="100">
<param_driver />
</param>
<param
id="10032"
group="0"
sex="female"
name="Breast_Physics_LeftRight_Damping"
label="Damping"
wearable="physics"
edit_group="physics_breasts_leftright"
value_default=".2"
value_min="0"
value_max="1">
<param_driver />
</param>
</driver_parameters>
</linden_avatar>

View File

@@ -53,9 +53,11 @@ WindLightUseAtmosShaders 1 1
WLSkyDetail 1 128
Disregard128DefaultDrawDistance 1 1
Disregard96DefaultDrawDistance 1 1
RenderTextureMemoryMultiple 1 1.0
RenderShaderLightingMaxLevel 1 3
RenderTextureMemoryMultiple 1 1.0
RenderUseFBO 1 1
RenderDeferred 1 1
RenderFastAlpha 1 1
//
// Low Graphics Settings
@@ -63,10 +65,10 @@ RenderShaderLightingMaxLevel 1 3
list Low
RenderAnisotropic 1 0
RenderAvatarCloth 1 0
RenderAvatarLODFactor 1 0.5
RenderAvatarLODFactor 1 0.25
RenderAvatarVP 1 0
RenderFarClip 1 64
RenderFlexTimeFactor 1 0.5
RenderFlexTimeFactor 1 0.1
RenderGlowResolutionPow 1 8
RenderLightingDetail 1 0
RenderMaxPartCount 1 1024
@@ -74,13 +76,16 @@ RenderObjectBump 1 0
RenderReflectionDetail 1 0
RenderTerrainDetail 1 0
RenderTerrainLODFactor 1 1
RenderTreeLODFactor 1 0.5
RenderTreeLODFactor 1 0.25
RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
RenderVolumeLODFactor 1 0.5
RenderWaterReflections 1 0
VertexShaderEnable 1 0
WindLightUseAtmosShaders 1 0
WLSkyDetail 1 48
RenderUseFBO 0 0
RenderDeferred 0 0
RenderFastAlpha 0 0
//
// Mid Graphics Settings
@@ -91,7 +96,7 @@ RenderAvatarCloth 1 0
RenderAvatarLODFactor 1 0.5
RenderAvatarVP 1 1
RenderFarClip 1 96
RenderFlexTimeFactor 1 1.0
RenderFlexTimeFactor 1 0.5
RenderGlowResolutionPow 1 8
RenderLightingDetail 1 1
RenderMaxPartCount 1 2048
@@ -106,6 +111,10 @@ RenderWaterReflections 1 0
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 0
WLSkyDetail 1 48
RenderUseFBO 1 0
RenderDeferred 1 0
RenderFastAlpha 1 0
//
// High Graphics Settings (purty)
@@ -131,6 +140,10 @@ RenderWaterReflections 1 0
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
WLSkyDetail 1 48
RenderUseFBO 1 0
RenderDeferred 1 0
RenderFastAlpha 1 0
//
// Ultra graphics (REALLY PURTY!)
@@ -156,6 +169,9 @@ RenderWaterReflections 1 1
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
WLSkyDetail 1 128
RenderUseFBO 1 1
RenderDeferred 1 1
RenderFastAlpha 1 1
//
// Class Unknown Hardware (unknown)

View File

@@ -53,7 +53,11 @@ WindLightUseAtmosShaders 1 1
WLSkyDetail 1 128
Disregard128DefaultDrawDistance 1 1
Disregard96DefaultDrawDistance 1 1
RenderShaderLightingMaxLevel 1 3
RenderTextureMemoryMultiple 1 1.0
RenderUseFBO 1 1
RenderDeferred 1 1
RenderFastAlpha 1 1
//
// Low Graphics Settings
@@ -61,10 +65,10 @@ RenderTextureMemoryMultiple 1 1.0
list Low
RenderAnisotropic 1 0
RenderAvatarCloth 1 0
RenderAvatarLODFactor 1 0.5
RenderAvatarLODFactor 1 0.25
RenderAvatarVP 1 0
RenderFarClip 1 64
RenderFlexTimeFactor 1 0.5
RenderFlexTimeFactor 1 0.1
RenderGlowResolutionPow 1 8
RenderLightingDetail 1 0
RenderMaxPartCount 1 1024
@@ -72,13 +76,16 @@ RenderObjectBump 1 0
RenderReflectionDetail 1 0
RenderTerrainDetail 1 0
RenderTerrainLODFactor 1 1
RenderTreeLODFactor 1 0.5
RenderTreeLODFactor 1 0.25
RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
RenderVolumeLODFactor 1 0.5
RenderWaterReflections 1 0
VertexShaderEnable 1 0
WindLightUseAtmosShaders 1 0
WLSkyDetail 1 48
RenderUseFBO 0 0
RenderDeferred 0 0
RenderFastAlpha 0 0
//
// Mid Graphics Settings
@@ -89,7 +96,7 @@ RenderAvatarCloth 1 0
RenderAvatarLODFactor 1 0.5
RenderAvatarVP 1 1
RenderFarClip 1 96
RenderFlexTimeFactor 1 1.0
RenderFlexTimeFactor 1 0.5
RenderGlowResolutionPow 1 8
RenderLightingDetail 1 1
RenderMaxPartCount 1 2048
@@ -104,6 +111,10 @@ RenderWaterReflections 1 0
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 0
WLSkyDetail 1 48
RenderUseFBO 1 0
RenderDeferred 1 0
RenderFastAlpha 1 0
//
// High Graphics Settings (purty)
@@ -129,6 +140,10 @@ RenderWaterReflections 1 0
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
WLSkyDetail 1 48
RenderUseFBO 1 0
RenderDeferred 1 0
RenderFastAlpha 1 0
//
// Ultra graphics (REALLY PURTY!)
@@ -154,6 +169,10 @@ RenderWaterReflections 1 1
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
WLSkyDetail 1 128
RenderUseFBO 1 1
RenderDeferred 1 1
RenderFastAlpha 1 1
//
// Class Unknown Hardware (unknown)
@@ -219,6 +238,9 @@ RenderUseImpostors 0 0
RenderVBOEnable 1 0
RenderWaterReflections 0 0
WindLightUseAtmosShaders 0 0
RenderUseFBO 1 0
RenderDeferred 1 0
//
// CPU based feature masks

View File

@@ -23,39 +23,41 @@ version 20
// NOTE: All settings are set to the MIN of applied values, including 'all'!
//
list all
RenderAnisotropic 1 0
RenderAvatarCloth 0 0
RenderAvatarLODFactor 1 1.0
RenderAvatarVP 1 0
RenderCubeMap 1 1
RenderFarClip 1 256
RenderFlexTimeFactor 1 1.0
RenderFogRatio 1 4.0
RenderGamma 1 0
RenderGlowResolutionPow 1 9
RenderGround 1 1
RenderLightingDetail 1 1
RenderMaxPartCount 1 8192
RenderNightBrightness 1 1.0
RenderObjectBump 1 1
RenderReflectionDetail 1 3
RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTreeLODFactor 1 1.0
RenderUseImpostors 1 1
RenderVBOEnable 1 1
RenderVolumeLODFactor 1 2.0
RenderWaterReflections 1 1
UseOcclusion 1 1
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
WLSkyDetail 1 128
RenderUseCleverUI 1 1
Disregard128DefaultDrawDistance 1 1
Disregard96DefaultDrawDistance 1 1
RenderTextureMemoryMultiple 1 0.5
RenderAnisotropic 1 0
RenderAvatarCloth 1 1
RenderAvatarLODFactor 1 1.0
RenderAvatarVP 1 1
RenderCubeMap 1 1
RenderFarClip 1 256
RenderFlexTimeFactor 1 1.0
RenderFogRatio 1 4.0
RenderGamma 1 0
RenderGlowResolutionPow 1 9
RenderGround 1 1
RenderLightingDetail 1 1
RenderMaxPartCount 1 8192
RenderNightBrightness 1 1.0
RenderObjectBump 1 1
RenderReflectionDetail 1 3
RenderTerrainDetail 1 1
RenderTerrainLODFactor 1 2.0
RenderTreeLODFactor 1 1.0
RenderUseImpostors 1 1
RenderVBOEnable 1 1
RenderVolumeLODFactor 1 2.0
RenderWaterReflections 1 1
UseStartScreen 1 1
UseOcclusion 1 1
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
WLSkyDetail 1 128
Disregard128DefaultDrawDistance 1 1
Disregard96DefaultDrawDistance 1 1
RenderShaderLightingMaxLevel 1 3
RenderTextureMemoryMultiple 1 1.0
RenderUseFBO 1 1
RenderDeferred 1 1
RenderFastAlpha 1 1
//
// Low Graphics Settings
@@ -63,10 +65,10 @@ Disregard96DefaultDrawDistance 1 1
list Low
RenderAnisotropic 1 0
RenderAvatarCloth 1 0
RenderAvatarLODFactor 1 0.5
RenderAvatarLODFactor 1 0.25
RenderAvatarVP 1 0
RenderFarClip 1 64
RenderFlexTimeFactor 1 0.5
RenderFlexTimeFactor 1 0.1
RenderGlowResolutionPow 1 8
RenderLightingDetail 1 0
RenderMaxPartCount 1 1024
@@ -74,13 +76,16 @@ RenderObjectBump 1 0
RenderReflectionDetail 1 0
RenderTerrainDetail 1 0
RenderTerrainLODFactor 1 1
RenderTreeLODFactor 1 0.5
RenderTreeLODFactor 1 0.25
RenderUseImpostors 1 1
RenderVolumeLODFactor 1 1.125
RenderVolumeLODFactor 1 0.5
RenderWaterReflections 1 0
VertexShaderEnable 1 0
WindLightUseAtmosShaders 1 0
WLSkyDetail 1 48
RenderUseFBO 0 0
RenderDeferred 0 0
RenderFastAlpha 0 0
//
// Mid Graphics Settings
@@ -91,7 +96,7 @@ RenderAvatarCloth 1 0
RenderAvatarLODFactor 1 0.5
RenderAvatarVP 1 1
RenderFarClip 1 96
RenderFlexTimeFactor 1 1.0
RenderFlexTimeFactor 1 0.5
RenderGlowResolutionPow 1 8
RenderLightingDetail 1 1
RenderMaxPartCount 1 2048
@@ -106,6 +111,10 @@ RenderWaterReflections 1 0
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 0
WLSkyDetail 1 48
RenderUseFBO 1 0
RenderDeferred 1 0
RenderFastAlpha 1 0
//
// High Graphics Settings (purty)
@@ -131,6 +140,10 @@ RenderWaterReflections 1 0
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
WLSkyDetail 1 48
RenderUseFBO 1 0
RenderDeferred 1 0
RenderFastAlpha 1 0
//
// Ultra graphics (REALLY PURTY!)
@@ -156,6 +169,9 @@ RenderWaterReflections 1 1
VertexShaderEnable 1 1
WindLightUseAtmosShaders 1 1
WLSkyDetail 1 128
RenderUseFBO 1 1
RenderDeferred 1 1
RenderFastAlpha 1 1
//
// Class Unknown Hardware (unknown)

View File

@@ -127,9 +127,13 @@ BOOL FloaterVoiceLicense::postBuild()
{
// start to observe it so we see navigate complete events
web_browser->addObserver( this );
gResponsePtr = LLIamHereVoice::build( this );
LLHTTPClient::get( getString( "real_url" ), gResponsePtr );
std::string url = getString( "real_url" );
if(url.substr(0,4) == "http") {
gResponsePtr = LLIamHereVoice::build( this );
LLHTTPClient::get( url, gResponsePtr );
} else {
setSiteIsAlive(false);
}
}
return TRUE;
@@ -145,11 +149,7 @@ void FloaterVoiceLicense::setSiteIsAlive( bool alive )
{
// navigate to the "real" page
std::string real_url = getString( "real_url" );
if (real_url.find("http://") == 0) {
web_browser->navigateTo(real_url);
} else {
web_browser->navigateToLocalPage("license",real_url);
}
web_browser->navigateTo(real_url);
}
}
else

View File

@@ -302,6 +302,8 @@ NVIDIA GeForce 6700 .*NVIDIA.*GeForce 67.* 2 1
NVIDIA GeForce 6800 .*NVIDIA.*GeForce 68.* 2 1
NVIDIA GeForce 7000M .*NVIDIA.*GeForce 7000M.* 0 1
NVIDIA GeForce 7100M .*NVIDIA.*GeForce 7100M.* 0 1
NVIDIA GeForce 7000 .*NVIDIA.*GeForce 70.* 0 1
NVIDIA GeForce 7100 .*NVIDIA.*GeForce 71.* 0 1
NVIDIA GeForce 7200 .*NVIDIA.*GeForce 72.* 1 1
NVIDIA GeForce 7300 .*NVIDIA.*GeForce 73.* 1 1
NVIDIA GeForce 7500 .*NVIDIA.*GeForce 75.* 1 1
@@ -389,8 +391,39 @@ NVIDIA MCP78 .*NVIDIA.*MCP78.* 1 1
NVIDIA Quadro2 .*Quadro2.* 0 1
NVIDIA Quadro4 .*Quadro4.* 0 1
NVIDIA Quadro DCC .*Quadro DCC.* 0 1
NVIDIA Quadro FX 4500 .*Quadro.*FX.*4500.* 3 1
NVIDIA Quadro FX 1400 .*Quadro.*FX.*1400.* 1 1
NVIDIA Quadro FX 1500 .*Quadro.*FX.*1500.* 1 1
NVIDIA Quadro FX 1700 .*Quadro.*FX.*1700.* 2 1
NVIDIA Quadro FX 1800 .*Quadro.*FX.*1800.* 2 1
NVIDIA Quadro FX 3400 .*Quadro.*FX.*3400.* 1 1
NVIDIA Quadro FX 3450 .*Quadro.*FX.*3450.* 1 1
NVIDIA Quadro FX 3500 .*Quadro.*FX.*3500.* 1 1
NVIDIA Quadro FX 3700 .*Quadro.*FX.*3700.* 2 1
NVIDIA Quadro FX 3800 .*Quadro.*FX.*3800.* 2 1
NVIDIA Quadro FX 370 .*Quadro.*FX.*370.* 2 1
NVIDIA Quadro FX 380 .*Quadro.*FX.*380.* 2 1
NVIDIA Quadro FX 4000 .*Quadro.*FX.*4000.* 1 1
NVIDIA Quadro FX 4500 .*Quadro.*FX.*4500.* 1 1
NVIDIA Quadro FX 4600 .*Quadro.*FX.*4600.* 2 1
NVIDIA Quadro FX 4700 .*Quadro.*FX.*4700.* 2 1
NVIDIA Quadro FX 4800 .*Quadro.*FX.*4800.* 2 1
NVIDIA Quadro FX 470 .*Quadro.*FX.*470.* 2 1
NVIDIA Quadro FX 5500 .*Quadro.*FX.*5500.* 1 1
NVIDIA Quadro FX 5600 .*Quadro.*FX.*5600.* 2 1
NVIDIA Quadro FX 5700 .*Quadro.*FX.*5700.* 2 1
NVIDIA Quadro FX 5800 .*Quadro.*FX.*5800.* 2 1
NVIDIA Quadro FX 540 .*Quadro.*FX.*540.* 1 1
NVIDIA Quadro FX 550 .*Quadro.*FX.*550.* 1 1
NVIDIA Quadro FX 560 .*Quadro.*FX.*560.* 1 1
NVIDIA Quadro FX 570 .*Quadro.*FX.*570.* 2 1
NVIDIA Quadro FX 580 .*Quadro.*FX.*580.* 2 1
NVIDIA Quadro FX .*Quadro FX.* 1 1
NVIDIA Quadro VX 200 .*Quadro VX.*200.* 2 1
NVIDIA Quadro 2000 .*Quadro.*2000.* 2 1
NVIDIA Quadro 4000 .*Quadro.*4000.* 2 1
NVIDIA Quadro 5000 .*Quadro.*5000.* 2 1
NVIDIA Quadro 6000 .*Quadro.*6000.* 2 1
NVIDIA Quadro 600 .*Quadro.*600.* 2 1
NVIDIA Quadro NVS .*Quadro NVS.* 0 1
NVIDIA RIVA TNT .*RIVA TNT.* 0 0
NVIDIA PCI .*NVIDIA.*/PCI/SSE2 0 0

View File

@@ -95,6 +95,15 @@ const std::string& HippoGridInfo::getGridName() const
return mGridName;
}
const std::string& HippoGridInfo::getGridOwner() const {
if(isSecondLife()) {
static const std::string ll = "Linden Lab";
return ll;
} else {
return this->getGridName();
}
}
const std::string& HippoGridInfo::getLoginUri() const
{
return mLoginUri;
@@ -972,6 +981,6 @@ void HippoGridManager::saveFile()
}
else
{
llerrs << "Unable to open grid info file: " << fileName << llendl;
llwarns << "Unable to open grid info file for save: " << fileName << llendl;
}
}

View File

@@ -40,6 +40,7 @@ public:
bool isSecondLife() const;
const std::string& getGridNick() const;
const std::string& getGridName() const;
const std::string& getGridOwner() const;
const std::string& getLoginUri() const;
const std::string& getLoginPage() const;
const std::string& getHelperUri() const;

View File

@@ -0,0 +1,195 @@
/* Copyright (c) 2009
*
* Greg Hendrickson (LordGregGreg Back). All rights reserved.
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* 3. Neither the name Modular Systems nor the names of its contributors
* may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY MODULAR SYSTEMS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MODULAR SYSTEMS OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "llviewerprecompiledheaders.h"
#include "lggdicdownload.h"
#include "llagentdata.h"
#include "llcommandhandler.h"
#include "llfloater.h"
#include "lluictrlfactory.h"
#include "llagent.h"
#include "llpanel.h"
#include "llbutton.h"
#include "llcolorswatch.h"
#include "llcombobox.h"
#include "llview.h"
#include "ascentprefssys.h"
#include "llviewercontrol.h"
#include "llhttpclient.h"
#include "llbufferstream.h"
class lggDicDownloadFloater;
class EmeraldDicDownloader : public LLHTTPClient::Responder
{
public:
EmeraldDicDownloader(lggDicDownloadFloater* spanel, std::string sname);
~EmeraldDicDownloader() { }
void completedRaw(
U32 status,
const std::string& reason,
const LLChannelDescriptors& channels,
const LLIOPipe::buffer_ptr_t& buffer);
private:
lggDicDownloadFloater* panel;
std::string name;
};
class lggDicDownloadFloater : public LLFloater, public LLFloaterSingleton<lggDicDownloadFloater>
{
public:
lggDicDownloadFloater(const LLSD& seed);
virtual ~lggDicDownloadFloater();
BOOL postBuild(void);
void setData(std::vector<std::string> shortNames, std::vector<std::string> longNames, void * data);
static void onClickDownload(void* data);
std::vector<std::string> sNames;
std::vector<std::string> lNames;
LLPrefsAscentSys * empanel;
};
lggDicDownloadFloater::~lggDicDownloadFloater()
{
}
lggDicDownloadFloater::lggDicDownloadFloater(const LLSD& seed)
{
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_dictionaries.xml");
if (getRect().mLeft == 0
&& getRect().mBottom == 0)
{
center();
}
}
BOOL lggDicDownloadFloater::postBuild(void)
{
childSetAction("Emerald_dic_download", onClickDownload, this);
return true;
}
void lggDicDownloadFloater::setData(std::vector<std::string> shortNames, std::vector<std::string> longNames, void* data)
{
sNames = shortNames;
lNames = longNames;
empanel = (LLPrefsAscentSys*)data;
LLComboBox* comboBox = getChild<LLComboBox>("Emerald_combo_dics");
if (comboBox != NULL)
{
comboBox->removeall();
for (int i = 0; i < (int)lNames.size(); i++)
{
comboBox->add(lNames[i], ADD_BOTTOM);
}
comboBox->setCurrentByIndex(0);
comboBox->add("", ADD_BOTTOM);
}
}
void lggDicDownloadFloater::onClickDownload(void* data)
{
lggDicDownloadFloater* self = (lggDicDownloadFloater*)data;
if (self)
{
//std::string selection = self->childGetValue("Emerald_combo_dics").asString();
LLComboBox* comboBox = self->getChild<LLComboBox>("Emerald_combo_dics");
if (comboBox != NULL)
{
if (!comboBox->getSelectedItemLabel().empty())
{
std::string newDict(self->sNames[comboBox->getCurrentIndex()]);
LLHTTPClient::get(gSavedSettings.getString("SpellDownloadURL")+newDict+".aff", new EmeraldDicDownloader(self,newDict+".aff"));
LLHTTPClient::get(gSavedSettings.getString("SpellDownloadURL")+newDict+".dic", new EmeraldDicDownloader(NULL,newDict+".dic"));
LLButton* button = self->getChild<LLButton>("Emerald_dic_download");
if (button)
{
// TODO: move this to xml
button->setLabel(LLStringExplicit("Downloading... Please Wait"));
button->setEnabled(FALSE);
}
}
}
}
}
void LggDicDownload::show(BOOL showin, std::vector<std::string> shortNames, std::vector<std::string> longNames, void * data)
{
if (showin)
{
lggDicDownloadFloater* dic_floater = lggDicDownloadFloater::showInstance();
dic_floater->setData(shortNames,longNames,data);
}
}
EmeraldDicDownloader::EmeraldDicDownloader(lggDicDownloadFloater* spanel, std::string sname)
:
panel(spanel),
name(sname)
{
}
void EmeraldDicDownloader::completedRaw(U32 status, const std::string& reason, const LLChannelDescriptors& channels, const LLIOPipe::buffer_ptr_t& buffer)
{
if (status < 200 || status >= 300)
{
return;
}
LLBufferStream istr(channels, buffer.get());
std::string dicpath(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "dictionaries", name.c_str()));
llofstream ostr(dicpath, std::ios::binary);
while (istr.good() && ostr.good())
{
ostr << istr.rdbuf();
}
ostr.close();
if (panel)
{
if (panel->empanel)
{
panel->empanel->refresh();
}
else
{
llinfos << "completedRaw(): No empanel to refresh()!" << llendl;
}
panel->close();
}
}

View File

@@ -0,0 +1,37 @@
/* Copyright (c) 2009
*
* Greg Hendrickson (LordGregGreg Back). All rights reserved.
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* 3. Neither the name Modular Systems nor the names of its contributors
* may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY MODULAR SYSTEMS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MODULAR SYSTEMS OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
class LggDicDownload
{
public:
static void show( BOOL showw , std::vector<std::string> shortNames, std::vector<std::string> longNames, void * data);
};

View File

@@ -0,0 +1,974 @@
/* Copyright (C) 2009 LordGregGreg Back
This is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of
the License, or (at your option) any later version.
This is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the viewer; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#include "llviewerprecompiledheaders.h"
#include "lgghunspell_wrapper.h"
#include <boost/regex.hpp>
#include "llweb.h"
#include "llviewercontrol.h"
#include "llviewerwindow.h"
#include "llfile.h"
#include "llhttpclient.h"
#include "lggdicdownload.h"
lggHunSpell_Wrapper *glggHunSpell = 0;
Hunspell* lggHunSpell_Wrapper::myHunspell = 0;
// do not insert empty lines after this line until the size calculation
#define COUNTRY_CODES_RAW_START_LINE (__LINE__ + 2)
static char * countryCodesraw[] = {
(char*)"SL",(char*)"SecondLife",
(char*)"AD",(char*)"Andorra",
(char*)"AE",(char*)"United Arab Emirates",
(char*)"AF",(char*)"Afghanistan",
(char*)"AG",(char*)"Antigua & Barbuda",
(char*)"AI",(char*)"Anguilla",
(char*)"AL",(char*)"Albania",
(char*)"AM",(char*)"Armenia",
(char*)"AN",(char*)"Netherlands Antilles",
(char*)"AO",(char*)"Angola",
(char*)"AQ",(char*)"Antarctica",
(char*)"AR",(char*)"Argentina",
(char*)"AS",(char*)"American Samoa",
(char*)"AT",(char*)"Austria",
(char*)"AU",(char*)"Australia",
(char*)"AW",(char*)"Aruba",
(char*)"AZ",(char*)"Azerbaijan",
(char*)"BA",(char*)"Bosnia and Herzegovina",
(char*)"BB",(char*)"Barbados",
(char*)"BD",(char*)"Bangladesh",
(char*)"BE",(char*)"Belgium",
(char*)"BF",(char*)"Burkina Faso",
(char*)"BG",(char*)"Bulgaria",
(char*)"BH",(char*)"Bahrain",
(char*)"BI",(char*)"Burundi",
(char*)"BJ",(char*)"Benin",
(char*)"BM",(char*)"Bermuda",
(char*)"BN",(char*)"Brunei Darussalam",
(char*)"BO",(char*)"Bolivia",
(char*)"BR",(char*)"Brazil",
(char*)"BS",(char*)"Bahama",
(char*)"BT",(char*)"Bhutan",
(char*)"BU",(char*)"Burma",
(char*)"BV",(char*)"Bouvet Island",
(char*)"BW",(char*)"Botswana",
(char*)"BY",(char*)"Belarus",
(char*)"BZ",(char*)"Belize",
(char*)"CA",(char*)"Canada",
(char*)"CC",(char*)"Cocos (Keeling) Islands",
(char*)"CF",(char*)"Central African Republic",
(char*)"CG",(char*)"Congo",
(char*)"CH",(char*)"Switzerland",
(char*)"CI",(char*)"Côte D'ivoire (Ivory Coast)",
(char*)"CK",(char*)"Cook Iislands",
(char*)"CL",(char*)"Chile",
(char*)"CM",(char*)"Cameroon",
(char*)"CN",(char*)"China",
(char*)"CO",(char*)"Colombia",
(char*)"CR",(char*)"Costa Rica",
(char*)"CS",(char*)"Czechoslovakia",
(char*)"CU",(char*)"Cuba",
(char*)"CV",(char*)"Cape Verde",
(char*)"CX",(char*)"Christmas Island",
(char*)"CY",(char*)"Cyprus",
(char*)"CZ",(char*)"Czech Republic",
(char*)"DD",(char*)"German Democratic Republic",
(char*)"DE",(char*)"Germany",
(char*)"DJ",(char*)"Djibouti",
(char*)"DK",(char*)"Denmark",
(char*)"DM",(char*)"Dominica",
(char*)"DO",(char*)"Dominican Republic",
(char*)"DZ",(char*)"Algeria",
(char*)"EC",(char*)"Ecuador",
(char*)"EE",(char*)"Estonia",
(char*)"EG",(char*)"Egypt",
(char*)"EH",(char*)"Western Sahara",
(char*)"ER",(char*)"Eritrea",
(char*)"ES",(char*)"Spain",
(char*)"ET",(char*)"Ethiopia",
(char*)"FI",(char*)"Finland",
(char*)"FJ",(char*)"Fiji",
(char*)"FK",(char*)"Falkland Islands (Malvinas)",
(char*)"FM",(char*)"Micronesia",
(char*)"FO",(char*)"Faroe Islands",
(char*)"FR",(char*)"France",
(char*)"FX",(char*)"France, Metropolitan",
(char*)"GA",(char*)"Gabon",
(char*)"GB",(char*)"United Kingdom (Great Britain)",
(char*)"GD",(char*)"Grenada",
(char*)"GE",(char*)"Georgia",
(char*)"GF",(char*)"French Guiana",
(char*)"GH",(char*)"Ghana",
(char*)"GI",(char*)"Gibraltar",
(char*)"GL",(char*)"Greenland",
(char*)"GM",(char*)"Gambia",
(char*)"GN",(char*)"Guinea",
(char*)"GP",(char*)"Guadeloupe",
(char*)"GQ",(char*)"Equatorial Guinea",
(char*)"GR",(char*)"Greece",
(char*)"GS",(char*)"South Georgia and the South Sandwich Islands",
(char*)"GT",(char*)"Guatemala",
(char*)"GU",(char*)"Guam",
(char*)"GW",(char*)"Guinea-Bissau",
(char*)"GY",(char*)"Guyana",
(char*)"HK",(char*)"Hong Kong",
(char*)"HM",(char*)"Heard & McDonald Islands",
(char*)"HN",(char*)"Honduras",
(char*)"HR",(char*)"Croatia",
(char*)"HT",(char*)"Haiti",
(char*)"HU",(char*)"Hungary",
(char*)"ID",(char*)"Indonesia",
(char*)"IE",(char*)"Ireland",
(char*)"IL",(char*)"Israel",
(char*)"IN",(char*)"India",
(char*)"IO",(char*)"British Indian Ocean Territory",
(char*)"IQ",(char*)"Iraq",
(char*)"IR",(char*)"Islamic Republic of Iran",
(char*)"IS",(char*)"Iceland",
(char*)"IT",(char*)"Italy",
(char*)"JM",(char*)"Jamaica",
(char*)"JO",(char*)"Jordan",
(char*)"JP",(char*)"Japan",
(char*)"KE",(char*)"Kenya",
(char*)"KG",(char*)"Kyrgyzstan",
(char*)"KH",(char*)"Cambodia",
(char*)"KI",(char*)"Kiribati",
(char*)"KM",(char*)"Comoros",
(char*)"KN",(char*)"St. Kitts and Nevis",
(char*)"KP",(char*)"Korea, Democratic People's Republic of",
(char*)"KR",(char*)"Korea, Republic of",
(char*)"KW",(char*)"Kuwait",
(char*)"KY",(char*)"Cayman Islands",
(char*)"KZ",(char*)"Kazakhstan",
(char*)"LA",(char*)"Lao People's Democratic Republic",
(char*)"LB",(char*)"Lebanon",
(char*)"LC",(char*)"Saint Lucia",
(char*)"LI",(char*)"Liechtenstein",
(char*)"LK",(char*)"Sri Lanka",
(char*)"LR",(char*)"Liberia",
(char*)"LS",(char*)"Lesotho",
(char*)"LT",(char*)"Lithuania",
(char*)"LU",(char*)"Luxembourg",
(char*)"LV",(char*)"Latvia",
(char*)"LY",(char*)"Libyan Arab Jamahiriya",
(char*)"MA",(char*)"Morocco",
(char*)"MC",(char*)"Monaco",
(char*)"MD",(char*)"Moldova, Republic of",
(char*)"MG",(char*)"Madagascar",
(char*)"MH",(char*)"Marshall Islands",
(char*)"ML",(char*)"Mali",
(char*)"MN",(char*)"Mongolia",
(char*)"MM",(char*)"Myanmar",
(char*)"MO",(char*)"Macau",
(char*)"MP",(char*)"Northern Mariana Islands",
(char*)"MQ",(char*)"Martinique",
(char*)"MR",(char*)"Mauritania",
(char*)"MS",(char*)"Monserrat",
(char*)"MT",(char*)"Malta",
(char*)"MU",(char*)"Mauritius",
(char*)"MV",(char*)"Maldives",
(char*)"MW",(char*)"Malawi",
(char*)"MX",(char*)"Mexico",
(char*)"MY",(char*)"Malaysia",
(char*)"MZ",(char*)"Mozambique",
(char*)"NA",(char*)"Namibia",
(char*)"NC",(char*)"New Caledonia",
(char*)"NE",(char*)"Niger",
(char*)"NF",(char*)"Norfolk Island",
(char*)"NG",(char*)"Nigeria",
(char*)"NI",(char*)"Nicaragua",
(char*)"NL",(char*)"Netherlands",
(char*)"NO",(char*)"Norway",
(char*)"NP",(char*)"Nepal",
(char*)"NR",(char*)"Nauru",
(char*)"NT",(char*)"Neutral Zone",
(char*)"NU",(char*)"Niue",
(char*)"NZ",(char*)"New Zealand",
(char*)"OM",(char*)"Oman",
(char*)"PA",(char*)"Panama",
(char*)"PE",(char*)"Peru",
(char*)"PF",(char*)"French Polynesia",
(char*)"PG",(char*)"Papua New Guinea",
(char*)"PH",(char*)"Philippines",
(char*)"PK",(char*)"Pakistan",
(char*)"PL",(char*)"Poland",
(char*)"PM",(char*)"St. Pierre & Miquelon",
(char*)"PN",(char*)"Pitcairn",
(char*)"PR",(char*)"Puerto Rico",
(char*)"PT",(char*)"Portugal",
(char*)"PW",(char*)"Palau",
(char*)"PY",(char*)"Paraguay",
(char*)"QA",(char*)"Qatar",
(char*)"RE",(char*)"Réunion",
(char*)"RO",(char*)"Romania",
(char*)"RU",(char*)"Russian Federation",
(char*)"RW",(char*)"Rwanda",
(char*)"SA",(char*)"Saudi Arabia",
(char*)"SB",(char*)"Solomon Islands",
(char*)"SC",(char*)"Seychelles",
(char*)"SD",(char*)"Sudan",
(char*)"SE",(char*)"Sweden",
(char*)"SG",(char*)"Singapore",
(char*)"SH",(char*)"St. Helena",
(char*)"SI",(char*)"Slovenia",
(char*)"SJ",(char*)"Svalbard & Jan Mayen Islands",
(char*)"SK",(char*)"Slovakia",
(char*)"SL",(char*)"Sierra Leone",
(char*)"SM",(char*)"San Marino",
(char*)"SN",(char*)"Senegal",
(char*)"SO",(char*)"Somalia",
(char*)"SR",(char*)"Suriname",
(char*)"ST",(char*)"Sao Tome & Principe",
(char*)"SU",(char*)"Union of Soviet Socialist Republics",
(char*)"SV",(char*)"El Salvador",
(char*)"SY",(char*)"Syrian Arab Republic",
(char*)"SZ",(char*)"Swaziland",
(char*)"TC",(char*)"Turks & Caicos Islands",
(char*)"TD",(char*)"Chad",
(char*)"TF",(char*)"French Southern Territories",
(char*)"TG",(char*)"Togo",
(char*)"TH",(char*)"Thailand",
(char*)"TJ",(char*)"Tajikistan",
(char*)"TK",(char*)"Tokelau",
(char*)"TM",(char*)"Turkmenistan",
(char*)"TN",(char*)"Tunisia",
(char*)"TO",(char*)"Tonga",
(char*)"TP",(char*)"East Timor",
(char*)"TR",(char*)"Turkey",
(char*)"TT",(char*)"Trinidad & Tobago",
(char*)"TV",(char*)"Tuvalu",
(char*)"TW",(char*)"Taiwan, Province of China",
(char*)"TZ",(char*)"Tanzania, United Republic of",
(char*)"UA",(char*)"Ukraine",
(char*)"UG",(char*)"Uganda",
(char*)"UM",(char*)"United States Minor Outlying Islands",
(char*)"US",(char*)"United States of America",
(char*)"UY",(char*)"Uruguay",
(char*)"UZ",(char*)"Uzbekistan",
(char*)"VA",(char*)"Vatican City State",
(char*)"VC",(char*)"St. Vincent & the Grenadines",
(char*)"VE",(char*)"Venezuela",
(char*)"VG",(char*)"British Virgin Islands",
(char*)"VI",(char*)"United States Virgin Islands",
(char*)"VN",(char*)"Viet Nam",
(char*)"VU",(char*)"Vanuatu",
(char*)"WF",(char*)"Wallis & Futuna Islands",
(char*)"WS",(char*)"Samoa",
(char*)"YD",(char*)"Democratic Yemen",
(char*)"YE",(char*)"Yemen",
(char*)"YT",(char*)"Mayotte",
(char*)"YU",(char*)"Yugoslavia",
(char*)"ZA",(char*)"South Africa",
(char*)"ZM",(char*)"Zambia",
(char*)"ZR",(char*)"Zaire",
(char*)"ZW",(char*)"Zimbabwe",
(char*)"ZZ",(char*)"Unknown or unspecified country"
};
//#define COUNTRY_CODES_RAW_SIZE ((__LINE__ - 1 - COUNTRY_CODES_RAW_START_LINE) * 2)
#define COUNTRY_CODES_RAW_SIZE 492
#define LANGUAGE_CODES_RAW_START_LINE (__LINE__ + 2)
static char * languageCodesraw[]={
(char*)"aa",(char*)"Afar",
(char*)"ab",(char*)"Abkhazian",
(char*)"ae",(char*)"Avestan",
(char*)"af",(char*)"Afrikaans",
(char*)"ak",(char*)"Akan",
(char*)"am",(char*)"Amharic",
(char*)"an",(char*)"Aragonese",
(char*)"ar",(char*)"Arabic",
(char*)"as",(char*)"Assamese",
(char*)"av",(char*)"Avaric",
(char*)"ay",(char*)"Aymara",
(char*)"az",(char*)"Azerbaijani",
(char*)"ba",(char*)"Bashkir",
(char*)"be",(char*)"Belarusian",
(char*)"bg",(char*)"Bulgarian",
(char*)"bh",(char*)"Bihari",
(char*)"bi",(char*)"Bislama",
(char*)"bm",(char*)"Bambara",
(char*)"bn",(char*)"Bengali",
(char*)"bo",(char*)"Tibetan",
(char*)"br",(char*)"Breton",
(char*)"bs",(char*)"Bosnian",
(char*)"ca",(char*)"Catalan",
(char*)"ce",(char*)"Chechen",
(char*)"ch",(char*)"Chamorro",
(char*)"co",(char*)"Corsican",
(char*)"cr",(char*)"Cree",
(char*)"cs",(char*)"Czech",
(char*)"cu",(char*)"ChurchSlavic",
(char*)"cv",(char*)"Chuvash",
(char*)"cy",(char*)"Welsh",
(char*)"da",(char*)"Danish",
(char*)"de",(char*)"German",
(char*)"dv",(char*)"Divehi",
(char*)"dz",(char*)"Dzongkha",
(char*)"ee",(char*)"Ewe",
(char*)"el",(char*)"ModernGreek",
(char*)"en",(char*)"English",
(char*)"eo",(char*)"Esperanto",
(char*)"es",(char*)"Spanish",
(char*)"et",(char*)"Estonian",
(char*)"eu",(char*)"Basque",
(char*)"fa",(char*)"Persian",
(char*)"ff",(char*)"Fulah",
(char*)"fi",(char*)"Finnish",
(char*)"fj",(char*)"Fijian",
(char*)"fo",(char*)"Faroese",
(char*)"fr",(char*)"French",
(char*)"fy",(char*)"WesternFrisian",
(char*)"ga",(char*)"Irish",
(char*)"gd",(char*)"Gaelic",
(char*)"gl",(char*)"Galician",
(char*)"gn",(char*)"Guaraní",
(char*)"gu",(char*)"Gujarati",
(char*)"gv",(char*)"Manx",
(char*)"ha",(char*)"Hausa",
(char*)"he",(char*)"ModernHebrew",
(char*)"hi",(char*)"Hindi",
(char*)"ho",(char*)"HiriMotu",
(char*)"hr",(char*)"Croatian",
(char*)"ht",(char*)"Haitian",
(char*)"hu",(char*)"Hungarian",
(char*)"hy",(char*)"Armenian",
(char*)"hz",(char*)"Herero",
(char*)"ia",(char*)"Interlingua",
(char*)"id",(char*)"Indonesian",
(char*)"ie",(char*)"Interlingue",
(char*)"ig",(char*)"Igbo",
(char*)"ii",(char*)"SichuanYi",
(char*)"ik",(char*)"Inupiaq",
(char*)"io",(char*)"Ido",
(char*)"is",(char*)"Icelandic",
(char*)"it",(char*)"Italian",
(char*)"iu",(char*)"Inuktitut",
(char*)"ja",(char*)"Japanese",
(char*)"jv",(char*)"Javanese",
(char*)"ka",(char*)"Georgian",
(char*)"kg",(char*)"Kongo",
(char*)"ki",(char*)"Kikuyu",
(char*)"kj",(char*)"Kwanyama",
(char*)"kk",(char*)"Kazakh",
(char*)"kl",(char*)"Kalaallisut",
(char*)"km",(char*)"CentralKhmer",
(char*)"kn",(char*)"Kannada",
(char*)"ko",(char*)"Korean",
(char*)"kr",(char*)"Kanuri",
(char*)"ks",(char*)"Kashmiri",
(char*)"ku",(char*)"Kurdish",
(char*)"kv",(char*)"Komi",
(char*)"kw",(char*)"Cornish",
(char*)"ky",(char*)"Kirghiz",
(char*)"la",(char*)"Latin",
(char*)"lb",(char*)"Luxembourgish",
(char*)"lg",(char*)"Ganda",
(char*)"li",(char*)"Limburgish",
(char*)"ln",(char*)"Lingala",
(char*)"lo",(char*)"Lao",
(char*)"lt",(char*)"Lithuanian",
(char*)"lu",(char*)"Luba-Katanga",
(char*)"lv",(char*)"Latvian",
(char*)"mg",(char*)"Malagasy",
(char*)"mh",(char*)"Marshallese",
(char*)"mi",(char*)"Maori",
(char*)"mk",(char*)"Macedonian",
(char*)"ml",(char*)"Malayalam",
(char*)"mn",(char*)"Mongolian",
(char*)"mr",(char*)"Marathi",
(char*)"ms",(char*)"Malay",
(char*)"mt",(char*)"Maltese",
(char*)"my",(char*)"Burmese",
(char*)"na",(char*)"Nauru",
(char*)"nb",(char*)"NorwegianBokmal",
(char*)"nd",(char*)"NorthNdebele",
(char*)"ne",(char*)"Nepali",
(char*)"ng",(char*)"Ndonga",
(char*)"nl",(char*)"Dutch/Flemish",
(char*)"nn",(char*)"NorwegianNynorsk",
(char*)"no",(char*)"Norwegian",
(char*)"nr",(char*)"SouthNdebele",
(char*)"nv",(char*)"Navajo/Navaho",
(char*)"ny",(char*)"Nyanja",
(char*)"oc",(char*)"Occitan",
(char*)"oj",(char*)"Ojibwa",
(char*)"om",(char*)"Oromo",
(char*)"or",(char*)"Oriya",
(char*)"os",(char*)"Ossetian",
(char*)"pa",(char*)"Panjabi",
(char*)"pi",(char*)"Pali",
(char*)"pl",(char*)"Polish",
(char*)"ps",(char*)"Pashto/Pushto",
(char*)"pt",(char*)"Portuguese",
(char*)"qu",(char*)"Quechua",
(char*)"rm",(char*)"Romansh",
(char*)"rn",(char*)"Rundi",
(char*)"ro",(char*)"Romanian",
(char*)"ru",(char*)"Russian",
(char*)"rw",(char*)"Kinyarwanda",
(char*)"sa",(char*)"Sanskrit",
(char*)"sc",(char*)"Sardinian",
(char*)"sd",(char*)"Sindhi",
(char*)"se",(char*)"NorthernSami",
(char*)"sg",(char*)"Sango",
(char*)"si",(char*)"Sinhala",
(char*)"sk",(char*)"Slovak",
(char*)"sl",(char*)"Slovene",
(char*)"sm",(char*)"Samoan",
(char*)"sn",(char*)"Shona",
(char*)"so",(char*)"Somali",
(char*)"sq",(char*)"Albanian",
(char*)"sr",(char*)"Serbian",
(char*)"ss",(char*)"Swati",
(char*)"st",(char*)"SouthernSotho",
(char*)"su",(char*)"Sundanese",
(char*)"sv",(char*)"Swedish",
(char*)"sw",(char*)"Swahili",
(char*)"ta",(char*)"Tamil",
(char*)"te",(char*)"Telugu",
(char*)"tg",(char*)"Tajik",
(char*)"th",(char*)"Thai",
(char*)"ti",(char*)"Tigrinya",
(char*)"tk",(char*)"Turkmen",
(char*)"tl",(char*)"Tagalog",
(char*)"tn",(char*)"Tswana",
(char*)"to",(char*)"Tonga",
(char*)"tr",(char*)"Turkish",
(char*)"ts",(char*)"Tsonga",
(char*)"tt",(char*)"Tatar",
(char*)"tw",(char*)"Twi",
(char*)"ty",(char*)"Tahitian",
(char*)"ug",(char*)"Uighur",
(char*)"uk",(char*)"Ukrainian",
(char*)"ur",(char*)"Urdu",
(char*)"uz",(char*)"Uzbek",
(char*)"ve",(char*)"Venda",
(char*)"vi",(char*)"Vietnamese",
(char*)"vo",(char*)"Volapük",
(char*)"wa",(char*)"Walloon",
(char*)"wo",(char*)"Wolof",
(char*)"xh",(char*)"Xhosa",
(char*)"yi",(char*)"Yiddish",
(char*)"yo",(char*)"Yoruba",
(char*)"za",(char*)"Zhuang",
(char*)"zh",(char*)"Chinese",
(char*)"zu",(char*)"Zulu"
};
//#define LANGUAGE_CODES_RAW_SIZE ((__LINE__ - 1 - LANGUAGE_CODES_RAW_START_LINE) * 2)
#define LANGUAGE_CODES_RAW_SIZE 368
lggHunSpell_Wrapper::lggHunSpell_Wrapper()
{
//languageCodes(begin(languageCodesraw), end(languageCodesraw));
// mSpellCheckHighlight = rebind_llcontrol<BOOL>("SpellDisplay", &gSavedSettings, true);
}
lggHunSpell_Wrapper::~lggHunSpell_Wrapper()
{
}
BOOL lggHunSpell_Wrapper::getSpellCheckHighlight()
{
static const LLCachedControl<bool> mSpellCheckHighlight("SpellDisplay", false);
return mSpellCheckHighlight;
}
std::string lggHunSpell_Wrapper::getCorrectPath(std::string file)
{
//finds out if it is in user dir, if not, takes it from app dir
std::string dicpath1(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "dictionaries", file).c_str());
if (!gDirUtilp->fileExists(dicpath1))
{
dicpath1=gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "dictionaries", file).c_str();
}
return dicpath1;
}
void lggHunSpell_Wrapper::setNewDictionary(std::string newDict)
{
llinfos << "Setting new base dictionary long name is-> " << newDict.c_str() << llendl;
currentBaseDic = newDict;
//expecting a full name comming in
newDict = fullName2DictName(newDict);
if (myHunspell)
{
delete myHunspell;
}
std::string dicaffpath = getCorrectPath(newDict+".aff");
std::string dicdicpath = getCorrectPath(newDict+".dic");
llinfos << "Setting new base dictionary -> " << dicaffpath.c_str() << llendl;
myHunspell = new Hunspell(dicaffpath.c_str(), dicdicpath.c_str());
llinfos << "Adding custom dictionary " << llendl;
createCustomDic();
addDictionary("custom");
std::vector<std::string> toInstall = getInstalledDicts();
for (int i = 0; i < (int)toInstall.size(); i++)
{
addDictionary(toInstall[i]);
}
}
void lggHunSpell_Wrapper::createCustomDic()
{
std::string filename(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "dictionaries", "custom.dic"));
if (!gDirUtilp->fileExists(filename))
{
llofstream export_file;
export_file.open(filename);
std::string sizePart("1\nLordGregGreg\n");
export_file.write(sizePart.c_str(),sizePart.length());
export_file.close();
}
}
void lggHunSpell_Wrapper::addWordToCustomDictionary(std::string wordToAdd)
{
if (!myHunspell)
{
return;
}
myHunspell->add(wordToAdd.c_str());
std::string filename(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "dictionaries", "custom.dic"));
std::vector<std::string> lines;
if (gDirUtilp->fileExists(filename))
{
//get words already there..
llifstream importer(filename);
std::string line;
if (getline( importer, line ))//ignored the size
{
while ( getline( importer, line ) ) lines.push_back(line);
}
importer.close();
}
llofstream export_file;
export_file.open(filename);
std::string sizePart(llformat("%i", (int)(lines.size()+1)) + "\n");
export_file.write(sizePart.c_str(), sizePart.length());
for (int i = 0; i < (int)lines.size() ;i++)
{
export_file.write(std::string(lines[i]+"\n").c_str(),lines[i].length()+1);
}
//LLStringUtil::toLower(wordToAdd);
wordToAdd = wordToAdd+std::string("\n");
export_file.write(wordToAdd.c_str(), wordToAdd.length());
//export_file << std::hex << 10 ;
export_file.close();
}
BOOL lggHunSpell_Wrapper::isSpelledRight(std::string wordToCheck)
{
if (!myHunspell || wordToCheck.length() < 3)
{
return TRUE;
}
return myHunspell->spell(wordToCheck.c_str());
}
std::vector<std::string> lggHunSpell_Wrapper::getSuggestionList(std::string badWord)
{
std::vector<std::string> toReturn;
if (!myHunspell)
{
return toReturn;
}
char** suggestionList;
int numberOfSuggestions = myHunspell->suggest(&suggestionList, badWord.c_str());
if (numberOfSuggestions <= 0)
{
return toReturn;
}
for (int i = 0; i < numberOfSuggestions; i++)
{
std::string tempSugg(suggestionList[i]);
toReturn.push_back(tempSugg);
}
myHunspell->free_list(&suggestionList,numberOfSuggestions);
return toReturn;
}
void lggHunSpell_Wrapper::debugTest(std::string testWord)
{
llinfos << "Testing to see if " << testWord.c_str() << " is spelled correct" << llendl;
if (isSpelledRight(testWord))
{
llinfos << testWord.c_str() << " is spelled correctly" << llendl;
}
else
{
llinfos << testWord.c_str() << " is not spelled correctly, getting suggestions" << llendl;
std::vector<std::string> suggList;
suggList.clear();
suggList = getSuggestionList(testWord);
llinfos << "Got suggestions.. " << llendl;
for (int i = 0; i < (int)suggList.size(); i++)
{
llinfos << "Suggestion for " << testWord.c_str() << ":" << suggList[i].c_str() << llendl;
}
}
}
void lggHunSpell_Wrapper::initSettings()
{
glggHunSpell = new lggHunSpell_Wrapper();
glggHunSpell->processSettings();
}
void lggHunSpell_Wrapper::processSettings()
{
//expects everything to already be in saved settings
//this will also reload and read the installed dicts
setNewDictionary(gSavedSettings.getString("SpellBase"));
}
void lggHunSpell_Wrapper::addDictionary(std::string additionalDictionary)
{
if (!myHunspell || additionalDictionary.empty())
{
return;
}
//expecting a full name here
std::string dicpath = getCorrectPath(fullName2DictName(additionalDictionary)+".dic");
if (gDirUtilp->fileExists(dicpath))
{
llinfos << "Adding additional dictionary -> " << dicpath.c_str() << llendl;
myHunspell->add_dic(dicpath.c_str());
}
}
std::string lggHunSpell_Wrapper::dictName2FullName(std::string dictName)
{
if (dictName.empty())
{
return dictName;
}
std::string countryCode("");
std::string languageCode("");
//remove extension
dictName = dictName.substr(0,dictName.find("."));
//break it up by - or _
S32 breakPoint = dictName.find("-");
if (breakPoint == std::string::npos)
{
breakPoint = dictName.find("_");
}
if (breakPoint == std::string::npos)
{
//no country code given
languageCode = dictName;
}
else
{
languageCode = dictName.substr(0,breakPoint);
countryCode = dictName.substr(breakPoint+1);
}
//get long language code
for (int i = 0; i<LANGUAGE_CODES_RAW_SIZE; i++)
{
if (0 == LLStringUtil::compareInsensitive(languageCode, std::string(languageCodesraw[i])))
{
languageCode = languageCodesraw[i+1];
break;
}
}
//get long country code
if (!countryCode.empty())
{
for (int i =0; i<COUNTRY_CODES_RAW_SIZE; i++)
{
//llinfos << i << llendl;
if (0 == LLStringUtil::compareInsensitive(countryCode, std::string(countryCodesraw[i])))
{
countryCode = countryCodesraw[i+1];
break;
}
}
countryCode = " (" + countryCode + ")";
}
return std::string(languageCode+countryCode);
}
std::string lggHunSpell_Wrapper::fullName2DictName(std::string fullName)
{
std::string countryCode("");
std::string languageCode("");
S32 breakPoint = fullName.find(" (");
if (breakPoint == std::string::npos)
{
languageCode = fullName;
}
else
{
languageCode = fullName.substr(0, breakPoint);
countryCode = fullName.substr(breakPoint+2, fullName.length()-3-breakPoint);
}
//get long language code
for (int i = 1; i<LANGUAGE_CODES_RAW_SIZE; i+=2)
{
//llinfos << i << llendl;
if (0 == LLStringUtil::compareInsensitive(languageCode, std::string(languageCodesraw[i])))
{
languageCode = std::string(languageCodesraw[i-1]);
break;
}
}
//get long country code
std::string toReturn = languageCode;
if (!countryCode.empty())
{
for (int i = 1; i<COUNTRY_CODES_RAW_SIZE; i+=2)
{
//llinfos << i << " comparing " <<countryCode<<" and "<<std::string(countryCodesraw[i]).c_str()<< llendl;
if (0 == LLStringUtil::compareInsensitive(countryCode, std::string(countryCodesraw[i])))
{
countryCode = std::string(countryCodesraw[i-1]);
break;
}
}
toReturn += "_" + countryCode;
}
LLStringUtil::toLower(toReturn);
return toReturn;
}
std::vector <std::string> lggHunSpell_Wrapper::getDicts()
{
std::vector<std::string> names;
std::string path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "dictionaries", ""));
bool found = true;
while (found)
{
std::string name;
found = gDirUtilp->getNextFileInDir(path_name, "*.aff", name, false);
if (found)
{
names.push_back(dictName2FullName(name));
}
}
path_name = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "dictionaries", "");
found = true;
while (found)
{
std::string name;
found = gDirUtilp->getNextFileInDir(path_name, "*.aff", name, false);
if (found)
{
names.push_back(dictName2FullName(name));
}
}
return names;
}
std::vector <std::string> lggHunSpell_Wrapper::getExtraDicts()
{
std::vector<std::string> names;
std::string path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "dictionaries", ""));
bool found = true;
while (found)
{
std::string name;
found = gDirUtilp->getNextFileInDir(path_name, "*.dic", name, false);
if (found)
{
names.push_back(dictName2FullName(name));
}
}
path_name = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "dictionaries", "");
found = true;
while (found)
{
std::string name;
found = gDirUtilp->getNextFileInDir(path_name, "*.dic", name, false);
if (found)
{
names.push_back(dictName2FullName(name));
}
}
return names;
}
std::vector<std::string> lggHunSpell_Wrapper::getInstalledDicts()
{
std::vector<std::string> toReturn;
//expecting short names to be stored...
std::vector<std::string> shortNames = CSV2VEC(gSavedSettings.getString("SpellInstalled"));
for (int i =0; i < (int)shortNames.size(); i++)
{
toReturn.push_back(dictName2FullName(shortNames[i]));
}
return toReturn;
}
std::vector<std::string> lggHunSpell_Wrapper::getAvailDicts()
{
std::vector<std::string> toReturn;
std::vector<std::string> dics = getExtraDicts();
std::vector<std::string> installedDics = getInstalledDicts();
for (int i = 0; i < (int)dics.size(); i++)
{
bool found = false;
for (int j = 0; j < (int)installedDics.size(); j++)
{
if (0 == LLStringUtil::compareInsensitive(dics[i], installedDics[j]))
{
found = true;//this dic is already installed
}
}
if (0 == LLStringUtil::compareInsensitive(dics[i], currentBaseDic))
{
found = true;
}
if (0 == LLStringUtil::compareInsensitive(dics[i], "custom"))
{
found = true;
}
if (!found)
{
toReturn.push_back(dics[i]);
}
}
return toReturn;
}
std::vector<std::string> lggHunSpell_Wrapper::CSV2VEC(std::string csv)
{
std::vector<std::string> toReturn;
boost::regex re(",");
boost::sregex_token_iterator i(csv.begin(), csv.end(), re, -1);
boost::sregex_token_iterator j;
while (i != j)
{
toReturn.push_back(*i++);
}
return toReturn;
}
std::string lggHunSpell_Wrapper::VEC2CSV(std::vector<std::string> vec)
{
std::string toReturn("");
if (vec.size() < 1)
{
return toReturn;
}
for (int i = 0;i < (int)vec.size() ;i++)
{
toReturn += vec[i] + ",";
}
return toReturn.erase(toReturn.length()-1);
}
void lggHunSpell_Wrapper::addButton(std::string selection)
{
if (selection.empty())
{
return;
}
addDictionary(selection);
std::vector<std::string> alreadyInstalled = CSV2VEC(gSavedSettings.getString("SpellInstalled"));
alreadyInstalled.push_back(fullName2DictName(selection));
gSavedSettings.setString("SpellInstalled", VEC2CSV(alreadyInstalled));
}
void lggHunSpell_Wrapper::removeButton(std::string selection)
{
if (selection.empty())
{
return;
}
std::vector<std::string> newInstalledDics;
std::vector<std::string> currentlyInstalled = getInstalledDicts();
for (int i = 0; i < (int)currentlyInstalled.size(); i++)
{
if (0 != LLStringUtil::compareInsensitive(selection, currentlyInstalled[i]))
{
newInstalledDics.push_back(fullName2DictName(currentlyInstalled[i]));
}
}
gSavedSettings.setString("SpellInstalled", VEC2CSV(newInstalledDics));
processSettings();
}
void lggHunSpell_Wrapper::newDictSelection(std::string selection)
{
currentBaseDic = selection;
gSavedSettings.setString("SpellBase", selection);
//better way to do this would be to check and see if there is a installed conflict
//and then only remove that one.. messy
gSavedSettings.setString("SpellInstalled", "en_sl");
processSettings();
}
void lggHunSpell_Wrapper::getMoreButton(void* data)
{
std::vector<std::string> shortNames;
std::vector<std::string> longNames;
LLSD response = LLHTTPClient::blockingGet(gSavedSettings.getString("SpellDownloadURL")+"dic_list.xml");
if (response.has("body"))
{
const LLSD &dict_list = response["body"];
if (dict_list.has("isComplete"))
{
LLSD dics = dict_list["data"];
for (int i = 0; i < dics.size(); i++)
{
std::string dicFullName = dictName2FullName(dics[i].asString());
longNames.push_back(dicFullName);
shortNames.push_back(fullName2DictName(dicFullName));
}
LggDicDownload::show(true,shortNames,longNames, data);
}
}
}
void lggHunSpell_Wrapper::editCustomButton()
{
std::string dicdicpath(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "dictionaries", std::string("custom.dic")).c_str());
if (!gDirUtilp->fileExists(dicdicpath))
{
createCustomDic();
//glggHunSpell->addWordToCustomDictionary("temp");
}
gViewerWindow->getWindow()->ShellEx(dicdicpath);
}
void lggHunSpell_Wrapper::setSpellCheckHighlight(BOOL highlight)
{
gSavedSettings.setBOOL("SpellDisplay", highlight);
}

View File

@@ -0,0 +1,75 @@
/* Copyright (C) 2009 LordGregGreg Back
This is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of
the License, or (at your option) any later version.
This is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the viewer; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#ifndef ASPELL_WRAPPER
#define ASPELL_WRAPPER 1
#if LL_WINDOWS
#include "hunspell/hunspelldll.h"
#else
#include "hunspell/hunspell.hxx"
#endif
class lggHunSpell_Wrapper
{
public:
static Hunspell* myHunspell;
static void initSettings();
void processSettings();
std::vector<std::string> getAvailDicts();
std::vector<std::string> getInstalledDicts();
std::vector<std::string> getDicts();
std::vector<std::string> getExtraDicts();
void addDictionary(std::string additionalDictionary);
void addWordToCustomDictionary(std::string wordToAdd);
void addButton(std::string selection);
void removeButton(std::string selection);
void editCustomButton();
void newDictSelection(std::string selection);
void getMoreButton(void * data);
static std::string dictName2FullName(std::string dictName);
static std::string fullName2DictName(std::string fullName);
void setNewDictionary(std::string newDict);
BOOL isSpelledRight(std::string wordToCheck);
std::vector<std::string> getSuggestionList(std::string badWord);
S32 findNextError(std::string haystack, int startAt);
std::vector<std::string> CSV2VEC(std::string csv);
std::string VEC2CSV(std::vector<std::string> vec);
void setSpellCheckHighlight(BOOL highlight);
BOOL getSpellCheckHighlight();
private:
void createCustomDic();
std::string getCorrectPath(std::string file);
lggHunSpell_Wrapper();
~lggHunSpell_Wrapper();
void debugTest(std::string testWord);//prints out debug about testing the word
std::string currentBaseDic;
//std::vector<std::string> languageCodes;
//std::vector<std::string> countryCodes;
// BOOL* mSpellCheckHighlight;
};
extern lggHunSpell_Wrapper* glggHunSpell; // the singleton hunspell wrapper
#endif

View File

@@ -7306,7 +7306,8 @@ void LLAgent::createStandardWearables(BOOL female)
TRUE, //WT_UNDERPANTS
FALSE, //WT_SKIRT
FALSE, //WT_ALPHA
FALSE //WT_TATTOO
FALSE, //WT_TATTOO
FALSE, //WT_PHYSICS
};
for( S32 i=0; i < WT_COUNT; i++ )
@@ -7918,6 +7919,7 @@ void LLAgent::setWearableOutfit(
wearables_to_remove[WT_SKIRT] = remove && gRlvWearableLocks.canRemove(WT_SKIRT);
wearables_to_remove[WT_ALPHA] = remove && gRlvWearableLocks.canRemove(WT_ALPHA);
wearables_to_remove[WT_TATTOO] = remove && gRlvWearableLocks.canRemove(WT_TATTOO);
wearables_to_remove[WT_PHYSICS] = remove && gRlvWearableLocks.canRemove(WT_PHYSICS);
// [/RLVa:KB]
S32 count = wearables.count();
@@ -8199,6 +8201,7 @@ void LLAgent::userRemoveAllClothesStep2( BOOL proceed, void* userdata )
gAgent.removeWearable( WT_SKIRT );
gAgent.removeWearable( WT_ALPHA );
gAgent.removeWearable( WT_TATTOO );
gAgent.removeWearable( WT_PHYSICS );
}
}

View File

@@ -429,6 +429,7 @@ static void settings_to_globals()
LLVolumeImplFlexible::sUpdateFactor = gSavedSettings.getF32("RenderFlexTimeFactor");
LLVOTree::sTreeFactor = gSavedSettings.getF32("RenderTreeLODFactor");
LLVOAvatar::sLODFactor = gSavedSettings.getF32("RenderAvatarLODFactor");
LLVOAvatar::sPhysicsLODFactor = gSavedSettings.getF32("RenderAvatarPhysicsLODFactor");
LLVOAvatar::sMaxVisible = gSavedSettings.getS32("RenderAvatarMaxVisible");
LLVOAvatar::sVisibleInFirstPerson = gSavedSettings.getBOOL("FirstPersonAvatarVisible");
// clamp auto-open time to some minimum usable value
@@ -450,8 +451,6 @@ static void settings_to_globals()
gShowObjectUpdates = gSavedSettings.getBOOL("ShowObjectUpdates");
LLWorldMapView::sMapScale = gSavedSettings.getF32("MapScale");
LLHoverView::sShowHoverTips = gSavedSettings.getBOOL("ShowHoverTips");
LLCubeMap::sUseCubeMaps = LLFeatureManager::getInstance()->isFeatureAvailable("RenderCubeMap");
}
static void settings_modify()
@@ -654,9 +653,8 @@ bool LLAppViewer::init()
&gColors,
LLUIImageList::getInstance(),
ui_audio_callback,
&LLUI::sGLScaleFactor,
std::string(),
LLViewerFetchedTexture::BOOST_ICON);
&LLUI::sGLScaleFactor
);
LLWeb::initClass(); // do this after LLUI
LLTextEditor::setURLCallbacks(&LLWeb::loadURL,
@@ -740,6 +738,9 @@ bool LLAppViewer::init()
gGLActive = TRUE;
initWindow();
// initWindow also initializes the Feature List, so now we can initialize this global.
LLCubeMap::sUseCubeMaps = LLFeatureManager::getInstance()->isFeatureAvailable("RenderCubeMap");
// call all self-registered classes
LLInitClassList::instance().fireCallbacks();

View File

@@ -144,7 +144,7 @@ LLAssetType::EType LLAssetConverter::convert(std::string src_filename, std::stri
return LLAssetType::AT_NONE;
}
}
else if(exten == "eyes" || exten == "gloves" || exten == "hair" || exten == "jacket" || exten == "pants" || exten == "shape" || exten == "shirt" || exten == "shoes" || exten == "skin" || exten == "skirt" || exten == "socks" || exten == "underpants" || exten == "undershirt" || exten == "bodypart" || exten == "clothing")
else if(exten == "eyes" || exten == "gloves" || exten == "hair" || exten == "jacket" || exten == "pants" || exten == "shape" || exten == "shirt" || exten == "shoes" || exten == "skin" || exten == "skirt" || exten == "socks" || exten == "underpants" || exten == "undershirt" || exten == "bodypart" || exten == "clothing" || exten == "physics")
{
asset_type = LLAssetType::AT_CLOTHING;
if(!copyFile(src_filename, filename))

View File

@@ -279,7 +279,7 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content)
mPostData["name"].asString(),
mPostData["description"].asString(),
LLSaleInfo::DEFAULT,
LLInventoryItem::II_FLAGS_NONE,
LLInventoryItemFlags::II_FLAGS_NONE,
creation_date_now);
gInventory.updateItem(item);
gInventory.notifyObservers();

View File

@@ -144,7 +144,7 @@ LLFloaterScriptQueue* LLFloaterScriptQueue::findInstance(const LLUUID& id)
// worked on.
// NOT static, virtual!
void LLFloaterScriptQueue::inventoryChanged(LLViewerObject* viewer_object,
InventoryObjectList* inv,
LLInventoryObject::object_list_t* inv,
S32,
void* q_id)
{
@@ -353,7 +353,7 @@ LLFloaterCompileQueue::~LLFloaterCompileQueue()
}
void LLFloaterCompileQueue::handleInventory(LLViewerObject *viewer_object,
InventoryObjectList* inv)
LLInventoryObject::object_list_t* inv)
{
// find all of the lsl, leaving off duplicates. We'll remove
// all matching asset uuids on compilation success.
@@ -361,8 +361,8 @@ void LLFloaterCompileQueue::handleInventory(LLViewerObject *viewer_object,
typedef std::multimap<LLUUID, LLPointer<LLInventoryItem> > uuid_item_map;
uuid_item_map asset_item_map;
InventoryObjectList::const_iterator it = inv->begin();
InventoryObjectList::const_iterator end = inv->end();
LLInventoryObject::object_list_t::const_iterator it = inv->begin();
LLInventoryObject::object_list_t::const_iterator end = inv->end();
for ( ; it != end; ++it)
{
if((*it)->getType() == LLAssetType::AT_LSL_TEXT)
@@ -678,14 +678,14 @@ LLFloaterResetQueue::~LLFloaterResetQueue()
}
void LLFloaterResetQueue::handleInventory(LLViewerObject* viewer_obj,
InventoryObjectList* inv)
LLInventoryObject::object_list_t* inv)
{
// find all of the lsl, leaving off duplicates. We'll remove
// all matching asset uuids on compilation success.
LLDynamicArray<const char*> names;
InventoryObjectList::const_iterator it = inv->begin();
InventoryObjectList::const_iterator end = inv->end();
LLInventoryObject::object_list_t::const_iterator it = inv->begin();
LLInventoryObject::object_list_t::const_iterator end = inv->end();
for ( ; it != end; ++it)
{
if((*it)->getType() == LLAssetType::AT_LSL_TEXT)
@@ -740,14 +740,14 @@ LLFloaterRunQueue::~LLFloaterRunQueue()
}
void LLFloaterRunQueue::handleInventory(LLViewerObject* viewer_obj,
InventoryObjectList* inv)
LLInventoryObject::object_list_t* inv)
{
// find all of the lsl, leaving off duplicates. We'll remove
// all matching asset uuids on compilation success.
LLDynamicArray<const char*> names;
InventoryObjectList::const_iterator it = inv->begin();
InventoryObjectList::const_iterator end = inv->end();
LLInventoryObject::object_list_t::const_iterator it = inv->begin();
LLInventoryObject::object_list_t::const_iterator end = inv->end();
for ( ; it != end; ++it)
{
if((*it)->getType() == LLAssetType::AT_LSL_TEXT)
@@ -804,14 +804,14 @@ LLFloaterNotRunQueue::~LLFloaterNotRunQueue()
}
void LLFloaterNotRunQueue::handleInventory(LLViewerObject* viewer_obj,
InventoryObjectList* inv)
LLInventoryObject::object_list_t* inv)
{
// find all of the lsl, leaving off duplicates. We'll remove
// all matching asset uuids on compilation success.
LLDynamicArray<const char*> names;
InventoryObjectList::const_iterator it = inv->begin();
InventoryObjectList::const_iterator end = inv->end();
LLInventoryObject::object_list_t::const_iterator it = inv->begin();
LLInventoryObject::object_list_t::const_iterator end = inv->end();
for ( ; it != end; ++it)
{
if((*it)->getType() == LLAssetType::AT_LSL_TEXT)

View File

@@ -76,13 +76,13 @@ protected:
// This is the callback method for the viewer object currently
// being worked on.
/*virtual*/ void inventoryChanged(LLViewerObject* obj,
InventoryObjectList* inv,
LLInventoryObject::object_list_t* inv,
S32 serial_num,
void* queue);
// This is called by inventoryChanged
virtual void handleInventory(LLViewerObject* viewer_obj,
InventoryObjectList* inv) = 0;
LLInventoryObject::object_list_t* inv) = 0;
static void onCloseBtn(void* user_data);
@@ -149,7 +149,7 @@ protected:
// This is called by inventoryChanged
virtual void handleInventory(LLViewerObject* viewer_obj,
InventoryObjectList* inv);
LLInventoryObject::object_list_t* inv);
// This is the callback for when each script arrives
static void scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
@@ -201,7 +201,7 @@ protected:
// This is called by inventoryChanged
virtual void handleInventory(LLViewerObject* viewer_obj,
InventoryObjectList* inv);
LLInventoryObject::object_list_t* inv);
protected:
};
@@ -225,7 +225,7 @@ protected:
// This is called by inventoryChanged
virtual void handleInventory(LLViewerObject* viewer_obj,
InventoryObjectList* inv);
LLInventoryObject::object_list_t* inv);
protected:
};
@@ -249,7 +249,7 @@ protected:
// This is called by inventoryChanged
virtual void handleInventory(LLViewerObject* viewer_obj,
InventoryObjectList* inv);
LLInventoryObject::object_list_t* inv);
protected:
};

View File

@@ -90,7 +90,7 @@ LLDebugView::LLDebugView(const std::string& name, const LLRect &rect)
mMemoryView->setVisible(FALSE); // start invisible
addChild(mMemoryView);
r.set(150, rect.getHeight() - 50, 820, 100);
r.set(150, rect.getHeight() - 50, 870, 100);
gTextureView = new LLTextureView("gTextureView", r);
gTextureView->setRect(r);
gTextureView->setFollowsBottom();

View File

@@ -129,6 +129,7 @@ public:
PASS_FULLBRIGHT_SHINY,
PASS_SHINY,
PASS_BUMP,
PASS_POST_BUMP,
PASS_GLOW,
PASS_ALPHA,
PASS_ALPHA_MASK,

View File

@@ -637,9 +637,9 @@ BOOL LLDrawPoolBump::bindBumpMap(LLDrawInfo& params, S32 channel)
}
//static
void LLDrawPoolBump::beginBump()
void LLDrawPoolBump::beginBump(U32 pass)
{
if (!gPipeline.hasRenderBatches(LLRenderPass::PASS_BUMP))
if (!gPipeline.hasRenderBatches(pass))
{
return;
}
@@ -682,9 +682,9 @@ void LLDrawPoolBump::beginBump()
}
//static
void LLDrawPoolBump::renderBump()
void LLDrawPoolBump::renderBump(U32 pass)
{
if (!gPipeline.hasRenderBatches(LLRenderPass::PASS_BUMP))
if (!gPipeline.hasRenderBatches(pass))
{
return;
}
@@ -697,13 +697,13 @@ void LLDrawPoolBump::renderBump()
/// Get rid of z-fighting with non-bump pass.
LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL);
glPolygonOffset(-1.0f, -1.0f);
renderBump(LLRenderPass::PASS_BUMP, sVertexMask);
renderBump(pass, sVertexMask);
}
//static
void LLDrawPoolBump::endBump()
void LLDrawPoolBump::endBump(U32 pass)
{
if (!gPipeline.hasRenderBatches(LLRenderPass::PASS_BUMP))
if (!gPipeline.hasRenderBatches(pass))
{
return;
}
@@ -720,6 +720,12 @@ void LLDrawPoolBump::endBump()
gGL.setSceneBlendType(LLRender::BT_ALPHA);
}
S32 LLDrawPoolBump::getNumDeferredPasses()
{
static const LLCachedControl<bool> render_object_bump("RenderObjectBump",false);
return render_object_bump ? 1 : 0;
}
void LLDrawPoolBump::beginDeferredPass(S32 pass)
{
if (!gPipeline.hasRenderBatches(LLRenderPass::PASS_BUMP))
@@ -774,17 +780,41 @@ void LLDrawPoolBump::renderDeferred(S32 pass)
void LLDrawPoolBump::beginPostDeferredPass(S32 pass)
{
beginFullbrightShiny();
switch (pass)
{
case 0:
beginFullbrightShiny();
break;
case 1:
beginBump(LLRenderPass::PASS_POST_BUMP);
break;
}
}
void LLDrawPoolBump::endPostDeferredPass(S32 pass)
{
endFullbrightShiny();
switch (pass)
{
case 0:
endFullbrightShiny();
break;
case 1:
endBump(LLRenderPass::PASS_POST_BUMP);
break;
}
}
void LLDrawPoolBump::renderPostDeferred(S32 pass)
{
renderFullbrightShiny();
switch (pass)
{
case 0:
renderFullbrightShiny();
break;
case 1:
renderBump(LLRenderPass::PASS_POST_BUMP);
break;
}
}
////////////////////////////////////////////////////////////////

View File

@@ -75,16 +75,16 @@ public:
void renderFullbrightShiny();
void endFullbrightShiny();
void beginBump();
void renderBump();
void endBump();
void beginBump(U32 pass = LLRenderPass::PASS_BUMP);
void renderBump(U32 pass = LLRenderPass::PASS_BUMP);
void endBump(U32 pass = LLRenderPass::PASS_BUMP);
virtual S32 getNumDeferredPasses() { return 1; }
virtual S32 getNumDeferredPasses();
/*virtual*/ void beginDeferredPass(S32 pass);
/*virtual*/ void endDeferredPass(S32 pass);
/*virtual*/ void renderDeferred(S32 pass);
virtual S32 getNumPostDeferredPasses() { return 1; }
virtual S32 getNumPostDeferredPasses() { return 2; }
/*virtual*/ void beginPostDeferredPass(S32 pass);
/*virtual*/ void endPostDeferredPass(S32 pass);
/*virtual*/ void renderPostDeferred(S32 pass);

View File

@@ -554,7 +554,8 @@ void LLDrawPoolWater::shade()
}
LLVOWater* water = (LLVOWater*) face->getViewerObject();
gGL.getTexUnit(diffTex)->bind(face->getTexture());
if(diffTex > -1 && face->getTexture()->hasGLTexture())
gGL.getTexUnit(diffTex)->bind(face->getTexture());
sNeedsReflectionUpdate = TRUE;
@@ -572,6 +573,8 @@ void LLDrawPoolWater::shade()
LLGLSquashToFarClip far_clip(glh_get_current_projection());
face->renderIndexed();
}
if(diffTex > -1 && face->getTexture()->hasGLTexture())
gGL.getTexUnit(diffTex)->unbind(LLTexUnit::TT_TEXTURE);
}
}

View File

@@ -35,6 +35,7 @@
#include "llviewervisualparam.h"
class LLPhysicsMotion;
class LLVOAvatar;
//-----------------------------------------------------------------------------
@@ -78,6 +79,7 @@ protected:
class LLDriverParam : public LLViewerVisualParam
{
friend class LLPhysicsMotion; // physics motion needs to access driven params directly.
public:
LLDriverParam(LLVOAvatar *avatarp);
~LLDriverParam();

View File

@@ -595,23 +595,26 @@ void LLFace::printDebugInfo() const
llinfos << "II: " << mIndicesIndex << " Count:" << mIndicesCount << llendl;
llinfos << llendl;
poolp->printDebugInfo();
S32 pool_references = 0;
for (std::vector<LLFace*>::iterator iter = poolp->mReferences.begin();
iter != poolp->mReferences.end(); iter++)
if (poolp)
{
LLFace *facep = *iter;
if (facep == this)
poolp->printDebugInfo();
S32 pool_references = 0;
for (std::vector<LLFace*>::iterator iter = poolp->mReferences.begin();
iter != poolp->mReferences.end(); iter++)
{
llinfos << "Pool reference: " << pool_references << llendl;
pool_references++;
LLFace *facep = *iter;
if (facep == this)
{
llinfos << "Pool reference: " << pool_references << llendl;
pool_references++;
}
}
}
if (pool_references != 1)
{
llinfos << "Incorrect number of pool references!" << llendl;
if (pool_references != 1)
{
llinfos << "Incorrect number of pool references!" << llendl;
}
}
#if 0
@@ -1004,6 +1007,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
BOOL rebuild_binormal = rebuild_pos && mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_BINORMAL);
const LLTextureEntry *tep = mVObjp->getTE(f);
if (!tep) rebuild_color = FALSE; // can't get color when tep is NULL
U8 bump_code = tep ? tep->getBumpmap() : 0;
if (rebuild_pos)
@@ -1101,9 +1105,9 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
}
}
LLColor4U color = tep->getColor();
LLColor4U color = (tep ? LLColor4U(tep->getColor()) : LLColor4U::white);
if (rebuild_color)
if (rebuild_color) // FALSE if tep == NULL
{
if (tep)
{

View File

@@ -693,6 +693,16 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename)
L"Asset Blacklists (*.blacklist)\0*.blacklist\0" \
L"\0";
break;
case FFSAVE_PHYSICS:
if(filename.empty())
{
wcsncpy( mFilesW,L"untitled.phy", FILENAME_BUFFER_SIZE);
}
mOFN.lpstrDefExt = L"phy";
mOFN.lpstrFilter =
L"Landmarks (*.phy)\0*.phy\0" \
L"\0";
break;
// </edit>
default:
return FALSE;

Some files were not shown because too many files have changed in this diff Show More