summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2009-08-05 16:10:15 -0400
committerNat Goodspeed <nat@lindenlab.com>2009-08-05 16:10:15 -0400
commit07129bf928f79246849e66b396fab44a7a228216 (patch)
treee4e19b342540450ff84dad75f90d5acb5b3d6269 /indra/newview
parent03ebc43132331b9a8dcb3c418ec9c319a6beddda (diff)
parentdc62495da6e5c153c0df57fdbce6b0f40c0208f2 (diff)
Merge recent changes
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/CMakeLists.txt95
-rw-r--r--indra/newview/English.lproj/InfoPlist.strings4
-rw-r--r--indra/newview/Info-SecondLife.plist2
-rw-r--r--indra/newview/app_settings/foldertypes.xml58
-rw-r--r--indra/newview/app_settings/settings.xml338
-rw-r--r--indra/newview/app_settings/settings_per_account.xml23
-rw-r--r--indra/newview/llagent.cpp99
-rw-r--r--indra/newview/llagent.h8
-rw-r--r--indra/newview/llagentwearables.cpp420
-rw-r--r--indra/newview/llagentwearables.h36
-rw-r--r--indra/newview/llappviewer.cpp112
-rw-r--r--indra/newview/llappviewer.h12
-rw-r--r--indra/newview/llassetuploadresponders.cpp6
-rw-r--r--indra/newview/llassetuploadresponders.h1
-rw-r--r--indra/newview/llavataractions.cpp279
-rw-r--r--indra/newview/llavataractions.h88
-rw-r--r--indra/newview/llavatariconctrl.cpp94
-rw-r--r--indra/newview/llavatariconctrl.h17
-rw-r--r--indra/newview/llavatarlist.cpp146
-rw-r--r--indra/newview/llavatarlist.h21
-rw-r--r--indra/newview/llavatarlistitem.h4
-rw-r--r--indra/newview/llavatarpropertiesprocessor.cpp3
-rw-r--r--indra/newview/llbottomtray.cpp338
-rw-r--r--indra/newview/llbottomtray.h54
-rw-r--r--indra/newview/llbreadcrumbview.cpp37
-rw-r--r--indra/newview/llbreadcrumbview.h36
-rw-r--r--indra/newview/llcallingcard.cpp2
-rw-r--r--indra/newview/llchannelmanager.cpp177
-rw-r--r--indra/newview/llchannelmanager.h123
-rw-r--r--indra/newview/llchatbar.cpp691
-rw-r--r--indra/newview/llchatbar.h120
-rw-r--r--indra/newview/llchatitemscontainerctrl.cpp585
-rw-r--r--indra/newview/llchatitemscontainerctrl.h154
-rw-r--r--indra/newview/llchatmsgbox.cpp389
-rw-r--r--indra/newview/llchatmsgbox.h160
-rw-r--r--indra/newview/llchiclet.cpp941
-rw-r--r--indra/newview/llchiclet.h604
-rw-r--r--indra/newview/llclassifiedstatsresponder.h1
-rw-r--r--indra/newview/llcolorswatch.cpp6
-rw-r--r--indra/newview/llcolorswatch.h18
-rw-r--r--indra/newview/lldrawable.cpp8
-rw-r--r--indra/newview/lldrawable.h10
-rw-r--r--indra/newview/lldrawpool.cpp19
-rw-r--r--indra/newview/lldrawpool.h22
-rw-r--r--indra/newview/lldrawpoolalpha.cpp8
-rw-r--r--indra/newview/lldrawpoolavatar.cpp4
-rw-r--r--indra/newview/lldrawpoolavatar.h2
-rw-r--r--indra/newview/lldrawpoolbump.cpp63
-rw-r--r--indra/newview/lldrawpoolbump.h16
-rw-r--r--indra/newview/lldrawpoolsky.cpp2
-rw-r--r--indra/newview/lldrawpoolterrain.cpp73
-rw-r--r--indra/newview/lldrawpoolterrain.h16
-rw-r--r--indra/newview/lldrawpooltree.cpp10
-rw-r--r--indra/newview/lldrawpooltree.h8
-rw-r--r--indra/newview/lldrawpoolwater.cpp37
-rw-r--r--indra/newview/lldrawpoolwater.h10
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp20
-rw-r--r--indra/newview/lldrawpoolwlsky.h8
-rw-r--r--indra/newview/lldynamictexture.cpp110
-rw-r--r--indra/newview/lldynamictexture.h45
-rw-r--r--indra/newview/lleventnotifier.cpp9
-rw-r--r--indra/newview/llface.cpp37
-rw-r--r--indra/newview/llface.h18
-rw-r--r--indra/newview/llfasttimerview.cpp2
-rw-r--r--indra/newview/llfavoritesbar.cpp249
-rw-r--r--indra/newview/llfavoritesbar.h2
-rw-r--r--indra/newview/llfeaturemanager.cpp3
-rw-r--r--indra/newview/llfirstuse.cpp4
-rw-r--r--indra/newview/llfirstuse.h2
-rw-r--r--indra/newview/llflexibleobject.cpp3
-rw-r--r--indra/newview/llfloaterabout.cpp12
-rw-r--r--indra/newview/llfloaterabout.h7
-rw-r--r--indra/newview/llfloateranimpreview.cpp17
-rw-r--r--indra/newview/llfloateranimpreview.h10
-rw-r--r--indra/newview/llfloaterauction.cpp8
-rw-r--r--indra/newview/llfloaterauction.h12
-rw-r--r--indra/newview/llfloateravatarpicker.cpp17
-rw-r--r--indra/newview/llfloateravatarpicker.h1
-rw-r--r--indra/newview/llfloaterbeacons.cpp33
-rw-r--r--indra/newview/llfloaterbeacons.h8
-rw-r--r--indra/newview/llfloaterbuildoptions.cpp2
-rw-r--r--indra/newview/llfloaterbuildoptions.h6
-rw-r--r--indra/newview/llfloaterbulkpermission.cpp44
-rw-r--r--indra/newview/llfloaterbulkpermission.h18
-rw-r--r--indra/newview/llfloaterbump.cpp4
-rw-r--r--indra/newview/llfloaterbump.h7
-rw-r--r--indra/newview/llfloaterbuy.cpp4
-rw-r--r--indra/newview/llfloaterbuycontents.cpp4
-rw-r--r--indra/newview/llfloatercamera.cpp25
-rw-r--r--indra/newview/llfloatercamera.h9
-rw-r--r--indra/newview/llfloaterchat.cpp53
-rw-r--r--indra/newview/llfloaterchat.h9
-rw-r--r--indra/newview/llfloaterchatterbox.cpp43
-rw-r--r--indra/newview/llfloatercolorpicker.cpp7
-rw-r--r--indra/newview/llfloatercolorpicker.h2
-rw-r--r--indra/newview/llfloaterfonttest.cpp16
-rw-r--r--indra/newview/llfloaterfonttest.h8
-rw-r--r--indra/newview/llfloaterfriends.cpp16
-rw-r--r--indra/newview/llfloatergesture.cpp6
-rw-r--r--indra/newview/llfloatergodtools.cpp302
-rw-r--r--indra/newview/llfloatergodtools.h55
-rw-r--r--indra/newview/llfloaterhardwaresettings.cpp13
-rw-r--r--indra/newview/llfloaterhud.cpp59
-rw-r--r--indra/newview/llfloaterhud.h10
-rw-r--r--indra/newview/llfloaterimagepreview.cpp31
-rw-r--r--indra/newview/llfloaterimagepreview.h22
-rw-r--r--indra/newview/llfloaterinspect.cpp100
-rw-r--r--indra/newview/llfloaterinspect.h24
-rw-r--r--indra/newview/llfloaterinventory.cpp1953
-rw-r--r--indra/newview/llfloaterinventory.h369
-rw-r--r--indra/newview/llfloaterjoystick.cpp2
-rw-r--r--indra/newview/llfloaterjoystick.h10
-rw-r--r--indra/newview/llfloaterlagmeter.cpp6
-rw-r--r--indra/newview/llfloaterlagmeter.h11
-rw-r--r--indra/newview/llfloaterland.cpp76
-rw-r--r--indra/newview/llfloaterland.h11
-rw-r--r--indra/newview/llfloaterlandholdings.cpp5
-rw-r--r--indra/newview/llfloatermap.cpp2
-rw-r--r--indra/newview/llfloatermemleak.cpp162
-rw-r--r--indra/newview/llfloatermemleak.h31
-rw-r--r--indra/newview/llfloaternotificationsconsole.cpp2
-rw-r--r--indra/newview/llfloaternotificationsconsole.h7
-rw-r--r--indra/newview/llfloateropenobject.cpp83
-rw-r--r--indra/newview/llfloateropenobject.h20
-rw-r--r--indra/newview/llfloaterperms.cpp41
-rw-r--r--indra/newview/llfloaterperms.h13
-rw-r--r--indra/newview/llfloaterpostcard.cpp8
-rw-r--r--indra/newview/llfloaterpostcard.h8
-rw-r--r--indra/newview/llfloaterpreference.cpp224
-rw-r--r--indra/newview/llfloaterpreference.h8
-rw-r--r--indra/newview/llfloaterproperties.cpp27
-rw-r--r--indra/newview/llfloaterregioninfo.cpp55
-rw-r--r--indra/newview/llfloaterregioninfo.h14
-rw-r--r--indra/newview/llfloaterreporter.cpp12
-rw-r--r--indra/newview/llfloaterreporter.h2
-rw-r--r--indra/newview/llfloaterscriptdebug.cpp4
-rw-r--r--indra/newview/llfloatersettingsdebug.cpp4
-rw-r--r--indra/newview/llfloatersettingsdebug.h15
-rw-r--r--indra/newview/llfloatersnapshot.cpp18
-rw-r--r--indra/newview/llfloatertelehub.cpp6
-rw-r--r--indra/newview/llfloatertelehub.h1
-rw-r--r--indra/newview/llfloatertestlistview.cpp77
-rw-r--r--indra/newview/llfloatertestlistview.h64
-rw-r--r--indra/newview/llfloatertools.cpp3
-rw-r--r--indra/newview/llfloatertopobjects.cpp145
-rw-r--r--indra/newview/llfloatertopobjects.h31
-rw-r--r--indra/newview/llfloateruipreview.cpp59
-rw-r--r--indra/newview/llfloateruipreview.h2
-rw-r--r--indra/newview/llfloaterurldisplay.cpp5
-rw-r--r--indra/newview/llfloaterurldisplay.h8
-rw-r--r--indra/newview/llfloatervoicedevicesettings.cpp4
-rw-r--r--indra/newview/llfloatervoicedevicesettings.h10
-rw-r--r--indra/newview/llfloaterworldmap.cpp240
-rw-r--r--indra/newview/llfloaterworldmap.h36
-rw-r--r--indra/newview/llfolderview.cpp3164
-rw-r--r--indra/newview/llfolderview.h689
-rw-r--r--indra/newview/llfoldervieweventlistener.h100
-rw-r--r--indra/newview/llfolderviewitem.cpp2475
-rw-r--r--indra/newview/llfolderviewitem.h528
-rw-r--r--indra/newview/llgesturemgr.cpp5
-rw-r--r--indra/newview/llgrouplist.cpp28
-rw-r--r--indra/newview/llgrouplist.h3
-rw-r--r--indra/newview/llhomelocationresponder.cpp4
-rw-r--r--indra/newview/llhomelocationresponder.h2
-rw-r--r--indra/newview/llhudeffect.cpp1
-rw-r--r--indra/newview/llhudeffectbeam.cpp1
-rw-r--r--indra/newview/llhudeffecttrail.cpp3
-rw-r--r--indra/newview/llhudicon.cpp10
-rw-r--r--indra/newview/llhudicon.h4
-rw-r--r--indra/newview/llhudmanager.cpp5
-rw-r--r--indra/newview/llhudrender.cpp1
-rw-r--r--indra/newview/llhudtext.cpp10
-rw-r--r--indra/newview/llimpanel.cpp620
-rw-r--r--indra/newview/llimpanel.h60
-rw-r--r--indra/newview/llimview.cpp532
-rw-r--r--indra/newview/llimview.h45
-rw-r--r--indra/newview/llinventorybridge.cpp372
-rw-r--r--indra/newview/llinventorybridge.h30
-rw-r--r--indra/newview/llinventoryfilter.cpp631
-rw-r--r--indra/newview/llinventoryfilter.h150
-rw-r--r--indra/newview/llinventorymodel.cpp114
-rw-r--r--indra/newview/llinventorymodel.h38
-rw-r--r--indra/newview/lljoystickbutton.cpp16
-rw-r--r--indra/newview/lljoystickbutton.h6
-rw-r--r--indra/newview/lllandmarkactions.cpp141
-rw-r--r--indra/newview/lllandmarkactions.h68
-rw-r--r--indra/newview/lllistbrowser.cpp37
-rw-r--r--indra/newview/lllistbrowser.h36
-rw-r--r--indra/newview/lllistview.cpp73
-rw-r--r--indra/newview/lllistview.h66
-rw-r--r--indra/newview/lllocaltextureobject.cpp149
-rw-r--r--indra/newview/lllocaltextureobject.h85
-rw-r--r--indra/newview/lllocationhistory.cpp11
-rw-r--r--indra/newview/lllocationhistory.h6
-rw-r--r--indra/newview/lllocationinputctrl.cpp89
-rw-r--r--indra/newview/lllocationinputctrl.h11
-rw-r--r--indra/newview/lllogininstance.cpp2
-rw-r--r--indra/newview/llmanip.cpp8
-rw-r--r--indra/newview/llmaniprotate.cpp10
-rw-r--r--indra/newview/llmanipscale.cpp8
-rw-r--r--indra/newview/llmaniptranslate.cpp18
-rw-r--r--indra/newview/llmemoryview.cpp2
-rw-r--r--indra/newview/llmenucommands.cpp18
-rw-r--r--indra/newview/llmoveview.cpp40
-rw-r--r--indra/newview/llmoveview.h13
-rw-r--r--indra/newview/llnamebox.cpp2
-rw-r--r--indra/newview/llnameeditor.cpp2
-rw-r--r--indra/newview/llnameeditor.h5
-rw-r--r--indra/newview/llnamelistctrl.cpp4
-rw-r--r--indra/newview/llnamelistctrl.h12
-rw-r--r--indra/newview/llnavigationbar.cpp45
-rw-r--r--indra/newview/llnavigationbar.h12
-rw-r--r--indra/newview/llnearbychat.cpp523
-rw-r--r--indra/newview/llnearbychat.h100
-rw-r--r--indra/newview/llnearbychatbar.cpp549
-rw-r--r--indra/newview/llnearbychatbar.h104
-rw-r--r--indra/newview/llnearbychathandler.cpp124
-rw-r--r--indra/newview/llnearbychathandler.h60
-rw-r--r--indra/newview/llnetmap.cpp19
-rw-r--r--indra/newview/llnetmap.h4
-rw-r--r--indra/newview/llnotificationalerthandler.cpp116
-rw-r--r--indra/newview/llnotificationgrouphandler.cpp117
-rw-r--r--indra/newview/llnotificationhandler.h180
-rw-r--r--indra/newview/llnotificationmanager.cpp127
-rw-r--r--indra/newview/llnotificationmanager.h79
-rw-r--r--indra/newview/lloutputmonitorctrl.cpp170
-rw-r--r--indra/newview/lloutputmonitorctrl.h32
-rw-r--r--indra/newview/lloverlaybar.cpp10
-rw-r--r--indra/newview/lloverlaybar.h1
-rw-r--r--indra/newview/llpanelavatar.cpp172
-rw-r--r--indra/newview/llpanelavatar.h63
-rw-r--r--indra/newview/llpanelclassified.cpp24
-rw-r--r--indra/newview/llpanelcontents.cpp2
-rw-r--r--indra/newview/llpanelface.cpp2
-rw-r--r--indra/newview/llpanelgroupgeneral.cpp11
-rw-r--r--indra/newview/llpanelgroupgeneral.h1
-rw-r--r--indra/newview/llpanelgrouplandmoney.cpp9
-rw-r--r--indra/newview/llpanelgroupnotices.cpp6
-rw-r--r--indra/newview/llpanelgrouproles.cpp6
-rw-r--r--indra/newview/llpanelimcontrolpanel.cpp87
-rw-r--r--indra/newview/llpanelimcontrolpanel.h55
-rw-r--r--indra/newview/llpanelland.cpp3
-rw-r--r--indra/newview/llpanellandmarks.cpp47
-rw-r--r--indra/newview/llpanellandmarks.h4
-rw-r--r--indra/newview/llpanellogin.cpp4
-rw-r--r--indra/newview/llpanellogin.h1
-rw-r--r--indra/newview/llpanelpeople.cpp300
-rw-r--r--indra/newview/llpanelpeople.h27
-rw-r--r--indra/newview/llpanelpermissions.cpp90
-rw-r--r--indra/newview/llpanelpick.cpp288
-rw-r--r--indra/newview/llpanelpick.h56
-rw-r--r--indra/newview/llpanelpicks.cpp464
-rw-r--r--indra/newview/llpanelpicks.h77
-rw-r--r--indra/newview/llpanelplace.cpp15
-rw-r--r--indra/newview/llpanelplaceinfo.cpp172
-rw-r--r--indra/newview/llpanelplaceinfo.h54
-rw-r--r--indra/newview/llpanelplaces.cpp295
-rw-r--r--indra/newview/llpanelplaces.h60
-rw-r--r--indra/newview/llpanelplacestab.cpp33
-rw-r--r--indra/newview/llpanelplacestab.h8
-rw-r--r--indra/newview/llpanelprofile.cpp146
-rw-r--r--indra/newview/llpanelprofile.h72
-rw-r--r--indra/newview/llpanelprofileview.cpp45
-rw-r--r--indra/newview/llpanelprofileview.h19
-rw-r--r--indra/newview/llpanelteleporthistory.cpp45
-rw-r--r--indra/newview/llpanelteleporthistory.h3
-rw-r--r--indra/newview/llpreview.cpp2
-rw-r--r--indra/newview/llpreviewanim.cpp2
-rw-r--r--indra/newview/llpreviewgesture.cpp4
-rw-r--r--indra/newview/llpreviewscript.cpp2
-rw-r--r--indra/newview/llpreviewsound.cpp2
-rw-r--r--indra/newview/llpreviewtexture.cpp24
-rw-r--r--indra/newview/llpreviewtexture.h6
-rw-r--r--indra/newview/llprogressview.cpp9
-rw-r--r--indra/newview/llremoteparcelrequest.cpp16
-rw-r--r--indra/newview/llrootview.h10
-rw-r--r--indra/newview/llscreenchannel.cpp403
-rw-r--r--indra/newview/llscreenchannel.h147
-rw-r--r--indra/newview/llselectmgr.cpp37
-rw-r--r--indra/newview/llselectmgr.h4
-rw-r--r--indra/newview/llsidetray.cpp214
-rw-r--r--indra/newview/llsidetray.h39
-rw-r--r--indra/newview/llspatialpartition.cpp14
-rw-r--r--indra/newview/llspatialpartition.h6
-rw-r--r--indra/newview/llsprite.cpp2
-rw-r--r--indra/newview/llsprite.h4
-rw-r--r--indra/newview/llstartup.cpp113
-rw-r--r--indra/newview/llstartup.h4
-rw-r--r--indra/newview/llstatusbar.cpp4
-rw-r--r--indra/newview/llstylemap.cpp6
-rw-r--r--indra/newview/llsurface.cpp28
-rw-r--r--indra/newview/llsurface.h10
-rw-r--r--indra/newview/llteleporthistory.cpp8
-rw-r--r--indra/newview/llteleporthistory.h3
-rw-r--r--indra/newview/lltexlayer.cpp168
-rw-r--r--indra/newview/lltexlayer.h17
-rw-r--r--indra/newview/lltexlayerparams.cpp40
-rw-r--r--indra/newview/lltexlayerparams.h2
-rw-r--r--indra/newview/lltexturectrl.cpp55
-rw-r--r--indra/newview/lltexturectrl.h6
-rw-r--r--indra/newview/lltexturefetch.cpp14
-rw-r--r--indra/newview/lltexturefetch.h2
-rw-r--r--indra/newview/lltextureview.cpp92
-rw-r--r--indra/newview/lltextureview.h10
-rw-r--r--indra/newview/lltoast.cpp239
-rw-r--r--indra/newview/lltoast.h115
-rw-r--r--indra/newview/lltoastalertpanel.cpp474
-rw-r--r--indra/newview/lltoastalertpanel.h124
-rw-r--r--indra/newview/lltoastgroupnotifypanel.cpp206
-rw-r--r--indra/newview/lltoastgroupnotifypanel.h83
-rw-r--r--indra/newview/lltoastnotifypanel.cpp435
-rw-r--r--indra/newview/lltoastnotifypanel.h86
-rw-r--r--indra/newview/lltoastpanel.cpp42
-rw-r--r--indra/newview/lltoastpanel.h53
-rw-r--r--indra/newview/lltoolbar.cpp43
-rw-r--r--indra/newview/lltooldraganddrop.cpp37
-rw-r--r--indra/newview/lltoolfocus.cpp6
-rw-r--r--indra/newview/lltoolgrab.cpp17
-rw-r--r--indra/newview/lltoolgun.cpp6
-rw-r--r--indra/newview/lltoolmgr.cpp2
-rw-r--r--indra/newview/lltoolmorph.cpp26
-rw-r--r--indra/newview/lltoolmorph.h17
-rw-r--r--indra/newview/lltoolpie.cpp28
-rw-r--r--indra/newview/lltoolpie.h2
-rw-r--r--indra/newview/lltracker.cpp4
-rw-r--r--indra/newview/lluploaddialog.cpp2
-rw-r--r--indra/newview/llurldispatcher.cpp57
-rw-r--r--indra/newview/llviewerassetstorage.h1
-rw-r--r--indra/newview/llviewercontrol.cpp7
-rw-r--r--indra/newview/llviewercontrol.h1
-rw-r--r--indra/newview/llviewercontrollistener.cpp3
-rw-r--r--indra/newview/llviewerdisplay.cpp30
-rw-r--r--indra/newview/llviewerfloaterreg.cpp118
-rw-r--r--indra/newview/llviewergesture.cpp7
-rw-r--r--indra/newview/llviewerinventory.cpp18
-rw-r--r--indra/newview/llviewerinventory.h1
-rw-r--r--indra/newview/llviewerjointmesh.cpp21
-rw-r--r--indra/newview/llviewerjointmesh.h8
-rw-r--r--indra/newview/llviewerkeyboard.cpp27
-rw-r--r--indra/newview/llviewermedia.cpp294
-rw-r--r--indra/newview/llviewermedia.h8
-rw-r--r--indra/newview/llviewermenu.cpp322
-rw-r--r--indra/newview/llviewermenu.h3
-rw-r--r--indra/newview/llviewermenufile.cpp12
-rw-r--r--indra/newview/llviewermessage.cpp61
-rw-r--r--indra/newview/llviewerobject.cpp54
-rw-r--r--indra/newview/llviewerobject.h11
-rw-r--r--indra/newview/llviewerobjectlist.cpp16
-rw-r--r--indra/newview/llviewerparcelmedia.cpp4
-rw-r--r--indra/newview/llviewerparcelmediaautoplay.cpp6
-rw-r--r--indra/newview/llviewerparcelmgr.cpp29
-rw-r--r--indra/newview/llviewerparcelmgr.h10
-rw-r--r--indra/newview/llviewerparceloverlay.cpp31
-rw-r--r--indra/newview/llviewerparceloverlay.h6
-rw-r--r--indra/newview/llviewerpartsim.cpp2
-rw-r--r--indra/newview/llviewerpartsim.h8
-rw-r--r--indra/newview/llviewerpartsource.cpp16
-rw-r--r--indra/newview/llviewerpartsource.h8
-rw-r--r--indra/newview/llviewerstats.cpp14
-rw-r--r--indra/newview/llviewertexteditor.cpp224
-rw-r--r--indra/newview/llviewertexteditor.h1
-rw-r--r--indra/newview/llviewertexture.cpp2383
-rw-r--r--indra/newview/llviewertexture.h672
-rw-r--r--indra/newview/llviewertexturelist.cpp1518
-rw-r--r--indra/newview/llviewertexturelist.h243
-rw-r--r--indra/newview/llviewerwindow.cpp367
-rw-r--r--indra/newview/llviewerwindow.h6
-rw-r--r--indra/newview/llvlcomposition.cpp22
-rw-r--r--indra/newview/llvlcomposition.h6
-rw-r--r--indra/newview/llvoavatar.cpp72
-rw-r--r--indra/newview/llvoavatar.h26
-rw-r--r--indra/newview/llvoavatarself.cpp238
-rw-r--r--indra/newview/llvoavatarself.h36
-rw-r--r--indra/newview/llvoclouds.cpp6
-rw-r--r--indra/newview/llvoclouds.h2
-rw-r--r--indra/newview/llvograss.cpp4
-rw-r--r--indra/newview/llvograss.h2
-rw-r--r--indra/newview/llvoground.h2
-rw-r--r--indra/newview/llvoiceclient.cpp45
-rw-r--r--indra/newview/llvoicevisualizer.cpp7
-rw-r--r--indra/newview/llvoicevisualizer.h2
-rw-r--r--indra/newview/llvosky.cpp36
-rw-r--r--indra/newview/llvosky.h16
-rw-r--r--indra/newview/llvotextbubble.cpp10
-rw-r--r--indra/newview/llvotree.cpp6
-rw-r--r--indra/newview/llvotree.h6
-rw-r--r--indra/newview/llvotreenew.h4
-rw-r--r--indra/newview/llvovolume.cpp48
-rw-r--r--indra/newview/llvovolume.h6
-rw-r--r--indra/newview/llvowater.cpp2
-rw-r--r--indra/newview/llvowater.h2
-rw-r--r--indra/newview/llwatchdog.h3
-rw-r--r--indra/newview/llwaterparamset.cpp2
-rw-r--r--indra/newview/llwearable.cpp91
-rw-r--r--indra/newview/llwearable.h13
-rw-r--r--indra/newview/llweb.cpp3
-rw-r--r--indra/newview/llworld.cpp10
-rw-r--r--indra/newview/llworld.h6
-rw-r--r--indra/newview/llworldmap.cpp20
-rw-r--r--indra/newview/llworldmap.h8
-rw-r--r--indra/newview/llworldmapview.cpp43
-rw-r--r--indra/newview/llworldmapview.h4
-rw-r--r--indra/newview/macview_Prefix.h1
-rw-r--r--indra/newview/pipeline.cpp33
-rw-r--r--indra/newview/pipeline.h18
-rw-r--r--indra/newview/res/viewerRes.rc8
-rw-r--r--indra/newview/skins/default/colors.xml3822
-rw-r--r--indra/newview/skins/default/textures/bottomtray/DownArrow.pngbin0 -> 139 bytes
-rw-r--r--indra/newview/skins/default/textures/bottomtray/Unread_IM.pngbin0 -> 297 bytes
-rw-r--r--indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl1.pngbin0 -> 557 bytes
-rw-r--r--indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl2.pngbin0 -> 663 bytes
-rw-r--r--indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl3.pngbin0 -> 607 bytes
-rw-r--r--indra/newview/skins/default/textures/bottomtray/VoicePTT_Off.pngbin0 -> 461 bytes
-rw-r--r--indra/newview/skins/default/textures/bottomtray/VoicePTT_On.pngbin0 -> 451 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Off.pngbin0 -> 175 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Over.pngbin0 -> 170 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Press.pngbin0 -> 175 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Off.pngbin0 -> 169 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Over.pngbin0 -> 162 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Press.pngbin0 -> 169 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/Accordion_Off.pngbin0 -> 239 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/Accordion_Over.pngbin0 -> 206 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/Accordion_Press.pngbin0 -> 200 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/Container.pngbin0 -> 673 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/TabTop_Left_Off.pngbin0 -> 339 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/TabTop_Left_Over.pngbin0 -> 337 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/TabTop_Left_Selected.pngbin0 -> 458 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/TabTop_Middle_Off.pngbin0 -> 258 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/TabTop_Middle_Over.pngbin0 -> 285 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/TabTop_Middle_Selected.pngbin0 -> 367 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/TabTop_Right_Off.pngbin0 -> 357 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/TabTop_Right_Over.pngbin0 -> 362 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/TabTop_Right_Selected.pngbin0 -> 474 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/Toolbar_Left_Off.pngbin0 -> 306 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/Toolbar_Left_Over.pngbin0 -> 310 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/Toolbar_Left_Selected.pngbin0 -> 380 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/Toolbar_Middle_Off.pngbin0 -> 224 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/Toolbar_Middle_Over.pngbin0 -> 228 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/Toolbar_Middle_Selected.pngbin0 -> 296 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/Toolbar_Right_Off.pngbin0 -> 302 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/Toolbar_Right_Over.pngbin0 -> 297 bytes
-rw-r--r--indra/newview/skins/default/textures/containers/Toolbar_Right_Selected.pngbin0 -> 377 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/AddItem_Off.pngbin0 -> 184 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/AddItem_Over.pngbin0 -> 165 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/AddItem_Press.pngbin0 -> 181 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/BackArrow_Off.pngbin0 -> 227 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/BackArrow_Over.pngbin0 -> 214 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Info.pngbin0 -> 351 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OptionsMenu_Off.pngbin0 -> 336 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OptionsMenu_Over.pngbin0 -> 277 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/OptionsMenu_Press.pngbin0 -> 318 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/TrashItem_Off.pngbin0 -> 201 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/TrashItem_Over.pngbin0 -> 201 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/TrashItem_Press.pngbin0 -> 201 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/VoicePTT_Lvl1.pngbin0 -> 557 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/VoicePTT_Lvl2.pngbin0 -> 663 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/VoicePTT_Lvl3.pngbin0 -> 607 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/VoicePTT_Off.pngbin0 -> 461 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/VoicePTT_On.pngbin0 -> 451 bytes
-rw-r--r--indra/newview/skins/default/textures/image_edit_icon.tgabin0 -> 3116 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/Arrow_Left_Off.pngbin0 -> 382 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/Arrow_Left_Over.pngbin0 -> 381 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/Arrow_Right_Off.pngbin0 -> 380 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/Arrow_Right_Over.pngbin0 -> 379 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/Favorite_Star_Active.pngbin0 -> 641 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/Favorite_Star_Off.pngbin0 -> 573 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/Favorite_Star_Over.pngbin0 -> 579 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/Favorite_Star_Press.pngbin0 -> 551 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/FileMenu_Divider.pngbin0 -> 116 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/Help_Over.pngbin0 -> 348 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/Help_Press.pngbin0 -> 384 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/Home_Off.pngbin0 -> 379 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/Home_Over.pngbin0 -> 330 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/Info_Off.pngbin0 -> 608 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/Info_Over.pngbin0 -> 622 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/Info_Press.pngbin0 -> 605 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/NavBar_BG.pngbin0 -> 210 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/Row_Selection.pngbin0 -> 231 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/Search.pngbin0 -> 467 bytes
-rw-r--r--indra/newview/skins/default/textures/taskpanel/TabIcon_Close_Off.pngbin0 -> 305 bytes
-rw-r--r--indra/newview/skins/default/textures/taskpanel/TabIcon_Home_Off.pngbin0 -> 228 bytes
-rw-r--r--indra/newview/skins/default/textures/taskpanel/TabIcon_Home_Selected.pngbin0 -> 291 bytes
-rw-r--r--indra/newview/skins/default/textures/taskpanel/TabIcon_Me_Off.pngbin0 -> 307 bytes
-rw-r--r--indra/newview/skins/default/textures/taskpanel/TabIcon_Me_Selected.pngbin0 -> 452 bytes
-rw-r--r--indra/newview/skins/default/textures/taskpanel/TabIcon_Open_Off.pngbin0 -> 294 bytes
-rw-r--r--indra/newview/skins/default/textures/taskpanel/TabIcon_People_Off.pngbin0 -> 361 bytes
-rw-r--r--indra/newview/skins/default/textures/taskpanel/TabIcon_People_Selected.pngbin0 -> 599 bytes
-rw-r--r--indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Off.pngbin0 -> 350 bytes
-rw-r--r--indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Selected.pngbin0 -> 476 bytes
-rw-r--r--indra/newview/skins/default/textures/taskpanel/TabIcon_Things_Off.pngbin0 -> 223 bytes
-rw-r--r--indra/newview/skins/default/textures/taskpanel/TabIcon_Things_Selected.pngbin0 -> 297 bytes
-rw-r--r--indra/newview/skins/default/textures/taskpanel/TaskPanel_Tab_Off.pngbin0 -> 219 bytes
-rw-r--r--indra/newview/skins/default/textures/taskpanel/TaskPanel_Tab_Selected.pngbin0 -> 325 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml336
-rw-r--r--indra/newview/skins/default/textures/widgets/Checkbox_Disabled.pngbin0 -> 306 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Checkbox_Off.pngbin0 -> 322 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Checkbox_On.pngbin0 -> 577 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Checkbox_On_Disabled.pngbin0 -> 558 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Checkbox_On_Over.pngbin0 -> 547 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Checkbox_On_Press.pngbin0 -> 612 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Checkbox_Over.pngbin0 -> 318 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Checkbox_Press.pngbin0 -> 373 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ComboButton_Disabled.pngbin0 -> 450 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ComboButton_Off.pngbin0 -> 470 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ComboButton_On.pngbin0 -> 486 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ComboButton_Selected.pngbin0 -> 539 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/DisclosureArrow_Closed_Over.pngbin0 -> 164 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/DisclosureArrow_Opened_Off.pngbin0 -> 173 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/DisclosureArrow_Opened_Over.pngbin0 -> 165 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/DropDown_Disabled.pngbin0 -> 600 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/DropDown_Off.pngbin0 -> 603 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/DropDown_On.pngbin0 -> 638 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/DropDown_Press.pngbin0 -> 679 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ListItem_Over.pngbin0 -> 244 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ListItem_Select.pngbin0 -> 251 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ProgressBar.pngbin0 -> 220 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ProgressTrack.pngbin0 -> 192 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/PushButton_Disabled.pngbin0 -> 461 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/PushButton_Off.pngbin0 -> 464 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/PushButton_On.pngbin0 -> 490 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/PushButton_On_Over.pngbin0 -> 498 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/PushButton_On_Selected.pngbin0 -> 572 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/PushButton_Over.pngbin0 -> 457 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/PushButton_Press.pngbin0 -> 520 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/PushButton_Selected.pngbin0 -> 520 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/PushButton_Selected_Disabled.pngbin0 -> 490 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/PushButton_Selected_Over.pngbin0 -> 498 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/PushButton_Selected_Press.pngbin0 -> 572 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/RadioButton_Disabled.pngbin0 -> 541 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/RadioButton_Off.pngbin0 -> 563 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/RadioButton_On.pngbin0 -> 627 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/RadioButton_On_Disabled.pngbin0 -> 605 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/RadioButton_On_Over.pngbin0 -> 635 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/RadioButton_On_Press.pngbin0 -> 641 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/RadioButton_Over.pngbin0 -> 575 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/RadioButton_Press.pngbin0 -> 589 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollArrow_Down.pngbin0 -> 239 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollArrow_Down_Over.pngbin0 -> 257 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollArrow_Left.pngbin0 -> 271 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollArrow_Left_Over.pngbin0 -> 295 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollArrow_Right.pngbin0 -> 260 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollArrow_Right_Over.pngbin0 -> 283 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollArrow_Up.pngbin0 -> 262 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollArrow_Up_Over.pngbin0 -> 276 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz.pngbin0 -> 364 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz_Over.pngbin0 -> 311 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollThumb_Vert.pngbin0 -> 323 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollThumb_Vert_Over.pngbin0 -> 311 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollTrack_Horiz.pngbin0 -> 153 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/ScrollTrack_Vert.pngbin0 -> 150 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Disabled.pngbin0 -> 378 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Off.pngbin0 -> 386 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On.pngbin0 -> 404 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Disabled.pngbin0 -> 404 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Over.pngbin0 -> 394 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Selected.pngbin0 -> 495 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Over.pngbin0 -> 384 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Press.pngbin0 -> 455 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected.pngbin0 -> 455 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Disabled.pngbin0 -> 404 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Over.pngbin0 -> 394 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Press.pngbin0 -> 495 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Disabled.pngbin0 -> 277 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On.pngbin0 -> 308 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On_Over.pngbin0 -> 300 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On_Press.pngbin0 -> 393 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Over.pngbin0 -> 286 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected.pngbin0 -> 359 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Disabled.pngbin0 -> 308 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Over.pngbin0 -> 300 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Press.pngbin0 -> 393 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Disabled.pngbin0 -> 380 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Off.pngbin0 -> 391 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On.pngbin0 -> 420 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Over.pngbin0 -> 416 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Selected.pngbin0 -> 502 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Over.pngbin0 -> 398 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Press.pngbin0 -> 459 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected.pngbin0 -> 459 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Disabled.pngbin0 -> 420 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Over.pngbin0 -> 416 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Press.pngbin0 -> 502 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SliderThumb_Disabled.pngbin0 -> 475 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SliderThumb_Off.pngbin0 -> 475 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SliderThumb_Over.pngbin0 -> 482 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SliderThumb_Press.pngbin0 -> 470 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SliderTrack_Horiz.pngbin0 -> 225 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/SliderTrack_Vert.pngbin0 -> 232 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Stepper_Down_Off.pngbin0 -> 300 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Stepper_Down_Over.pngbin0 -> 310 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Stepper_Down_Press.pngbin0 -> 343 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Stepper_Up_Off.pngbin0 -> 315 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Stepper_Up_Over.pngbin0 -> 314 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/Stepper_Up_Press.pngbin0 -> 384 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/TextField_Active.pngbin0 -> 225 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/TextField_Disabled.pngbin0 -> 225 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/TextField_Off.pngbin0 -> 224 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/TextField_Search_Active.pngbin0 -> 923 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/TextField_Search_Disabled.pngbin0 -> 943 bytes
-rw-r--r--indra/newview/skins/default/textures/widgets/TextField_Search_Off.pngbin0 -> 958 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Flyout.pngbin0 -> 820 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Flyout_Pointer.pngbin0 -> 236 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Close_Foreground.pngbin0 -> 226 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Close_Press.pngbin0 -> 217 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Close_Toast.pngbin0 -> 460 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Dock_Foreground.pngbin0 -> 240 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Dock_Press.pngbin0 -> 241 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Gear_Background.pngbin0 -> 373 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Gear_Foreground.pngbin0 -> 373 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Gear_Over.pngbin0 -> 279 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Gear_Press.pngbin0 -> 396 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Undock_Foreground.pngbin0 -> 238 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Icon_Undock_Press.pngbin0 -> 260 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Resize_Corner.pngbin0 -> 137 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Toast_CloseBtn.pngbin0 -> 471 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Toast_Over.pngbin0 -> 400 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Window_Background.pngbin0 -> 950 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/Window_Foreground.pngbin0 -> 959 bytes
-rw-r--r--indra/newview/skins/default/textures/world/NoEntryLines.pngbin0 -> 832 bytes
-rw-r--r--indra/newview/skins/default/textures/world/NoEntryPassLines.pngbin0 -> 1267 bytes
-rw-r--r--indra/newview/skins/default/xui/de/floater_tools.xml632
-rw-r--r--indra/newview/skins/default/xui/de/panel_group_general.xml85
-rw-r--r--indra/newview/skins/default/xui/de/panel_group_land_money.xml86
-rw-r--r--indra/newview/skins/default/xui/de/panel_group_notices.xml80
-rw-r--r--indra/newview/skins/default/xui/de/panel_group_roles.xml163
-rw-r--r--indra/newview/skins/default/xui/en/accordion_drag.xml8
-rw-r--r--indra/newview/skins/default/xui/en/accordion_parent.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_about.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_about_land.xml50
-rw-r--r--indra/newview/skins/default/xui/en/floater_animation_preview.xml99
-rw-r--r--indra/newview/skins/default/xui/en/floater_auction.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_beacons.xml35
-rw-r--r--indra/newview/skins/default/xui/en/floater_bulk_perms.xml79
-rw-r--r--indra/newview/skins/default/xui/en/floater_buy_contents.xml38
-rw-r--r--indra/newview/skins/default/xui/en/floater_buy_land.xml31
-rw-r--r--indra/newview/skins/default/xui/en/floater_buy_object.xml34
-rw-r--r--indra/newview/skins/default/xui/en/floater_camera.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_gesture.xml25
-rw-r--r--indra/newview/skins/default/xui/en/floater_god_tools.xml197
-rw-r--r--indra/newview/skins/default/xui/en/floater_hardware_settings.xml5
-rw-r--r--indra/newview/skins/default/xui/en/floater_im.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_im_session.xml67
-rw-r--r--indra/newview/skins/default/xui/en/floater_image_preview.xml30
-rw-r--r--indra/newview/skins/default/xui/en/floater_inspect.xml18
-rw-r--r--indra/newview/skins/default/xui/en/floater_inventory.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_joystick.xml9
-rw-r--r--indra/newview/skins/default/xui/en/floater_lagmeter.xml8
-rw-r--r--indra/newview/skins/default/xui/en/floater_land_holdings.xml60
-rw-r--r--indra/newview/skins/default/xui/en/floater_live_lsleditor.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_media_browser.xml191
-rw-r--r--indra/newview/skins/default/xui/en/floater_mem_leaking.xml30
-rw-r--r--indra/newview/skins/default/xui/en/floater_moveview.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_mute_object.xml4
-rw-r--r--indra/newview/skins/default/xui/en/floater_nearby_chat.xml18
-rw-r--r--indra/newview/skins/default/xui/en/floater_openobject.xml10
-rw-r--r--indra/newview/skins/default/xui/en/floater_perm_prefs.xml22
-rw-r--r--indra/newview/skins/default/xui/en/floater_preferences.xml148
-rw-r--r--indra/newview/skins/default/xui/en/floater_preview_animation.xml44
-rw-r--r--indra/newview/skins/default/xui/en/floater_preview_gesture.xml90
-rw-r--r--indra/newview/skins/default/xui/en/floater_preview_sound.xml11
-rw-r--r--indra/newview/skins/default/xui/en/floater_region_info.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_report_abuse.xml39
-rw-r--r--indra/newview/skins/default/xui/en/floater_sell_land.xml74
-rw-r--r--indra/newview/skins/default/xui/en/floater_settings_debug.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_snapshot.xml30
-rw-r--r--indra/newview/skins/default/xui/en/floater_telehub.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_test_checkbox.xml11
-rw-r--r--indra/newview/skins/default/xui/en/floater_test_combobox.xml14
-rw-r--r--indra/newview/skins/default/xui/en/floater_test_line_editor.xml64
-rw-r--r--indra/newview/skins/default/xui/en/floater_test_list_view.xml31
-rw-r--r--indra/newview/skins/default/xui/en/floater_test_navigation_bar.xml17
-rw-r--r--indra/newview/skins/default/xui/en/floater_test_widgets.xml10
-rw-r--r--indra/newview/skins/default/xui/en/floater_texture_ctrl.xml2
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml1420
-rw-r--r--indra/newview/skins/default/xui/en/floater_top_objects.xml42
-rw-r--r--indra/newview/skins/default/xui/en/floater_ui_preview.xml13
-rw-r--r--indra/newview/skins/default/xui/en/floater_url_entry.xml20
-rw-r--r--indra/newview/skins/default/xui/en/floater_world_map.xml62
-rw-r--r--indra/newview/skins/default/xui/en/fonts.xml16
-rw-r--r--indra/newview/skins/default/xui/en/menu_imchiclet_group.xml27
-rw-r--r--indra/newview/skins/default/xui/en/menu_imchiclet_p2p.xml43
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory.xml101
-rw-r--r--indra/newview/skins/default/xui/en/menu_login.xml14
-rw-r--r--indra/newview/skins/default/xui/en/menu_navbar.xml5
-rw-r--r--indra/newview/skins/default/xui/en/menu_nearby_chat.xml4
-rw-r--r--indra/newview/skins/default/xui/en/menu_picks.xml46
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml213
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml562
-rw-r--r--indra/newview/skins/default/xui/en/panel_avatar_list_item.xml6
-rw-r--r--indra/newview/skins/default/xui/en/panel_bottomtray.xml273
-rw-r--r--indra/newview/skins/default/xui/en/panel_chat_item.xml38
-rw-r--r--indra/newview/skins/default/xui/en/panel_classified.xml5
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_pick.xml50
-rw-r--r--indra/newview/skins/default/xui/en/panel_edit_profile.xml59
-rw-r--r--indra/newview/skins/default/xui/en/panel_friends.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_general.xml223
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_land_money.xml184
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_notices.xml230
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_notify.xml33
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_roles.xml282
-rw-r--r--indra/newview/skins/default/xui/en/panel_im_control_panel.xml32
-rw-r--r--indra/newview/skins/default/xui/en/panel_landmark_info.xml258
-rw-r--r--indra/newview/skins/default/xui/en/panel_landmarks.xml40
-rw-r--r--indra/newview/skins/default/xui/en/panel_login.xml3
-rw-r--r--indra/newview/skins/default/xui/en/panel_navigation_bar.xml127
-rw-r--r--indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml51
-rw-r--r--indra/newview/skins/default/xui/en/panel_notes.xml293
-rw-r--r--indra/newview/skins/default/xui/en/panel_people.xml410
-rw-r--r--indra/newview/skins/default/xui/en/panel_pick_info.xml71
-rw-r--r--indra/newview/skins/default/xui/en/panel_pick_list_item.xml63
-rw-r--r--indra/newview/skins/default/xui/en/panel_picks.xml117
-rw-r--r--indra/newview/skins/default/xui/en/panel_places.xml66
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_advanced.xml270
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_chat.xml362
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_general.xml522
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml397
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile.xml715
-rw-r--r--indra/newview/skins/default/xui/en/panel_profile_view.xml57
-rw-r--r--indra/newview/skins/default/xui/en/panel_progress.xml28
-rw-r--r--indra/newview/skins/default/xui/en/panel_region_covenant.xml72
-rw-r--r--indra/newview/skins/default/xui/en/panel_region_debug.xml43
-rw-r--r--indra/newview/skins/default/xui/en/panel_region_estate.xml95
-rw-r--r--indra/newview/skins/default/xui/en/panel_region_general.xml26
-rw-r--r--indra/newview/skins/default/xui/en/panel_region_terrain.xml40
-rw-r--r--indra/newview/skins/default/xui/en/panel_region_texture.xml140
-rw-r--r--indra/newview/skins/default/xui/en/panel_script_ed.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_scrolling_param.xml16
-rw-r--r--indra/newview/skins/default/xui/en/panel_side_tray.xml647
-rw-r--r--indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml90
-rw-r--r--indra/newview/skins/default/xui/en/panel_status_bar.xml6
-rw-r--r--indra/newview/skins/default/xui/en/panel_teleport_history.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_toast.xml65
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml81
-rw-r--r--indra/newview/skins/default/xui/en/widgets/button.xml8
-rw-r--r--indra/newview/skins/default/xui/en/widgets/check_box.xml13
-rw-r--r--indra/newview/skins/default/xui/en/widgets/color_swatch.xml2
-rw-r--r--indra/newview/skins/default/xui/en/widgets/combo_box.xml33
-rw-r--r--indra/newview/skins/default/xui/en/widgets/drop_down.xml18
-rw-r--r--indra/newview/skins/default/xui/en/widgets/filter_editor.xml7
-rw-r--r--indra/newview/skins/default/xui/en/widgets/flyout_button.xml15
-rw-r--r--indra/newview/skins/default/xui/en/widgets/gesture_combo_box.xml29
-rw-r--r--indra/newview/skins/default/xui/en/widgets/line_editor.xml13
-rw-r--r--indra/newview/skins/default/xui/en/widgets/list_view.xml6
-rw-r--r--indra/newview/skins/default/xui/en/widgets/location_input.xml82
-rw-r--r--indra/newview/skins/default/xui/en/widgets/output_monitor.xml9
-rw-r--r--indra/newview/skins/default/xui/en/widgets/progress_bar.xml4
-rw-r--r--indra/newview/skins/default/xui/en/widgets/radio_group.xml4
-rw-r--r--indra/newview/skins/default/xui/en/widgets/radio_item.xml9
-rw-r--r--indra/newview/skins/default/xui/en/widgets/scroll_bar.xml36
-rw-r--r--indra/newview/skins/default/xui/en/widgets/scroll_list.xml2
-rw-r--r--indra/newview/skins/default/xui/en/widgets/search_editor.xml12
-rw-r--r--indra/newview/skins/default/xui/en/widgets/side_tray.xml16
-rw-r--r--indra/newview/skins/default/xui/en/widgets/simple_text_editor.xml32
-rw-r--r--indra/newview/skins/default/xui/en/widgets/slider_bar.xml6
-rw-r--r--indra/newview/skins/default/xui/en/widgets/spinner.xml15
-rw-r--r--indra/newview/skins/default/xui/en/widgets/tab_container.xml8
-rw-r--r--indra/newview/skins/default/xui/en/widgets/text_editor.xml21
-rw-r--r--indra/newview/skins/default/xui/fr/menu_viewer.xml16
-rw-r--r--indra/newview/tests/lllogininstance_test.cpp4
-rwxr-xr-xindra/newview/viewer_manifest.py4
761 files changed, 36482 insertions, 18817 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index a908b058f0..2b8e66628e 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -61,7 +61,8 @@ include_directories(
)
set(viewer_SOURCE_FILES
- llaccordionpanel.cpp
+ llaccordionctrltab.cpp
+ llaccordionctrl.cpp
llagent.cpp
llagentlistener.cpp
llagentaccess.cpp
@@ -75,24 +76,25 @@ set(viewer_SOURCE_FILES
llassetuploadresponders.cpp
llassetuploadqueue.cpp
llaudiosourcevo.cpp
+ llavataractions.cpp
llavatariconctrl.cpp
llavatarlist.cpp
llavatarlistitem.cpp
llavatarpropertiesprocessor.cpp
- llbbox.cpp
llbottomtray.cpp
llbox.cpp
+ llbreadcrumbview.cpp
llcallbacklist.cpp
llcallingcard.cpp
llcapabilitylistener.cpp
llcaphttpsender.cpp
- llchatbar.cpp
- llchathistoryscroll.cpp
+ llchannelmanager.cpp
+ llchatitemscontainerctrl.cpp
+ llchatmsgbox.cpp
llchiclet.cpp
llclassifiedinfo.cpp
llclassifiedstatsresponder.cpp
llcloud.cpp
- llcollapsiblectrl.cpp
llcolorswatch.cpp
llcommandhandler.cpp
llcommandlineparser.cpp
@@ -104,7 +106,6 @@ set(viewer_SOURCE_FILES
lldebugview.cpp
lldelayedgestureerror.cpp
lldirpicker.cpp
- lldraggerbar.cpp
lldrawable.cpp
lldrawpoolalpha.cpp
lldrawpoolavatar.cpp
@@ -173,6 +174,7 @@ set(viewer_SOURCE_FILES
llfloaterhud.cpp
llfloaterimagepreview.cpp
llfloaterinspect.cpp
+ llfloaterinventory.cpp
llfloaterjoystick.cpp
llfloaterlagmeter.cpp
llfloaterland.cpp
@@ -198,6 +200,7 @@ set(viewer_SOURCE_FILES
llfloatersettingsdebug.cpp
llfloatersnapshot.cpp
llfloatertelehub.cpp
+ llfloatertestlistview.cpp
llfloatertools.cpp
llfloatertopobjects.cpp
llfloatertos.cpp
@@ -208,9 +211,10 @@ set(viewer_SOURCE_FILES
llfloaterwater.cpp
llfloaterwindlight.cpp
llfloaterworldmap.cpp
+ llfoldertype.cpp
llfolderview.cpp
+ llfolderviewitem.cpp
llfollowcam.cpp
- llfriendactions.cpp
llgesturemgr.cpp
llgivemoney.cpp
llglsandbox.cpp
@@ -236,10 +240,14 @@ set(viewer_SOURCE_FILES
llimcontrolpanel.cpp
llinventorybridge.cpp
llinventoryclipboard.cpp
+ llinventoryfilter.cpp
llinventorymodel.cpp
- llinventoryview.cpp
lljoystickbutton.cpp
+ lllandmarkactions.cpp
lllandmarklist.cpp
+ lllistbrowser.cpp
+ lllistview.cpp
+ lllocaltextureobject.cpp
lllocationhistory.cpp
lllocationinputctrl.cpp
lllogchat.cpp
@@ -262,8 +270,14 @@ set(viewer_SOURCE_FILES
llnameeditor.cpp
llnamelistctrl.cpp
llnavigationbar.cpp
- llnearbychathistory.cpp
+ llnearbychat.cpp
+ llnearbychatbar.cpp
+ llnearbychathandler.cpp
llnetmap.cpp
+ llnotificationalerthandler.cpp
+ llnotificationgrouphandler.cpp
+ llnotificationinfohandler.cpp
+ llnotificationmanager.cpp
llnotify.cpp
lloutputmonitorctrl.cpp
lloverlaybar.cpp
@@ -288,10 +302,12 @@ set(viewer_SOURCE_FILES
llpanelgroupnotices.cpp
llpanelgrouproles.cpp
llpanelinventory.cpp
+ llpanelimcontrolpanel.cpp
llpanelland.cpp
llpanellandmarks.cpp
llpanellandmedia.cpp
llpanellogin.cpp
+ llpanelmedia.cpp
llpanelmeprofile.cpp
llpanelobject.cpp
llpanelpeople.cpp
@@ -303,6 +319,7 @@ set(viewer_SOURCE_FILES
llpanelshower.cpp
llpanelplaces.cpp
llpanelplacestab.cpp
+ llpanelprofile.cpp
llpanelprofileview.cpp
llpanelteleporthistory.cpp
llpanelvolume.cpp
@@ -324,6 +341,7 @@ set(viewer_SOURCE_FILES
llregionposition.cpp
llremoteparcelrequest.cpp
llsavedsettingsglue.cpp
+ llscreenchannel.cpp
llselectmgr.cpp
llsidetray.cpp
llsky.cpp
@@ -343,6 +361,12 @@ set(viewer_SOURCE_FILES
lltexturectrl.cpp
lltexturefetch.cpp
lltextureview.cpp
+ lltoast.cpp
+ lltoastalertpanel.cpp
+ lltoastgroupnotifypanel.cpp
+ lltoastnotifypanel.cpp
+ lltoastpanel.cpp
+ lltoggleablemenu.cpp
lltoolbar.cpp
lltoolbrush.cpp
lltoolcomp.cpp
@@ -379,9 +403,7 @@ set(viewer_SOURCE_FILES
llviewerdisplay.cpp
llviewerfloaterreg.cpp
llviewergenericmessage.cpp
- llviewergesture.cpp
- llviewerimage.cpp
- llviewerimagelist.cpp
+ llviewergesture.cpp
llviewerinventory.cpp
llviewerjointattachment.cpp
llviewerjoint.cpp
@@ -409,7 +431,9 @@ set(viewer_SOURCE_FILES
llviewershadermgr.cpp
llviewerstats.cpp
llviewertexteditor.cpp
+ llviewertexture.cpp
llviewertextureanim.cpp
+ llviewertexturelist.cpp
llviewerthrottle.cpp
llviewervisualparam.cpp
llviewerwindow.cpp
@@ -478,7 +502,8 @@ endif (LINUX)
set(viewer_HEADER_FILES
CMakeLists.txt
ViewerInstall.cmake
- llaccordionpanel.h
+ llaccordionctrltab.h
+ llaccordionctrl.h
llagent.h
llagentlistener.h
llagentaccess.h
@@ -493,25 +518,26 @@ set(viewer_HEADER_FILES
llassetuploadresponders.h
llassetuploadqueue.h
llaudiosourcevo.h
+ llavataractions.h
llavatariconctrl.h
llavatarlist.h
llavatarlistitem.h
llavatarpropertiesprocessor.h
- llbbox.h
llbottomtray.h
llbox.h
+ llbreadcrumbview.h
llcallbacklist.h
llcallingcard.h
llcapabilitylistener.h
llcapabilityprovider.h
llcaphttpsender.h
- llchatbar.h
- llchathistoryscroll.h
+ llchannelmanager.h
+ llchatitemscontainerctrl.h
+ llchatmsgbox.h
llchiclet.h
llclassifiedinfo.h
llclassifiedstatsresponder.h
llcloud.h
- llcollapsiblectrl.h
llcolorswatch.h
llcommandhandler.h
llcommandlineparser.h
@@ -523,7 +549,6 @@ set(viewer_HEADER_FILES
lldebugview.h
lldelayedgestureerror.h
lldirpicker.h
- lldraggerbar.h
lldrawable.h
lldrawpool.h
lldrawpoolalpha.h
@@ -593,6 +618,7 @@ set(viewer_HEADER_FILES
llfloaterhud.h
llfloaterimagepreview.h
llfloaterinspect.h
+ llfloaterinventory.h
llfloaterjoystick.h
llfloaterlagmeter.h
llfloaterland.h
@@ -618,6 +644,7 @@ set(viewer_HEADER_FILES
llfloatersettingsdebug.h
llfloatersnapshot.h
llfloatertelehub.h
+ llfloatertestlistview.h
llfloatertools.h
llfloatertopobjects.h
llfloatertos.h
@@ -628,9 +655,11 @@ set(viewer_HEADER_FILES
llfloaterwater.h
llfloaterwindlight.h
llfloaterworldmap.h
+ llfoldertype.h
llfolderview.h
+ llfoldervieweventlistener.h
+ llfolderviewitem.h
llfollowcam.h
- llfriendactions.h
llgesturemgr.h
llgivemoney.h
llgroupactions.h
@@ -655,11 +684,15 @@ set(viewer_HEADER_FILES
llimcontrolpanel.h
llinventorybridge.h
llinventoryclipboard.h
+ llinventoryfilter.h
llinventorymodel.h
- llinventoryview.h
lljoystickbutton.h
+ lllandmarkactions.h
lllandmarklist.h
lllightconstants.h
+ lllistbrowser.h
+ lllistview.h
+ lllocaltextureobject.h
lllocationhistory.h
lllocationinputctrl.h
lllogchat.h
@@ -682,8 +715,12 @@ set(viewer_HEADER_FILES
llnameeditor.h
llnamelistctrl.h
llnavigationbar.h
- llnearbychathistory.h
+ llnearbychat.h
+ llnearbychatbar.h
+ llnearbychathandler.h
llnetmap.h
+ llnotificationhandler.h
+ llnotificationmanager.h
llnotify.h
lloutputmonitorctrl.h
lloverlaybar.h
@@ -708,10 +745,12 @@ set(viewer_HEADER_FILES
llpanelgroupnotices.h
llpanelgrouproles.h
llpanelinventory.h
+ llpanelimcontrolpanel.h
llpanelland.h
llpanellandmarks.h
llpanellandmedia.h
llpanellogin.h
+ llpanelmedia.h
llpanelmeprofile.h
llpanelobject.h
llpanelpeople.h
@@ -723,6 +762,7 @@ set(viewer_HEADER_FILES
llpanelshower.h
llpanelplaces.h
llpanelplacestab.h
+ llpanelprofile.h
llpanelprofileview.h
llpanelteleporthistory.h
llpanelvolume.h
@@ -745,6 +785,7 @@ set(viewer_HEADER_FILES
llremoteparcelrequest.h
llresourcedata.h
llrootview.h
+ llscreenchannel.h
llsavedsettingsglue.h
llselectmgr.h
llsidetray.h
@@ -766,6 +807,12 @@ set(viewer_HEADER_FILES
lltexturectrl.h
lltexturefetch.h
lltextureview.h
+ lltoast.h
+ lltoastalertpanel.h
+ lltoastgroupnotifypanel.h
+ lltoastnotifypanel.h
+ lltoastpanel.h
+ lltoggleablemenu.h
lltool.h
lltoolbar.h
lltoolbrush.h
@@ -804,9 +851,7 @@ set(viewer_HEADER_FILES
llviewerdisplay.h
llviewerfloaterreg.h
llviewergenericmessage.h
- llviewergesture.h
- llviewerimage.h
- llviewerimagelist.h
+ llviewergesture.h
llviewerinventory.h
llviewerjoint.h
llviewerjointattachment.h
@@ -832,7 +877,9 @@ set(viewer_HEADER_FILES
llviewershadermgr.h
llviewerstats.h
llviewertexteditor.h
+ llviewertexture.h
llviewertextureanim.h
+ llviewertexturelist.h
llviewerthrottle.h
llviewervisualparam.h
llviewerwindow.h
diff --git a/indra/newview/English.lproj/InfoPlist.strings b/indra/newview/English.lproj/InfoPlist.strings
index 0a1235b85d..735424c647 100644
--- a/indra/newview/English.lproj/InfoPlist.strings
+++ b/indra/newview/English.lproj/InfoPlist.strings
@@ -2,6 +2,6 @@
CFBundleName = "Second Life";
-CFBundleShortVersionString = "Second Life version 1.24.0.0";
-CFBundleGetInfoString = "Second Life version 1.24.0.0, Copyright 2004-2008 Linden Research, Inc.";
+CFBundleShortVersionString = "Second Life version 2.0.0.0";
+CFBundleGetInfoString = "Second Life version 2.0.0.0, Copyright 2004-2009 Linden Research, Inc.";
diff --git a/indra/newview/Info-SecondLife.plist b/indra/newview/Info-SecondLife.plist
index baa5ccf1b9..7264044d37 100644
--- a/indra/newview/Info-SecondLife.plist
+++ b/indra/newview/Info-SecondLife.plist
@@ -32,7 +32,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
- <string>1.24.0.0</string>
+ <string>2.0.0.0</string>
<key>CSResourcesFileMapped</key>
<true/>
</dict>
diff --git a/indra/newview/app_settings/foldertypes.xml b/indra/newview/app_settings/foldertypes.xml
new file mode 100644
index 0000000000..4d4d479bdd
--- /dev/null
+++ b/indra/newview/app_settings/foldertypes.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<ensemble_defs>
+ <ensemble
+ asset_num="-1"
+ xui_name="default"
+ icon_name="inv_plain_closed.tga"
+ />
+ <ensemble
+ asset_num="27"
+ xui_name="head"
+ icon_name="inv_folder_outfit_head.tga"
+ />
+ <ensemble
+ asset_num="28"
+ xui_name="gloves"
+ icon_name="inv_folder_outfit_gloves.tga"
+ />
+ <ensemble
+ asset_num="29"
+ xui_name="jacket"
+ icon_name="inv_folder_outfit_jacket.tga"
+ />
+ <ensemble
+ asset_num="30"
+ xui_name="pants"
+ icon_name="inv_folder_outfit_pants.tga"
+ />
+ <ensemble
+ asset_num="31"
+ xui_name="shape"
+ icon_name="inv_folder_outfit_shape.tga"
+ />
+ <ensemble
+ asset_num="32"
+ xui_name="shoes"
+ icon_name="inv_folder_outfit_shoes.tga"
+ />
+ <ensemble
+ asset_num="33"
+ xui_name="shirt"
+ icon_name="inv_folder_outfit_shirt.tga"
+ />
+ <ensemble
+ asset_num="34"
+ xui_name="skirt"
+ icon_name="inv_folder_outfit_skirt.tga"
+ />
+ <ensemble
+ asset_num="35"
+ xui_name="underpants"
+ icon_name="inv_folder_outfit_underpants.tga"
+ />
+ <ensemble
+ asset_num="36"
+ xui_name="undershirt"
+ icon_name="inv_folder_outfit_undershirt.tga"
+ />
+</ensemble_defs>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 71878d02db..667090d0ab 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -276,6 +276,17 @@
<key>Value</key>
<real>0.5</real>
</map>
+ <key>AudioSteamingMedia</key>
+ <map>
+ <key>Comment</key>
+ <string>Enable streaming</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>AudioStreamingMusic</key>
<map>
<key>Comment</key>
@@ -914,17 +925,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>BulkChangeIncludeLandmarks</key>
- <map>
- <key>Comment</key>
- <string>Bulk permission changes affect landmarks</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>BulkChangeIncludeNotecards</key>
<map>
<key>Comment</key>
@@ -1112,6 +1112,28 @@
<key>Value</key>
<string />
</map>
+ <key>CacheLocationTopFolder</key>
+ <map>
+ <key>Comment</key>
+ <string>Controls the top folder location of the local disk cache</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string />
+ </map>
+ <key>CacheLocationTopFolder</key>
+ <map>
+ <key>Comment</key>
+ <string>Controls the location of the local disk cache</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string />
+ </map>
<key>CacheSize</key>
<map>
<key>Comment</key>
@@ -2753,6 +2775,17 @@
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
+ </map>
+ <key>FirstSelectedEnabledPopups</key>
+ <map>
+ <key>Comment</key>
+ <string>Return false if there is not enable popup selected in the list of floater preferences popups</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
</map>
<key>FixedWeather</key>
<map>
@@ -3329,17 +3362,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>NotFullScreen</key>
- <map>
- <key>Comment</key>
- <string>Run SL in non fullscreen mode</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>FullScreenAspectRatio</key>
<map>
<key>Comment</key>
@@ -4628,6 +4650,17 @@
<key>Value</key>
<string />
</map>
+ <key>NewCacheLocationTopFolder</key>
+ <map>
+ <key>Comment</key>
+ <string>Change the top folder location of the local disk cache to this</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string />
+ </map>
<key>NextLoginLocation</key>
<map>
<key>Comment</key>
@@ -4716,6 +4749,83 @@
<key>Value</key>
<integer>350</integer>
</map>
+ <key>NotificationToastTime</key>
+ <map>
+ <key>Comment</key>
+ <string>Width of notification messages</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>5</integer>
+ </map>
+ <key>StartUpToastTime</key>
+ <map>
+ <key>Comment</key>
+ <string>Width of notification messages</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>10</integer>
+ </map>
+ <key>ToastMargin</key>
+ <map>
+ <key>Comment</key>
+ <string>Width of notification messages</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>5</integer>
+ </map>
+ <key>ChannelBottomPanelMargin</key>
+ <map>
+ <key>Comment</key>
+ <string>Width of notification messages</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>35</integer>
+ </map>
+ <key>NotificationChannelRightMargin</key>
+ <map>
+ <key>Comment</key>
+ <string>Width of notification messages</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>10</integer>
+ </map>
+ <key>NavBarMargin</key>
+ <map>
+ <key>Comment</key>
+ <string>Width of notification messages</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>60</integer>
+ </map>
+ <key>OverflowToastHeight</key>
+ <map>
+ <key>Comment</key>
+ <string>Width of notification messages</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>72</integer>
+ </map>
<key>NotifyMoneyChange</key>
<map>
<key>Comment</key>
@@ -5471,17 +5581,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>RenderCustomSettings</key>
- <map>
- <key>Comment</key>
- <string>Do you want to set the graphics settings yourself</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>RenderDebugAlphaMask</key>
<map>
<key>Comment</key>
@@ -5769,6 +5868,21 @@
<key>Value</key>
<integer>2</integer>
</map>
+ <key>RenderGlowLumWeights</key>
+ <map>
+ <key>Comment</key>
+ <string>Weights for each color channel to be used in calculating luminance (should add up to 1.0)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Vector3</string>
+ <key>Value</key>
+ <array>
+ <real>0.299</real>
+ <real>0.587</real>
+ <real>0.114</real>
+ </array>
+ </map>
<key>RenderGlowMaxExtractAlpha</key>
<map>
<key>Comment</key>
@@ -5824,6 +5938,21 @@
<key>Value</key>
<real>0.0</real>
</map>
+ <key>RenderGlowWarmthWeights</key>
+ <map>
+ <key>Comment</key>
+ <string>Weight of each color channel used before finding the max warmth</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Vector3</string>
+ <key>Value</key>
+ <array>
+ <real>1.0</real>
+ <real>0.5</real>
+ <real>0.7</real>
+ </array>
+ </map>
<key>RenderGlowWidth</key>
<map>
<key>Comment</key>
@@ -5890,7 +6019,7 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>RenderHideGroupTitleAll</key>
+ <key>RenderShowGroupTitleAll</key>
<map>
<key>Comment</key>
<string>Show group titles in name labels</string>
@@ -5899,7 +6028,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <integer>0</integer>
+ <integer>1</integer>
</map>
<key>RenderInitError</key>
<map>
@@ -5967,17 +6096,6 @@
<key>Value</key>
<integer>512</integer>
</map>
- <key>RenderName</key>
- <map>
- <key>Comment</key>
- <string>Controls display of names above avatars (0 = never, 1 = fade, 2 = always)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>S32</string>
- <key>Value</key>
- <integer>2</integer>
- </map>
<key>RenderNameFadeDuration</key>
<map>
<key>Comment</key>
@@ -5989,16 +6107,16 @@
<key>Value</key>
<real>1.0</real>
</map>
- <key>RenderNameHideSelf</key>
+ <key>RenderNameShowSelf</key>
<map>
<key>Comment</key>
- <string>Don't display own name above avatar</string>
+ <string>Display own name above avatar</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <integer>0</integer>
+ <integer>1</integer>
</map>
<key>RenderNameShowTime</key>
<map>
@@ -6589,10 +6707,10 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>ShowActiveSpeakers</key>
+ <key>ShowAdvancedGraphicsSettings</key>
<map>
<key>Comment</key>
- <string>Display active speakers list on login</string>
+ <string>Show advanced graphics settings</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -6611,32 +6729,32 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>ShowAxes</key>
+ <key>AvatarNameTagMode</key>
<map>
<key>Comment</key>
- <string>Render coordinate frame at your position</string>
+ <string>Select Avatar Name Tag Mode</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
- <string>Boolean</string>
+ <string>S32</string>
<key>Value</key>
- <integer>0</integer>
+ <integer>1</integer>
</map>
- <key>ShowBanLines</key>
+ <key>ShowAxes</key>
<map>
<key>Comment</key>
- <string>Show in-world ban/access borders</string>
+ <string>Render coordinate frame at your position</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <integer>1</integer>
+ <integer>0</integer>
</map>
- <key>ShowCameraControls</key>
+ <key>ShowBanLines</key>
<map>
<key>Comment</key>
- <string>Display camera controls on login</string>
+ <string>Show in-world ban/access borders</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -6677,17 +6795,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>ShowDirectory</key>
- <map>
- <key>Comment</key>
- <string />
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>ShowEmptyFoldersWhenSearching</key>
<map>
<key>Comment</key>
@@ -6721,17 +6828,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>ShowLeaders</key>
- <map>
- <key>Comment</key>
- <string />
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>ShowPGSearchAll</key>
<map>
<key>Comment</key>
@@ -6966,17 +7062,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>ShowMovementControls</key>
- <map>
- <key>Comment</key>
- <string>Display movement controls on login</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>1</integer>
- </map>
<key>ShowNearClip</key>
<map>
<key>Comment</key>
@@ -7131,17 +7216,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>ShowTools</key>
- <map>
- <key>Comment</key>
- <string />
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>ShowTutorial</key>
<map>
<key>Comment</key>
@@ -7241,6 +7315,21 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>SkyNightColorShift</key>
+ <map>
+ <key>Comment</key>
+ <string>Controls moonlight color (base color applied to moon as light source)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Color3</string>
+ <key>Value</key>
+ <array>
+ <real>0.67</real>
+ <real>0.67</real>
+ <real>1.0</real>
+ </array>
+ </map>
<key>SkyOverrideSimSunPosition</key>
<map>
<key>Comment</key>
@@ -7575,6 +7664,17 @@
<key>Value</key>
<real>0.699999988079</real>
</map>
+ <key>ToolTipFadeTime</key>
+ <map>
+ <key>Comment</key>
+ <string>Seconds over which tooltip fades away</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>0.2</real>
+ </map>
<key>ToolboxAutoMove</key>
<map>
<key>Comment</key>
@@ -8002,7 +8102,7 @@
<key>Type</key>
<string>S32</string>
<key>Value</key>
- <integer>1</integer>
+ <integer>3</integer>
</map>
<key>UIMaxComboWidth</key>
<map>
@@ -8079,7 +8179,7 @@
<key>Type</key>
<string>S32</string>
<key>Value</key>
- <real>1</real>
+ <integer>4</integer>
</map>
<key>UIPreeditMarkerThickness</key>
<map>
@@ -8123,7 +8223,7 @@
<key>Type</key>
<string>S32</string>
<key>Value</key>
- <real>2</real>
+ <integer>4</integer>
</map>
<key>UIPreeditStandoutThickness</key>
<map>
@@ -8134,7 +8234,7 @@
<key>Type</key>
<string>S32</string>
<key>Value</key>
- <real>2</real>
+ <integer>2</integer>
</map>
<key>UIResizeBarHeight</key>
<map>
@@ -9325,6 +9425,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>WindowFullScreen</key>
+ <map>
+ <key>Comment</key>
+ <string>Run SL in fullscreen mode</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>WindowHeight</key>
<map>
<key>Comment</key>
@@ -9391,6 +9502,17 @@
<key>Value</key>
<real>150000.0</real>
</map>
+ <key>XUIEditor</key>
+ <map>
+ <key>Comment</key>
+ <string>Path to program used to edit XUI files</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <real>150000.0</real>
+ </map>
<key>YawFromMousePosition</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml
index dab88a5ec3..893e7acd7a 100644
--- a/indra/newview/app_settings/settings_per_account.xml
+++ b/indra/newview/app_settings/settings_per_account.xml
@@ -22,17 +22,28 @@
<key>Value</key>
<string>|TOKEN COPY BusyModeResponse|</string>
</map>
- <key>IMLogTimestamp</key>
+ <key>IMLogOptions</key>
<map>
<key>Comment</key>
- <string>Log Timestamp of Instant Messages</string>
+ <string>Log options for Instant Messages</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
- <string>Boolean</string>
+ <string>S32</string>
<key>Value</key>
- <integer>1</integer>
+ <integer>2</integer>
</map>
+ <key>InstantMessageLogFolder</key>
+ <map>
+ <key>Comment</key>
+ <string>Top level folder to your log files.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string />
+ </map>
<key>InstantMessageLogPath</key>
<map>
<key>Comment</key>
@@ -77,10 +88,10 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>LogChatTimestamp</key>
+ <key>LogTimestamp</key>
<map>
<key>Comment</key>
- <string>Log Timestamp of Chat</string>
+ <string>Log Timestamp</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 13546347b9..e4db98faf2 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -38,7 +38,6 @@
#include "llagentlistener.h"
#include "llanimationstates.h"
#include "llcallingcard.h"
-#include "llchatbar.h"
#include "llconsole.h"
#include "lldrawable.h"
#include "llfirstuse.h"
@@ -100,6 +99,7 @@
#include "pipeline.h"
#include "lltrans.h"
#include "llbottomtray.h"
+#include "llnearbychatbar.h"
#include "stringize.h"
#include "llcapabilitylistener.h"
@@ -363,7 +363,7 @@ LLAgent::LLAgent() :
mAutoPilotFinishedCallback(NULL),
mAutoPilotCallbackData(NULL),
- mEffectColor(0.f, 1.f, 1.f, 1.f),
+ mEffectColor(LLColor4(0.f, 1.f, 1.f, 1.f)),
mHaveHomePosition(FALSE),
mHomeRegionHandle( 0 ),
@@ -417,7 +417,7 @@ void LLAgent::init()
mCameraZoomFraction = 1.f;
mTrackFocusObject = gSavedSettings.getBOOL("TrackFocusObject");
- mEffectColor = gSavedSkinSettings.getColor4("EffectColor");
+ mEffectColor = LLUIColorTable::instance().getColor("EffectColor");
gSavedSettings.getControl("PreferredMaturity")->getValidateSignal()->connect(boost::bind(&LLAgent::validateMaturity, this, _2));
gSavedSettings.getControl("PreferredMaturity")->getSignal()->connect(boost::bind(&LLAgent::handleMaturity, this, _2));
@@ -2157,7 +2157,6 @@ void LLAgent::setBusy()
{
gBusyMenu->setLabel(LLTrans::getString("AvatarSetNotBusy"));
}
- LLFloaterReg::getTypedInstance<LLFloaterMute>("mute")->updateButtons();
}
//-----------------------------------------------------------------------------
@@ -2171,7 +2170,6 @@ void LLAgent::clearBusy()
{
gBusyMenu->setLabel(LLTrans::getString("AvatarSetBusy"));
}
- LLFloaterReg::getTypedInstance<LLFloaterMute>("mute")->updateButtons();
}
//-----------------------------------------------------------------------------
@@ -2494,7 +2492,7 @@ void LLAgent::autoPilot(F32 *delta_yaw)
void LLAgent::propagate(const F32 dt)
{
// Update UI based on agent motion
- LLFloaterMove *floater_move = LLFloaterMove::getInstance();
+ LLFloaterMove *floater_move = LLFloaterReg::getTypedInstance<LLFloaterMove>("moveview");
if (floater_move)
{
floater_move->mForwardButton ->setToggleState( mAtKey > 0 || mWalkKey > 0 );
@@ -2728,7 +2726,7 @@ void LLAgent::startTyping()
{
sendAnimationRequest(ANIM_AGENT_TYPE, ANIM_REQUEST_START);
}
- LLBottomTray::getInstance()->sendChatFromViewer("", CHAT_TYPE_START, FALSE);
+ LLNearbyChatBar::getInstance()->sendChatFromViewer("", CHAT_TYPE_START, FALSE);
}
//-----------------------------------------------------------------------------
@@ -2740,7 +2738,7 @@ void LLAgent::stopTyping()
{
clearRenderState(AGENT_STATE_TYPING);
sendAnimationRequest(ANIM_AGENT_TYPE, ANIM_REQUEST_STOP);
- LLBottomTray::getInstance()->sendChatFromViewer("", CHAT_TYPE_STOP, FALSE);
+ LLNearbyChatBar::getInstance()->sendChatFromViewer("", CHAT_TYPE_STOP, FALSE);
}
}
@@ -3056,21 +3054,25 @@ void LLAgent::updateCamera()
}
// Update UI with our camera inputs
- LLFloaterCamera::getInstance()->mRotate->setToggleState(
- mOrbitRightKey > 0.f, // left
- mOrbitUpKey > 0.f, // top
- mOrbitLeftKey > 0.f, // right
- mOrbitDownKey > 0.f); // bottom
-
- LLFloaterCamera::getInstance()->mZoom->setToggleState(
- mOrbitInKey > 0.f, // top
- mOrbitOutKey > 0.f); // bottom
-
- LLFloaterCamera::getInstance()->mTrack->setToggleState(
- mPanLeftKey > 0.f, // left
- mPanUpKey > 0.f, // top
- mPanRightKey > 0.f, // right
- mPanDownKey > 0.f); // bottom
+ LLFloaterCamera* camera_instance = LLFloaterReg::getTypedInstance<LLFloaterCamera>("camera");
+ if(camera_instance)
+ {
+ camera_instance->mRotate->setToggleState(
+ mOrbitRightKey > 0.f, // left
+ mOrbitUpKey > 0.f, // top
+ mOrbitLeftKey > 0.f, // right
+ mOrbitDownKey > 0.f); // bottom
+
+ camera_instance->mZoom->setToggleState(
+ mOrbitInKey > 0.f, // top
+ mOrbitOutKey > 0.f); // bottom
+
+ camera_instance->mTrack->setToggleState(
+ mPanLeftKey > 0.f, // left
+ mPanUpKey > 0.f, // top
+ mPanRightKey > 0.f, // right
+ mPanDownKey > 0.f); // bottom
+ }
// Handle camera movement based on keyboard.
const F32 ORBIT_OVER_RATE = 90.f * DEG_TO_RAD; // radians per second
@@ -5555,7 +5557,7 @@ class LLAgentDropGroupViewerNode : public LLHTTPNode
!input.has("body") )
{
//what to do with badly formed message?
- response->status(400);
+ response->statusUnknownError(400);
response->result(LLSD("Invalid message parameters"));
}
@@ -5628,7 +5630,7 @@ class LLAgentDropGroupViewerNode : public LLHTTPNode
else
{
//what to do with badly formed message?
- response->status(400);
+ response->statusUnknownError(400);
response->result(LLSD("Invalid message parameters"));
}
}
@@ -6074,7 +6076,7 @@ bool LLAgent::teleportCore(bool is_local)
LLFloaterReg::hideInstance("search");
// hide land floater too - it'll be out of date
- LLFloaterLand::hideInstance();
+ LLFloaterReg::hideInstance("about_land");
LLViewerParcelMgr::getInstance()->deselectLand();
@@ -6448,7 +6450,7 @@ void LLAgent::sendAgentSetAppearance()
const LLWearable* wearable = gAgentWearables.getWearable(wearable_type,0);
if (wearable)
{
- hash ^= wearable->getID();
+ hash ^= wearable->getAssetID();
}
}
if (hash.notNull())
@@ -6578,49 +6580,6 @@ void LLAgent::parseTeleportMessages(const std::string& xml_filename)
}//end for (all message sets in xml file)
}
-// static
-void LLAgent::createLandmarkHere()
-{
- std::string landmark_name, landmark_desc;
-
- gAgent.buildLocationString(landmark_name, LLAgent::LOCATION_FORMAT_LANDMARK);
- gAgent.buildLocationString(landmark_desc, LLAgent::LOCATION_FORMAT_FULL);
- LLUUID folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK);
-
- createLandmarkHere(landmark_name, landmark_desc, folder_id);
-}
-
-// static
-void LLAgent::createLandmarkHere(const std::string& name, const std::string& desc, const LLUUID& folder_id)
-{
- LLViewerRegion* agent_region = gAgent.getRegion();
- if(!agent_region)
- {
- llwarns << "No agent region" << llendl;
- return;
- }
- LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
- if (!agent_parcel)
- {
- llwarns << "No agent parcel" << llendl;
- return;
- }
- if (!agent_parcel->getAllowLandmark()
- && !LLViewerParcelMgr::isParcelOwnedByAgent(agent_parcel, GP_LAND_ALLOW_LANDMARK))
- {
- LLNotifications::instance().add("CannotCreateLandmarkNotOwner");
- return;
- }
-
- create_inventory_item(gAgent.getID(), gAgent.getSessionID(),
- folder_id, LLTransactionID::tnull,
- name, desc,
- LLAssetType::AT_LANDMARK,
- LLInventoryType::IT_LANDMARK,
- NOT_WEARABLE, PERM_ALL,
- NULL);
-}
-
void LLAgent::sendAgentUpdateUserInfo(bool im_via_email, const std::string& directory_visibility )
{
gMessageSystem->newMessageFast(_PREHASH_UpdateUserInfo);
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 22e7ccc0e5..290c413079 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -44,6 +44,7 @@
#include "llcharacter.h" // LLAnimPauseRequest
#include "llfollowcam.h" // Ventrella
#include "llagentdata.h" // gAgentID, gAgentSessionID
+#include "lluicolor.h"
#include "llvoavatardefines.h"
extern const BOOL ANIMATE;
@@ -185,10 +186,7 @@ private:
public:
LLVOAvatarSelf* getAvatarObject() const { return mAvatarObject; }
- const LLUUID& getInventoryRootID() const { return mInventoryRootID; }
- LLUUID& getInventoryRootID() { return mInventoryRootID; }
private:
- LLUUID mInventoryRootID;
LLPointer<LLVOAvatarSelf> mAvatarObject; // NULL until avatar object sent down from simulator
/** General Accessors
@@ -269,8 +267,6 @@ public:
std::string getSLURL() const;
BOOL inPrelude();
BOOL buildLocationString(std::string& str, ELocationFormat fmt = LOCATION_FORMAT_LANDMARK); // Utility to build a location string
- static void createLandmarkHere();
- static void createLandmarkHere(const std::string& name, const std::string& desc, const LLUUID& folder_id);
private:
LLViewerRegion *mRegionp;
@@ -833,7 +829,7 @@ public:
F32 mHUDTargetZoom; // Target zoom level for HUD objects (used when editing)
F32 mHUDCurZoom; // Current animated zoom level for HUD objects
private:
- LLColor4 mEffectColor;
+ LLUIColor mEffectColor;
/** Camera
** **
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 1da54ad08c..22875cbca2 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -36,7 +36,7 @@
#include "llagentwearables.h"
#include "llfloatercustomize.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
#include "llinventorymodel.h"
#include "llnotify.h"
#include "llviewerregion.h"
@@ -44,6 +44,9 @@
#include "llwearable.h"
#include "llwearablelist.h"
+#include <boost/scoped_ptr.hpp>
+
+
LLAgentWearables gAgentWearables;
BOOL LLAgentWearables::mInitialWearablesUpdateReceived = FALSE;
@@ -59,22 +62,23 @@ void LLAgentWearables::dump()
llinfos << "Type: " << i << " count " << count << llendl;
for (U32 j=0; j<count; j++)
{
- LLWearableInv* wearable_entry = getWearableInv((EWearableType)i,j);
- if (wearable_entry == NULL)
- {
- llinfos << " " << j << " NULL entry" << llendl;
- continue;
- }
- if (wearable_entry->mWearable == NULL)
+ LLWearable* wearable = getWearable((EWearableType)i,j);
+ if (wearable == NULL)
{
llinfos << " " << j << " NULL wearable" << llendl;
- continue;
}
- llinfos << " " << j << " Name " << wearable_entry->mWearable->getName()
- << " description " << wearable_entry->mWearable->getDescription() << llendl;
+ llinfos << " " << j << " Name " << wearable->getName()
+ << " description " << wearable->getDescription() << llendl;
}
}
+ llinfos << "Total items awaiting wearable update " << mItemsAwaitingWearableUpdate.size() << llendl;
+ for (std::set<LLUUID>::iterator it = mItemsAwaitingWearableUpdate.begin();
+ it != mItemsAwaitingWearableUpdate.end();
+ ++it)
+ {
+ llinfos << (*it).asString() << llendl;
+ }
}
// MULTI-WEARABLE: debugging
@@ -105,7 +109,7 @@ LLAgentWearables::LLAgentWearables() :
// MULTI-WEARABLE: TODO remove null entries.
for (U32 i = 0; i < WT_COUNT; i++)
{
- mWearableDatas[(EWearableType)i].push_back(new LLWearableInv);
+ mWearableDatas[(EWearableType)i].push_back(NULL);
}
}
@@ -116,18 +120,6 @@ LLAgentWearables::~LLAgentWearables()
void LLAgentWearables::cleanup()
{
- for (wearableentry_map_t::iterator iter = mWearableDatas.begin();
- iter != mWearableDatas.end();
- iter++)
- {
- wearableentry_vec_t &wearables = iter->second;
- for (U32 i = 0; i < wearables.size(); i++)
- {
- LLWearableInv *wearable = wearables[i];
- delete wearable;
- wearables[i] = NULL;
- }
- }
mAvatarObject = NULL;
}
@@ -207,11 +199,13 @@ void LLAgentWearables::addWearabletoAgentInventoryDone(const S32 type,
if (item_id.isNull())
return;
- LLWearableInv* wearable_entry = getWearableInv((EWearableType)type, index);
+ LLUUID old_item_id = getWearableItemID((EWearableType)type,index);
+ if (wearable)
+ {
+ wearable->setItemID(item_id);
+ }
+ setWearable((EWearableType)type,index,wearable);
- LLUUID old_item_id = wearable_entry->mItemID;
- wearable_entry->mItemID = item_id;
- wearable_entry->mWearable = wearable;
if (old_item_id.notNull())
gInventory.addChangedMask(LLInventoryObserver::LABEL, old_item_id);
gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
@@ -221,7 +215,7 @@ void LLAgentWearables::addWearabletoAgentInventoryDone(const S32 type,
// We're changing the asset id, so we both need to set it
// locally via setAssetUUID() and via setTransactionID() which
// will be decoded on the server. JC
- item->setAssetUUID(wearable->getID());
+ item->setAssetUUID(wearable->getAssetID());
item->setTransactionID(wearable->getTransactionID());
gInventory.addChangedMask(LLInventoryObserver::INTERNAL, item_id);
item->updateServer(FALSE);
@@ -237,11 +231,10 @@ void LLAgentWearables::sendAgentWearablesUpdate()
{
for (U32 j=0; j < getWearableCount((EWearableType)i); j++)
{
- LLWearableInv* wearable_entry = getWearableInv((EWearableType)i,j);
- LLWearable* wearable = wearable_entry->mWearable;
+ LLWearable* wearable = getWearable((EWearableType)i,j);
if (wearable)
{
- if (wearable_entry->mItemID.isNull())
+ if (wearable->getItemID().isNull())
{
LLPointer<LLInventoryCallback> cb =
new addWearableToAgentInventoryCallback(
@@ -255,7 +248,7 @@ void LLAgentWearables::sendAgentWearablesUpdate()
else
{
gInventory.addChangedMask(LLInventoryObserver::LABEL,
- wearable_entry->mItemID);
+ wearable->getItemID());
}
}
}
@@ -281,12 +274,11 @@ void LLAgentWearables::sendAgentWearablesUpdate()
gMessageSystem->addU8Fast(_PREHASH_WearableType, type_u8);
// MULTI-WEARABLE: TODO: hacked index to 0, needs to loop over all once messages support this.
- LLWearableInv* wearable_entry = getWearableInv((EWearableType)i, 0);
- LLWearable* wearable = wearable_entry->mWearable;
+ LLWearable* wearable = getWearable((EWearableType)i, 0);
if (wearable)
{
//llinfos << "Sending wearable " << wearable->getName() << llendl;
- gMessageSystem->addUUIDFast(_PREHASH_ItemID, wearable_entry->mItemID);
+ gMessageSystem->addUUIDFast(_PREHASH_ItemID, wearable->getItemID());
}
else
{
@@ -294,7 +286,7 @@ void LLAgentWearables::sendAgentWearablesUpdate()
gMessageSystem->addUUIDFast(_PREHASH_ItemID, LLUUID::null);
}
- lldebugs << " " << LLWearableDictionary::getTypeLabel((EWearableType)i) << ": " << (wearable ? wearable->getID() : LLUUID::null) << llendl;
+ lldebugs << " " << LLWearableDictionary::getTypeLabel((EWearableType)i) << ": " << (wearable ? wearable->getAssetID() : LLUUID::null) << llendl;
}
gAgent.sendReliableMessage();
}
@@ -302,14 +294,15 @@ void LLAgentWearables::sendAgentWearablesUpdate()
// MULTI-WEARABLE: add index.
void LLAgentWearables::saveWearable(const EWearableType type, const U32 index, BOOL send_update)
{
- LLWearableInv* wearable_entry = getWearableInv(type, index);
- LLWearable* old_wearable = wearable_entry ? wearable_entry->mWearable : NULL;
+ LLWearable* old_wearable = getWearable(type, index);
if (old_wearable && (old_wearable->isDirty() || old_wearable->isOldVersion()))
{
+ LLUUID old_item_id = old_wearable->getItemID();
LLWearable* new_wearable = LLWearableList::instance().createCopyFromAvatar(old_wearable);
- wearable_entry->mWearable = new_wearable;
+ new_wearable->setItemID(old_item_id); // should this be in LLWearable::copyDataFrom()?
+ setWearable(type,index,new_wearable);
- LLInventoryItem* item = gInventory.getItem(wearable_entry->mItemID);
+ LLInventoryItem* item = gInventory.getItem(old_item_id);
if (item)
{
// Update existing inventory item
@@ -317,7 +310,7 @@ void LLAgentWearables::saveWearable(const EWearableType type, const U32 index, B
new LLViewerInventoryItem(item->getUUID(),
item->getParentUUID(),
item->getPermissions(),
- new_wearable->getID(),
+ new_wearable->getAssetID(),
new_wearable->getAssetType(),
item->getInventoryType(),
item->getName(),
@@ -368,15 +361,14 @@ void LLAgentWearables::saveWearableAs(const EWearableType type,
llwarns << "LLAgent::saveWearableAs() not copyable." << llendl;
return;
}
- LLWearableInv* wearable_entry = getWearableInv(type, index);
- LLWearable* old_wearable = wearable_entry->mWearable;
+ LLWearable* old_wearable = getWearable(type, index);
if (!old_wearable)
{
llwarns << "LLAgent::saveWearableAs() no old wearable." << llendl;
return;
}
- LLInventoryItem* item = gInventory.getItem(wearable_entry->mItemID);
+ LLInventoryItem* item = gInventory.getItem(getWearableItemID(type,index));
if (!item)
{
llwarns << "LLAgent::saveWearableAs() no inventory item." << llendl;
@@ -417,8 +409,7 @@ void LLAgentWearables::saveWearableAs(const EWearableType type,
void LLAgentWearables::revertWearable(const EWearableType type, const U32 index)
{
- LLWearableInv* wearable_entry = getWearableInv(type, index);
- LLWearable* wearable = wearable_entry->mWearable;
+ LLWearable* wearable = getWearable(type, index);
if (wearable)
{
wearable->writeToAvatar(TRUE);
@@ -448,15 +439,16 @@ void LLAgentWearables::setWearableName(const LLUUID& item_id, const std::string&
{
for (U32 j=0; j < getWearableCount((EWearableType)i); j++)
{
- LLWearableInv* wearable_entry = getWearableInv((EWearableType)i,j);
- if (wearable_entry->mItemID == item_id)
+ LLUUID curr_item_id = getWearableItemID((EWearableType)i,j);
+ if (curr_item_id == item_id)
{
- LLWearable* old_wearable = wearable_entry->mWearable;
+ LLWearable* old_wearable = getWearable((EWearableType)i,j);
llassert(old_wearable);
std::string old_name = old_wearable->getName();
old_wearable->setName(new_name);
LLWearable* new_wearable = LLWearableList::instance().createCopy(old_wearable);
+ new_wearable->setItemID(item_id);
LLInventoryItem* item = gInventory.getItem(item_id);
if (item)
{
@@ -464,7 +456,7 @@ void LLAgentWearables::setWearableName(const LLUUID& item_id, const std::string&
}
old_wearable->setName(old_name);
- wearable_entry->mWearable = new_wearable;
+ setWearable((EWearableType)i,j,new_wearable);
sendAgentWearablesUpdate();
break;
}
@@ -475,7 +467,7 @@ void LLAgentWearables::setWearableName(const LLUUID& item_id, const std::string&
BOOL LLAgentWearables::isWearableModifiable(EWearableType type, U32 index) const
{
- LLUUID item_id = getWearableItem(type, index);
+ LLUUID item_id = getWearableItemID(type, index);
if (!item_id.isNull())
{
LLInventoryItem* item = gInventory.getItem(item_id);
@@ -490,7 +482,7 @@ BOOL LLAgentWearables::isWearableModifiable(EWearableType type, U32 index) const
BOOL LLAgentWearables::isWearableCopyable(EWearableType type, U32 index) const
{
- LLUUID item_id = getWearableItem(type, index);
+ LLUUID item_id = getWearableItemID(type, index);
if (!item_id.isNull())
{
LLInventoryItem* item = gInventory.getItem(item_id);
@@ -506,7 +498,7 @@ BOOL LLAgentWearables::isWearableCopyable(EWearableType type, U32 index) const
/*
U32 LLAgentWearables::getWearablePermMask(EWearableType type)
{
- LLUUID item_id = getWearableItem(type);
+ LLUUID item_id = getWearableItemID(type);
if (!item_id.isNull())
{
LLInventoryItem* item = gInventory.getItem(item_id);
@@ -521,7 +513,7 @@ BOOL LLAgentWearables::isWearableCopyable(EWearableType type, U32 index) const
LLInventoryItem* LLAgentWearables::getWearableInventoryItem(EWearableType type, U32 index)
{
- LLUUID item_id = getWearableItem(type,index);
+ LLUUID item_id = getWearableItemID(type,index);
LLInventoryItem* item = NULL;
if (item_id.notNull())
{
@@ -530,16 +522,16 @@ LLInventoryItem* LLAgentWearables::getWearableInventoryItem(EWearableType type,
return item;
}
-LLWearable* LLAgentWearables::getWearableFromWearableItem(const LLUUID& item_id) const
+const LLWearable* LLAgentWearables::getWearableFromWearableItem(const LLUUID& item_id) const
{
for (S32 i=0; i < WT_COUNT; i++)
{
for (U32 j=0; j < getWearableCount((EWearableType)i); j++)
{
- const LLWearableInv* wearable_entry = getWearableInv((EWearableType)i, j);
- if (wearable_entry->mItemID == item_id)
+ LLUUID curr_item_id = getWearableItemID((EWearableType)i, j);
+ if (curr_item_id == item_id)
{
- return wearable_entry->mWearable;
+ return getWearable((EWearableType)i, j);
}
}
}
@@ -558,47 +550,57 @@ void LLAgentWearables::sendAgentWearablesRequest()
// MULTI-WEARABLE: update for multiple items per type.
// Used to enable/disable menu items.
// static
-BOOL LLAgentWearables::selfHasWearable(void* userdata)
+BOOL LLAgentWearables::selfHasWearable(EWearableType type)
{
- EWearableType type = (EWearableType)(intptr_t)userdata;
// MULTI-WEARABLE: TODO could be getWearableCount > 0, once null entries have been eliminated.
- return gAgentWearables.getWearableInv(type,0)->mWearable != NULL;
+ return gAgentWearables.getWearable(type,0) != NULL;
}
-const LLAgentWearables::LLWearableInv LLAgentWearables::s_null_wearable;
-
LLWearable* LLAgentWearables::getWearable(const EWearableType type, U32 index)
{
- LLWearableInv* inv = getWearableInv(type,index);
- return inv->mWearable;
-}
-
-const LLWearable* LLAgentWearables::getWearable(const EWearableType type, U32 index) const
-{
- const LLWearableInv* inv = getWearableInv(type,index);
- return inv->mWearable;
+ wearableentry_map_t::iterator wearable_iter = mWearableDatas.find(type);
+ if (wearable_iter == mWearableDatas.end())
+ {
+ return NULL;
+ }
+ wearableentry_vec_t& wearable_vec = wearable_iter->second;
+ if (index>=wearable_vec.size())
+ {
+ return NULL;
+ }
+ else
+ {
+ return wearable_vec[index];
+ }
}
-//MULTI-WEARABLE: this will give wrong values until we get rid of the "always one empty object" scheme.
-U32 LLAgentWearables::getWearableCount(const EWearableType type) const
+void LLAgentWearables::setWearable(const EWearableType type, U32 index, LLWearable *wearable)
{
- wearableentry_map_t::const_iterator wearable_iter = mWearableDatas.find(type);
+ wearableentry_map_t::iterator wearable_iter = mWearableDatas.find(type);
if (wearable_iter == mWearableDatas.end())
{
- return 0;
+ llwarns << "invalid type, type " << type << " index " << index << llendl;
+ return;
+ }
+ wearableentry_vec_t& wearable_vec = wearable_iter->second;
+ if (index>=wearable_vec.size())
+ {
+ llwarns << "invalid index, type " << type << " index " << index << llendl;
+ }
+ else
+ {
+ wearable_vec[index] = wearable;
}
- const wearableentry_vec_t& wearable_vec = wearable_iter->second;
- return wearable_vec.size();
}
-
-LLAgentWearables::LLWearableInv* LLAgentWearables::getWearableInv(const EWearableType type, U32 index)
+
+const LLWearable* LLAgentWearables::getWearable(const EWearableType type, U32 index) const
{
- wearableentry_map_t::iterator wearable_iter = mWearableDatas.find(type);
+ wearableentry_map_t::const_iterator wearable_iter = mWearableDatas.find(type);
if (wearable_iter == mWearableDatas.end())
{
return NULL;
}
- wearableentry_vec_t& wearable_vec = wearable_iter->second;
+ const wearableentry_vec_t& wearable_vec = wearable_iter->second;
if (index>=wearable_vec.size())
{
return NULL;
@@ -609,22 +611,36 @@ LLAgentWearables::LLWearableInv* LLAgentWearables::getWearableInv(const EWearabl
}
}
-const LLAgentWearables::LLWearableInv* LLAgentWearables::getWearableInv(const EWearableType type, U32 index) const
+//MULTI-WEARABLE: this will give wrong values until we get rid of the "always one empty object" scheme.
+U32 LLAgentWearables::getWearableCount(const EWearableType type) const
{
wearableentry_map_t::const_iterator wearable_iter = mWearableDatas.find(type);
- if (wearable_iter == mWearableDatas.end()) return &s_null_wearable;
+ if (wearable_iter == mWearableDatas.end())
+ {
+ return 0;
+ }
const wearableentry_vec_t& wearable_vec = wearable_iter->second;
- if (index>=wearable_vec.size())
- return &s_null_wearable;
- else
- return wearable_vec[index];
+ return wearable_vec.size();
}
-const LLUUID& LLAgentWearables::getWearableItem(EWearableType type, U32 index) const
+BOOL LLAgentWearables::itemUpdatePending(const LLUUID& item_id) const
{
- return getWearableInv(type,index)->mItemID;
+ return mItemsAwaitingWearableUpdate.find(item_id) != mItemsAwaitingWearableUpdate.end();
}
+U32 LLAgentWearables::itemUpdatePendingCount() const
+{
+ return mItemsAwaitingWearableUpdate.size();
+}
+
+const LLUUID LLAgentWearables::getWearableItemID(EWearableType type, U32 index) const
+{
+ const LLWearable *wearable = getWearable(type,index);
+ if (wearable)
+ return wearable->getItemID();
+ else
+ return LLUUID();
+}
// Warning: include_linked_items = TRUE makes this operation expensive.
BOOL LLAgentWearables::isWearingItem(const LLUUID& item_id, BOOL include_linked_items) const
@@ -646,6 +662,13 @@ BOOL LLAgentWearables::isWearingItem(const LLUUID& item_id, BOOL include_linked_
return FALSE;
}
+struct InitialWearableData
+{
+ S32 mType;
+ U32 mIndex;
+ LLUUID mItemID;
+};
+
// MULTI-WEARABLE: update for multiple
// static
void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgsys, void** user_data)
@@ -676,7 +699,9 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs
//lldebugs << "processAgentInitialWearablesUpdate()" << llendl;
// Add wearables
LLUUID asset_id_array[WT_COUNT];
+ LLUUID item_id_array[WT_COUNT];
// MULTI-WEARABLE: TODO: update once messages change. Currently use results to populate the zeroth element.
+ gAgentWearables.mItemsAwaitingWearableUpdate.clear();
for (S32 i=0; i < num_wearables; i++)
{
U8 type_u8 = 0;
@@ -703,9 +728,10 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs
{
continue;
}
- // MULTI-WEARABLE: TODO FIXME: assumes zeroth element always exists and can be safely written to.
- LLWearableInv* wearable_entry = gAgentWearables.getWearableInv(type,0);
- wearable_entry->mItemID = item_id;
+
+ // MULTI-WEARABLE: extend arrays to index by type + index.
+ gAgentWearables.mItemsAwaitingWearableUpdate.insert(item_id);
+ item_id_array[type] = item_id;
asset_id_array[type] = asset_id;
}
@@ -715,14 +741,18 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs
// now that we have the asset ids...request the wearable assets
for (S32 i = 0; i < WT_COUNT; i++)
{
- // MULTI-WEARABLE: TODO: update once messages change. Currently use results to populate the zeroth element.
- LLWearableInv* wearable_entry = gAgentWearables.getWearableInv((EWearableType)i, 0);
- if (!wearable_entry->mItemID.isNull())
+ // MULTI-WEARABLE: TODO: update once messages change.
+ // Currently use results to populate the zeroth element.
+ if (!item_id_array[i].isNull())
{
+ InitialWearableData *wear_data = new InitialWearableData;
+ wear_data->mType = i;
+ wear_data->mIndex = 0; // MULTI-WEARABLE: update
+ wear_data->mItemID = item_id_array[i];
LLWearableList::instance().getAsset(asset_id_array[i],
LLStringUtil::null,
LLWearableDictionary::getAssetType((EWearableType) i),
- onInitialWearableAssetArrived, (void*)(intptr_t)i);
+ onInitialWearableAssetArrived, (void*)wear_data);
}
}
}
@@ -732,7 +762,9 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs
// static
void LLAgentWearables::onInitialWearableAssetArrived(LLWearable* wearable, void* userdata)
{
- const EWearableType type = (EWearableType)(intptr_t)userdata;
+ boost::scoped_ptr<InitialWearableData> wear_data((InitialWearableData*)userdata);
+ const EWearableType type = (EWearableType)wear_data->mType;
+ const U32 index = wear_data->mIndex;
LLVOAvatarSelf* avatar = gAgent.getAvatarObject();
if (!avatar)
@@ -743,44 +775,31 @@ void LLAgentWearables::onInitialWearableAssetArrived(LLWearable* wearable, void*
if (wearable)
{
llassert(type == wearable->getType());
- // MULTI-WEARABLE: is this always zeroth element? Change sometime.
- LLWearableInv* wearable_entry = gAgentWearables.getWearableInv(type,0);
- wearable_entry->mWearable = wearable;
-
+ wearable->setItemID(wear_data->mItemID);
+ gAgentWearables.setWearable(type,index,wearable);
+ gAgentWearables.mItemsAwaitingWearableUpdate.erase(wear_data->mItemID);
+
// disable composites if initial textures are baked
avatar->setupComposites();
- gAgentWearables.queryWearableCache();
wearable->writeToAvatar(FALSE);
avatar->setCompositeUpdatesEnabled(TRUE);
- gInventory.addChangedMask(LLInventoryObserver::LABEL, wearable_entry->mItemID);
+ gInventory.addChangedMask(LLInventoryObserver::LABEL, wearable->getItemID());
}
else
{
// Somehow the asset doesn't exist in the database.
// MULTI-WEARABLE: assuming zeroth elt
- gAgentWearables.recoverMissingWearable(type,0);
+ gAgentWearables.recoverMissingWearable(type,index);
}
gInventory.notifyObservers();
// Have all the wearables that the avatar was wearing at log-in arrived?
// MULTI-WEARABLE: update when multiple wearables can arrive per type.
- if (!gAgentWearables.mWearablesLoaded)
- {
- gAgentWearables.mWearablesLoaded = TRUE;
- for (S32 i = 0; i < WT_COUNT; i++)
- {
- LLWearableInv* wearable_entry = gAgentWearables.getWearableInv((EWearableType)i,0);
- if (!wearable_entry->mItemID.isNull() && !wearable_entry->mWearable)
- {
- gAgentWearables.mWearablesLoaded = FALSE;
- break;
- }
- }
- }
- if (gAgentWearables.mWearablesLoaded)
+ gAgentWearables.updateWearablesLoaded();
+ if (gAgentWearables.areWearablesLoaded())
{
// Can't query cache until all wearables have arrived, so calling this earlier is a no-op.
@@ -809,8 +828,7 @@ void LLAgentWearables::recoverMissingWearable(const EWearableType type, U32 inde
LLWearable* new_wearable = LLWearableList::instance().createNewWearable(type);
S32 type_s32 = (S32) type;
- LLWearableInv* wearable_entry = getWearableInv(type, index);
- wearable_entry->mWearable = new_wearable;
+ setWearable(type,index,new_wearable);
new_wearable->writeToAvatar(TRUE);
// Add a new one in the lost and found folder.
@@ -831,19 +849,8 @@ void LLAgentWearables::recoverMissingWearable(const EWearableType type, U32 inde
void LLAgentWearables::recoverMissingWearableDone()
{
// Have all the wearables that the avatar was wearing at log-in arrived or been fabricated?
- mWearablesLoaded = TRUE;
- for (S32 i = 0; i < WT_COUNT; i++)
- {
- // MULTI-WEARABLE: assuming zeroth elt - fix when messages change.
- LLWearableInv* wearable_entry = getWearableInv((EWearableType)i,0);
- if (!wearable_entry->mItemID.isNull() && !wearable_entry->mWearable)
- {
- mWearablesLoaded = FALSE;
- break;
- }
- }
-
- if (mWearablesLoaded)
+ updateWearablesLoaded();
+ if (areWearablesLoaded())
{
// Make sure that the server's idea of the avatar's wearables actually match the wearables.
gAgent.sendAgentSetAppearance();
@@ -855,6 +862,17 @@ void LLAgentWearables::recoverMissingWearableDone()
}
}
+void LLAgentWearables::addLocalTextureObject(const EWearableType wearable_type, const LLVOAvatarDefines::ETextureIndex texture_type, U32 wearable_index)
+{
+ LLWearable* wearable = getWearable((EWearableType)wearable_type, wearable_index);
+ if (!wearable)
+ {
+ llerrs << "Tried to add local texture object to invalid wearable with type " << wearable_type << " and index " << wearable_index << llendl;
+ }
+
+ wearable->setLocalTextureObject(texture_type, new LLLocalTextureObject());
+}
+
void LLAgentWearables::createStandardWearables(BOOL female)
{
llwarns << "Creating Standard " << (female ? "female" : "male")
@@ -896,10 +914,9 @@ void LLAgentWearables::createStandardWearables(BOOL female)
donecb = new createStandardWearablesAllDoneCallback;
}
// MULTI_WEARABLE: only elt 0, may be the right thing?
- LLWearableInv* wearable_entry = getWearableInv((EWearableType)i,0);
- llassert(wearable_entry->mWearable == NULL);
+ llassert(getWearable((EWearableType)i,0) == NULL);
LLWearable* wearable = LLWearableList::instance().createNewWearable((EWearableType)i);
- wearable_entry->mWearable = wearable;
+ setWearable((EWearableType)i,0,wearable);
// no need to update here...
// MULTI_WEARABLE: hardwired index = 0 here.
LLPointer<LLInventoryCallback> cb =
@@ -929,6 +946,8 @@ void LLAgentWearables::createStandardWearablesAllDone()
// ... because sendAgentWearablesUpdate will notify inventory
// observers.
mWearablesLoaded = TRUE;
+ checkWearablesLoaded();
+
updateServer();
// Treat this as the first texture entry message, if none received yet
@@ -968,8 +987,7 @@ void LLAgentWearables::makeNewOutfit(const std::string& new_folder_name,
const S32 type = wearables_to_include[i];
for (U32 j=0; j<getWearableCount((EWearableType)i); j++)
{
- LLWearableInv* wearable_entry = getWearableInv((EWearableType)type, j);
- LLWearable* old_wearable = wearable_entry->mWearable;
+ LLWearable* old_wearable = getWearable((EWearableType)type, j);
if (old_wearable)
{
std::string new_name;
@@ -984,7 +1002,7 @@ void LLAgentWearables::makeNewOutfit(const std::string& new_folder_name,
new_wearable->setName(new_name);
}
- LLViewerInventoryItem* item = gInventory.getItem(wearable_entry->mItemID);
+ LLViewerInventoryItem* item = gInventory.getItem(getWearableItemID((EWearableType)type,j));
S32 todo = addWearableToAgentInventoryCallback::CALL_NONE;
if (!found_first_item)
{
@@ -1071,12 +1089,11 @@ void LLAgentWearables::makeNewOutfit(const std::string& new_folder_name,
void LLAgentWearables::makeNewOutfitDone(S32 type, U32 index)
{
- LLWearableInv* wearable_entry = getWearableInv((EWearableType)type, index);
- LLUUID first_item_id = wearable_entry->mItemID;
+ LLUUID first_item_id = getWearableItemID((EWearableType)type, index);
// Open the inventory and select the first item we added.
if (first_item_id.notNull())
{
- LLInventoryView* view = LLInventoryView::getActiveInventory();
+ LLFloaterInventory* view = LLFloaterInventory::getActiveInventory();
if (view)
{
view->getPanel()->setSelection(first_item_id, TAKE_FOCUS_NO);
@@ -1178,17 +1195,15 @@ void LLAgentWearables::removeWearableFinal(const EWearableType type, bool do_rem
S32 max_entry = mWearableDatas[type].size()-1;
for (S32 i=max_entry; i>=0; i--)
{
- LLWearableInv *wearable_entry = getWearableInv(type,i);
- LLWearable* old_wearable = wearable_entry->mWearable;
- gInventory.addChangedMask(LLInventoryObserver::LABEL, wearable_entry->mItemID);
- wearable_entry->mWearable = NULL;
- wearable_entry->mItemID.setNull();
- //queryWearableCache(); // BAP moved below
+ LLWearable* old_wearable = getWearable(type,i);
+ gInventory.addChangedMask(LLInventoryObserver::LABEL, getWearableItemID(type,i));
+ setWearable(type,i,NULL);
+
+ //queryWearableCache(); // moved below
// MULTI_WEARABLE: FIXME - currently we keep a null entry, so can't delete the last one.
if (i>0)
{
mWearableDatas[type].pop_back();
- delete wearable_entry;
}
if (old_wearable)
{
@@ -1198,15 +1213,12 @@ void LLAgentWearables::removeWearableFinal(const EWearableType type, bool do_rem
}
else
{
- LLWearableInv* wearable_entry = getWearableInv(type, index);
- LLWearable* old_wearable = wearable_entry->mWearable;
+ LLWearable* old_wearable = getWearable(type, index);
- gInventory.addChangedMask(LLInventoryObserver::LABEL, wearable_entry->mItemID);
+ gInventory.addChangedMask(LLInventoryObserver::LABEL, getWearableItemID(type,index));
+ setWearable(type,index,NULL);
- wearable_entry->mWearable = NULL;
- wearable_entry->mItemID.setNull();
-
- //queryWearableCache(); // BAP moved below
+ //queryWearableCache(); // moved below
if (old_wearable)
{
@@ -1221,7 +1233,6 @@ void LLAgentWearables::removeWearableFinal(const EWearableType type, bool do_rem
llassert_always(wearable_iter != mWearableDatas.end());
wearableentry_vec_t& wearable_vec = wearable_iter->second;
wearable_vec.erase( wearable_vec.begin() + index );
- delete(wearable_entry);
}
}
@@ -1268,12 +1279,11 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
wearables_to_remove[type] = FALSE;
// MULTI_WEARABLE: using 0th
- LLWearableInv* old_wearable_entry = getWearableInv(type, 0);
- LLWearable* old_wearable = old_wearable_entry->mWearable;
+ LLWearable* old_wearable = getWearable(type, 0);
if (old_wearable)
{
- const LLUUID& old_item_id = old_wearable_entry->mItemID;
- if ((old_wearable->getID() == new_wearable->getID()) &&
+ const LLUUID& old_item_id = getWearableItemID(type, 0);
+ if ((old_wearable->getAssetID() == new_wearable->getAssetID()) &&
(old_item_id == new_item->getUUID()))
{
lldebugs << "No change to wearable asset and item: " << LLWearableDictionary::getInstance()->getWearableEntry(type) << llendl;
@@ -1290,8 +1300,9 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
}
}
- old_wearable_entry->mItemID = new_item->getUUID();
- old_wearable_entry->mWearable = new_wearable;
+ setWearable(type,0,new_wearable);
+ if (new_wearable)
+ new_wearable->setItemID(new_item->getUUID());
}
std::vector<LLWearable*> wearables_being_removed;
@@ -1301,12 +1312,13 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
if (wearables_to_remove[i])
{
// MULTI_WEARABLE: assuming 0th
- LLWearableInv* wearable_entry = getWearableInv((EWearableType)i, 0);
- wearables_being_removed.push_back(wearable_entry->mWearable);
- wearable_entry->mWearable = NULL;
-
- gInventory.addChangedMask(LLInventoryObserver::LABEL, wearable_entry->mItemID);
- wearable_entry->mItemID.setNull();
+ LLWearable* wearable = getWearable((EWearableType)i, 0);
+ gInventory.addChangedMask(LLInventoryObserver::LABEL, getWearableItemID((EWearableType)i,0));
+ if (wearable)
+ {
+ wearables_being_removed.push_back(wearable);
+ }
+ setWearable((EWearableType)i,0,NULL);
}
}
@@ -1334,6 +1346,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
// Start rendering & update the server
mWearablesLoaded = TRUE;
+ checkWearablesLoaded();
updateServer();
lldebugs << "setWearableOutfit() end" << llendl;
@@ -1341,9 +1354,9 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
// User has picked "wear on avatar" from a menu.
-void LLAgentWearables::setWearable(LLInventoryItem* new_item, LLWearable* new_wearable, bool do_append)
+void LLAgentWearables::setWearableItem(LLInventoryItem* new_item, LLWearable* new_wearable, bool do_append)
{
- //LLAgentDumper dumper("setWearable");
+ //LLAgentDumper dumper("setWearableItem");
if (isWearingItem(new_item->getUUID()))
{
llwarns << "wearable " << new_item->getUUID() << " is already worn" << llendl;
@@ -1356,12 +1369,11 @@ void LLAgentWearables::setWearable(LLInventoryItem* new_item, LLWearable* new_we
{
// Remove old wearable, if any
// MULTI_WEARABLE: hardwired to 0
- LLWearableInv* old_wearable_entry = getWearableInv(type,0);
- LLWearable* old_wearable = old_wearable_entry->mWearable;
+ LLWearable* old_wearable = getWearable(type,0);
if (old_wearable)
{
- const LLUUID& old_item_id = old_wearable_entry->mItemID;
- if ((old_wearable->getID() == new_wearable->getID()) &&
+ const LLUUID& old_item_id = old_wearable->getItemID();
+ if ((old_wearable->getAssetID() == new_wearable->getAssetID()) &&
(old_item_id == new_item->getUUID()))
{
lldebugs << "No change to wearable asset and item: " << LLWearableDictionary::getInstance()->getWearableEntry(type) << llendl;
@@ -1417,29 +1429,32 @@ bool LLAgentWearables::onSetWearableDialog(const LLSD& notification, const LLSD&
return false;
}
-// Called from setWearable() and onSetWearableDialog() to actually set the wearable.
+// Called from setWearableItem() and onSetWearableDialog() to actually set the wearable.
// MULTI_WEARABLE: unify code after null objects are gone.
void LLAgentWearables::setWearableFinal(LLInventoryItem* new_item, LLWearable* new_wearable, bool do_append)
{
const EWearableType type = new_wearable->getType();
- if (do_append && getWearableInv(type,0)->mItemID.notNull())
+ if (do_append && getWearableItemID(type,0).notNull())
{
- LLWearableInv *new_wearable_entry = new LLWearableInv;
- new_wearable_entry->mItemID = new_item->getUUID();
- new_wearable_entry->mWearable = new_wearable;
- mWearableDatas[type].push_back(new_wearable_entry);
+ new_wearable->setItemID(new_item->getUUID());
+ mWearableDatas[type].push_back(new_wearable);
llinfos << "Added additional wearable for type " << type
<< " size is now " << mWearableDatas[type].size() << llendl;
}
else
{
- LLWearableInv* wearable_entry = getWearableInv(type,0);
// Replace the old wearable with a new one.
- llassert(new_item->getAssetUUID() == new_wearable->getID());
- LLUUID old_item_id = wearable_entry->mItemID;
- wearable_entry->mItemID = new_item->getUUID();
- wearable_entry->mWearable = new_wearable;
+ llassert(new_item->getAssetUUID() == new_wearable->getAssetID());
+
+ LLWearable *old_wearable = getWearable(type,0);
+ LLUUID old_item_id;
+ if (old_wearable)
+ {
+ old_item_id = old_wearable->getItemID();
+ }
+ new_wearable->setItemID(new_item->getUUID());
+ setWearable(type,0,new_wearable);
if (old_item_id.notNull())
{
@@ -1450,7 +1465,7 @@ void LLAgentWearables::setWearableFinal(LLInventoryItem* new_item, LLWearable* n
<< " size is now " << mWearableDatas[type].size() << llendl;
}
- //llinfos << "LLVOAvatar::setWearable()" << llendl;
+ //llinfos << "LLVOAvatar::setWearableItem()" << llendl;
queryWearableCache();
new_wearable->writeToAvatar(TRUE);
@@ -1459,7 +1474,7 @@ void LLAgentWearables::setWearableFinal(LLInventoryItem* new_item, LLWearable* n
void LLAgentWearables::queryWearableCache()
{
- if (!mWearablesLoaded)
+ if (!areWearablesLoaded())
{
return;
}
@@ -1489,10 +1504,10 @@ void LLAgentWearables::queryWearableCache()
// EWearableType baked_type = gBakedWearableMap[baked_index][baked_num];
const EWearableType baked_type = baked_dict->mWearables[i];
// MULTI_WEARABLE: assuming 0th
- const LLWearable* wearable = getWearableInv(baked_type,0)->mWearable;
+ const LLWearable* wearable = getWearable(baked_type,0);
if (wearable)
{
- hash ^= wearable->getID();
+ hash ^= wearable->getAssetID();
}
}
if (hash.notNull())
@@ -1592,6 +1607,29 @@ void LLAgentWearables::userRemoveAllAttachments(void* userdata)
gMessageSystem->sendReliable(gAgent.getRegionHost());
}
+void LLAgentWearables::checkWearablesLoaded() const
+{
+#ifdef SHOW_ASSERT
+ U32 item_pend_count = itemUpdatePendingCount();
+ if (mWearablesLoaded)
+ {
+ llassert(item_pend_count==0);
+ }
+#endif
+}
+
+BOOL LLAgentWearables::areWearablesLoaded() const
+{
+ checkWearablesLoaded();
+ return mWearablesLoaded;
+}
+
+// MULTI-WEARABLE: update for multiple indices.
+void LLAgentWearables::updateWearablesLoaded()
+{
+ mWearablesLoaded = (itemUpdatePendingCount()==0);
+}
+
void LLAgentWearables::updateServer()
{
sendAgentWearablesUpdate();
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index 31d6e30069..977efd71b4 100644
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -66,32 +66,37 @@ public:
BOOL isWearingItem(const LLUUID& item_id, const BOOL include_linked_items = FALSE) const;
BOOL isWearableModifiable(EWearableType type, U32 index /*= 0*/) const;
BOOL isWearableCopyable(EWearableType type, U32 index /*= 0*/) const;
- BOOL areWearablesLoaded() const { return mWearablesLoaded; }
+ BOOL areWearablesLoaded() const;
+ void updateWearablesLoaded();
+ void checkWearablesLoaded() const;
+
//--------------------------------------------------------------------
// Accessors
//--------------------------------------------------------------------
public:
- const LLUUID& getWearableItem(EWearableType type, U32 index /*= 0*/) const;
- LLWearable* getWearableFromWearableItem(const LLUUID& item_id) const;
+ const LLUUID getWearableItemID(EWearableType type, U32 index /*= 0*/) const;
+ const LLWearable* getWearableFromWearableItem(const LLUUID& item_id) const;
LLInventoryItem* getWearableInventoryItem(EWearableType type, U32 index /*= 0*/);
// MULTI-WEARABLE: assuming one per type.
- static BOOL selfHasWearable(void* userdata); // userdata is EWearableType
+ static BOOL selfHasWearable(EWearableType type);
LLWearable* getWearable(const EWearableType type, U32 index /*= 0*/);
const LLWearable* getWearable(const EWearableType type, U32 index /*= 0*/) const;
U32 getWearableCount(const EWearableType type) const;
+
private:
- struct LLWearableInv;
- LLWearableInv* getWearableInv(const EWearableType type, U32 index /*= 0*/);
- const LLWearableInv* getWearableInv(const EWearableType type, U32 /*index = 0*/) const;
+ // Low-level data structure setter - public access is via setWearableItem, etc.
+ void setWearable(const EWearableType type, U32 index, LLWearable *wearable);
+
//--------------------------------------------------------------------
// Setters
//--------------------------------------------------------------------
public:
- void setWearable(LLInventoryItem* new_item, LLWearable* wearable, bool do_append = false);
+ void setWearableItem(LLInventoryItem* new_item, LLWearable* wearable, bool do_append = false);
void setWearableOutfit(const LLInventoryItem::item_array_t& items, const LLDynamicArray< LLWearable* >& wearables, BOOL remove);
void setWearableName(const LLUUID& item_id, const std::string& new_name);
+ void addLocalTextureObject(const EWearableType wearable_type, const LLVOAvatarDefines::ETextureIndex texture_type, U32 wearable_index);
protected:
void setWearableFinal(LLInventoryItem* new_item, LLWearable* new_wearable, bool do_append = false);
static bool onSetWearableDialog(const LLSD& notification, const LLSD& response, LLWearable* wearable);
@@ -160,16 +165,20 @@ public:
static void userRemoveAllClothes(void* userdata); // userdata is NULL
static void userRemoveAllAttachments(void* userdata); // userdata is NULL
+ BOOL itemUpdatePending(const LLUUID& item_id) const;
+ U32 itemUpdatePendingCount() const;
+
//--------------------------------------------------------------------
// Member variables
//--------------------------------------------------------------------
private:
- typedef std::vector<LLWearableInv*> wearableentry_vec_t; // all wearables of a certain type (EG all shirts)
+ typedef std::vector<LLWearable*> wearableentry_vec_t; // all wearables of a certain type (EG all shirts)
typedef std::map<EWearableType, wearableentry_vec_t> wearableentry_map_t; // wearable "categories" arranged by wearable type
wearableentry_map_t mWearableDatas;
static BOOL mInitialWearablesUpdateReceived;
BOOL mWearablesLoaded;
+ std::set<LLUUID> mItemsAwaitingWearableUpdate;
LLPointer<LLVOAvatarSelf> mAvatarObject; // NULL until avatar object sent down from simulator
//--------------------------------------------------------------------------------
@@ -215,15 +224,6 @@ private:
LLPointer<LLRefCount> mCB;
};
- struct LLWearableInv // Make this subclass of llwearable?
- {
- LLWearableInv() : mItemID(LLUUID::null), mWearable(NULL) {}
- // BOOL exists() const;
- LLUUID mItemID; // ID of the inventory item in the agent's inventory.
- LLWearable* mWearable;
- };
- const static LLWearableInv s_null_wearable;
-
}; // LLAgentWearables
extern LLAgentWearables gAgentWearables;
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 5a1ccb2047..87354121a0 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -42,7 +42,7 @@
#include "lltexteditor.h"
#include "llalertdialog.h"
#include "llerrorcontrol.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llgroupmgr.h"
#include "llagent.h"
#include "llagentwearables.h"
@@ -156,8 +156,9 @@
#include "llviewerfloaterreg.h"
#include "llcommandlineparser.h"
#include "llfloatermemleak.h"
+#include "llfloaterreg.h"
#include "llfloatersnapshot.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
// includes for idle() idleShutdown()
#include "llviewercontrol.h"
@@ -239,9 +240,6 @@ LLTimer gLogoutTimer;
static const F32 LOGOUT_REQUEST_TIME = 6.f; // this will be cut short by the LogoutReply msg.
F32 gLogoutMaxTime = LOGOUT_REQUEST_TIME;
-LLUUID gInventoryLibraryOwner;
-LLUUID gInventoryLibraryRoot;
-
BOOL gDisconnected = FALSE;
// Map scale in pixels per region
@@ -672,7 +670,6 @@ bool LLAppViewer::init()
// Widget construction depends on LLUI being initialized
LLUI::settings_map_t settings_map;
settings_map["config"] = &gSavedSettings;
- settings_map["color"] = &gSavedSkinSettings;
settings_map["ignores"] = &gWarningSettings;
settings_map["floater"] = &gSavedSettings; // *TODO: New settings file
settings_map["account"] = &gSavedPerAccountSettings;
@@ -940,9 +937,10 @@ bool LLAppViewer::mainLoop()
#endif
//memory leaking simulation
- if(LLFloaterMemLeak::getInstance())
+ LLFloaterMemLeak* mem_leak_instance = LLFloaterReg::getTypedInstance<LLFloaterMemLeak>("mem_leaking");
+ if(mem_leak_instance)
{
- LLFloaterMemLeak::getInstance()->idle() ;
+ mem_leak_instance->idle() ;
}
// canonical per-frame event
@@ -1109,9 +1107,10 @@ bool LLAppViewer::mainLoop()
catch(std::bad_alloc)
{
//stop memory leaking simulation
- if(LLFloaterMemLeak::getInstance())
+ LLFloaterMemLeak* mem_leak_instance = LLFloaterReg::getTypedInstance<LLFloaterMemLeak>("mem_leaking");
+ if(mem_leak_instance)
{
- LLFloaterMemLeak::getInstance()->stop() ;
+ mem_leak_instance->stop() ;
llwarns << "Bad memory allocation in LLAppViewer::mainLoop()!" << llendl ;
}
else
@@ -1136,9 +1135,10 @@ bool LLAppViewer::mainLoop()
llwarns << "Bad memory allocation when saveFinalSnapshot() is called!" << llendl ;
//stop memory leaking simulation
- if(LLFloaterMemLeak::getInstance())
+ LLFloaterMemLeak* mem_leak_instance = LLFloaterReg::getTypedInstance<LLFloaterMemLeak>("mem_leaking");
+ if(mem_leak_instance)
{
- LLFloaterMemLeak::getInstance()->stop() ;
+ mem_leak_instance->stop() ;
}
}
}
@@ -1369,8 +1369,8 @@ bool LLAppViewer::cleanup()
// save their rects on delete.
gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE);
- //*FIX: don't overwrite user color tweaks with *all* colors
- gSavedSkinSettings.saveToFile(gSavedSettings.getString("SkinningSettingsFile"), TRUE);
+ LLUIColorTable::instance().saveUserSettings();
+
// PerAccountSettingsFile should be empty if no use has been logged on.
// *FIX:Mani This should get really saved in a "logoff" mode.
gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE);
@@ -1384,7 +1384,7 @@ bool LLAppViewer::cleanup()
gWarningSettings.saveToFile(warnings_settings_filename, TRUE);
gSavedSettings.cleanup();
- gSavedSkinSettings.cleanup();
+ LLUIColorTable::instance().clear();
gCrashSettings.cleanup();
// Save URL history file
@@ -1463,10 +1463,10 @@ bool LLAppViewer::cleanup()
LLMetricPerformanceTester::cleanClass() ;
//Note:
- //LLViewerMedia::cleanupClass() has to be put before gImageList.shutdown()
+ //LLViewerMedia::cleanupClass() has to be put before gTextureList.shutdown()
//because some new image might be generated during cleaning up media. --bao
LLViewerMedia::cleanupClass();
- gImageList.shutdown(); // shutdown again in case a callback added something
+ gTextureList.shutdown(); // shutdown again in case a callback added something
LLUIImageList::getInstance()->cleanUp();
// This should eventually be done in LLAppViewer
@@ -1724,43 +1724,7 @@ std::string LLAppViewer::getSettingsFilename(const std::string& location_key,
void LLAppViewer::loadColorSettings()
{
- gSavedSkinSettings.cleanup();
-
- loadSettingsFromDirectory("DefaultSkin");
- loadSettingsFromDirectory("CurrentSkin", true);
- loadSettingsFromDirectory("UserSkin");
-
- class ColorConverterFunctor : public LLControlGroup::ApplyFunctor
- {
- public:
- explicit ColorConverterFunctor(LLUIColorTable::Params& result)
- :mResult(result)
- {
- }
-
- void apply(const std::string& name, LLControlVariable* control)
- {
- if(control->isType(TYPE_COL4))
- {
- LLUIColorTable::ColorParams color;
- color.value = (LLColor4)control->getValue();
-
- LLUIColorTable::ColorEntryParams color_entry;
- color_entry.name = name;
- color_entry.color = color;
-
- mResult.color_entries.add(color_entry);
- }
- }
-
- private:
- LLUIColorTable::Params& mResult;
- };
-
- LLUIColorTable::Params params;
- ColorConverterFunctor ccf(params);
- LLControlGroup::getInstance("Skinning")->applyToAll(&ccf);
- LLUIColorTable::instance().init(params);
+ LLUIColorTable::instance().loadFromSettings();
}
bool LLAppViewer::initConfiguration()
@@ -1804,9 +1768,6 @@ bool LLAppViewer::initConfiguration()
gSavedSettings.setString("ClientSettingsFile",
gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Global")));
- gSavedSettings.setString("SkinningSettingsFile",
- gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("UserSkin", "Skinning")));
-
gSavedSettings.setString("VersionChannelName", LL_CHANNEL);
#ifndef LL_RELEASE_FOR_DOWNLOAD
@@ -1837,7 +1798,7 @@ bool LLAppViewer::initConfiguration()
LLFirstUse::addConfigVariable("FirstMap");
LLFirstUse::addConfigVariable("FirstGoTo");
LLFirstUse::addConfigVariable("FirstBuild");
- LLFirstUse::addConfigVariable("FirstLeftClickNoHit");
+// LLFirstUse::addConfigVariable("FirstLeftClickNoHit");
LLFirstUse::addConfigVariable("FirstTeleport");
LLFirstUse::addConfigVariable("FirstOverrideKeys");
LLFirstUse::addConfigVariable("FirstAttach");
@@ -2061,10 +2022,9 @@ bool LLAppViewer::initConfiguration()
const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent");
if(skinfolder && LLStringUtil::null != skinfolder->getValue().asString())
{
- gDirUtilp->setSkinFolder(skinfolder->getValue().asString());
-
- gSavedSettings.setString("SkinningSettingsFile",
- gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("UserSkin", "Skinning")));
+ // hack to force the skin to default.
+ //gDirUtilp->setSkinFolder(skinfolder->getValue().asString());
+ gDirUtilp->setSkinFolder("default");
}
mYieldTime = gSavedSettings.getS32("YieldTime");
@@ -2288,10 +2248,10 @@ bool LLAppViewer::initWindow()
gSavedSettings.getS32("WindowWidth"), gSavedSettings.getS32("WindowHeight"),
FALSE, ignorePixelDepth);
- if (!gSavedSettings.getBOOL("NotFullScreen"))
+ if (gSavedSettings.getBOOL("WindowFullScreen"))
{
+ // request to go full screen... which will be delayed until login
gViewerWindow->toggleFullscreen(FALSE);
- // request to go full screen... which will be delayed until login
}
if (gSavedSettings.getBOOL("WindowMaximized"))
@@ -2939,12 +2899,14 @@ bool LLAppViewer::initCache()
gDirUtilp->setCacheDir(gSavedSettings.getString("CacheLocation"));
purgeCache(); // purge old cache
gSavedSettings.setString("CacheLocation", new_cache_location);
+ gSavedSettings.setString("CacheLocationTopFolder", gDirUtilp->getBaseFileName(new_cache_location));
}
if (!gDirUtilp->setCacheDir(gSavedSettings.getString("CacheLocation")))
{
LL_WARNS("AppCache") << "Unable to set cache location" << LL_ENDL;
gSavedSettings.setString("CacheLocation", "");
+ gSavedSettings.setString("CacheLocationTopFolder", "");
}
if (mPurgeCache)
@@ -3937,20 +3899,20 @@ void LLAppViewer::disconnectViewer()
LLSelectMgr::getInstance()->deselectAll();
}
- if (!gNoRender)
+ // save inventory if appropriate
+ gInventory.cache(gInventory.getRootFolderID(), gAgent.getID());
+ if (gInventory.getLibraryRootFolderID().notNull()
+ && gInventory.getLibraryOwnerID().notNull())
{
- // save inventory if appropriate
- gInventory.cache(gAgent.getInventoryRootID(), gAgent.getID());
- if(gInventoryLibraryRoot.notNull() && gInventoryLibraryOwner.notNull())
- {
- gInventory.cache(gInventoryLibraryRoot, gInventoryLibraryOwner);
- }
+ gInventory.cache(
+ gInventory.getLibraryRootFolderID(),
+ gInventory.getLibraryOwnerID());
}
saveNameCache();
// close inventory interface, close all windows
- LLInventoryView::cleanup();
+ LLFloaterInventory::cleanup();
gAgentWearables.cleanup();
@@ -4106,6 +4068,9 @@ void LLAppViewer::handleLoginComplete()
{
gDebugInfo["MainloopTimeoutState"] = LLAppViewer::instance()->mMainloopTimeout->getState();
}
+
+ mOnLoginCompleted();
+
writeDebugInfo();
}
@@ -4267,4 +4232,5 @@ void LLAppViewer::launchUpdater()
// *REMOVE:Mani - Saving for reference...
// LLAppViewer::instance()->forceQuit();
-} \ No newline at end of file
+}
+
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index d0a934c87e..f95d7cb412 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -163,6 +163,13 @@ public:
LLAllocator & getAllocator() { return mAlloc; }
+ // On LoginCompleted callback
+ typedef boost::signals2::signal<void (void)> login_completed_signal_t;
+ login_completed_signal_t mOnLoginCompleted;
+ boost::signals2::connection setOnLoginCompletedCallback( const login_completed_signal_t::slot_type& cb ) { return mOnLoginCompleted.connect(cb); }
+
+ void purgeCache(); // Clear the local cache.
+
protected:
virtual bool initWindow(); // Initialize the viewer's window.
virtual bool initLogging(); // Initialize log files, logging system, return false on failure.
@@ -184,7 +191,7 @@ private:
void initGridChoice();
bool initCache(); // Initialize local client cache.
- void purgeCache(); // Clear the local cache.
+
// We have switched locations of both Mac and Windows cache, make sure
// files migrate and old cache is cleared out.
@@ -317,9 +324,6 @@ extern LLTimer gLogoutTimer;
extern F32 gSimLastTime;
extern F32 gSimFrames;
-extern LLUUID gInventoryLibraryOwner;
-extern LLUUID gInventoryLibraryRoot;
-
extern BOOL gDisconnected;
// Map scale in pixels per region
diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp
index 1379073bba..802c90f531 100644
--- a/indra/newview/llassetuploadresponders.cpp
+++ b/indra/newview/llassetuploadresponders.cpp
@@ -41,7 +41,7 @@
#include "llfilepicker.h"
#include "llnotify.h"
#include "llinventorymodel.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
#include "llpermissionsflags.h"
#include "llpreviewnotecard.h"
#include "llpreviewscript.h"
@@ -285,7 +285,7 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content)
// Show the preview panel for textures and sounds to let
// user know that the image (or snapshot) arrived intact.
- LLInventoryView* view = LLInventoryView::getActiveInventory();
+ LLFloaterInventory* view = LLFloaterInventory::getActiveInventory();
if(view)
{
LLUICtrl* focus_ctrl = gFocusMgr.getKeyboardFocus();
@@ -295,7 +295,7 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content)
{
view->getPanel()->openSelected();
}
- //LLInventoryView::dumpSelectionInformation((void*)view);
+ //LLFloaterInventory::dumpSelectionInformation((void*)view);
// restore keyboard focus
gFocusMgr.setKeyboardFocus(focus_ctrl);
}
diff --git a/indra/newview/llassetuploadresponders.h b/indra/newview/llassetuploadresponders.h
index 9ab571ae99..a08d70213c 100644
--- a/indra/newview/llassetuploadresponders.h
+++ b/indra/newview/llassetuploadresponders.h
@@ -47,6 +47,7 @@ public:
const std::string& file_name,
LLAssetType::EType asset_type);
~LLAssetUploadResponder();
+
virtual void error(U32 statusNum, const std::string& reason);
virtual void result(const LLSD& content);
virtual void uploadUpload(const LLSD& content);
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
new file mode 100644
index 0000000000..281d73b18b
--- /dev/null
+++ b/indra/newview/llavataractions.cpp
@@ -0,0 +1,279 @@
+/**
+ * @file llavataractions.cpp
+ * @brief Friend-related actions (add, remove, offer teleport, etc)
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h"
+
+#include "llavataractions.h"
+
+#include "llsd.h"
+#include "lldarray.h"
+#include "llnotifications.h"
+
+#include "llagent.h"
+#include "llappviewer.h" // for gLastVersionChannel
+#include "llcallingcard.h" // for LLAvatarTracker
+#include "llinventorymodel.h"
+#include "llimview.h" // for gIMMgr
+#include "llsidetray.h"
+#include "llviewermessage.h" // for handle_lure
+#include "llviewerregion.h"
+
+// static
+void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::string& name)
+{
+ if(id == gAgentID)
+ {
+ LLNotifications::instance().add("AddSelfFriend");
+ return;
+ }
+
+ LLSD args;
+ args["NAME"] = name;
+ LLSD payload;
+ payload["id"] = id;
+ payload["name"] = name;
+ // Look for server versions like: Second Life Server 1.24.4.95600
+ if (gLastVersionChannel.find(" 1.24.") != std::string::npos)
+ {
+ // Old and busted server version, doesn't support friend
+ // requests with messages.
+ LLNotifications::instance().add("AddFriend", args, payload, &callbackAddFriend);
+ }
+ else
+ {
+ LLNotifications::instance().add("AddFriendWithMessage", args, payload, &callbackAddFriendWithMessage);
+ }
+
+ // add friend to recent people list
+ LLRecentPeople::instance().add(id);
+}
+
+// static
+void LLAvatarActions::removeFriendDialog(const LLUUID& id)
+{
+ if (id.isNull())
+ return;
+
+ std::vector<LLUUID> ids;
+ ids.push_back(id);
+ removeFriendsDialog(ids);
+}
+
+// static
+void LLAvatarActions::removeFriendsDialog(const std::vector<LLUUID>& ids)
+{
+ if(ids.size() == 0)
+ return;
+
+ LLSD args;
+ std::string msgType;
+ if(ids.size() == 1)
+ {
+ LLUUID agent_id = ids[0];
+ std::string first, last;
+ if(gCacheName->getName(agent_id, first, last))
+ {
+ args["FIRST_NAME"] = first;
+ args["LAST_NAME"] = last;
+ }
+
+ msgType = "RemoveFromFriends";
+ }
+ else
+ {
+ msgType = "RemoveMultipleFromFriends";
+ }
+
+ LLSD payload;
+ for (std::vector<LLUUID>::const_iterator it = ids.begin(); it != ids.end(); ++it)
+ {
+ payload["ids"].append(*it);
+ }
+
+ LLNotifications::instance().add(msgType,
+ args,
+ payload,
+ &handleRemove);
+}
+
+// static
+void LLAvatarActions::offerTeleport(const LLUUID& invitee)
+{
+ if (invitee.isNull())
+ return;
+
+ LLDynamicArray<LLUUID> ids;
+ ids.push_back(invitee);
+ offerTeleport(ids);
+}
+
+// static
+void LLAvatarActions::offerTeleport(const std::vector<LLUUID>& ids)
+{
+ if (ids.size() > 0)
+ handle_lure(ids);
+}
+
+// static
+void LLAvatarActions::startIM(const LLUUID& id)
+{
+ if (id.isNull())
+ return;
+
+ std::string name;
+ gCacheName->getFullName(id, name);
+ gIMMgr->addSession(name, IM_NOTHING_SPECIAL, id);
+ make_ui_sound("UISndStartIM");
+}
+
+// static
+void LLAvatarActions::startConference(const std::vector<LLUUID>& ids)
+{
+ // *HACK: Copy into dynamic array
+ LLDynamicArray<LLUUID> id_array;
+ for (std::vector<LLUUID>::const_iterator it = ids.begin(); it != ids.end(); ++it)
+ {
+ id_array.push_back(*it);
+ }
+ gIMMgr->addSession("Friends Conference", IM_SESSION_CONFERENCE_START, ids[0], id_array);
+ make_ui_sound("UISndStartIM");
+}
+
+// static
+void LLAvatarActions::showProfile(const LLUUID& id)
+{
+ if (id.notNull())
+ {
+ LLSD params;
+ params["id"] = id;
+ params["open_tab_name"] = "panel_profile";
+
+ //Show own profile
+ if(gAgent.getID() == id)
+ {
+ LLSideTray::getInstance()->showPanel("panel_me_profile", params);
+ }
+ //Show other user profile
+ else
+ {
+ LLSideTray::getInstance()->showPanel("panel_profile_view", params);
+ }
+ }
+}
+
+//== private methods ========================================================================================
+
+// static
+bool LLAvatarActions::handleRemove(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotification::getSelectedOption(notification, response);
+
+ const LLSD& ids = notification["payload"]["ids"];
+ for (LLSD::array_const_iterator itr = ids.beginArray(); itr != ids.endArray(); ++itr)
+ {
+ LLUUID id = itr->asUUID();
+ const LLRelationship* ip = LLAvatarTracker::instance().getBuddyInfo(id);
+ if (ip)
+ {
+ switch (option)
+ {
+ case 0: // YES
+ if( ip->isRightGrantedTo(LLRelationship::GRANT_MODIFY_OBJECTS))
+ {
+ LLAvatarTracker::instance().empower(id, FALSE);
+ LLAvatarTracker::instance().notifyObservers();
+ }
+ LLAvatarTracker::instance().terminateBuddy(id);
+ LLAvatarTracker::instance().notifyObservers();
+ gInventory.addChangedMask(LLInventoryObserver::LABEL | LLInventoryObserver::CALLING_CARD, LLUUID::null);
+ gInventory.notifyObservers();
+ break;
+
+ case 1: // NO
+ default:
+ llinfos << "No removal performed." << llendl;
+ break;
+ }
+ }
+ }
+ return false;
+}
+
+// static
+bool LLAvatarActions::callbackAddFriendWithMessage(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotification::getSelectedOption(notification, response);
+ if (option == 0)
+ {
+ requestFriendship(notification["payload"]["id"].asUUID(),
+ notification["payload"]["name"].asString(),
+ response["message"].asString());
+ }
+ return false;
+}
+
+// static
+bool LLAvatarActions::callbackAddFriend(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotification::getSelectedOption(notification, response);
+ if (option == 0)
+ {
+ // Servers older than 1.25 require the text of the message to be the
+ // calling card folder ID for the offering user. JC
+ LLUUID calling_card_folder_id =
+ gInventory.findCategoryUUIDForType(LLAssetType::AT_CALLINGCARD);
+ std::string message = calling_card_folder_id.asString();
+ requestFriendship(notification["payload"]["id"].asUUID(),
+ notification["payload"]["name"].asString(),
+ message);
+ }
+ return false;
+}
+
+// static
+void LLAvatarActions::requestFriendship(const LLUUID& target_id, const std::string& target_name, const std::string& message)
+{
+ LLUUID calling_card_folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CALLINGCARD);
+ send_improved_im(target_id,
+ target_name,
+ message,
+ IM_ONLINE,
+ IM_FRIENDSHIP_OFFERED,
+ calling_card_folder_id);
+}
+
+//static
+bool LLAvatarActions::isFriend(const LLUUID& id)
+{
+ return ( NULL != LLAvatarTracker::instance().getBuddyInfo(id) );
+}
diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h
new file mode 100644
index 0000000000..73325d21f1
--- /dev/null
+++ b/indra/newview/llavataractions.h
@@ -0,0 +1,88 @@
+/**
+ * @file llavataractions.h
+ * @brief Friend-related actions (add, remove, offer teleport, etc)
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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_LLAVATARACTIONS_H
+#define LL_LLAVATARACTIONS_H
+
+/**
+ * Friend-related actions (add, remove, offer teleport, etc)
+ */
+class LLAvatarActions
+{
+public:
+ /**
+ * Show a dialog explaining what friendship entails, then request friendship.
+ */
+ static void requestFriendshipDialog(const LLUUID& id, const std::string& name);
+
+ /**
+ * Show a friend removal dialog.
+ */
+ static void removeFriendDialog(const LLUUID& id);
+ static void removeFriendsDialog(const std::vector<LLUUID>& ids);
+
+ /**
+ * Show teleport offer dialog.
+ */
+ static void offerTeleport(const LLUUID& invitee);
+ static void offerTeleport(const std::vector<LLUUID>& ids);
+
+ /**
+ * Start instant messaging session.
+ */
+ static void startIM(const LLUUID& id);
+
+ /**
+ * Start conference chat with the given avatars.
+ */
+ static void startConference(const std::vector<LLUUID>& ids);
+
+ /**
+ * Show avatar profile.
+ */
+ static void showProfile(const LLUUID& id);
+
+ /**
+ * Return true if avatar with "id" is a friend
+ */
+ static bool isFriend(const LLUUID& id);
+
+private:
+ static bool callbackAddFriend(const LLSD& notification, const LLSD& response);
+ static bool callbackAddFriendWithMessage(const LLSD& notification, const LLSD& response);
+ static bool handleRemove(const LLSD& notification, const LLSD& response);
+
+ // Just request friendship, no dialog.
+ static void requestFriendship(const LLUUID& target_id, const std::string& target_name, const std::string& message);
+};
+
+#endif // LL_LLAVATARACTIONS_H
diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp
index 3cd6126739..f6eb7f6494 100644
--- a/indra/newview/llavatariconctrl.cpp
+++ b/indra/newview/llavatariconctrl.cpp
@@ -36,17 +36,20 @@
#include "llavatarconstants.h"
#include "llavatariconctrl.h"
#include "llcallingcard.h" // for LLAvatarTracker
-#include "llfriendactions.h"
+#include "llavataractions.h"
#include "llimview.h"
#include "llmenugl.h"
#include "lluictrlfactory.h"
#include "llcachename.h"
+#include "llagentdata.h"
#define MENU_ITEM_VIEW_PROFILE 0
#define MENU_ITEM_SEND_IM 1
-static LLDefaultWidgetRegistry::Register<LLAvatarIconCtrl> r("avatar_icon");
+static LLDefaultChildRegistry::Register<LLAvatarIconCtrl> r("avatar_icon");
+
+LLAvatarIconCtrl::avatar_image_map_t LLAvatarIconCtrl::sImagesCache;
LLAvatarIconCtrl::LLAvatarIconCtrl(const LLAvatarIconCtrl::Params& p)
: LLIconCtrl(p),
@@ -106,7 +109,7 @@ LLAvatarIconCtrl::LLAvatarIconCtrl(const LLAvatarIconCtrl::Params& p)
registrar.add("AvatarIcon.Action", boost::bind(&LLAvatarIconCtrl::onAvatarIconContextMenuItemClicked, this, _2));
- LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_avatar_icon.xml", gMenuHolder);
+ LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_avatar_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
mPopupMenuHandle = menu->getHandle();
}
@@ -137,7 +140,17 @@ void LLAvatarIconCtrl::setValue(const LLSD& value)
LLAvatarPropertiesProcessor::getInstance()->addObserver(value.asUUID(), this);
LLAvatarPropertiesProcessor::getInstance()->sendDataRequest(value.asUUID(),APT_PROPERTIES);
mAvatarId = value.asUUID();
+
+ // Check if cache already contains image_id for that avatar
+ avatar_image_map_t::iterator it;
+
+ it = sImagesCache.find(mAvatarId);
+ if (it != sImagesCache.end())
+ {
+ updateFromCache(it->second);
+ }
}
+
}
else
{
@@ -147,6 +160,37 @@ void LLAvatarIconCtrl::setValue(const LLSD& value)
gCacheName->get(mAvatarId, FALSE, boost::bind(&LLAvatarIconCtrl::nameUpdatedCallback, this, _1, _2, _3, _4));
}
+void LLAvatarIconCtrl::updateFromCache(LLAvatarIconCtrl::LLImagesCacheItem data)
+{
+ // Update the avatar
+ if (data.image_id.notNull())
+ {
+ LLIconCtrl::setValue(data.image_id);
+ }
+ else
+ {
+ LLIconCtrl::setValue("default_profile_picture.j2c");
+ }
+
+ // Update color of status symbol and tool tip
+ if (data.flags & AVATAR_ONLINE)
+ {
+ mStatusSymbol->setColor(LLColor4::green);
+ if (mDrawTooltip)
+ {
+ setToolTip((LLStringExplicit)"Online");
+ }
+ }
+ else
+ {
+ mStatusSymbol->setColor(LLColor4::grey);
+ if (mDrawTooltip)
+ {
+ setToolTip((LLStringExplicit)"Offline");
+ }
+ }
+}
+
//virtual
void LLAvatarIconCtrl::processProperties(void* data, EAvatarProcessorType type)
{
@@ -160,33 +204,10 @@ void LLAvatarIconCtrl::processProperties(void* data, EAvatarProcessorType type)
return;
}
- // Update the avatar
- if (avatar_data->image_id.notNull())
- {
- LLIconCtrl::setValue(avatar_data->image_id);
- }
- else
- {
- LLIconCtrl::setValue("default_profile_picture.j2c");
- }
+ LLAvatarIconCtrl::LLImagesCacheItem data(avatar_data->image_id, avatar_data->flags);
- // Update color of status symbol and tool tip
- if (avatar_data->flags & AVATAR_ONLINE)
- {
- mStatusSymbol->setColor(LLColor4::green);
- if (mDrawTooltip)
- {
- setToolTip((LLStringExplicit)"Online");
- }
- }
- else
- {
- mStatusSymbol->setColor(LLColor4::grey);
- if (mDrawTooltip)
- {
- setToolTip((LLStringExplicit)"Offline");
- }
- }
+ updateFromCache(data);
+ sImagesCache.insert(std::pair<LLUUID, LLAvatarIconCtrl::LLImagesCacheItem>(mAvatarId, data));
}
}
}
@@ -198,10 +219,17 @@ BOOL LLAvatarIconCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
if(menu)
{
bool is_friend = LLAvatarTracker::instance().getBuddyInfo(mAvatarId) != NULL;
-
+
menu->setItemEnabled("Add Friend", !is_friend);
menu->setItemEnabled("Remove Friend", is_friend);
+ if(gAgentID == mAvatarId)
+ {
+ menu->setItemEnabled("Add Friend", false);
+ menu->setItemEnabled("Send IM", false);
+ menu->setItemEnabled("Remove Friend", false);
+ }
+
menu->buildDrawLabels();
menu->updateParent(LLMenuGL::sMenuContainer);
LLMenuGL::showPopup(this, menu, x, y);
@@ -230,7 +258,7 @@ void LLAvatarIconCtrl::onAvatarIconContextMenuItemClicked(const LLSD& userdata)
if (level == "profile")
{
- LLFriendActions::showProfile(id);
+ LLAvatarActions::showProfile(id);
}
else if (level == "im")
{
@@ -248,10 +276,10 @@ void LLAvatarIconCtrl::onAvatarIconContextMenuItemClicked(const LLSD& userdata)
name.append(" ");
name.append(getLastName());
- LLFriendActions::requestFriendshipDialog(id, name);
+ LLAvatarActions::requestFriendshipDialog(id, name);
}
else if (level == "remove")
{
- LLFriendActions::removeFriendDialog(id);
+ LLAvatarActions::removeFriendDialog(id);
}
}
diff --git a/indra/newview/llavatariconctrl.h b/indra/newview/llavatariconctrl.h
index cb1e9584ba..10ce827d6d 100644
--- a/indra/newview/llavatariconctrl.h
+++ b/indra/newview/llavatariconctrl.h
@@ -46,9 +46,10 @@ public:
Optional <LLUUID> avatar_id;
Optional <bool> draw_tooltip;
Params()
+ : avatar_id("avatar_id"),
+ draw_tooltip("draw_tooltip", true)
{
name = "avatar_icon";
- draw_tooltip = TRUE;
}
};
protected:
@@ -84,6 +85,20 @@ protected:
std::string mLastName;
LLHandle<LLView> mPopupMenuHandle;
bool mDrawTooltip;
+
+ struct LLImagesCacheItem
+ {
+ LLUUID image_id;
+ U32 flags;
+
+ LLImagesCacheItem(LLUUID image_id_, U32 flags_) : image_id(image_id_), flags(flags_) {}
+ };
+
+ typedef std::map<LLUUID, LLAvatarIconCtrl::LLImagesCacheItem> avatar_image_map_t;
+
+ static avatar_image_map_t sImagesCache;
+
+ void updateFromCache(LLAvatarIconCtrl::LLImagesCacheItem data);
};
#endif // LL_LLAVATARICONCTRL_H
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp
index 08f0cf8842..a85f8710c7 100644
--- a/indra/newview/llavatarlist.cpp
+++ b/indra/newview/llavatarlist.cpp
@@ -37,24 +37,40 @@
// newview
#include "llcallingcard.h" // for LLAvatarTracker
#include "llcachename.h"
+#include "lloutputmonitorctrl.h"
+#include "llvoiceclient.h"
-static LLDefaultWidgetRegistry::Register<LLAvatarList> r("avatar_list");
+static LLDefaultChildRegistry::Register<LLAvatarList> r("avatar_list");
LLAvatarList::Params::Params()
+:
+ volume_column_width("volume_column_width", 0)
+ , online_go_first("online_go_first", true)
{
draw_heading = true;
draw_stripes = false;
multi_select = false;
column_padding = 0;
- search_column = LIST_NAME;
- sort_column = LIST_NAME;
+ search_column = COL_NAME;
+ sort_column = COL_NAME;
}
LLAvatarList::LLAvatarList(const Params& p)
: LLScrollListCtrl(p)
+ , mHaveVolumeColumn(p.volume_column_width > 0)
+ , mOnlineGoFirst(p.online_go_first)
{
setCommitOnSelectionChange(TRUE); // there's no such param in LLScrollListCtrl::Params
+ // "volume" column
+ {
+ LLScrollListColumn::Params col_params;
+ col_params.name = "volume";
+ col_params.header.label = "Volume"; // *TODO: localize or remove the header
+ col_params.width.pixel_width = p.volume_column_width;
+ addColumn(col_params);
+ }
+
// "name" column
{
LLScrollListColumn::Params col_params;
@@ -63,18 +79,42 @@ LLAvatarList::LLAvatarList(const Params& p)
col_params.width.dynamic_width = true;
addColumn(col_params);
}
+
+ // "online status" column
+ {
+ LLScrollListColumn::Params col_params;
+ col_params.name = "online";
+ col_params.header.label = "Online"; // *TODO: localize or remove the header
+ col_params.width.pixel_width = 0; // invisible column
+ addColumn(col_params);
+ }
+
// invisible "id" column
{
LLScrollListColumn::Params col_params;
col_params.name = "id";
+ col_params.header.label = "ID"; // *TODO: localize or remove the header
col_params.width.pixel_width = 0;
addColumn(col_params);
}
- // The corresponding parameters don't work because we create columns dynamically.
- sortByColumnIndex(LIST_NAME, TRUE);
- setSearchColumn(LIST_NAME);
+ // Primary sort = online status, secondary sort = name
+ // The corresponding parameters don't work because we create columns dynamically.
+ sortByColumnIndex(COL_NAME, TRUE);
+ if (mOnlineGoFirst)
+ sortByColumnIndex(COL_ONLINE, FALSE);
+ setSearchColumn(COL_NAME);
+}
+
+// virtual
+void LLAvatarList::draw()
+{
+ LLScrollListCtrl::draw();
+ if (mHaveVolumeColumn)
+ {
+ updateVolume();
+ }
}
std::vector<LLUUID> LLAvatarList::getSelectedIDs()
@@ -97,17 +137,30 @@ void LLAvatarList::addItem(const LLUUID& id, const std::string& name, BOOL is_bo
LLSD element;
element["id"] = id;
- LLSD& friend_column = element["columns"][LIST_NAME];
+ // Update volume column (if we have one)
+ {
+ std::string icon = mHaveVolumeColumn ? getVolumeIcon(id) : "";
+ LLSD& volume_column = element["columns"][COL_VOLUME];
+ volume_column["column"] = "volume";
+ volume_column["type"] = "icon";
+ volume_column["value"] = icon;
+ }
+
+ LLSD& friend_column = element["columns"][COL_NAME];
friend_column["column"] = "name";
friend_column["value"] = name;
+ LLSD& online_column = element["columns"][COL_ONLINE];
+ online_column["column"] = "online";
+ online_column["value"] = is_bold ? "1" : "0";
+
LLScrollListItem* new_itemp = addElement(element, pos);
// Indicate buddy online status.
// (looks like parsing font parameters from LLSD is broken)
if (is_bold)
{
- LLScrollListText* name_textp = dynamic_cast<LLScrollListText*>(new_itemp->getColumn(LIST_NAME));
+ LLScrollListText* name_textp = dynamic_cast<LLScrollListText*>(new_itemp->getColumn(COL_NAME));
if (name_textp)
name_textp->setFontStyle(LLFontGL::BOLD);
else
@@ -117,7 +170,13 @@ void LLAvatarList::addItem(const LLUUID& id, const std::string& name, BOOL is_bo
}
}
-BOOL LLAvatarList::updateList(const std::vector<LLUUID>& all_buddies)
+static bool findInsensitive(std::string haystack, const std::string& needle_upper)
+{
+ LLStringUtil::toUpper(haystack);
+ return haystack.find(needle_upper) != std::string::npos;
+}
+
+BOOL LLAvatarList::update(const std::vector<LLUUID>& all_buddies, const std::string& name_filter)
{
BOOL have_names = TRUE;
@@ -133,6 +192,8 @@ BOOL LLAvatarList::updateList(const std::vector<LLUUID>& all_buddies)
std::string name;
const LLUUID& buddy_id = *buddy_it;
have_names &= gCacheName->getFullName(buddy_id, name);
+ if (name_filter != LLStringUtil::null && !findInsensitive(name, name_filter))
+ continue;
addItem(buddy_id, name, LLAvatarTracker::instance().isBuddyOnline(buddy_id));
}
@@ -161,3 +222,70 @@ BOOL LLAvatarList::updateList(const std::vector<LLUUID>& all_buddies)
return have_names;
}
+
+// static
+std::string LLAvatarList::getVolumeIcon(const LLUUID& id)
+{
+ //
+ // Determine icon appropriate for the current avatar volume.
+ //
+ // *TODO: remove this in favor of LLOutputMonitorCtrl
+ // when ListView widget is implemented
+ // which is capable of containing arbitrary widgets.
+ //
+ static LLOutputMonitorCtrl::Params default_monitor_params(LLUICtrlFactory::getDefaultParams<LLOutputMonitorCtrl>());
+ bool muted = gVoiceClient->getIsModeratorMuted(id) || gVoiceClient->getOnMuteList(id);
+ F32 power = gVoiceClient->getCurrentPower(id);
+ std::string icon;
+
+ if (muted)
+ {
+ icon = default_monitor_params.image_mute.name;
+ }
+ else if (power == 0.f)
+ {
+ icon = default_monitor_params.image_off.name;
+ }
+ else if (power < LLVoiceClient::OVERDRIVEN_POWER_LEVEL)
+ {
+ S32 icon_image_idx = llmin(2, llfloor((power / LLVoiceClient::OVERDRIVEN_POWER_LEVEL) * 3.f));
+ switch(icon_image_idx)
+ {
+ default:
+ case 0:
+ icon = default_monitor_params.image_on.name;
+ break;
+ case 1:
+ icon = default_monitor_params.image_level_1.name;
+ break;
+ case 2:
+ icon = default_monitor_params.image_level_2.name;
+ break;
+ }
+ }
+ else
+ {
+ // overdriven
+ icon = default_monitor_params.image_level_3.name;
+ }
+
+ return icon;
+}
+
+// Update volume column for all list rows.
+void LLAvatarList::updateVolume()
+{
+ item_list& items = getItemList();
+
+ for (item_list::iterator item_it = items.begin();
+ item_it != items.end();
+ ++item_it)
+ {
+ LLScrollListItem* itemp = (*item_it);
+ LLUUID speaker_id = itemp->getUUID();
+
+ LLScrollListCell* icon_cell = itemp->getColumn(COL_VOLUME);
+ if (icon_cell)
+ icon_cell->setValue(getVolumeIcon(speaker_id));
+ }
+}
diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h
index 9bd9ce8e0e..8b419dbb57 100644
--- a/indra/newview/llavatarlist.h
+++ b/indra/newview/llavatarlist.h
@@ -42,22 +42,37 @@ class LLAvatarList : public LLScrollListCtrl
public:
struct Params : public LLInitParam::Block<Params, LLScrollListCtrl::Params>
{
+ Optional<S32> volume_column_width;
+ Optional<bool> online_go_first;
Params();
};
- enum AVATAR_LIST_COLUMN_ORDER
+ enum EColumnOrder
{
- LIST_NAME,
+ COL_VOLUME,
+ COL_NAME,
+ COL_ONLINE,
+ COL_ID,
};
LLAvatarList(const Params&);
virtual ~LLAvatarList() {}
- BOOL updateList(const std::vector<LLUUID>& all_buddies);
+ /*virtual*/ void draw();
+
+ BOOL update(const std::vector<LLUUID>& all_buddies,
+ const std::string& name_filter = LLStringUtil::null);
protected:
std::vector<LLUUID> getSelectedIDs();
void addItem(const LLUUID& id, const std::string& name, BOOL is_bold, EAddPosition pos = ADD_BOTTOM);
+
+private:
+ static std::string getVolumeIcon(const LLUUID& id); /// determine volume icon from current avatar volume
+ void updateVolume(); // update volume for all avatars
+
+ bool mHaveVolumeColumn;
+ bool mOnlineGoFirst;
};
#endif // LL_LLAVATARLIST_H
diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h
index 5835a4c6b4..dc73f187a7 100644
--- a/indra/newview/llavatarlistitem.h
+++ b/indra/newview/llavatarlistitem.h
@@ -57,7 +57,9 @@ public:
{};
} buttons;
- Params() : avatar_icon("avatar_icon",LLUUID()), user_name("user_name","")
+ Params()
+ : avatar_icon("avatar_icon"),
+ user_name("user_name")
{};
};
diff --git a/indra/newview/llavatarpropertiesprocessor.cpp b/indra/newview/llavatarpropertiesprocessor.cpp
index e27da5663b..ecd67e44ae 100644
--- a/indra/newview/llavatarpropertiesprocessor.cpp
+++ b/indra/newview/llavatarpropertiesprocessor.cpp
@@ -102,6 +102,7 @@ void LLAvatarPropertiesProcessor::sendDataRequest(const LLUUID& avatar_id, EAvat
if (data) {
sendPickInfoRequest(avatar_id, *static_cast<const LLUUID*>(data));
}
+ break;
case APT_NOTES:
sendGenericRequest(avatar_id, "avatarnotesrequest");
break;
@@ -305,7 +306,7 @@ void LLAvatarPropertiesProcessor::processPickInfoReply(LLMessageSystem* msg, voi
msg->getS32(_PREHASH_Data, _PREHASH_SortOrder, pick_data.sort_order);
msg->getBOOL(_PREHASH_Data, _PREHASH_Enabled, pick_data.enabled);
- notifyObservers(pick_data.agent_id, &pick_data, APT_PICK_INFO);
+ notifyObservers(pick_data.creator_id, &pick_data, APT_PICK_INFO);
}
void LLAvatarPropertiesProcessor::processAvatarGroupsReply(LLMessageSystem* msg, void**)
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index 616cbb1fdb..1781e6b3f1 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -32,29 +32,51 @@
#include "llviewerprecompiledheaders.h" // must be first include
#include "llbottomtray.h"
+
#include "llagent.h"
#include "llchiclet.h"
-#include "lllayoutstack.h"
-#include "llkeyboard.h"
-#include "llgesturemgr.h"
-#include "llanimationstates.h"
-
-//FIXME: temporary, for send_chat_from_viewer() proto
-#include "llchatbar.h"
-
-LLBottomTray::LLBottomTray()
- :mLastSpecialChatChannel(0)
+#include "llfloaterreg.h"
+#include "llflyoutbutton.h"
+#include "llnearbychatbar.h"
+
+//FIXME: temporary, for stand up proto
+#include "llselectmgr.h"
+#include "llvoavatarself.h"
+
+LLBottomTray::LLBottomTray(const LLSD&)
+ : mChicletPanel(NULL)
+ , mIMWell(NULL)
+ , mSysWell(NULL)
+ , mTalkBtn(NULL)
+ , mStandUpBtn(NULL) ////FIXME: temporary, for stand up proto
+ , mNearbyChatBar(NULL)
{
+ mFactoryMap["chat_bar"] = LLCallbackMap(LLBottomTray::createNearbyChatBar, NULL);
+
LLUICtrlFactory::getInstance()->buildPanel(this,"panel_bottomtray.xml");
mChicletPanel = getChild<LLChicletPanel>("chiclet_list",TRUE,FALSE);
+ mIMWell = getChild<LLNotificationChiclet>("im_well",TRUE,FALSE);
+ mSysWell = getChild<LLNotificationChiclet>("sys_well",TRUE,FALSE);
- LLLineEditor* chat_box = getChatBox();
- chat_box->setCommitCallback(boost::bind(&LLBottomTray::onChatBoxCommit, this));
- chat_box->setKeystrokeCallback(&onChatBoxKeystroke, this);
- chat_box->setFocusLostCallback(&onChatBoxFocusLost, this);
+ mChicletPanel->setChicletClickedCallback(boost::bind(&LLBottomTray::onChicletClick,this,_1));
+ ////FIXME: temporary, for stand up proto
+ mStandUpBtn = getChild<LLButton> ("stand", TRUE, FALSE);
+ if (mStandUpBtn)
+ {
+ mStandUpBtn->setCommitCallback(boost::bind(&LLBottomTray::onCommitStandUp, this, _1));
+ }
+
LLIMMgr::getInstance()->addSessionObserver(this);
+
+ //this is to fix a crash that occurs because LLBottomTray is a singleton
+ //and thus is deleted at the end of the viewers lifetime, but to be cleanly
+ //destroyed LLBottomTray requires some subsystems that are long gone
+ LLUI::getRootView()->addChild(this);
+
+ // Necessary for focus movement among child controls
+ setFocusRoot(TRUE);
}
LLBottomTray::~LLBottomTray()
@@ -65,179 +87,77 @@ LLBottomTray::~LLBottomTray()
}
}
-LLLineEditor* LLBottomTray::getChatBox()
-{
- return getChild<LLLineEditor>("chat_box",TRUE,FALSE);
-}
-
-void LLBottomTray::onChatBoxCommit()
+void LLBottomTray::onChicletClick(LLUICtrl* ctrl)
{
- if (getChatBox()->getText().length() > 0)
+ LLIMChiclet* chiclet = dynamic_cast<LLIMChiclet*>(ctrl);
+ if (chiclet)
{
- sendChat(CHAT_TYPE_NORMAL);
-
- LLLineEditor* chat_box = getChatBox();
-
- if (chat_box)
- {
- chat_box->setText(LLStringExplicit(""));
- }
-
- gAgent.stopTyping();
+ // Until you can type into an IM Window and have a conversation,
+ // still show the old communicate window
+ LLFloaterReg::showInstance("communicate", chiclet->getSessionId());
+ // DISABLED IN VIEWER-2 BRANCH UNTIL FEATURE IS DONE -- James
+ //// Show after comm window so it is frontmost (and hence will not
+ //// auto-hide)
+ //LLIMFloater::show(chiclet->getSessionId());
}
}
-void LLBottomTray::sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate)
+void* LLBottomTray::createNearbyChatBar(void* userdata)
{
- sendChatFromViewer(utf8str_to_wstring(utf8text), type, animate);
-}
+ LLBottomTray *bt = LLBottomTray::getInstance();
+ if (!bt)
+ return NULL;
-void LLBottomTray::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate)
-{
- // Look for "/20 foo" channel chats.
- S32 channel = 0;
- LLWString out_text = stripChannelNumber(wtext, &channel);
- std::string utf8_out_text = wstring_to_utf8str(out_text);
- std::string utf8_text = wstring_to_utf8str(wtext);
-
- utf8_text = utf8str_trim(utf8_text);
- if (!utf8_text.empty())
- {
- utf8_text = utf8str_truncate(utf8_text, MAX_STRING - 1);
- }
-
- // Don't animate for chats people can't hear (chat to scripts)
- if (animate && (channel == 0))
- {
- if (type == CHAT_TYPE_WHISPER)
- {
- lldebugs << "You whisper " << utf8_text << llendl;
- gAgent.sendAnimationRequest(ANIM_AGENT_WHISPER, ANIM_REQUEST_START);
- }
- else if (type == CHAT_TYPE_NORMAL)
- {
- lldebugs << "You say " << utf8_text << llendl;
- gAgent.sendAnimationRequest(ANIM_AGENT_TALK, ANIM_REQUEST_START);
- }
- else if (type == CHAT_TYPE_SHOUT)
- {
- lldebugs << "You shout " << utf8_text << llendl;
- gAgent.sendAnimationRequest(ANIM_AGENT_SHOUT, ANIM_REQUEST_START);
- }
- else
- {
- llinfos << "send_chat_from_viewer() - invalid volume" << llendl;
- return;
- }
- }
- else
- {
- if (type != CHAT_TYPE_START && type != CHAT_TYPE_STOP)
- {
- lldebugs << "Channel chat: " << utf8_text << llendl;
- }
- }
+ bt->mNearbyChatBar = new LLNearbyChatBar();
- send_chat_from_viewer(utf8_out_text, type, channel);
+ return bt->mNearbyChatBar;
}
-// static
-void LLBottomTray::onChatBoxKeystroke(LLLineEditor* caller, void* userdata)
+//virtual
+void LLBottomTray::draw()
{
- LLBottomTray* self = (LLBottomTray *)userdata;
-
- LLWString raw_text;
- if (self->getChatBox()) raw_text = self->getChatBox()->getWText();
-
- // Can't trim the end, because that will cause autocompletion
- // to eat trailing spaces that might be part of a gesture.
- LLWStringUtil::trimHead(raw_text);
-
- S32 length = raw_text.length();
-
- if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences
- {
- gAgent.startTyping();
- }
- else
- {
- gAgent.stopTyping();
- }
+ refreshStandUp();
+ LLPanel::draw();
+}
- /* Doesn't work -- can't tell the difference between a backspace
- that killed the selection vs. backspace at the end of line.
- if (length > 1
- && text[0] == '/'
- && key == KEY_BACKSPACE)
+void LLBottomTray::refreshStandUp()
+{
+ //FIXME: temporary, for stand up proto
+ BOOL sitting = FALSE;
+ if (gAgent.getAvatarObject())
{
- // the selection will already be deleted, but we need to trim
- // off the character before
- std::string new_text = raw_text.substr(0, length-1);
- self->mInputEditor->setText( new_text );
- self->mInputEditor->setCursorToEnd();
- length = length - 1;
+ sitting = gAgent.getAvatarObject()->mIsSitting;
}
- */
-
- KEY key = gKeyboard->currentKey();
-
- // Ignore "special" keys, like backspace, arrows, etc.
- if (length > 1
- && raw_text[0] == '/'
- && key < KEY_SPECIAL)
+
+ if (mStandUpBtn && mStandUpBtn->getVisible() != sitting)
{
- // we're starting a gesture, attempt to autocomplete
-
- std::string utf8_trigger = wstring_to_utf8str(raw_text);
- std::string utf8_out_str(utf8_trigger);
-
- if (gGestureManager.matchPrefix(utf8_trigger, &utf8_out_str))
- {
- if (self->getChatBox())
- {
- std::string rest_of_match = utf8_out_str.substr(utf8_trigger.size());
- self->getChatBox()->setText(utf8_trigger + rest_of_match); // keep original capitalization for user-entered part
- S32 outlength = self->getChatBox()->getLength(); // in characters
-
- // Select to end of line, starting from the character
- // after the last one the user typed.
- self->getChatBox()->setSelection(length, outlength);
- }
- }
-
- //llinfos << "GESTUREDEBUG " << trigger
- // << " len " << length
- // << " outlen " << out_str.getLength()
- // << llendl;
+ mStandUpBtn->setVisible(sitting);
+ sendChildToFront(mStandUpBtn);
+ moveChildToBackOfTabGroup(mStandUpBtn);
}
}
-// static
-void LLBottomTray::onChatBoxFocusLost(LLFocusableElement* caller, void* userdata)
+//FIXME: temporary, for stand up proto
+void LLBottomTray::onCommitStandUp(LLUICtrl* ctrl)
{
- // stop typing animation
- gAgent.stopTyping();
+ LLSelectMgr::getInstance()->deselectAllForStandingUp();
+ gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
}
-
//virtual
void LLBottomTray::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id)
{
if(getChicletPanel())
{
- LLSD sid(session_id);
-
- if(getChicletPanel()->findIMChiclet(&sid))
+ if(getChicletPanel()->findChiclet<LLChiclet>(session_id))
{
}
else
{
- LLIMChiclet* chicklet = (LLIMChiclet *)getChicletPanel()->createChiclet(&sid);
- chicklet->setIMSessionName(name);
- chicklet->setOtherParticipantId(other_participant_id);
-
- getChicletPanel()->arrange();
+ LLIMChiclet* chiclet = getChicletPanel()->createChiclet<LLIMChiclet>(session_id);
+ chiclet->setIMSessionName(name);
+ chiclet->setOtherParticipantId(other_participant_id);
}
}
}
@@ -247,100 +167,42 @@ void LLBottomTray::sessionRemoved(const LLUUID& session_id)
{
if(getChicletPanel())
{
- LLSD sid(session_id);
- getChicletPanel()->removeIMChiclet(&sid);
- getChicletPanel()->arrange();
+ getChicletPanel()->removeChiclet(session_id);
}
}
-void LLBottomTray::sendChat( EChatType type )
+//virtual
+void LLBottomTray::onFocusLost()
{
- LLLineEditor* chat_box = getChatBox();
-
- if (chat_box)
+ if (gAgent.cameraMouselook())
{
- LLWString text = chat_box->getConvertedText();
- if (!text.empty())
- {
- // store sent line in history, duplicates will get filtered
- chat_box->updateHistory();
- // Check if this is destined for another channel
- S32 channel = 0;
- stripChannelNumber(text, &channel);
-
- std::string utf8text = wstring_to_utf8str(text);
- // Try to trigger a gesture, if not chat to a script.
- std::string utf8_revised_text;
- if (0 == channel)
- {
- // discard returned "found" boolean
- gGestureManager.triggerAndReviseString(utf8text, &utf8_revised_text);
- }
- else
- {
- utf8_revised_text = utf8text;
- }
-
- utf8_revised_text = utf8str_trim(utf8_revised_text);
-
- if (!utf8_revised_text.empty())
- {
- // Chat with animation
- sendChatFromViewer(utf8_revised_text, type, TRUE);
- }
- }
+ setVisible(FALSE);
}
-
- gAgent.stopTyping();
}
-// If input of the form "/20foo" or "/20 foo", returns "foo" and channel 20.
-// Otherwise returns input and channel 0.
-LLWString LLBottomTray::stripChannelNumber(const LLWString &mesg, S32* channel)
+//virtual
+// setVisible used instead of onVisibilityChange, since LLAgent calls it on entering/leaving mouselook mode.
+// If bottom tray is already visible in mouselook mode, then onVisibilityChange will not be called from setVisible(true),
+void LLBottomTray::setVisible(BOOL visible)
{
- if (mesg[0] == '/'
- && mesg[1] == '/')
- {
- // This is a "repeat channel send"
- *channel = mLastSpecialChatChannel;
- return mesg.substr(2, mesg.length() - 2);
- }
- else if (mesg[0] == '/'
- && mesg[1]
- && LLStringOps::isDigit(mesg[1]))
+ LLPanel::setVisible(visible);
+
+ LLView* stack = getChild<LLView>("toolbar_stack",TRUE,FALSE);
+
+ if (stack)
{
- // This a special "/20" speak on a channel
- S32 pos = 0;
+ BOOL visibility = gAgent.cameraMouselook() ? false : true;
- // Copy the channel number into a string
- LLWString channel_string;
- llwchar c;
- do
+ for ( child_list_const_iter_t child_it = stack->getChildList()->begin(); child_it != stack->getChildList()->end(); child_it++)
{
- c = mesg[pos+1];
- channel_string.push_back(c);
- pos++;
- }
- while(c && pos < 64 && LLStringOps::isDigit(c));
-
- // Move the pointer forward to the first non-whitespace char
- // Check isspace before looping, so we can handle "/33foo"
- // as well as "/33 foo"
- while(c && iswspace(c))
- {
- c = mesg[pos+1];
- pos++;
+ LLView* viewp = *child_it;
+
+ if ("chat_bar" == viewp->getName())
+ continue;
+ else
+ {
+ viewp->setVisible(visibility);
+ }
}
-
- mLastSpecialChatChannel = strtol(wstring_to_utf8str(channel_string).c_str(), NULL, 10);
- *channel = mLastSpecialChatChannel;
- return mesg.substr(pos, mesg.length() - pos);
- }
- else
- {
- // This is normal chat.
- *channel = 0;
- return mesg;
}
}
-
diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h
index 780e1b270d..e5848f72dc 100644
--- a/indra/newview/llbottomtray.h
+++ b/indra/newview/llbottomtray.h
@@ -34,58 +34,56 @@
#define LL_LLBOTTOMPANEL_H
#include "llpanel.h"
-#include "llflyoutbutton.h"
#include "llimview.h"
-#include "llchat.h"
class LLChicletPanel;
-class LLNotificationChiclet;
+class LLLineEditor;
class LLNotificationChiclet;
class LLTalkButton;
+class LLNearbyChatBar;
class LLBottomTray
- : public LLSingleton<LLBottomTray>
+ : public LLUISingleton<LLBottomTray>
, public LLPanel
, public LLIMSessionObserver
{
+ friend class LLUISingleton<LLBottomTray>;
public:
- LLBottomTray();
-
~LLBottomTray();
- LLLineEditor* getChatBox();
-
- LLChicletPanel* getChicletPanel() {return mChicletPanel;};
-
- LLNotificationChiclet* getIMWell() {return mIMWell;};
+ LLChicletPanel* getChicletPanel() {return mChicletPanel;}
+ LLNotificationChiclet* getIMWell() {return mIMWell;}
+ LLNotificationChiclet* getSysWell() {return mSysWell;}
+ LLNearbyChatBar* getNearbyChatBar() {return mNearbyChatBar;}
- LLNotificationChiclet* getNotificationWell(){return mNotificationWell;};
+ /*virtual*/void draw();
+ void refreshStandUp();
- void onChatBoxCommit();
- void sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate);
- void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate);
- static void onChatBoxKeystroke(LLLineEditor* caller, void* userdata);
- static void onChatBoxFocusLost(LLFocusableElement* caller, void* userdata);
+ void onCommitGesture(LLUICtrl* ctrl);
+ void onCommitStandUp(LLUICtrl* ctrl);
+ void refreshGestures();
// LLIMSessionObserver observe triggers
virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id);
virtual void sessionRemoved(const LLUUID& session_id);
+ virtual void onFocusLost();
+ virtual void setVisible(BOOL visible);
+
protected:
- void sendChat( EChatType type );
- LLWString stripChannelNumber(const LLWString &mesg, S32* channel);
+ LLBottomTray(const LLSD& key = LLSD());
- // Which non-zero channel did we last chat on?
- S32 mLastSpecialChatChannel;
+ void onChicletClick(LLUICtrl* ctrl);
- LLChicletPanel* mChicletPanel;
- LLNotificationChiclet* mIMWell;
- LLNotificationChiclet* mNotificationWell;
- LLTalkButton* mTalkBtn;
-};
+ static void* createNearbyChatBar(void* userdata);
-extern LLBottomTray* gBottomTray;
-extern S32 BOTTOM_TRAY_HEIGHT;
+ LLChicletPanel* mChicletPanel;
+ LLNotificationChiclet* mIMWell;
+ LLNotificationChiclet* mSysWell;
+ LLTalkButton* mTalkBtn;
+ LLButton* mStandUpBtn;
+ LLNearbyChatBar* mNearbyChatBar;
+};
#endif // LL_LLBOTTOMPANEL_H
diff --git a/indra/newview/llbreadcrumbview.cpp b/indra/newview/llbreadcrumbview.cpp
new file mode 100644
index 0000000000..342994ee30
--- /dev/null
+++ b/indra/newview/llbreadcrumbview.cpp
@@ -0,0 +1,37 @@
+/**
+ * @file llbreadcrumbview.cpp
+ * @brief UI widget for displaying position in a folder hierarchy and allowing
+ * the user to click on a location in the hierarchy.
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h"
+
+#include "llbreadcrumbview.h"
+
+// TODO
diff --git a/indra/newview/llbreadcrumbview.h b/indra/newview/llbreadcrumbview.h
new file mode 100644
index 0000000000..ca6fbe7fb2
--- /dev/null
+++ b/indra/newview/llbreadcrumbview.h
@@ -0,0 +1,36 @@
+/**
+ * @file llbreadcrumbview.h
+ * @brief UI widget for displaying position in a folder hierarchy and allowing
+ * the user to click on a location in the hierarchy.
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 LLBREADCRUMBVIEW_H
+#define LLBREADCRUMBVIEW_H
+
+#endif // LLBREADCRUMBVIEW_H
diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp
index 1844934e6a..355a90209a 100644
--- a/indra/newview/llcallingcard.cpp
+++ b/indra/newview/llcallingcard.cpp
@@ -684,7 +684,7 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
{
std::string notifyMsg = notification->getMessage();
if (!notifyMsg.empty())
- floater->addHistoryLine(notifyMsg,gSavedSkinSettings.getColor4("SystemChatColor"));
+ floater->addHistoryLine(notifyMsg,LLUIColorTable::instance().getColor("SystemChatColor"));
}
}
diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp
new file mode 100644
index 0000000000..0eb0801a2c
--- /dev/null
+++ b/indra/newview/llchannelmanager.cpp
@@ -0,0 +1,177 @@
+/**
+ * @file llchannelmanager.cpp
+ * @brief This class rules screen notification channels.
+ *
+ * $LicenseInfo:firstyear=2000&license=viewergpl$
+ *
+ * Copyright (c) 2000-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h" // must be first include
+
+#include "llchannelmanager.h"
+
+#include "llappviewer.h"
+#include "llviewercontrol.h"
+
+#include <algorithm>
+
+using namespace LLNotificationsUI;
+
+//--------------------------------------------------------------------------
+LLChannelManager::LLChannelManager()
+{
+ LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLChannelManager::onLoginCompleted, this));
+}
+
+//--------------------------------------------------------------------------
+LLChannelManager::~LLChannelManager()
+{
+ //All channels are being deleted by Parent View
+}
+
+//--------------------------------------------------------------------------
+void LLChannelManager::onLoginCompleted()
+{
+ S32 hidden_notifications = 0;
+
+ for(std::vector<ChannelElem>::iterator it = mChannelList.begin(); it != mChannelList.end(); ++it)
+ {
+ //(*it).channel->showToasts();
+ hidden_notifications +=(*it).channel->getNumberOfHiddenToasts();
+ }
+
+ if(!hidden_notifications)
+ {
+ LLScreenChannel::setStartUpToastShown();
+ return;
+ }
+
+ LLChannelManager::Params p;
+ p.id = LLUUID(STARTUP_CHANNEL_ID);
+ p.channel_right_bound = getRootView()->getRect().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
+ p.channel_width = gSavedSettings.getS32("NotifyBoxWidth");
+ mStartUpChannel = NULL;
+ mStartUpChannel = createChannel(p);
+
+ if(!mStartUpChannel)
+ return;
+
+ static_cast<LLUICtrl*>(mStartUpChannel)->setCommitCallback(boost::bind(&LLChannelManager::enableShowToasts, this));
+ mStartUpChannel->setNumberOfHiddenToasts(hidden_notifications);
+ mStartUpChannel->createOverflowToast(gSavedSettings.getS32("ChannelBottomPanelMargin"), gSavedSettings.getS32("StartUpToastTime"));
+}
+
+//--------------------------------------------------------------------------
+void LLChannelManager::enableShowToasts()
+{
+ LLScreenChannel::setStartUpToastShown();
+ delete mStartUpChannel;
+}
+
+//--------------------------------------------------------------------------
+LLScreenChannel* LLChannelManager::createChannel(LLChannelManager::Params& p)
+{
+ LLScreenChannel* new_channel = NULL;
+
+ if(!p.chiclet)
+ {
+ new_channel = getChannelByID(p.id);
+ }
+ else
+ {
+ new_channel = getChannelByChiclet(p.chiclet);
+ }
+
+ if(new_channel)
+ return new_channel;
+
+ new_channel = new LLScreenChannel();
+ getRootView()->addChild(new_channel);
+ new_channel->init(p.channel_right_bound - p.channel_width, p.channel_right_bound);
+ new_channel->setToastAlignment(p.align);
+
+ ChannelElem new_elem;
+ new_elem.id = p.id;
+ new_elem.chiclet = p.chiclet;
+ new_elem.channel = new_channel;
+
+ mChannelList.push_back(new_elem); //TODO: remove chiclet from ScreenChannel?
+
+ return new_channel;
+}
+
+//--------------------------------------------------------------------------
+LLScreenChannel* LLChannelManager::getChannelByID(const LLUUID id)
+{
+ std::vector<ChannelElem>::iterator it = find(mChannelList.begin(), mChannelList.end(), id);
+ if(it != mChannelList.end())
+ {
+ return (*it).channel;
+ }
+
+ return NULL;
+}
+
+//--------------------------------------------------------------------------
+LLScreenChannel* LLChannelManager::getChannelByChiclet(const LLChiclet* chiclet)
+{
+ std::vector<ChannelElem>::iterator it = find(mChannelList.begin(), mChannelList.end(), chiclet);
+ if(it != mChannelList.end())
+ {
+ return (*it).channel;
+ }
+
+ return NULL;
+}
+
+//--------------------------------------------------------------------------
+void LLChannelManager::reshape(S32 width, S32 height, BOOL called_from_parent)
+{
+ for(std::vector<ChannelElem>::iterator it = mChannelList.begin(); it != mChannelList.end(); ++it)
+ {
+ if((*it).channel->getToastAlignment() == NA_CENTRE)
+ {
+ LLRect channel_rect = (*it).channel->getRect();
+ S32 screen_width = getRootView()->getRect().getWidth();
+ channel_rect.setLeftTopAndSize(screen_width/2, channel_rect.mTop, channel_rect.getWidth(), channel_rect.getHeight());
+ (*it).channel->setRect(channel_rect);
+ (*it).channel->showToasts();
+ }
+ }
+}
+
+//--------------------------------------------------------------------------
+
+
+//--------------------------------------------------------------------------
+
+
+
+
+
+
+
diff --git a/indra/newview/llchannelmanager.h b/indra/newview/llchannelmanager.h
new file mode 100644
index 0000000000..3914d20ebc
--- /dev/null
+++ b/indra/newview/llchannelmanager.h
@@ -0,0 +1,123 @@
+/**
+ * @file llchannelmanager.h
+ * @brief This class rules screen notification channels.
+ *
+ * $LicenseInfo:firstyear=2003&license=viewergpl$
+ *
+ * Copyright (c) 2003-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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_LLCHANNELMANAGER_H
+#define LL_LLCHANNELMANAGER_H
+
+
+#include "llchiclet.h"
+#include "llscreenchannel.h"
+
+#include "lluuid.h"
+
+#include <map>
+#include <boost/shared_ptr.hpp>
+
+namespace LLNotificationsUI
+{
+
+#define STARTUP_CHANNEL_ID "AEED3193-8709-4693-8558-7452CCA97AE5"
+
+/**
+ * Manager for screen channels.
+ * Responsible for instantiating and retrieving screen channels.
+ */
+class LLChannelManager : public LLUICtrl, public LLSingleton<LLChannelManager>
+{
+public:
+ struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
+ {
+ Optional<LLUUID> id;
+ Optional<LLChiclet*> chiclet;
+ Optional<S32> channel_right_bound;
+ Optional<S32> channel_width;
+ Optional<EToastAlignment> align;
+
+ Params(): id("id", LLUUID("")),
+ chiclet("chiclet", NULL),
+ channel_right_bound("channel_right_bound", 0),
+ channel_width("channel_width", 0),
+ align("align", NA_BOTTOM)
+ {}
+ };
+
+ struct ChannelElem
+ {
+ LLUUID id;
+ LLChiclet* chiclet;
+ LLScreenChannel* channel;
+
+ ChannelElem() : id(LLUUID("")), chiclet(NULL), channel(NULL) { }
+
+ ChannelElem(const ChannelElem &elem)
+ {
+ id = elem.id;
+ chiclet = elem.chiclet;
+ channel = elem.channel;
+ }
+
+ bool operator == (const LLUUID &id_op) const
+ {
+ return (id == id_op);
+ }
+
+ bool operator == (const LLChiclet* chiclet_op) const
+ {
+ return (chiclet == chiclet_op);
+ }
+
+ };
+
+ LLChannelManager();
+ virtual ~LLChannelManager();
+
+ // On LoginCompleted - show StartUp toast
+ void onLoginCompleted();
+ void enableShowToasts();
+
+ //TODO: make protected? in order to be shure that channels are created only by notification handlers
+ LLScreenChannel* createChannel(LLChannelManager::Params& p);
+
+ LLScreenChannel* getChannelByID(const LLUUID id);
+ LLScreenChannel* getChannelByChiclet(const LLChiclet* chiclet);
+
+ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+
+private:
+
+ LLScreenChannel* mStartUpChannel;
+ std::vector<ChannelElem> mChannelList;
+};
+
+}
+#endif
+
diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp
deleted file mode 100644
index 5e97157694..0000000000
--- a/indra/newview/llchatbar.cpp
+++ /dev/null
@@ -1,691 +0,0 @@
-/**
- * @file llchatbar.cpp
- * @brief LLChatBar class implementation
- *
- * $LicenseInfo:firstyear=2002&license=viewergpl$
- *
- * Copyright (c) 2002-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h"
-
-#include "llchatbar.h"
-
-#include "imageids.h"
-#include "llfontgl.h"
-#include "llrect.h"
-#include "llerror.h"
-#include "llparcel.h"
-#include "llstring.h"
-#include "message.h"
-#include "llfocusmgr.h"
-
-#include "llagent.h"
-#include "llbutton.h"
-#include "llcombobox.h"
-#include "llcommandhandler.h" // secondlife:///app/chat/ support
-#include "llviewercontrol.h"
-#include "llfloaterchat.h"
-#include "llgesturemgr.h"
-#include "llkeyboard.h"
-#include "lllineeditor.h"
-#include "llstatusbar.h"
-#include "lltextbox.h"
-#include "lluiconstants.h"
-#include "llviewergesture.h" // for triggering gestures
-#include "llviewermenu.h" // for deleting object with DEL key
-#include "llviewerstats.h"
-#include "llviewerwindow.h"
-#include "llframetimer.h"
-#include "llresmgr.h"
-#include "llworld.h"
-#include "llinventorymodel.h"
-#include "llmultigesture.h"
-#include "llui.h"
-#include "llviewermenu.h"
-#include "lluictrlfactory.h"
-#include "llbottomtray.h"
-
-//
-// Globals
-//
-const F32 AGENT_TYPING_TIMEOUT = 5.f; // seconds
-
-LLChatBar *gChatBar = NULL;
-
-class LLChatBarGestureObserver : public LLGestureManagerObserver
-{
-public:
- LLChatBarGestureObserver(LLChatBar* chat_barp) : mChatBar(chat_barp){}
- virtual ~LLChatBarGestureObserver() {}
- virtual void changed() { mChatBar->refreshGestures(); }
-private:
- LLChatBar* mChatBar;
-};
-
-
-//
-// Functions
-//
-
-LLChatBar::LLChatBar()
-: LLPanel(),
- mInputEditor(NULL),
- mGestureLabelTimer(),
- mLastSpecialChatChannel(0),
- mIsBuilt(FALSE),
- mGestureCombo(NULL),
- mObserver(NULL)
-{
- setIsChrome(TRUE);
-
-#if !LL_RELEASE_FOR_DOWNLOAD
- childDisplayNotFound();
-#endif
-}
-
-
-LLChatBar::~LLChatBar()
-{
- gGestureManager.removeObserver(mObserver);
- delete mObserver;
- mObserver = NULL;
- // LLView destructor cleans up children
-}
-
-BOOL LLChatBar::postBuild()
-{
- getChild<LLUICtrl>("Say")->setCommitCallback(boost::bind(&LLChatBar::onClickSay, this, _1));
-
- // attempt to bind to an existing combo box named gesture
- setGestureCombo(getChild<LLComboBox>( "Gesture", TRUE, FALSE));
-
- mInputEditor = getChild<LLLineEditor>("Chat Editor");
- mInputEditor->setKeystrokeCallback(&onInputEditorKeystroke, this);
- mInputEditor->setFocusLostCallback(&onInputEditorFocusLost, this);
- mInputEditor->setFocusReceivedCallback( &onInputEditorGainFocus, this );
- mInputEditor->setCommitOnFocusLost( FALSE );
- mInputEditor->setRevertOnEsc( FALSE );
- mInputEditor->setIgnoreTab(TRUE);
- mInputEditor->setPassDelete(TRUE);
- mInputEditor->setReplaceNewlinesWithSpaces(FALSE);
-
- mInputEditor->setMaxTextLength(1023);
- mInputEditor->setEnableLineHistory(TRUE);
-
- mIsBuilt = TRUE;
-
- return TRUE;
-}
-
-//-----------------------------------------------------------------------
-// Overrides
-//-----------------------------------------------------------------------
-
-// virtual
-BOOL LLChatBar::handleKeyHere( KEY key, MASK mask )
-{
- BOOL handled = FALSE;
-
- // ALT-RETURN is reserved for windowed/fullscreen toggle
- if( KEY_RETURN == key )
- {
- if (mask == MASK_CONTROL)
- {
- // shout
- sendChat(CHAT_TYPE_SHOUT);
- handled = TRUE;
- }
- else if (mask == MASK_NONE)
- {
- // say
- sendChat( CHAT_TYPE_NORMAL );
- handled = TRUE;
- }
- }
- // only do this in main chatbar
- else if ( KEY_ESCAPE == key && gChatBar == this)
- {
- stopChat();
-
- handled = TRUE;
- }
-
- return handled;
-}
-
-void LLChatBar::refresh()
-{
- // HACK: Leave the name of the gesture in place for a few seconds.
- const F32 SHOW_GESTURE_NAME_TIME = 2.f;
- if (mGestureLabelTimer.getStarted() && mGestureLabelTimer.getElapsedTimeF32() > SHOW_GESTURE_NAME_TIME)
- {
- LLCtrlListInterface* gestures = mGestureCombo ? mGestureCombo->getListInterface() : NULL;
- if (gestures) gestures->selectFirstItem();
- mGestureLabelTimer.stop();
- }
-
- if ((gAgent.getTypingTime() > AGENT_TYPING_TIMEOUT) && (gAgent.getRenderState() & AGENT_STATE_TYPING))
- {
- gAgent.stopTyping();
- }
-
- childSetEnabled("Say", mInputEditor->getText().size() > 0);
-
-}
-
-void LLChatBar::refreshGestures()
-{
- if (mGestureCombo)
- {
- //store current selection so we can maintain it
- std::string cur_gesture = mGestureCombo->getValue().asString();
- mGestureCombo->selectFirstItem();
- std::string label = mGestureCombo->getValue().asString();;
- // clear
- mGestureCombo->clearRows();
-
- // collect list of unique gestures
- std::map <std::string, BOOL> unique;
- LLGestureManager::item_map_t::iterator it;
- for (it = gGestureManager.mActive.begin(); it != gGestureManager.mActive.end(); ++it)
- {
- LLMultiGesture* gesture = (*it).second;
- if (gesture)
- {
- if (!gesture->mTrigger.empty())
- {
- unique[gesture->mTrigger] = TRUE;
- }
- }
- }
-
- // add unique gestures
- std::map <std::string, BOOL>::iterator it2;
- for (it2 = unique.begin(); it2 != unique.end(); ++it2)
- {
- mGestureCombo->addSimpleElement((*it2).first);
- }
-
- mGestureCombo->sortByName();
- // Insert label after sorting, at top, with separator below it
- mGestureCombo->addSeparator(ADD_TOP);
- mGestureCombo->addSimpleElement(getString("gesture_label"), ADD_TOP);
-
- if (!cur_gesture.empty())
- {
- mGestureCombo->selectByValue(LLSD(cur_gesture));
- }
- else
- {
- mGestureCombo->selectFirstItem();
- }
- }
-}
-
-// Move the cursor to the correct input field.
-void LLChatBar::setKeyboardFocus(BOOL focus)
-{
- if (focus)
- {
- if (mInputEditor)
- {
- mInputEditor->setFocus(TRUE);
- mInputEditor->selectAll();
- }
- }
- else if (gFocusMgr.childHasKeyboardFocus(this))
- {
- if (mInputEditor)
- {
- mInputEditor->deselect();
- }
- setFocus(FALSE);
- }
-}
-
-
-// Ignore arrow keys in chat bar
-void LLChatBar::setIgnoreArrowKeys(BOOL b)
-{
- if (mInputEditor)
- {
- mInputEditor->setIgnoreArrowKeys(b);
- }
-}
-
-BOOL LLChatBar::inputEditorHasFocus()
-{
- return mInputEditor && mInputEditor->hasFocus();
-}
-
-std::string LLChatBar::getCurrentChat()
-{
- return mInputEditor ? mInputEditor->getText() : LLStringUtil::null;
-}
-
-void LLChatBar::setGestureCombo(LLComboBox* combo)
-{
- mGestureCombo = combo;
- if (mGestureCombo)
- {
- mGestureCombo->setCommitCallback(boost::bind(&LLChatBar::onCommitGesture, this, _1));
-
- // now register observer since we have a place to put the results
- mObserver = new LLChatBarGestureObserver(this);
- gGestureManager.addObserver(mObserver);
-
- // refresh list from current active gestures
- refreshGestures();
- }
-}
-
-//-----------------------------------------------------------------------
-// Internal functions
-//-----------------------------------------------------------------------
-
-// If input of the form "/20foo" or "/20 foo", returns "foo" and channel 20.
-// Otherwise returns input and channel 0.
-LLWString LLChatBar::stripChannelNumber(const LLWString &mesg, S32* channel)
-{
- if (mesg[0] == '/'
- && mesg[1] == '/')
- {
- // This is a "repeat channel send"
- *channel = mLastSpecialChatChannel;
- return mesg.substr(2, mesg.length() - 2);
- }
- else if (mesg[0] == '/'
- && mesg[1]
- && LLStringOps::isDigit(mesg[1]))
- {
- // This a special "/20" speak on a channel
- S32 pos = 0;
-
- // Copy the channel number into a string
- LLWString channel_string;
- llwchar c;
- do
- {
- c = mesg[pos+1];
- channel_string.push_back(c);
- pos++;
- }
- while(c && pos < 64 && LLStringOps::isDigit(c));
-
- // Move the pointer forward to the first non-whitespace char
- // Check isspace before looping, so we can handle "/33foo"
- // as well as "/33 foo"
- while(c && iswspace(c))
- {
- c = mesg[pos+1];
- pos++;
- }
-
- mLastSpecialChatChannel = strtol(wstring_to_utf8str(channel_string).c_str(), NULL, 10);
- *channel = mLastSpecialChatChannel;
- return mesg.substr(pos, mesg.length() - pos);
- }
- else
- {
- // This is normal chat.
- *channel = 0;
- return mesg;
- }
-}
-
-
-void LLChatBar::sendChat( EChatType type )
-{
- if (mInputEditor)
- {
- LLWString text = mInputEditor->getConvertedText();
- if (!text.empty())
- {
- // store sent line in history, duplicates will get filtered
- if (mInputEditor) mInputEditor->updateHistory();
- // Check if this is destined for another channel
- S32 channel = 0;
- stripChannelNumber(text, &channel);
-
- std::string utf8text = wstring_to_utf8str(text);
- // Try to trigger a gesture, if not chat to a script.
- std::string utf8_revised_text;
- if (0 == channel)
- {
- // discard returned "found" boolean
- gGestureManager.triggerAndReviseString(utf8text, &utf8_revised_text);
- }
- else
- {
- utf8_revised_text = utf8text;
- }
-
- utf8_revised_text = utf8str_trim(utf8_revised_text);
-
- if (!utf8_revised_text.empty())
- {
- // Chat with animation
- sendChatFromViewer(utf8_revised_text, type, TRUE);
- }
- }
- }
-
- childSetValue("Chat Editor", LLStringUtil::null);
-
- gAgent.stopTyping();
-
- // If the user wants to stop chatting on hitting return, lose focus
- // and go out of chat mode.
- if (gChatBar == this && gSavedSettings.getBOOL("CloseChatOnReturn"))
- {
- stopChat();
- }
-}
-
-
-//-----------------------------------------------------------------------
-// Static functions
-//-----------------------------------------------------------------------
-
-// static
-void LLChatBar::startChat(const char* line)
-{
- //TODO* remove DUMMY chat
- if(LLBottomTray::getInstance()->getChatBox())
- {
- LLBottomTray::getInstance()->getChatBox()->setFocus(TRUE);
- }
-
- // *TODO Vadim: Why was this code commented out?
-
-// gChatBar->setVisible(TRUE);
-// gChatBar->setKeyboardFocus(TRUE);
-// gSavedSettings.setBOOL("ChatVisible", TRUE);
-//
-// if (line && gChatBar->mInputEditor)
-// {
-// std::string line_string(line);
-// gChatBar->mInputEditor->setText(line_string);
-// }
-// // always move cursor to end so users don't obliterate chat when accidentally hitting WASD
-// gChatBar->mInputEditor->setCursorToEnd();
-}
-
-
-// Exit "chat mode" and do the appropriate focus changes
-// static
-void LLChatBar::stopChat()
-{
- //TODO* remove DUMMY chat
- if(LLBottomTray::getInstance()->getChatBox())
- {
- LLBottomTray::getInstance()->getChatBox()->setFocus(FALSE);
- }
-
- // *TODO Vadim: Why was this code commented out?
-
-// // In simple UI mode, we never release focus from the chat bar
-// gChatBar->setKeyboardFocus(FALSE);
-//
-// // If we typed a movement key and pressed return during the
-// // same frame, the keyboard handlers will see the key as having
-// // gone down this frame and try to move the avatar.
-// gKeyboard->resetKeys();
-// gKeyboard->resetMaskKeys();
-//
-// // stop typing animation
-// gAgent.stopTyping();
-//
-// // hide chat bar so it doesn't grab focus back
-// gChatBar->setVisible(FALSE);
-// gSavedSettings.setBOOL("ChatVisible", FALSE);
-}
-
-// static
-void LLChatBar::onInputEditorKeystroke( LLLineEditor* caller, void* userdata )
-{
- LLChatBar* self = (LLChatBar *)userdata;
-
- LLWString raw_text;
- if (self->mInputEditor) raw_text = self->mInputEditor->getWText();
-
- // Can't trim the end, because that will cause autocompletion
- // to eat trailing spaces that might be part of a gesture.
- LLWStringUtil::trimHead(raw_text);
-
- S32 length = raw_text.length();
-
- if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences
- {
- gAgent.startTyping();
- }
- else
- {
- gAgent.stopTyping();
- }
-
- /* Doesn't work -- can't tell the difference between a backspace
- that killed the selection vs. backspace at the end of line.
- if (length > 1
- && text[0] == '/'
- && key == KEY_BACKSPACE)
- {
- // the selection will already be deleted, but we need to trim
- // off the character before
- std::string new_text = raw_text.substr(0, length-1);
- self->mInputEditor->setText( new_text );
- self->mInputEditor->setCursorToEnd();
- length = length - 1;
- }
- */
-
- KEY key = gKeyboard->currentKey();
-
- // Ignore "special" keys, like backspace, arrows, etc.
- if (length > 1
- && raw_text[0] == '/'
- && key < KEY_SPECIAL)
- {
- // we're starting a gesture, attempt to autocomplete
-
- std::string utf8_trigger = wstring_to_utf8str(raw_text);
- std::string utf8_out_str(utf8_trigger);
-
- if (gGestureManager.matchPrefix(utf8_trigger, &utf8_out_str))
- {
- if (self->mInputEditor)
- {
- std::string rest_of_match = utf8_out_str.substr(utf8_trigger.size());
- self->mInputEditor->setText(utf8_trigger + rest_of_match); // keep original capitalization for user-entered part
- S32 outlength = self->mInputEditor->getLength(); // in characters
-
- // Select to end of line, starting from the character
- // after the last one the user typed.
- self->mInputEditor->setSelection(length, outlength);
- }
- }
-
- //llinfos << "GESTUREDEBUG " << trigger
- // << " len " << length
- // << " outlen " << out_str.getLength()
- // << llendl;
- }
-}
-
-// static
-void LLChatBar::onInputEditorFocusLost( LLFocusableElement* caller, void* userdata)
-{
- // stop typing animation
- gAgent.stopTyping();
-}
-
-// static
-void LLChatBar::onInputEditorGainFocus( LLFocusableElement* caller, void* userdata )
-{
- LLFloaterChat::setHistoryCursorAndScrollToEnd();
-}
-
-void LLChatBar::onClickSay( LLUICtrl* ctrl )
-{
- std::string cmd = ctrl->getValue().asString();
- e_chat_type chat_type = CHAT_TYPE_NORMAL;
- if (cmd == "shout")
- {
- chat_type = CHAT_TYPE_SHOUT;
- }
- else if (cmd == "whisper")
- {
- chat_type = CHAT_TYPE_WHISPER;
- }
- sendChat(chat_type);
-}
-
-void LLChatBar::sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate)
-{
- sendChatFromViewer(utf8str_to_wstring(utf8text), type, animate);
-}
-
-void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate)
-{
- // Look for "/20 foo" channel chats.
- S32 channel = 0;
- LLWString out_text = stripChannelNumber(wtext, &channel);
- std::string utf8_out_text = wstring_to_utf8str(out_text);
- std::string utf8_text = wstring_to_utf8str(wtext);
-
- utf8_text = utf8str_trim(utf8_text);
- if (!utf8_text.empty())
- {
- utf8_text = utf8str_truncate(utf8_text, MAX_STRING - 1);
- }
-
- // Don't animate for chats people can't hear (chat to scripts)
- if (animate && (channel == 0))
- {
- if (type == CHAT_TYPE_WHISPER)
- {
- lldebugs << "You whisper " << utf8_text << llendl;
- gAgent.sendAnimationRequest(ANIM_AGENT_WHISPER, ANIM_REQUEST_START);
- }
- else if (type == CHAT_TYPE_NORMAL)
- {
- lldebugs << "You say " << utf8_text << llendl;
- gAgent.sendAnimationRequest(ANIM_AGENT_TALK, ANIM_REQUEST_START);
- }
- else if (type == CHAT_TYPE_SHOUT)
- {
- lldebugs << "You shout " << utf8_text << llendl;
- gAgent.sendAnimationRequest(ANIM_AGENT_SHOUT, ANIM_REQUEST_START);
- }
- else
- {
- llinfos << "send_chat_from_viewer() - invalid volume" << llendl;
- return;
- }
- }
- else
- {
- if (type != CHAT_TYPE_START && type != CHAT_TYPE_STOP)
- {
- lldebugs << "Channel chat: " << utf8_text << llendl;
- }
- }
-
- send_chat_from_viewer(utf8_out_text, type, channel);
-}
-
-void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel)
-{
- LLMessageSystem* msg = gMessageSystem;
- msg->newMessageFast(_PREHASH_ChatFromViewer);
- msg->nextBlockFast(_PREHASH_AgentData);
- msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- msg->nextBlockFast(_PREHASH_ChatData);
- msg->addStringFast(_PREHASH_Message, utf8_out_text);
- msg->addU8Fast(_PREHASH_Type, type);
- msg->addS32("Channel", channel);
-
- gAgent.sendReliableMessage();
-
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CHAT_COUNT);
-}
-
-
-void LLChatBar::onCommitGesture(LLUICtrl* ctrl)
-{
- LLCtrlListInterface* gestures = mGestureCombo ? mGestureCombo->getListInterface() : NULL;
- if (gestures)
- {
- S32 index = gestures->getFirstSelectedIndex();
- if (index == 0)
- {
- return;
- }
- const std::string& trigger = gestures->getSelectedValue().asString();
-
- // pretend the user chatted the trigger string, to invoke
- // substitution and logging.
- std::string text(trigger);
- std::string revised_text;
- gGestureManager.triggerAndReviseString(text, &revised_text);
-
- revised_text = utf8str_trim(revised_text);
- if (!revised_text.empty())
- {
- // Don't play nodding animation
- sendChatFromViewer(revised_text, CHAT_TYPE_NORMAL, FALSE);
- }
- }
- mGestureLabelTimer.start();
- if (mGestureCombo != NULL)
- {
- // free focus back to chat bar
- mGestureCombo->setFocus(FALSE);
- }
-}
-
-class LLChatHandler : public LLCommandHandler
-{
-public:
- // not allowed from outside the app
- LLChatHandler() : LLCommandHandler("chat", true) { }
-
- // Your code here
- bool handle(const LLSD& tokens, const LLSD& query_map,
- LLWebBrowserCtrl* web)
- {
- if (tokens.size() < 2) return false;
- S32 channel = tokens[0].asInteger();
- std::string mesg = tokens[1].asString();
- send_chat_from_viewer(mesg, CHAT_TYPE_NORMAL, channel);
- return true;
- }
-};
-
-// Creating the object registers with the dispatcher.
-LLChatHandler gChatHandler;
diff --git a/indra/newview/llchatbar.h b/indra/newview/llchatbar.h
deleted file mode 100644
index e0e324af6b..0000000000
--- a/indra/newview/llchatbar.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * @file llchatbar.h
- * @brief LLChatBar class definition
- *
- * $LicenseInfo:firstyear=2002&license=viewergpl$
- *
- * Copyright (c) 2002-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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_LLCHATBAR_H
-#define LL_LLCHATBAR_H
-
-#include "llpanel.h"
-#include "llframetimer.h"
-#include "llchat.h"
-
-class LLLineEditor;
-class LLMessageSystem;
-class LLUICtrl;
-class LLUUID;
-class LLFrameTimer;
-class LLChatBarGestureObserver;
-class LLComboBox;
-
-// legacy calllback glue
-void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel);
-
-class LLChatBar
-: public LLPanel
-{
-public:
- // constructor for inline chat-bars (e.g. hosted in chat history window)
- LLChatBar();
- ~LLChatBar();
- virtual BOOL postBuild();
-
- virtual BOOL handleKeyHere(KEY key, MASK mask);
-
- void refresh();
- void refreshGestures();
-
- // Move cursor into chat input field.
- void setKeyboardFocus(BOOL b);
-
- // Ignore arrow keys for chat bar
- void setIgnoreArrowKeys(BOOL b);
-
- BOOL inputEditorHasFocus();
- std::string getCurrentChat();
-
- // since chat bar logic is reused for chat history
- // gesture combo box might not be a direct child
- void setGestureCombo(LLComboBox* combo);
-
- // Send a chat (after stripping /20foo channel chats).
- // "Animate" means the nodding animation for regular text.
- void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate);
- void sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate);
-
- // If input of the form "/20foo" or "/20 foo", returns "foo" and channel 20.
- // Otherwise returns input and channel 0.
- LLWString stripChannelNumber(const LLWString &mesg, S32* channel);
-
- // callbacks
- void onClickSay(LLUICtrl* ctrl);
-
- static void onTabClick( void* userdata );
- static void onInputEditorKeystroke(LLLineEditor* caller, void* userdata);
- static void onInputEditorFocusLost(LLFocusableElement* caller,void* userdata);
- static void onInputEditorGainFocus(LLFocusableElement* caller,void* userdata);
-
- void onCommitGesture(LLUICtrl* ctrl);
-
- static void startChat(const char* line);
- static void stopChat();
-
-protected:
- void sendChat(EChatType type);
- void updateChat();
-
-protected:
- LLLineEditor* mInputEditor;
-
- LLFrameTimer mGestureLabelTimer;
-
- // Which non-zero channel did we last chat on?
- S32 mLastSpecialChatChannel;
-
- BOOL mIsBuilt;
- LLComboBox* mGestureCombo;
-
- LLChatBarGestureObserver* mObserver;
-};
-
-extern LLChatBar *gChatBar;
-
-#endif
diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
new file mode 100644
index 0000000000..2b455485ca
--- /dev/null
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -0,0 +1,585 @@
+/**
+ * @file llchatitemscontainer.cpp
+ * @brief chat history scrolling panel implementation
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h"
+
+#include "llchatitemscontainerctrl.h"
+#include "lltextbox.h"
+
+#include "llchatmsgbox.h"
+#include "llavatariconctrl.h"
+#include "llfloaterreg.h"
+#include "lltrans.h"
+
+#include "llviewercontrol.h"
+#include "llagentdata.h"
+
+static const S32 BORDER_MARGIN = 2;
+static const S32 PARENT_BORDER_MARGIN = 0;
+
+static const S32 HORIZONTAL_MULTIPLE = 8;
+static const S32 VERTICAL_MULTIPLE = 16;
+static const F32 MIN_AUTO_SCROLL_RATE = 120.f;
+static const F32 MAX_AUTO_SCROLL_RATE = 500.f;
+static const F32 AUTO_SCROLL_RATE_ACCEL = 120.f;
+
+static const S32 msg_left_offset = 30;
+static const S32 msg_right_offset = 10;
+
+#define MAX_CHAT_HISTORY 100
+
+
+static LLDefaultChildRegistry::Register<LLChatItemsContainerCtrl> t2("chat_items_container");
+
+
+
+//*******************************************************************************************************************
+//LLChatItemCtrl
+//*******************************************************************************************************************
+
+LLChatItemCtrl* LLChatItemCtrl::createInstance()
+{
+ LLChatItemCtrl* item = new LLChatItemCtrl();
+ LLUICtrlFactory::getInstance()->buildPanel(item, "panel_chat_item.xml");
+ return item;
+}
+
+void LLChatItemCtrl::draw()
+{
+ LLPanel::draw();
+}
+
+void LLChatItemCtrl::reshape (S32 width, S32 height, BOOL called_from_parent )
+{
+ LLPanel::reshape(width, height,called_from_parent);
+
+ LLPanel* caption = getChild<LLPanel>("msg_caption",false,false);
+ LLChatMsgBox* msg_text = getChild<LLChatMsgBox>("msg_text",false,false);
+ if(caption && msg_text)
+ {
+ LLRect caption_rect = caption->getRect();
+ caption_rect.setLeftTopAndSize( 2, height, width - 4, caption_rect.getHeight());
+ caption->reshape( width - 4, caption_rect.getHeight(), 1);
+ caption->setRect(caption_rect);
+
+
+ LLRect msg_text_rect = msg_text->getRect();
+ msg_text_rect.setLeftTopAndSize( msg_left_offset, height - caption_rect.getHeight() , width - msg_left_offset - msg_right_offset, height - caption_rect.getHeight());
+ msg_text->reshape( width - msg_left_offset - msg_right_offset, height - caption_rect.getHeight(), 1);
+ msg_text->setRect(msg_text_rect);
+ }
+
+}
+
+BOOL LLChatItemCtrl::postBuild()
+{
+ return LLPanel::postBuild();
+}
+
+
+std::string LLChatItemCtrl::appendTime()
+{
+ time_t utc_time;
+ utc_time = time_corrected();
+ std::string timeStr ="["+ LLTrans::getString("TimeHour")+"]:["
+ +LLTrans::getString("TimeMin")+"] ";
+
+ LLSD substitution;
+
+ substitution["datetime"] = (S32) utc_time;
+ LLStringUtil::format (timeStr, substitution);
+
+ return timeStr;
+}
+
+
+
+void LLChatItemCtrl::addText (const std::string& message)
+{
+ LLChatMsgBox* msg_text = getChild<LLChatMsgBox>("msg_text",false,false);
+ if(msg_text)
+ msg_text->addText(message);
+ mMessages.push_back(message);
+}
+
+void LLChatItemCtrl::setMessage (const LLChat& msg)
+{
+ LLPanel* caption = getChild<LLPanel>("msg_caption",false,false);
+ if(!caption)
+ return;
+
+ std::string str_sender;
+
+
+ if(gAgentID != msg.mFromID)
+ str_sender = msg.mFromName;
+ else
+ str_sender = LLTrans::getString("You");;
+
+ caption->getChild<LLTextBox>("sender_name",false,false)->setText(str_sender);
+
+ std::string tt = appendTime();
+
+ caption->getChild<LLTextBox>("msg_time",false,false)->setText(tt);
+
+
+ caption->getChild<LLAvatarIconCtrl>("avatar_icon",false,false)->setValue(msg.mFromID);
+
+ mOriginalMessage = msg;
+
+ LLChatMsgBox* msg_text = getChild<LLChatMsgBox>("msg_text",false,false);
+ if(msg_text)
+ msg_text->setText(msg.mText);
+
+ LLUICtrl* msg_inspector = caption->getChild<LLUICtrl>("msg_inspector");
+ if(mOriginalMessage.mSourceType != CHAT_SOURCE_AGENT)
+ msg_inspector->setVisible(false);
+
+ mMessages.clear();
+
+}
+
+void LLChatItemCtrl::snapToMessageHeight ()
+{
+ LLChatMsgBox* text_box = getChild<LLChatMsgBox>("msg_text",false,false);
+ if(!text_box)
+ return;///actually assert fits better
+ S32 new_height = text_box->getTextPixelHeight();
+ LLRect panel_rect = getRect();
+
+ S32 caption_height = 0;
+ LLPanel* caption = getChild<LLPanel>("msg_caption",false,false);
+ if(caption)
+ caption_height = caption->getRect().getHeight();
+
+
+ panel_rect.setLeftTopAndSize( panel_rect.mLeft, panel_rect.mTop, panel_rect.getWidth() , caption_height + new_height);
+
+ reshape( getRect().getWidth(), caption_height + new_height, 1);
+
+ setRect(panel_rect);
+
+}
+
+
+void LLChatItemCtrl::setWidth(S32 width)
+{
+ LLChatMsgBox* text_box = getChild<LLChatMsgBox>("msg_text",false,false);
+ if(!text_box)
+ return;///actually assert fits better
+
+ text_box->reshape(width - msg_left_offset - msg_right_offset,100/*its not magic number, we just need any number*/);
+
+ LLChatMsgBox* msg_text = getChild<LLChatMsgBox>("msg_text",false,false);
+ if(msg_text && mOriginalMessage.mText.length())
+ msg_text->setText(mOriginalMessage.mText);
+
+ for(size_t i=0;i<mMessages.size();++i)
+ msg_text->addText(mMessages[i]);
+
+ setRect(LLRect(getRect().mLeft, getRect().mTop, getRect().mLeft + width , getRect().mBottom));
+ snapToMessageHeight ();
+}
+
+void LLChatItemCtrl::onMouseLeave (S32 x, S32 y, MASK mask)
+{
+ LLPanel* caption = getChild<LLPanel>("msg_caption",false,false);
+ if(!caption)
+ return;
+ LLUICtrl* msg_inspector = caption->getChild<LLUICtrl>("msg_inspector");
+ if(msg_inspector)
+ msg_inspector->setVisible(false);
+
+}
+void LLChatItemCtrl::onMouseEnter (S32 x, S32 y, MASK mask)
+{
+ if(mOriginalMessage.mSourceType != CHAT_SOURCE_AGENT)
+ return;
+ LLPanel* caption = getChild<LLPanel>("msg_caption",false,false);
+ if(!caption)
+ return;
+ LLUICtrl* msg_inspector = caption->getChild<LLUICtrl>("msg_inspector");
+ if(msg_inspector)
+ msg_inspector->setVisible(true);
+}
+
+BOOL LLChatItemCtrl::handleMouseDown (S32 x, S32 y, MASK mask)
+{
+ if(mOriginalMessage.mSourceType != CHAT_SOURCE_AGENT)
+ return LLPanel::handleMouseDown(x,y,mask);
+ LLPanel* caption = getChild<LLPanel>("msg_caption",false,false);
+ if(caption)
+ {
+ LLUICtrl* msg_inspector = caption->getChild<LLUICtrl>("msg_inspector");
+ if(msg_inspector)
+ {
+ S32 local_x = x - msg_inspector->getRect().mLeft - caption->getRect().mLeft;
+ S32 local_y = y - msg_inspector->getRect().mBottom - caption->getRect().mBottom;
+ if(msg_inspector->pointInView(local_x, local_y))
+ {
+ LLFloaterReg::showInstance("mini_inspector", mOriginalMessage.mFromID);
+ }
+ }
+ }
+ return LLPanel::handleMouseDown(x,y,mask);
+}
+
+void LLChatItemCtrl::setHeaderVisibility(EShowItemHeader e)
+{
+ LLPanel* caption = getChild<LLPanel>("msg_caption",false,false);
+ if(!caption)
+ return;
+
+ LLUICtrl* icon = caption->getChild<LLUICtrl>("avatar_icon",false,false);
+ LLUICtrl* name = caption->getChild<LLUICtrl>("sender_name",false,false);
+
+ if(icon == 0 || name == 0)
+ return;
+
+ icon->setVisible(e == CHATITEMHEADER_SHOW_ONLY_ICON || e==CHATITEMHEADER_SHOW_BOTH);
+ name->setVisible(e == CHATITEMHEADER_SHOW_ONLY_NAME || e==CHATITEMHEADER_SHOW_BOTH);
+
+}
+
+bool LLChatItemCtrl::canAddText ()
+{
+ LLChatMsgBox* msg_text = getChild<LLChatMsgBox>("msg_text",false,false);
+ if(!msg_text )
+ return false;
+ return msg_text->getTextLinesNum()<10;
+}
+
+BOOL LLChatItemCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
+{
+ LLPanel* caption = getChild<LLPanel>("msg_caption",false,false);
+ if(!caption)
+ return LLPanel::handleRightMouseDown(x,y,mask);
+ LLUICtrl* avatar_icon = caption->getChild<LLUICtrl>("avatar_icon",false,false);
+ if(!avatar_icon)
+ return LLPanel::handleRightMouseDown(x,y,mask);
+ S32 local_x = x - avatar_icon->getRect().mLeft - caption->getRect().mLeft;
+ S32 local_y = y - avatar_icon->getRect().mBottom - caption->getRect().mBottom;
+
+ //eat message for avatar icon if msg was from object
+ if(avatar_icon->pointInView(local_x, local_y) && mOriginalMessage.mSourceType != CHAT_SOURCE_AGENT)
+ return TRUE;
+ return LLPanel::handleRightMouseDown(x,y,mask);
+}
+
+
+//*******************************************************************************************************************
+//LLChatItemsContainerCtrl
+//*******************************************************************************************************************
+
+LLChatItemsContainerCtrl::LLChatItemsContainerCtrl(const Params& params):LLPanel(params)
+{
+ mEShowItemHeader = CHATITEMHEADER_SHOW_BOTH;
+}
+
+
+void LLChatItemsContainerCtrl::addMessage(const LLChat& msg)
+{
+ /*
+ if(msg.mChatType == CHAT_TYPE_DEBUG_MSG)
+ return;
+ */
+ if(mItems.size() >= MAX_CHAT_HISTORY)
+ {
+ LLChatItemCtrl* item = mItems[0];
+ removeChild(item);
+ delete item;
+ mItems.erase(mItems.begin());
+ }
+
+
+ if(mItems.size() > 0
+ && msg.mFromID == mItems[mItems.size()-1]->getMessage().mFromID
+ && (msg.mTime-mItems[mItems.size()-1]->getMessage().mTime)<60
+ && mItems[mItems.size()-1]->canAddText()
+ )
+ {
+ mItems[mItems.size()-1]->addText(msg.mText);
+ mItems[mItems.size()-1]->snapToMessageHeight();
+ }
+ else
+ {
+ LLChatItemCtrl* item = LLChatItemCtrl::createInstance();
+ mItems.push_back(item);
+ addChild(item,0);
+ item->setWidth(getRect().getWidth() - 16);
+ item->setMessage(msg);
+ item->snapToMessageHeight();
+
+ item->setHeaderVisibility((EShowItemHeader)gSavedSettings.getS32("nearbychat_showicons_and_names"));
+
+ item->setVisible(true);
+ }
+
+ arrange(getRect().getWidth(),getRect().getHeight());
+ updateLayout(getRect().getWidth(),getRect().getHeight());
+ scrollToBottom();
+}
+
+void LLChatItemsContainerCtrl::scrollToBottom ()
+{
+ if(mScrollbar->getVisible())
+ {
+ mScrollbar->setDocPos(mScrollbar->getDocPosMax());
+ onScrollPosChangeCallback(0,0);
+ }
+}
+
+void LLChatItemsContainerCtrl::draw()
+{
+ LLLocalClipRect clip(getRect());
+ LLPanel::draw();
+}
+
+void LLChatItemsContainerCtrl::reshape (S32 width, S32 height, BOOL called_from_parent )
+{
+ S32 delta_width = width - getRect().getWidth();
+ S32 delta_height = height - getRect().getHeight();
+
+ if (delta_width || delta_height || sForceReshape)
+ {
+ arrange(width, height);
+ }
+
+ updateBoundingRect();
+}
+
+void LLChatItemsContainerCtrl::arrange (S32 width, S32 height)
+{
+ S32 delta_width = width - getRect().getWidth();
+ if(delta_width)//width changed...too bad. now we need to reformat all items
+ reformatHistoryScrollItems(width);
+
+ calcRecuiredHeight();
+
+ show_hide_scrollbar(width,height);
+
+ updateLayout(width,height);
+}
+
+void LLChatItemsContainerCtrl::reformatHistoryScrollItems(S32 width)
+{
+ for(std::vector<LLChatItemCtrl*>::iterator it = mItems.begin(); it != mItems.end();++it)
+ {
+ (*it)->setWidth(width);
+ }
+}
+
+S32 LLChatItemsContainerCtrl::calcRecuiredHeight ()
+{
+ S32 rec_height = 0;
+
+ std::vector<LLChatItemCtrl*>::iterator it;
+ for(it=mItems.begin(); it!=mItems.end(); ++it)
+ {
+ rec_height += (*it)->getRect().getHeight();
+ }
+
+ mInnerRect.setLeftTopAndSize(0,rec_height + BORDER_MARGIN*2,getRect().getWidth(),rec_height + BORDER_MARGIN);
+
+ return mInnerRect.getHeight();
+}
+
+
+void LLChatItemsContainerCtrl::updateLayout (S32 width, S32 height)
+{
+ S32 panel_top = height - BORDER_MARGIN ;
+ S32 panel_width = width;
+ if(mScrollbar->getVisible())
+ {
+ static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
+
+ panel_top+=mScrollbar->getDocPos();
+ panel_width-=scrollbar_size;
+ }
+
+
+ //set sizes for first panels and dragbars
+ for(size_t i=0;i<mItems.size();++i)
+ {
+ LLRect panel_rect = mItems[i]->getRect();
+ panelSetLeftTopAndSize(mItems[i],panel_rect.mLeft,panel_top,panel_width,panel_rect.getHeight());
+ panel_top-=panel_rect.getHeight();
+ }
+}
+
+void LLChatItemsContainerCtrl::show_hide_scrollbar (S32 width, S32 height)
+{
+ calcRecuiredHeight();
+ if(getRecuiredHeight() > height )
+ showScrollbar(width, height);
+ else
+ hideScrollbar(width, height);
+}
+
+void LLChatItemsContainerCtrl::showScrollbar (S32 width, S32 height)
+{
+ bool was_visible = mScrollbar->getVisible();
+
+ mScrollbar->setVisible(true);
+
+ static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
+
+ panelSetLeftTopAndSize(mScrollbar,width-scrollbar_size
+ ,height-PARENT_BORDER_MARGIN,scrollbar_size,height-2*PARENT_BORDER_MARGIN);
+
+ mScrollbar->setPageSize(height);
+ mScrollbar->setDocParams(mInnerRect.getHeight(),mScrollbar->getDocPos());
+
+ if(was_visible)
+ {
+ S32 scroll_pos = llmin(mScrollbar->getDocPos(), getRecuiredHeight() - height - 1);
+ mScrollbar->setDocPos(scroll_pos);
+ updateLayout(width,height);
+ return;
+ }
+}
+
+void LLChatItemsContainerCtrl::hideScrollbar (S32 width, S32 height)
+{
+ if(mScrollbar->getVisible() == false)
+ return;
+ mScrollbar->setVisible(false);
+
+ mScrollbar->setDocPos(0);
+
+ if(mItems.size()>0)
+ {
+ S32 panel_top = height - BORDER_MARGIN; // Top coordinate of the first panel
+ S32 diff = panel_top - mItems[0]->getRect().mTop;
+ shiftPanels(diff);
+ }
+}
+
+//---------------------------------------------------------------------------------
+void LLChatItemsContainerCtrl::panelSetLeftTopAndSize(LLView* panel, S32 left, S32 top, S32 width, S32 height)
+{
+ if(!panel)
+ return;
+ LLRect panel_rect = panel->getRect();
+ panel_rect.setLeftTopAndSize( left, top, width, height);
+ panel->reshape( width, height, 1);
+ panel->setRect(panel_rect);
+}
+
+void LLChatItemsContainerCtrl::panelShiftVertical(LLView* panel,S32 delta)
+{
+ if(!panel)
+ return;
+ panel->translate(0,delta);
+}
+
+void LLChatItemsContainerCtrl::shiftPanels(S32 delta)
+{
+ //Arrange panels
+ for(std::vector<LLChatItemCtrl*>::iterator it = mItems.begin(); it != mItems.end();++it)
+ {
+ panelShiftVertical((*it),delta);
+ }
+
+}
+
+//---------------------------------------------------------------------------------
+
+void LLChatItemsContainerCtrl::onScrollPosChangeCallback(S32, LLScrollbar*)
+{
+ updateLayout(getRect().getWidth(),getRect().getHeight());
+}
+
+BOOL LLChatItemsContainerCtrl::postBuild()
+{
+ static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0);
+
+ LLRect scroll_rect;
+ scroll_rect.setOriginAndSize(
+ getRect().getWidth() - scrollbar_size,
+ 1,
+ scrollbar_size,
+ getRect().getHeight() - 1);
+
+
+ LLScrollbar::Params sbparams;
+ sbparams.name("scrollable vertical");
+ sbparams.rect(scroll_rect);
+ sbparams.orientation(LLScrollbar::VERTICAL);
+ sbparams.doc_size(mInnerRect.getHeight());
+ sbparams.doc_pos(0);
+ sbparams.page_size(mInnerRect.getHeight());
+ sbparams.step_size(VERTICAL_MULTIPLE);
+ sbparams.follows.flags(FOLLOWS_RIGHT | FOLLOWS_TOP | FOLLOWS_BOTTOM);
+ sbparams.change_callback(boost::bind(&LLChatItemsContainerCtrl::onScrollPosChangeCallback, this, _1, _2));
+
+ mScrollbar = LLUICtrlFactory::create<LLScrollbar> (sbparams);
+ LLView::addChild( mScrollbar );
+ mScrollbar->setVisible( true );
+ mScrollbar->setFollowsRight();
+ mScrollbar->setFollowsTop();
+ mScrollbar->setFollowsBottom();
+
+ reformatHistoryScrollItems(getRect().getWidth());
+ arrange(getRect().getWidth(),getRect().getHeight());
+
+ return LLPanel::postBuild();
+}
+BOOL LLChatItemsContainerCtrl::handleMouseDown (S32 x, S32 y, MASK mask)
+{
+ return LLPanel::handleMouseDown(x,y,mask);
+}
+BOOL LLChatItemsContainerCtrl::handleKeyHere (KEY key, MASK mask)
+{
+ if( mScrollbar->getVisible() && mScrollbar->handleKeyHere( key,mask ) )
+ return TRUE;
+ return LLPanel::handleKeyHere(key,mask);
+}
+BOOL LLChatItemsContainerCtrl::handleScrollWheel ( S32 x, S32 y, S32 clicks )
+{
+ if( mScrollbar->getVisible() && mScrollbar->handleScrollWheel( 0, 0, clicks ) )
+ return TRUE;
+ return false;
+}
+
+void LLChatItemsContainerCtrl::setHeaderVisibility(EShowItemHeader e)
+{
+ if(e == mEShowItemHeader)
+ return;
+ mEShowItemHeader = e;
+ for(std::vector<LLChatItemCtrl*>::iterator it = mItems.begin(); it != mItems.end();++it)
+ {
+ (*it)->setHeaderVisibility(e);
+ }
+}
+
+
diff --git a/indra/newview/llchatitemscontainerctrl.h b/indra/newview/llchatitemscontainerctrl.h
new file mode 100644
index 0000000000..de16cf9505
--- /dev/null
+++ b/indra/newview/llchatitemscontainerctrl.h
@@ -0,0 +1,154 @@
+/**
+ * @file llchatitemscontainer.h
+ * @brief chat history scrolling panel implementation
+ *
+ * $LicenseInfo:firstyear=2004&license=viewergpl$
+ *
+ * Copyright (c) 2004-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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_LLCHATITEMSCONTAINER_H_
+#define LL_LLCHATITEMSCONTAINER_H_
+
+#include "llpanel.h"
+#include "llscrollbar.h"
+#include "string"
+#include "llchat.h"
+
+typedef enum e_show_item_header
+{
+ CHATITEMHEADER_SHOW_ONLY_NAME = 0,
+ CHATITEMHEADER_SHOW_ONLY_ICON = 1,
+ CHATITEMHEADER_SHOW_BOTH
+} EShowItemHeader;
+
+class LLChatItemCtrl: public LLPanel
+{
+protected:
+ LLChatItemCtrl(){};
+public:
+
+
+ ~LLChatItemCtrl(){}
+
+ static LLChatItemCtrl* createInstance();
+
+ void draw();
+
+ const LLChat& getMessage() const { return mOriginalMessage;}
+
+ void addText (const std::string& message);
+ void setMessage (const LLChat& msg);
+ void setWidth (S32 width);
+ void snapToMessageHeight ();
+
+ bool canAddText ();
+
+ void onMouseLeave (S32 x, S32 y, MASK mask);
+ void onMouseEnter (S32 x, S32 y, MASK mask);
+ BOOL handleMouseDown (S32 x, S32 y, MASK mask);
+
+ virtual BOOL postBuild();
+
+ void reshape (S32 width, S32 height, BOOL called_from_parent = TRUE);
+
+ void setHeaderVisibility(EShowItemHeader e);
+ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
+private:
+
+ std::string appendTime ();
+
+private:
+ LLChat mOriginalMessage;
+
+ std::vector<std::string> mMessages;
+};
+
+class LLChatItemsContainerCtrl: public LLPanel
+{
+public:
+ struct Params
+ : public LLInitParam::Block<Params, LLPanel::Params>
+ {
+ Params(){};
+ };
+
+ LLChatItemsContainerCtrl(const Params& params);
+
+
+ ~LLChatItemsContainerCtrl(){}
+
+ void addMessage (const LLChat& msg);
+
+ void draw();
+
+ void reshape (S32 width, S32 height, BOOL called_from_parent = TRUE);
+
+ void onScrollPosChangeCallback(S32, LLScrollbar*);
+
+ virtual BOOL postBuild();
+
+ BOOL handleMouseDown (S32 x, S32 y, MASK mask);
+ BOOL handleKeyHere (KEY key, MASK mask);
+ BOOL handleScrollWheel( S32 x, S32 y, S32 clicks );
+
+ void scrollToBottom ();
+
+ void setHeaderVisibility(EShowItemHeader e);
+ EShowItemHeader getHeaderVisibility() const { return mEShowItemHeader;};
+
+
+private:
+ void reformatHistoryScrollItems(S32 width);
+ void arrange (S32 width, S32 height);
+
+ S32 calcRecuiredHeight ();
+ S32 getRecuiredHeight () const { return mInnerRect.getHeight(); }
+
+ void updateLayout (S32 width, S32 height);
+
+ void show_hide_scrollbar (S32 width, S32 height);
+
+ void showScrollbar (S32 width, S32 height);
+ void hideScrollbar (S32 width, S32 height);
+
+ void panelSetLeftTopAndSize (LLView* panel, S32 left, S32 top, S32 width, S32 height);
+ void panelShiftVertical (LLView* panel,S32 delta);
+ void shiftPanels (S32 delta);
+
+private:
+ std::vector<LLChatItemCtrl*> mItems;
+
+ EShowItemHeader mEShowItemHeader;
+
+ LLRect mInnerRect;
+ LLScrollbar* mScrollbar;
+
+};
+
+#endif
+
+
diff --git a/indra/newview/llchatmsgbox.cpp b/indra/newview/llchatmsgbox.cpp
new file mode 100644
index 0000000000..933d9b8771
--- /dev/null
+++ b/indra/newview/llchatmsgbox.cpp
@@ -0,0 +1,389 @@
+/**
+ * @file llchatmsgbox.cpp
+ * @brief chat history text box, able to show array of strings with separator
+ *
+ * $LicenseInfo:firstyear=2004&license=viewergpl$
+ *
+ * Copyright (c) 2004-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h"
+
+#include "llchatmsgbox.h"
+#include "llwindow.h"
+#include "llfocusmgr.h"
+
+static LLDefaultChildRegistry::Register<LLChatMsgBox> r("text_chat");
+
+LLChatMsgBox::Params::Params()
+: text_color("text_color"),
+ highlight_on_hover("hover", false),
+ border_visible("border_visible", false),
+ border_drop_shadow_visible("border_drop_shadow_visible", false),
+ bg_visible("bg_visible", false),
+ use_ellipses("use_ellipses"),
+ word_wrap("word_wrap", false),
+ hover_color("hover_color"),
+ disabled_color("disabled_color"),
+ background_color("background_color"),
+ border_color("border_color"),
+ line_spacing("line_spacing", 4),
+ block_spacing("block_spacing",10),
+ text("text"),
+ font_shadow("font_shadow", LLFontGL::NO_SHADOW)
+{}
+
+LLChatMsgBox::LLChatMsgBox(const LLChatMsgBox::Params& p)
+: LLUICtrl(p),
+ mFontGL(p.font),
+ mHoverActive( p.highlight_on_hover ),
+ mHasHover( FALSE ),
+ mBackgroundVisible( p.bg_visible ),
+ mBorderVisible( p.border_visible ),
+ mShadowType( p.font_shadow ),
+ mBorderDropShadowVisible( p.border_drop_shadow_visible ),
+ mUseEllipses( p.use_ellipses ),
+ mVAlign( LLFontGL::TOP ),
+ mClickedCallback(NULL),
+ mTextColor(p.text_color()),
+ mDisabledColor(p.disabled_color()),
+ mBackgroundColor(p.background_color()),
+ mBorderColor(p.border_color()),
+ mHoverColor(p.hover_color()),
+ mHAlign(p.font_halign),
+ mLineSpacing(p.line_spacing),
+ mBlockSpasing(p.block_spacing),
+ mWordWrap( p.word_wrap ),
+ mFontStyle(LLFontGL::getStyleFromString(p.font.style))
+{
+ setText( p.text() );
+}
+
+BOOL LLChatMsgBox::handleMouseDown(S32 x, S32 y, MASK mask)
+{
+ BOOL handled = FALSE;
+
+ // HACK: Only do this if there actually is a click callback, so that
+ // overly large text boxes in the older UI won't start eating clicks.
+ if (mClickedCallback)
+ {
+ handled = TRUE;
+
+ // Route future Mouse messages here preemptively. (Release on mouse up.)
+ gFocusMgr.setMouseCapture( this );
+
+ if (getSoundFlags() & MOUSE_DOWN)
+ {
+ make_ui_sound("UISndClick");
+ }
+ }
+
+ return handled;
+}
+
+BOOL LLChatMsgBox::handleMouseUp(S32 x, S32 y, MASK mask)
+{
+ BOOL handled = FALSE;
+
+ // We only handle the click if the click both started and ended within us
+
+ // HACK: Only do this if there actually is a click callback, so that
+ // overly large text boxes in the older UI won't start eating clicks.
+ if (mClickedCallback
+ && hasMouseCapture())
+ {
+ handled = TRUE;
+
+ // Release the mouse
+ gFocusMgr.setMouseCapture( NULL );
+
+ if (getSoundFlags() & MOUSE_UP)
+ {
+ make_ui_sound("UISndClickRelease");
+ }
+
+ // DO THIS AT THE VERY END to allow the button to be destroyed as a result of being clicked.
+ // If mouseup in the widget, it's been clicked
+ if (mClickedCallback)
+ {
+ mClickedCallback();
+ }
+ }
+
+ return handled;
+}
+
+BOOL LLChatMsgBox::handleHover(S32 x, S32 y, MASK mask)
+{
+ BOOL handled = LLView::handleHover(x,y,mask);
+ if(mHoverActive)
+ {
+ mHasHover = TRUE; // This should be set every frame during a hover.
+ getWindow()->setCursor(UI_CURSOR_ARROW);
+ }
+
+ return (handled || mHasHover);
+}
+
+void LLChatMsgBox::addText( const LLStringExplicit& text )
+{
+ boost::shared_ptr<text_block> t(new text_block());
+ t->text = wrapText(text);
+ setLineLengths(*t);
+ mTextStrings.push_back(t);
+}
+
+void LLChatMsgBox::setText(const LLStringExplicit& text)
+{
+ mTextStrings.clear();
+
+ addText(text);
+
+}
+
+void LLChatMsgBox::resetLineLengths()
+{
+ for(std::vector< boost::shared_ptr<text_block> >::iterator it = mTextStrings.begin();
+ it!=mTextStrings.end();++it)
+ {
+ boost::shared_ptr<text_block> tblock = *it;
+ setLineLengths(*tblock);
+ }
+}
+
+void LLChatMsgBox::setLineLengths(text_block& t)
+{
+ t.lines.clear();
+
+ std::string::size_type cur = 0;
+ std::string::size_type len = t.text.length();
+
+ while (cur < len)
+ {
+ std::string::size_type end = t.text.getWString().find('\n', cur);
+ std::string::size_type runLen;
+
+ if (end == std::string::npos)
+ {
+ runLen = len - cur;
+ cur = len;
+ }
+ else
+ {
+ runLen = end - cur;
+ cur = end + 1; // skip the new line character
+ }
+
+ t.lines.push_back( (S32)runLen );
+ }
+}
+
+std::string LLChatMsgBox::wrapText(const LLStringExplicit& in_text, F32 max_width)
+{
+ if (max_width < 0.0f)
+ {
+ max_width = (F32)getRect().getWidth();
+ }
+
+ LLWString wtext = utf8str_to_wstring(in_text);
+ LLWString final_wtext;
+
+ LLWString::size_type cur = 0;;
+ LLWString::size_type len = wtext.size();
+ while (cur < len)
+ {
+ LLWString::size_type end = wtext.find('\n', cur);
+ if (end == LLWString::npos)
+ {
+ end = len;
+ }
+
+ LLWString::size_type runLen = end - cur;
+ if (runLen > 0)
+ {
+ LLWString run(wtext, cur, runLen);
+ LLWString::size_type useLen =
+ mFontGL->maxDrawableChars(run.c_str(), max_width, runLen, TRUE);
+
+ final_wtext.append(wtext, cur, useLen);
+ cur += useLen;
+ // not enough room to add any more characters
+ if (useLen == 0) break;
+ }
+
+ if (cur < len)
+ {
+ if (wtext[cur] == '\n')
+ cur += 1;
+ else
+ final_wtext += '\n';
+ }
+ }
+
+ std::string final_text = wstring_to_utf8str(final_wtext);
+ return final_text;
+}
+
+S32 LLChatMsgBox::getTextLinesNum()
+{
+ S32 num_lines = 0;
+ for(std::vector< boost::shared_ptr<text_block> >::iterator it = mTextStrings.begin();
+ it!=mTextStrings.end();++it)
+ {
+ boost::shared_ptr<text_block> tblock = *it;
+ num_lines+=tblock->lines.size();
+ }
+
+ if( num_lines < 1 )
+ {
+ num_lines = 1;
+ }
+
+ return num_lines;
+}
+
+S32 LLChatMsgBox::getTextPixelHeight()
+{
+ S32 num_lines = getTextLinesNum();
+ return (S32)(num_lines * mFontGL->getLineHeight() + (num_lines-1)*mLineSpacing + mBlockSpasing*(mTextStrings.size()-1) + 2*mLineSpacing);//some extra space
+}
+
+void LLChatMsgBox::setValue(const LLSD& value )
+{
+ setText(value.asString());
+}
+
+
+void LLChatMsgBox::draw()
+{
+ if (mBorderVisible)
+ {
+ gl_rect_2d_offset_local(getLocalRect(), 2, FALSE);
+ }
+
+ if( mBorderDropShadowVisible )
+ {
+ static LLUICachedControl<LLColor4> color_drop_shadow ("ColorDropShadow", *(new LLColor4));
+ static LLUICachedControl<S32> drop_shadow_tooltip ("DropShadowTooltip", 0);
+ gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0,
+ color_drop_shadow, drop_shadow_tooltip);
+ }
+
+ if (mBackgroundVisible)
+ {
+ LLRect r( 0, getRect().getHeight(), getRect().getWidth(), 0 );
+ gl_rect_2d( r, mBackgroundColor.get() );
+ }
+
+ S32 text_x = 0;
+ switch( mHAlign )
+ {
+ case LLFontGL::LEFT:
+ break;
+ case LLFontGL::HCENTER:
+ text_x = getRect().getWidth() / 2;
+ break;
+ case LLFontGL::RIGHT:
+ text_x = getRect().getWidth() ;
+ break;
+ }
+
+ S32 text_y = getRect().getHeight() ;
+
+ if ( getEnabled() )
+ {
+ if(mHasHover)
+ {
+ drawText( text_x, text_y, mHoverColor.get() );
+ }
+ else
+ {
+ drawText( text_x, text_y, mTextColor.get() );
+ }
+ }
+ else
+ {
+ drawText( text_x, text_y, mDisabledColor.get() );
+ }
+
+ if (sDebugRects)
+ {
+ drawDebugRect();
+ }
+
+ //// *HACK: also draw debug rectangles around currently-being-edited LLView, and any elements that are being highlighted by GUI preview code (see LLFloaterUIPreview)
+ //std::set<LLView*>::iterator iter = std::find(sPreviewHighlightedElements.begin(), sPreviewHighlightedElements.end(), this);
+ //if ((sEditingUI && this == sEditingUIView) || (iter != sPreviewHighlightedElements.end() && sDrawPreviewHighlights))
+ //{
+ // drawDebugRect();
+ //}
+
+ mHasHover = FALSE; // This is reset every frame.
+}
+
+void LLChatMsgBox::reshape(S32 width, S32 height, BOOL called_from_parent)
+{
+ // reparse line lengths
+ LLView::reshape(width, height, called_from_parent);
+ resetLineLengths();
+}
+
+void LLChatMsgBox::drawText( S32 x, S32 y, const LLColor4& color )
+{
+ S32 width = getRect().getWidth()-10;
+
+
+ for(std::vector< boost::shared_ptr<text_block> >::iterator it = mTextStrings.begin();
+ it!=mTextStrings.end();++it)
+ {
+ boost::shared_ptr<text_block> tblock = *it;
+
+ S32 cur_pos = 0;
+ for (std::vector<S32>::iterator iter = tblock->lines.begin();
+ iter != tblock->lines.end(); ++iter)
+ {
+ S32 line_length = *iter;
+ mFontGL->render(tblock->text, cur_pos, (F32)x, (F32)y, color,
+ mHAlign, mVAlign,
+ mFontStyle,
+ mShadowType,
+ line_length, getRect().getWidth(), NULL, TRUE, mUseEllipses );
+ cur_pos += line_length + 1;
+ y -= llfloor(mFontGL->getLineHeight()) + mLineSpacing;
+
+ }
+ std::vector< boost::shared_ptr<text_block> >::iterator next = it;
+ ++next;
+ if(next == mTextStrings.end())
+ break;
+ //separator
+ gl_line_2d(5,y-mBlockSpasing/2,width,y-mBlockSpasing/2,LLColor4::grey);
+ y-=mBlockSpasing;
+ }
+
+}
+
diff --git a/indra/newview/llchatmsgbox.h b/indra/newview/llchatmsgbox.h
new file mode 100644
index 0000000000..61035499c7
--- /dev/null
+++ b/indra/newview/llchatmsgbox.h
@@ -0,0 +1,160 @@
+/**
+ * @file llchatmsgbox.h
+ * @brief chat history text box, able to show array of strings with separator
+ *
+ * $LicenseInfo:firstyear=2004&license=viewergpl$
+ *
+ * Copyright (c) 2004-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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_LLCHATMSGBOX_H
+#define LL_LLCHATMSGBOX_H
+
+
+#include "lluictrl.h"
+#include "v4color.h"
+#include "llstring.h"
+#include "lluistring.h"
+
+
+class LLChatMsgBox
+: public LLUICtrl
+{
+protected:
+ struct text_block
+ {
+ LLUIString text;
+ std::vector<S32> lines;
+ };
+public:
+ typedef boost::function<void (void)> callback_t;
+
+ struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
+ {
+ Optional<std::string> text;
+
+ Optional<bool> highlight_on_hover,
+ border_visible,
+ border_drop_shadow_visible,
+ bg_visible,
+ use_ellipses,
+ word_wrap;
+
+ Optional<LLFontGL::ShadowType> font_shadow;
+
+ Optional<LLUIColor> text_color,
+ hover_color,
+ disabled_color,
+ background_color,
+ border_color;
+
+ Optional<S32> line_spacing;
+
+ Optional<S32> block_spacing;
+
+ Params();
+ };
+protected:
+ LLChatMsgBox(const Params&);
+ friend class LLUICtrlFactory;
+public:
+ virtual void draw();
+ virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+
+ virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
+ virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
+ virtual BOOL handleHover(S32 x, S32 y, MASK mask);
+
+ void setColor( const LLColor4& c ) { mTextColor = c; }
+ void setDisabledColor( const LLColor4& c) { mDisabledColor = c; }
+ void setBackgroundColor( const LLColor4& c) { mBackgroundColor = c; }
+ void setBorderColor( const LLColor4& c) { mBorderColor = c; }
+
+ void setHoverColor( const LLColor4& c ) { mHoverColor = c; }
+ void setHoverActive( BOOL active ) { mHoverActive = active; }
+
+ void setText( const LLStringExplicit& text );
+ void addText( const LLStringExplicit& text );
+
+ void setUseEllipses( BOOL use_ellipses ) { mUseEllipses = use_ellipses; }
+
+ void setBackgroundVisible(BOOL visible) { mBackgroundVisible = visible; }
+ void setBorderVisible(BOOL visible) { mBorderVisible = visible; }
+ void setBorderDropshadowVisible(BOOL visible){ mBorderDropShadowVisible = visible; }
+ void setRightAlign() { mHAlign = LLFontGL::RIGHT; }
+ void setHAlign( LLFontGL::HAlign align ) { mHAlign = align; }
+ void setClickedCallback( boost::function<void (void*)> cb, void* userdata = NULL ){ mClickedCallback = boost::bind(cb, userdata); } // mouse down and up within button
+
+ const LLFontGL* getFont() const { return mFontGL; }
+
+ S32 getTextPixelHeight();
+ S32 getTextLinesNum();
+
+ virtual void setValue(const LLSD& value );
+
+
+
+private:
+ std::string wrapText (const LLStringExplicit& in_text, F32 max_width = -1.0);
+
+ void setLineLengths (text_block& t);
+ void resetLineLengths ();
+ void drawText (S32 x, S32 y, const LLColor4& color );
+
+ const LLFontGL* mFontGL;
+ LLUIColor mTextColor;
+ LLUIColor mDisabledColor;
+ LLUIColor mBackgroundColor;
+ LLUIColor mBorderColor;
+ LLUIColor mHoverColor;
+
+ BOOL mHoverActive;
+ BOOL mHasHover;
+ BOOL mBackgroundVisible;
+ BOOL mBorderVisible;
+ BOOL mWordWrap;
+
+ U8 mFontStyle; // style bit flags for font
+ LLFontGL::ShadowType mShadowType;
+ BOOL mBorderDropShadowVisible;
+ BOOL mUseEllipses;
+
+ S32 mLineSpacing;
+ S32 mBlockSpasing;
+
+ LLFontGL::HAlign mHAlign;
+ LLFontGL::VAlign mVAlign;
+
+ callback_t mClickedCallback;
+
+
+ //same as mLineLengthList and mText in LLTextBox
+ std::vector< boost::shared_ptr<text_block> > mTextStrings;
+
+};
+
+#endif
+
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index d8e844d291..f71ea9f8ad 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -32,72 +32,60 @@
#include "llviewerprecompiledheaders.h" // must be first include
#include "llchiclet.h"
-#include "llfloaterreg.h"
-#include "llvoiceclient.h"
#include "llagent.h"
-#include "lltextbox.h"
+#include "llavataractions.h"
+#include "llbottomtray.h"
+#include "llgroupactions.h"
#include "lliconctrl.h"
-#include "llvoicecontrolpanel.h"
-#include "lloutputmonitorctrl.h"
+#include "llimpanel.h" // LLFloaterIMPanel
#include "llimview.h"
-#include "llbottomtray.h"
+#include "llfloatergroupinfo.h"
+#include "llmenugl.h"
+#include "lloutputmonitorctrl.h"
+#include "lltextbox.h"
+#include "llvoiceclient.h"
+#include "llvoicecontrolpanel.h"
+
+static const std::string P2P_MENU_NAME = "IMChiclet P2P Menu";
+static const std::string GROUP_MENU_NAME = "IMChiclet Group Menu";
-static const S32 CHICLET_HEIGHT = 25;
-static const S32 CHICLET_SPACING = 0;
-static const S32 CHICLET_PADDING = 3;
-static const S32 AVATAR_WIDTH = 25;
-static const S32 SPEAKER_WIDTH = 20;
-static const S32 COUNTER_WIDTH = 20;
-static const S32 SCROLL_BUTTON_WIDTH = 19;
-static const S32 SCROLL_BUTTON_HEIGHT = 20;
-static const S32 NOTIFICATION_TEXT_TOP_PAD = 5;
-
-static LLDefaultWidgetRegistry::Register<LLChicletPanel> t1("chiclet_panel");
-static LLDefaultWidgetRegistry::Register<LLTalkButton> t2("chiclet_talk");
-static LLDefaultWidgetRegistry::Register<LLNotificationChiclet> t3("chiclet_notification");
-static LLDefaultWidgetRegistry::Register<LLChicletPanel> t4("chiclet_panel");
+static LLDefaultChildRegistry::Register<LLChicletPanel> t1("chiclet_panel");
+static LLDefaultChildRegistry::Register<LLTalkButton> t2("chiclet_talk");
+static LLDefaultChildRegistry::Register<LLNotificationChiclet> t3("chiclet_notification");
+static LLDefaultChildRegistry::Register<LLIMChiclet> t4("chiclet_im");
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
LLNotificationChiclet::Params::Params()
-: image_unselected("image_unselected")
-, image_selected("image_selected")
-, image_overlay("image_overlay")
+: button("button")
+, unread_notifications("unread_notifications")
{
+ button.name("button");
+ button.tab_stop(FALSE);
+ button.label(LLStringUtil::null);
+
+ unread_notifications.name("unread");
+ unread_notifications.font(LLFontGL::getFontSansSerif());
+ unread_notifications.text_color=(LLColor4::white);
+ unread_notifications.font_halign(LLFontGL::HCENTER);
+ unread_notifications.mouse_opaque(FALSE);
}
LLNotificationChiclet::LLNotificationChiclet(const Params& p)
: LLChiclet(p)
, mButton(NULL)
-, mCounterText(NULL)
-{
- LLRect rc(p.rect);
-
- LLButton::Params button_params;
- button_params.name("btn");
- button_params.label(LLStringUtil::null);
- button_params.rect(LLRect(0,rc.getHeight(),rc.getWidth(),0));
- button_params.image_overlay(p.image_overlay);
- button_params.image_unselected(p.image_unselected);
- button_params.image_selected(p.image_selected);
- button_params.tab_stop(false);
+, mCounterCtrl(NULL)
+{
+ LLButton::Params button_params = p.button;
+ button_params.rect(p.rect());
mButton = LLUICtrlFactory::create<LLButton>(button_params);
addChild(mButton);
- LLTextBox::Params textbox_params;
- textbox_params.name("txt");
- textbox_params.rect(LLRect(p.label_left,rc.getHeight(),
- rc.getWidth()-p.label_left,0));
- textbox_params.mouse_opaque(false);
- textbox_params.v_pad(NOTIFICATION_TEXT_TOP_PAD);
- textbox_params.font.style("SansSerif");
- textbox_params.font_halign(LLFontGL::HCENTER);
- mCounterText = LLUICtrlFactory::create<LLTextBox>(textbox_params);
- addChild(mCounterText);
- mCounterText->setColor(LLColor4::white);
- mCounterText->setText(LLStringUtil::null);
+ LLChicletNotificationCounterCtrl::Params unread_params = p.unread_notifications;
+ mCounterCtrl = LLUICtrlFactory::create<LLChicletNotificationCounterCtrl>(unread_params);
+ addChild(mCounterCtrl);
}
LLNotificationChiclet::~LLNotificationChiclet()
@@ -105,18 +93,15 @@ LLNotificationChiclet::~LLNotificationChiclet()
}
-LLChiclet* LLNotificationChiclet::create(const Params& p)
+void LLNotificationChiclet::setCounter(S32 counter)
{
- LLChiclet* chiclet = new LLNotificationChiclet(p);
- return chiclet;
+ mCounterCtrl->setCounter(counter);
}
-void LLNotificationChiclet::setCounter(S32 counter)
+void LLNotificationChiclet::setShowCounter(bool show)
{
- std::stringstream stream;
- mCounter = counter;
- stream << mCounter;
- mCounterText->setText(stream.str());
+ LLChiclet::setShowCounter(show);
+ mCounterCtrl->setVisible(getShowCounter());
}
boost::signals2::connection LLNotificationChiclet::setClickCallback(
@@ -129,10 +114,16 @@ boost::signals2::connection LLNotificationChiclet::setClickCallback(
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
+LLChiclet::Params::Params()
+ : show_counter("show_counter")
+{
+ show_counter = true;
+}
+
LLChiclet::LLChiclet(const Params& p)
: LLUICtrl(p)
-, mCounter(0)
-, mShowCounter(true)
+, mSessionId(LLUUID::null)
+, mShowCounter(p.show_counter)
{
}
@@ -155,47 +146,81 @@ BOOL LLChiclet::handleMouseDown(S32 x, S32 y, MASK mask)
return TRUE;
}
+boost::signals2::connection LLChiclet::setChicletSizeChangedCallback(
+ const chiclet_size_changed_callback_t& cb)
+{
+ return mChicletSizeChangedSignal.connect(cb);
+}
+
+void LLChiclet::onChicletSizeChanged()
+{
+ mChicletSizeChangedSignal(this, getValue());
+}
+
+LLSD LLChiclet::getValue() const
+{
+ return LLSD(getSessionId());
+}
+
+void LLChiclet::setValue(const LLSD& value)
+{
+ if(value.isUUID())
+ setSessionId(value.asUUID());
+}
+
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
-LLIMChiclet::LLIMChiclet(const LLChiclet::Params& p)
+LLIMChiclet::Params::Params()
+: avatar_icon("avatar_icon")
+, unread_notifications("unread_notifications")
+, speaker("speaker")
+, show_speaker("show_speaker")
+{
+ rect(LLRect(0, 25, 45, 0));
+
+ avatar_icon.name("avatar_icon");
+ avatar_icon.rect(LLRect(0, 25, 25, 0));
+
+ unread_notifications.name("unread");
+ unread_notifications.rect(LLRect(25, 25, 45, 0));
+ unread_notifications.font(LLFontGL::getFontSansSerif());
+ unread_notifications.font_halign(LLFontGL::HCENTER);
+ unread_notifications.v_pad(5);
+ unread_notifications.text_color(LLColor4::white);
+
+ speaker.name("speaker");
+ speaker.rect(LLRect(45, 25, 65, 0));
+
+ show_speaker = false;
+}
+
+LLIMChiclet::LLIMChiclet(const Params& p)
: LLChiclet(p)
-, mAvatar(NULL)
-, mCounterText(NULL)
-, mSpeaker(NULL)
-, mIMSessionId()
-, mShowSpeaker(false)
-, mSpeakerStatus(SPEAKER_IDLE)
-{
- LLAvatarIconCtrl::Params avatar_params;
- avatar_params.control_name("avatar");
- avatar_params.draw_tooltip = FALSE;
- mAvatar = LLUICtrlFactory::create<LLAvatarIconCtrl>(avatar_params);
-
- addChild(mAvatar);
-
- LLTextBox::Params unread_params;
- unread_params.font.style("SansSerif");
- unread_params.font_halign(LLFontGL::HCENTER);
- unread_params.v_pad(5);
- mCounterText = LLUICtrlFactory::create<LLTextBox>(unread_params);
- addChild(mCounterText);
- mCounterText->setColor(LLColor4::white);
+, mAvatarCtrl(NULL)
+, mCounterCtrl(NULL)
+, mSpeakerCtrl(NULL)
+, mShowSpeaker(p.show_speaker)
+, mPopupMenu(NULL)
+, mDockTongueVisible(false)
+{
+ LLChicletAvatarIconCtrl::Params avatar_params = p.avatar_icon;
+ mAvatarCtrl = LLUICtrlFactory::create<LLChicletAvatarIconCtrl>(avatar_params);
+ addChild(mAvatarCtrl);
+
+ LLChicletNotificationCounterCtrl::Params unread_params = p.unread_notifications;
+ mCounterCtrl = LLUICtrlFactory::create<LLChicletNotificationCounterCtrl>(unread_params);
+ addChild(mCounterCtrl);
+
setCounter(getCounter());
+ setShowCounter(getShowCounter());
- LLIconCtrl::Params speaker_params;
- speaker_params.image( LLUI::getUIImage("icn_voice_ptt-on-lvl2.tga") );
- mSpeaker = LLUICtrlFactory::create<LLIconCtrl>(speaker_params);
- addChild(mSpeaker);
- mSpeaker->setVisible(getShowSpeaker());
+ LLChicletSpeakerCtrl::Params speaker_params = p.speaker;
+ mSpeakerCtrl = LLUICtrlFactory::create<LLChicletSpeakerCtrl>(speaker_params);
+ addChild(mSpeakerCtrl);
- S32 left = 0;
- mAvatar->setRect(LLRect(left,CHICLET_HEIGHT,AVATAR_WIDTH,0));
- left += AVATAR_WIDTH + CHICLET_SPACING;
- mCounterText->setRect(LLRect(left,CHICLET_HEIGHT,left + COUNTER_WIDTH,0));
- left += COUNTER_WIDTH + CHICLET_SPACING;
- mSpeaker->setRect(LLRect(left,CHICLET_HEIGHT,left + SPEAKER_WIDTH,0));
+ setShowSpeaker(getShowSpeaker());
}
LLIMChiclet::~LLIMChiclet()
@@ -203,43 +228,57 @@ LLIMChiclet::~LLIMChiclet()
}
-LLChiclet* LLIMChiclet::create(LLSD* imSessionId /* = NULL */)
+void LLIMChiclet::setDockTongueVisible(bool visible)
{
- LLIMChiclet* chiclet = new LLIMChiclet(LLChiclet::Params());
- chiclet->setIMSessionId(imSessionId);
- return chiclet;
+ mDockTongueVisible = visible;
}
void LLIMChiclet::setCounter(S32 counter)
{
- mCounter = counter;
- std::stringstream stream;
- stream << mCounter;
- mCounterText->setText(stream.str());
+ mCounterCtrl->setCounter(counter);
+
+ if(getShowCounter())
+ {
+ LLRect counter_rect = mCounterCtrl->getRect();
+ LLRect required_rect = mCounterCtrl->getRequiredRect();
+ bool needs_resize = required_rect.getWidth() != counter_rect.getWidth();
- LLRect rc = mCounterText->getRect();
- rc.mRight = rc.mLeft + calcCounterWidth();
- mCounterText->setRect(rc);
+ if(needs_resize)
+ {
+ counter_rect.mRight = counter_rect.mLeft + required_rect.getWidth();
+ mCounterCtrl->reshape(counter_rect.getWidth(), counter_rect.getHeight());
+ mCounterCtrl->setRect(counter_rect);
+
+ onChicletSizeChanged();
+ }
+ }
}
LLRect LLIMChiclet::getRequiredRect()
{
- LLRect rect(0,CHICLET_HEIGHT,AVATAR_WIDTH,0);
+ LLRect rect(0, 0, mAvatarCtrl->getRect().getWidth(), 0);
if(getShowCounter())
{
- rect.mRight += CHICLET_SPACING + calcCounterWidth();
+ rect.mRight += mCounterCtrl->getRequiredRect().getWidth();
}
if(getShowSpeaker())
{
- rect.mRight += CHICLET_SPACING + SPEAKER_WIDTH;
+ rect.mRight += mSpeakerCtrl->getRect().getWidth();
}
return rect;
}
void LLIMChiclet::setShowCounter(bool show)
{
+ bool needs_resize = getShowCounter() != show;
+
LLChiclet::setShowCounter(show);
- mCounterText->setVisible(getShowCounter());
+ mCounterCtrl->setVisible(getShowCounter());
+
+ if(needs_resize)
+ {
+ onChicletSizeChanged();
+ }
}
void LLIMChiclet::setIMSessionName(const std::string& name)
@@ -249,63 +288,195 @@ void LLIMChiclet::setIMSessionName(const std::string& name)
void LLIMChiclet::setOtherParticipantId(const LLUUID& other_participant_id)
{
- if (mAvatar)
+ if (mAvatarCtrl)
{
- mAvatar->setValue(other_participant_id);
+ mAvatarCtrl->setValue(other_participant_id);
+ }
+}
+
+void LLIMChiclet::updateMenuItems()
+{
+ if(!mPopupMenu)
+ return;
+ if(getSessionId().isNull())
+ return;
+
+ if(P2P_MENU_NAME == mPopupMenu->getName())
+ {
+ bool is_friend = LLAvatarActions::isFriend(mAvatarCtrl->getAvatarId());
+
+ mPopupMenu->getChild<LLUICtrl>("Add Friend")->setEnabled(!is_friend);
+ mPopupMenu->getChild<LLUICtrl>("Remove Friend")->setEnabled(is_friend);
}
}
void LLIMChiclet::setShowSpeaker(bool show)
{
+ bool needs_resize = getShowSpeaker() != show;
+
mShowSpeaker = show;
- mSpeaker->setVisible(getShowSpeaker());
+ mSpeakerCtrl->setVisible(getShowSpeaker());
+
+ if(needs_resize)
+ {
+ onChicletSizeChanged();
+ }
}
void LLIMChiclet::draw()
{
LLUICtrl::draw();
- gl_rect_2d(1, getRect().getHeight(), getRect().getWidth(), 1, LLColor4(0.0f,0.0f,0.0f,1.f), FALSE);
+ gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, LLColor4(0.0f,0.0f,0.0f,1.f), FALSE);
+
+ if (mDockTongueVisible)
+ {
+ LLUIImagePtr flyout_tongue = LLUI::getUIImage("windows/Flyout_Pointer.png");
+ // was previously AVATAR_WIDTH-16 and CHICLET_HEIGHT-6
+ flyout_tongue->draw( getRect().getWidth()-31, getRect().getHeight()-5);
+ }
+}
+
+BOOL LLIMChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask)
+{
+ if(!mPopupMenu)
+ createPopupMenu();
+
+ updateMenuItems();
+
+ if (mPopupMenu)
+ {
+ mPopupMenu->arrangeAndClear();
+ }
+
+ LLMenuGL::showPopup(this, mPopupMenu, x, y);
+
+ return TRUE;
+}
+
+void LLIMChiclet::createPopupMenu()
+{
+ if(mPopupMenu)
+ {
+ llwarns << "Menu already exists" << llendl;
+ return;
+ }
+ if(getSessionId().isNull())
+ return;
+
+ LLFloaterIMPanel*floater = gIMMgr->findFloaterBySession(getSessionId());
+ if(!floater)
+ return;
+
+ LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
+ registrar.add("IMChicletMenu.Action", boost::bind(&LLIMChiclet::onMenuItemClicked, this, _2));
+
+ switch(floater->getDialogType())
+ {
+ case IM_SESSION_GROUP_START:
+ mPopupMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>
+ ("menu_imchiclet_group.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ break;
+ case IM_NOTHING_SPECIAL:
+ mPopupMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>
+ ("menu_imchiclet_p2p.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ break;
+ default:
+ llwarns << "Unexpected dialog type" << llendl;
+ break;
+ }
}
-S32 LLIMChiclet::calcCounterWidth()
+void LLIMChiclet::onMenuItemClicked(const LLSD& user_data)
{
- S32 font_width = mCounterText->getFont()->getWidth("0");
- S32 text_size = mCounterText->getText().size();
+ std::string level = user_data.asString();
+ LLUUID other_participant_id = mAvatarCtrl->getAvatarId();
- return llmax(font_width * text_size, COUNTER_WIDTH);
+ if("profile" == level)
+ {
+ LLAvatarActions::showProfile(other_participant_id);
+ }
+ else if("im" == level)
+ {
+ LLAvatarActions::startIM(other_participant_id);
+ }
+ else if("add" == level)
+ {
+ std::string name;
+ gCacheName->getFullName(other_participant_id,name);
+ LLAvatarActions::requestFriendshipDialog(other_participant_id,name);
+ }
+ else if("remove" == level)
+ {
+ LLAvatarActions::removeFriendDialog(other_participant_id);
+ }
+ else if("group chat" == level)
+ {
+ LLGroupActions::startChat(other_participant_id);
+ }
+ else if("info" == level)
+ {
+ LLFloaterGroupInfo::showFromUUID(other_participant_id);
+ }
}
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
+LLChicletPanel::Params::Params()
+: chiclet_padding("chiclet_padding")
+, scrolling_offset("scrolling_offset")
+, left_scroll_button("left_scroll_button")
+, right_scroll_button("right_scroll_button")
+, min_width("min_width")
+{
+ chiclet_padding = 3;
+ scrolling_offset = 40;
+ min_width = 70;
+
+ LLRect scroll_button_rect(0, 25, 19, 5);
+
+ left_scroll_button.name("left_scroll");
+ left_scroll_button.label(LLStringUtil::null);
+ left_scroll_button.rect(scroll_button_rect);
+ left_scroll_button.tab_stop(false);
+ left_scroll_button.image_selected(LLUI::getUIImage("bottom_tray_scroll_left.tga"));
+ left_scroll_button.image_unselected(LLUI::getUIImage("bottom_tray_scroll_left.tga"));
+ left_scroll_button.image_hover_selected(LLUI::getUIImage("bottom_tray_scroll_left.tga"));
+
+ right_scroll_button.name("right_scroll");
+ right_scroll_button.label(LLStringUtil::null);
+ right_scroll_button.rect(scroll_button_rect);
+ right_scroll_button.tab_stop(false);
+ right_scroll_button.image_selected(LLUI::getUIImage("bottom_tray_scroll_right.tga"));
+ right_scroll_button.image_unselected(LLUI::getUIImage("bottom_tray_scroll_right.tga"));
+ right_scroll_button.image_hover_selected(LLUI::getUIImage("bottom_tray_scroll_right.tga"));
+};
+
LLChicletPanel::LLChicletPanel(const Params&p)
: LLPanel(p)
-, mLeftScroll(NULL)
-, mRightScroll(NULL)
-, mFirstToShow(0)
-{
- LLButton::Params params;
-
- params.name("scroll_left");
- params.label(LLStringUtil::null);
- params.tab_stop(false);
- params.image_selected(LLUI::getUIImage("scroll_left.tga"));
- params.image_unselected(LLUI::getUIImage("scroll_left.tga"));
- params.image_hover_selected(LLUI::getUIImage("scroll_left.tga"));
- mLeftScroll = LLUICtrlFactory::create<LLButton>(params);
- addChild(mLeftScroll);
- mLeftScroll->setClickedCallback(boost::bind(&LLChicletPanel::onLeftScrollClick,this));
- mLeftScroll->setEnabled(false);
-
- params.name("scroll_right");
- params.image_selected(LLUI::getUIImage("scroll_right.tga"));
- params.image_unselected(LLUI::getUIImage("scroll_right.tga"));
- params.image_hover_selected(LLUI::getUIImage("scroll_right.tga"));
- mRightScroll = LLUICtrlFactory::create<LLButton>(params);
- addChild(mRightScroll);
- mRightScroll->setClickedCallback(boost::bind(&LLChicletPanel::onRightScrollClick,this));
- mRightScroll->setEnabled(false);
+, mScrollArea(NULL)
+, mLeftScrollButton(NULL)
+, mRightScrollButton(NULL)
+, mChicletPadding(p.chiclet_padding)
+, mScrollingOffset(p.scrolling_offset)
+, mMinWidth(p.min_width)
+, mShowControls(true)
+{
+ LLButton::Params scroll_button_params = p.left_scroll_button;
+
+ mLeftScrollButton = LLUICtrlFactory::create<LLButton>(scroll_button_params);
+ addChild(mLeftScrollButton);
+
+ mLeftScrollButton->setClickedCallback(boost::bind(&LLChicletPanel::onLeftScrollClick,this));
+ mLeftScrollButton->setEnabled(false);
+
+ scroll_button_params = p.right_scroll_button;
+ mRightScrollButton = LLUICtrlFactory::create<LLButton>(scroll_button_params);
+ addChild(mRightScrollButton);
+
+ mRightScrollButton->setClickedCallback(boost::bind(&LLChicletPanel::onRightScrollClick,this));
+ mRightScrollButton->setEnabled(false);
LLPanel::Params panel_params;
mScrollArea = LLUICtrlFactory::create<LLPanel>(panel_params,this);
@@ -317,44 +488,55 @@ LLChicletPanel::~LLChicletPanel()
}
-LLChicletPanel* LLChicletPanel::create()
-{
- LLChicletPanel* panel = new LLChicletPanel(LLChicletPanel::Params());
- return panel;
+void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){
+
+ LLUUID session_id = data["session_id"].asUUID();
+ LLChiclet* chiclet = panel->findChiclet<LLChiclet>(session_id);
+
+ if (chiclet)
+ {
+ chiclet->setCounter(data["num_unread"].asInteger());
+ }
+ else
+ {
+ llwarns << "Unable to set counter for chiclet " << session_id << llendl;
+ }
}
+
BOOL LLChicletPanel::postBuild()
{
LLPanel::postBuild();
+ LLIMModel::instance().addChangedCallback(boost::bind(im_chiclet_callback, this, _1));
return TRUE;
}
-LLChiclet* LLChicletPanel::createChiclet(LLSD* imSessionId, S32 pos)
+bool LLChicletPanel::addChiclet(LLChiclet* chiclet, S32 index)
{
- LLChiclet* chiclet = LLIMChiclet::create(imSessionId);
- if(!chiclet)
- {
- assert(false);
- return NULL;
- }
-
- if(!addChiclet(chiclet, pos))
+ if(mScrollArea->addChild(chiclet))
{
- assert(false);
- return NULL;
- }
+ S32 offset = 0;
+ // Do not scroll chiclets if chiclets are scrolled right and new
+ // chiclet is added to the beginning of the list
+ if(canScrollLeft())
+ {
+ offset = - (chiclet->getRequiredRect().getWidth() + getChicletPadding());
+ if(0 == index)
+ {
+ offset += getChiclet(0)->getRect().mLeft;
+ }
+ }
- return chiclet;
-}
+ mChicletList.insert(mChicletList.begin() + index, chiclet);
-bool LLChicletPanel::addChiclet(LLChiclet* chiclet, S32 pos)
-{
- if(mScrollArea->addChild(chiclet))
- {
- mChicletList.insert(mChicletList.begin() + pos, chiclet);
+ getChiclet(0)->translate(offset, 0);
chiclet->setLeftButtonClickCallback(boost::bind(&LLChicletPanel::onChicletClick, this, _1, _2));
+ chiclet->setChicletSizeChangedCallback(boost::bind(&LLChicletPanel::onChicletSizeChanged, this, _1, index));
+
+ arrange();
+ showScrollButtonsIfNeeded();
return true;
}
@@ -362,57 +544,65 @@ bool LLChicletPanel::addChiclet(LLChiclet* chiclet, S32 pos)
return false;
}
-void LLChicletPanel::onChicletClick(LLUICtrl*ctrl,const LLSD&param)
+void LLChicletPanel::onChicletSizeChanged(LLChiclet* ctrl, const LLSD& param)
{
- LLIMChiclet* chiclet = dynamic_cast<LLIMChiclet*>(ctrl);
- if (chiclet)
+ S32 chiclet_width = ctrl->getRect().getWidth();
+ S32 chiclet_new_width = ctrl->getRequiredRect().getWidth();
+
+ if(chiclet_new_width == chiclet_width)
{
- LLFloaterReg::showInstance("communicate", chiclet->getIMSessionId().asUUID());
+ return;
}
- mCommitSignal(ctrl,param);
-}
+ LLRect chiclet_rect = ctrl->getRect();
+ chiclet_rect.mRight = chiclet_rect.mLeft + chiclet_new_width;
-LLChiclet* LLChicletPanel::findIMChiclet(LLSD* imSessionId)
-{
- chiclet_list_t::const_iterator it = mChicletList.begin();
- for( ; mChicletList.end() != it; ++it)
- {
- LLIMChiclet* chiclet = dynamic_cast<LLIMChiclet*>(*it);
- if(!chiclet)
- {
- continue;
- }
+ ctrl->setRect(chiclet_rect);
- if(chiclet->getIMSessionId().asUUID() == imSessionId->asUUID())
- {
- return chiclet;
- }
- }
- return NULL;
+ S32 offset = chiclet_new_width - chiclet_width;
+ S32 index = getChicletIndex(ctrl);
+
+ shiftChiclets(offset, index + 1);
+ trimChiclets();
+ showScrollButtonsIfNeeded();
}
-LLChiclet* LLChicletPanel::getChiclet(S32 pos)
+void LLChicletPanel::onChicletClick(LLUICtrl*ctrl,const LLSD&param)
{
- return mChicletList.at(pos);
+ mCommitSignal(ctrl,param);
}
void LLChicletPanel::removeChiclet(chiclet_list_t::iterator it)
{
mScrollArea->removeChild(*it);
- delete *it;
mChicletList.erase(it);
- mLeftScroll->setEnabled(canScrollLeft());
- mRightScroll->setEnabled(canScrollRight());
+
+ arrange();
+ trimChiclets();
+ showScrollButtonsIfNeeded();
}
-void LLChicletPanel::removeChiclet(S32 pos)
+void LLChicletPanel::removeChiclet(S32 index)
{
- if(0 > pos || getChicletCount() >= pos)
+ if(index >= 0 && index < getChicletCount())
{
- return;
+ removeChiclet(mChicletList.begin() + index);
+ }
+}
+
+S32 LLChicletPanel::getChicletIndex(const LLChiclet* chiclet)
+{
+ if(mChicletList.empty())
+ return -1;
+
+ S32 size = getChicletCount();
+ for(int n = 0; n < size; ++n)
+ {
+ if(chiclet == mChicletList[n])
+ return n;
}
- removeChiclet(mChicletList.begin() + pos);
+
+ return -1;
}
void LLChicletPanel::removeChiclet(LLChiclet*chiclet)
@@ -429,18 +619,14 @@ void LLChicletPanel::removeChiclet(LLChiclet*chiclet)
}
}
-void LLChicletPanel::removeIMChiclet(LLSD* imSessionId)
+void LLChicletPanel::removeChiclet(const LLUUID& im_session_id)
{
chiclet_list_t::iterator it = mChicletList.begin();
for( ; mChicletList.end() != it; ++it)
{
LLIMChiclet* chiclet = dynamic_cast<LLIMChiclet*>(*it);
- if(!chiclet)
- {
- continue;
- }
- if(chiclet->getIMSessionId().asUUID() == imSessionId->asUUID())
+ if(chiclet->getSessionId() == im_session_id)
{
removeChiclet(it);
return;
@@ -450,54 +636,104 @@ void LLChicletPanel::removeIMChiclet(LLSD* imSessionId)
void LLChicletPanel::removeAll()
{
- mScrollArea->deleteAllChildren();
+ S32 size = getChicletCount();
+ for(S32 n = 0; n < size; ++n)
+ {
+ mScrollArea->removeChild(mChicletList[n]);
+ }
mChicletList.erase(mChicletList.begin(), mChicletList.end());
- mLeftScroll->setEnabled(false);
- mRightScroll->setEnabled(false);
+
+ showScrollButtonsIfNeeded();
}
void LLChicletPanel::reshape(S32 width, S32 height, BOOL called_from_parent )
{
LLPanel::reshape(width,height,called_from_parent);
- mLeftScroll->setRect(LLRect(0,CHICLET_HEIGHT,SCROLL_BUTTON_WIDTH,
- CHICLET_HEIGHT - SCROLL_BUTTON_HEIGHT));
- mRightScroll->setRect(LLRect(getRect().getWidth()-SCROLL_BUTTON_WIDTH,CHICLET_HEIGHT,
- getRect().getWidth(),CHICLET_HEIGHT - SCROLL_BUTTON_HEIGHT));
+ static const S32 SCROLL_BUTTON_PAD = 5;
- mScrollArea->setRect(LLRect(SCROLL_BUTTON_WIDTH + 5,CHICLET_HEIGHT + 1,
- getRect().getWidth() - SCROLL_BUTTON_WIDTH - 5, 0));
+ LLRect scroll_button_rect = mLeftScrollButton->getRect();
+ mLeftScrollButton->setRect(LLRect(0,height,scroll_button_rect.getWidth(),
+ height - scroll_button_rect.getHeight()));
+ scroll_button_rect = mRightScrollButton->getRect();
+ mRightScrollButton->setRect(LLRect(width - scroll_button_rect.getWidth(),height,
+ width, height - scroll_button_rect.getHeight()));
- arrange();
+ mScrollArea->setRect(LLRect(scroll_button_rect.getWidth() + SCROLL_BUTTON_PAD,
+ height + 7, width - scroll_button_rect.getWidth() - SCROLL_BUTTON_PAD, 0));
+
+ mShowControls = width > mMinWidth;
+ mScrollArea->setVisible(mShowControls);
+
+ trimChiclets();
+
+ showScrollButtonsIfNeeded();
}
void LLChicletPanel::arrange()
{
- S32 left = 0;
- S32 size = getChicletCount();
+ if(mChicletList.empty())
+ return;
- for( int n = mFirstToShow; n < size; ++n)
+ S32 chiclet_left = getChiclet(0)->getRect().mLeft;
+
+ S32 size = getChicletCount();
+ for( int n = 0; n < size; ++n)
{
LLChiclet* chiclet = getChiclet(n);
+
S32 chiclet_width = chiclet->getRequiredRect().getWidth();
- LLRect rc(left, CHICLET_HEIGHT, left + chiclet_width, 0);
+ LLRect rect = chiclet->getRect();
+ rect.set(chiclet_left, rect.mTop, chiclet_left + chiclet_width, rect.mBottom);
- chiclet->setRect(rc);
- chiclet->reshape(rc.getWidth(),rc.getHeight());
+ chiclet->setRect(rect);
- left += chiclet_width + CHICLET_PADDING;
+ chiclet_left += chiclet_width + getChicletPadding();
}
+}
- mLeftScroll->setEnabled(canScrollLeft());
- mRightScroll->setEnabled(canScrollRight());
+void LLChicletPanel::trimChiclets()
+{
+ // trim right
+ if(canScrollLeft() && !canScrollRight())
+ {
+ S32 last_chiclet_right = (*mChicletList.rbegin())->getRect().mRight;
+ S32 scroll_width = mScrollArea->getRect().getWidth();
+ if(last_chiclet_right < scroll_width)
+ {
+ shiftChiclets(scroll_width - last_chiclet_right);
+ }
+ }
+
+ // trim left
+ if(!mChicletList.empty())
+ {
+ LLRect first_chiclet_rect = getChiclet(0)->getRect();
+ if(first_chiclet_rect.mLeft > 0)
+ {
+ shiftChiclets( - first_chiclet_rect.mLeft);
+ }
+ }
}
-void LLChicletPanel::draw()
+void LLChicletPanel::showScrollButtonsIfNeeded()
{
- //gl_rect_2d(0,getRect().getHeight(),getRect().getWidth(),0,LLColor4(0.f,1.f,1.f,1.f),TRUE);
+ bool can_scroll_left = canScrollLeft();
+ bool can_scroll_right = canScrollRight();
+
+ mLeftScrollButton->setEnabled(can_scroll_left);
+ mRightScrollButton->setEnabled(can_scroll_right);
+
+ bool show_scroll_buttons = (can_scroll_left || can_scroll_right) && mShowControls;
+ mLeftScrollButton->setVisible(show_scroll_buttons);
+ mRightScrollButton->setVisible(show_scroll_buttons);
+}
+
+void LLChicletPanel::draw()
+{
child_list_const_iter_t it = getChildList()->begin();
for( ; getChildList()->end() != it; ++it)
{
@@ -516,38 +752,39 @@ void LLChicletPanel::draw()
bool LLChicletPanel::canScrollRight()
{
- S32 width = 0;
- LLRect visible_rect = mScrollArea->getRect();
+ if(mChicletList.empty())
+ return false;
+
+ S32 scroll_width = mScrollArea->getRect().getWidth();
+ S32 last_chiclet_right = (*mChicletList.rbegin())->getRect().mRight;
+
+ if(last_chiclet_right > scroll_width)
+ return true;
- chiclet_list_t::const_iterator it = mChicletList.begin() + mFirstToShow;
- for(;mChicletList.end() != it; ++it)
- {
- LLChiclet* chiclet = *it;
- width += chiclet->getRect().getWidth() + CHICLET_PADDING;
- if(width > visible_rect.getWidth())
- return true;
- }
return false;
}
bool LLChicletPanel::canScrollLeft()
{
- return mFirstToShow > 0;
+ if(mChicletList.empty())
+ return false;
+
+ return getChiclet(0)->getRect().mLeft < 0;
}
-void LLChicletPanel::scroll(ScrollDirection direction)
+void LLChicletPanel::scroll(S32 offset)
{
- S32 elem = 0;
- if(SCROLL_LEFT == direction)
- elem = mFirstToShow;
- else if(SCROLL_RIGHT)
- elem = mFirstToShow - 1;
+ shiftChiclets(offset);
+}
- S32 offset = mChicletList[elem]->getRect().getWidth() +
- CHICLET_PADDING;
- offset *= direction;
+void LLChicletPanel::shiftChiclets(S32 offset, S32 start_index /* = 0 */)
+{
+ if(start_index < 0 || start_index >= getChicletCount())
+ {
+ return;
+ }
- chiclet_list_t::const_iterator it = mChicletList.begin();
+ chiclet_list_t::const_iterator it = mChicletList.begin() + start_index;
for(;mChicletList.end() != it; ++it)
{
LLChiclet* chiclet = *it;
@@ -559,10 +796,18 @@ void LLChicletPanel::scrollLeft()
{
if(canScrollLeft())
{
- --mFirstToShow;
- scroll(SCROLL_LEFT);
- mLeftScroll->setEnabled(canScrollLeft());
- mRightScroll->setEnabled(canScrollRight());
+ S32 offset = getScrollingOffset();
+ LLRect first_chiclet_rect = getChiclet(0)->getRect();
+
+ // shift chiclets in case first chiclet is partially visible
+ if(first_chiclet_rect.mLeft < 0 && first_chiclet_rect.mRight > 0)
+ {
+ offset = llabs(first_chiclet_rect.mLeft);
+ }
+
+ scroll(offset);
+
+ showScrollButtonsIfNeeded();
}
}
@@ -570,10 +815,20 @@ void LLChicletPanel::scrollRight()
{
if(canScrollRight())
{
- ++mFirstToShow;
- scroll(SCROLL_RIGHT);
- mLeftScroll->setEnabled(canScrollLeft());
- mRightScroll->setEnabled(canScrollRight());
+ S32 offset = - getScrollingOffset();
+
+ S32 last_chiclet_right = (*mChicletList.rbegin())->getRect().mRight;
+ S32 scroll_rect_width = mScrollArea->getRect().getWidth();
+ // if after scrolling, the last chiclet will not be aligned to
+ // scroll area right side - align it.
+ if( last_chiclet_right + offset < scroll_rect_width )
+ {
+ offset = scroll_rect_width - last_chiclet_right;
+ }
+
+ scroll(offset);
+
+ showScrollButtonsIfNeeded();
}
}
@@ -587,7 +842,7 @@ void LLChicletPanel::onRightScrollClick()
scrollRight();
}
-boost::signals2::connection LLChicletPanel::setChicletClickCallback(
+boost::signals2::connection LLChicletPanel::setChicletClickedCallback(
const commit_callback_t& cb)
{
return mCommitSignal.connect(cb);
@@ -606,62 +861,87 @@ BOOL LLChicletPanel::handleScrollWheel(S32 x, S32 y, S32 clicks)
return TRUE;
}
-LLTalkButton::LLTalkButton(const LLUICtrl::Params& p)
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+
+LLTalkButton::Params::Params()
+ : speak_button("speak_button")
+ , show_button("show_button")
+ , monitor("monitor")
+{
+ speak_button.name("left");
+ speak_button.label("Speak");
+ speak_button.label_selected("Speak");
+ speak_button.font(LLFontGL::getFontSansSerifSmall());
+ speak_button.tab_stop(false);
+ speak_button.is_toggle(true);
+ speak_button.picture_style(true);
+ speak_button.image_selected(LLUI::getUIImage("SegmentedBtn_Left_Selected"));
+ speak_button.image_unselected(LLUI::getUIImage("SegmentedBtn_Left_Off"));
+
+ show_button.name("right");
+ show_button.label(LLStringUtil::null);
+ show_button.rect(LLRect(0, 0, 20, 0));
+ show_button.tab_stop(false);
+ show_button.is_toggle(true);
+ show_button.picture_style(true);
+ show_button.image_selected(LLUI::getUIImage("ComboButton_Selected"));
+ show_button.image_unselected(LLUI::getUIImage("ComboButton_Off"));
+
+ monitor.name("monitor");
+ monitor.rect(LLRect(0, 10, 16, 0));
+}
+
+LLTalkButton::LLTalkButton(const Params& p)
: LLUICtrl(p)
+, mPrivateCallPanel(NULL)
+, mOutputMonitor(NULL)
+, mSpeakBtn(NULL)
+, mShowBtn(NULL)
{
- static S32 DROPDOWN_BTN_WIDTH = 20;
-
- LLRect rc(p.rect);
-
- LLButton::Params speak_params;
- speak_params.name("left");
- speak_params.rect(LLRect(0,rc.getHeight(),rc.getWidth()-DROPDOWN_BTN_WIDTH,0));
- speak_params.label("Speak");
- speak_params.label_selected("Speak");
- speak_params.font(LLFontGL::getFontSansSerifSmall());
- speak_params.label_color(LLColor4::black);
- speak_params.label_color_selected(LLColor4::black);
- speak_params.tab_stop(false);
- speak_params.is_toggle(true);
- speak_params.picture_style(true);
- speak_params.image_selected(LLUI::getUIImage("flyout_btn_left_selected.tga"));
- speak_params.image_unselected(LLUI::getUIImage("flyout_btn_left.tga"));
+ LLRect rect = p.rect();
+ LLRect speak_rect(0, rect.getHeight(), rect.getWidth(), 0);
+ LLRect show_rect = p.show_button.rect();
+ show_rect.set(0, rect.getHeight(), show_rect.getWidth(), 0);
+
+ speak_rect.mRight -= show_rect.getWidth();
+ show_rect.mLeft = speak_rect.getWidth();
+ show_rect.mRight = rect.getWidth();
+
+ LLButton::Params speak_params = p.speak_button;
+ speak_params.rect(speak_rect);
mSpeakBtn = LLUICtrlFactory::create<LLButton>(speak_params);
addChild(mSpeakBtn);
mSpeakBtn->setClickedCallback(boost::bind(&LLTalkButton::onClick_SpeakBtn, this));
- mSpeakBtn->setToggleState(false);
-
- LLButton::Params show_params;
- show_params.name("right");
- show_params.rect(LLRect(rc.getWidth()-DROPDOWN_BTN_WIDTH,rc.getHeight(),rc.getWidth(),0));
- show_params.label("");
- show_params.tab_stop(false);
- show_params.is_toggle(true);
- show_params.picture_style(true);
- show_params.image_selected(LLUI::getUIImage("show_btn_selected.tga"));
- show_params.image_unselected(LLUI::getUIImage("show_btn.tga"));
+ mSpeakBtn->setToggleState(FALSE);
+
+ LLButton::Params show_params = p.show_button;
+ show_params.rect(show_rect);
mShowBtn = LLUICtrlFactory::create<LLButton>(show_params);
addChild(mShowBtn);
mShowBtn->setClickedCallback(boost::bind(&LLTalkButton::onClick_ShowBtn, this));
- mShowBtn->setToggleState(false);
-
- mSpeakBtn->setToggleState(FALSE);
mShowBtn->setToggleState(FALSE);
- rc = mSpeakBtn->getRect();
+ static const S32 MONITOR_RIGHT_PAD = 2;
- LLOutputMonitorCtrl::Params monitor_param;
- monitor_param.name("monitor");
- monitor_param.draw_border(false);
- monitor_param.rect(LLRect(rc.getWidth()-20,18,rc.getWidth()-3,2));
- monitor_param.visible(true);
- mOutputMonitor = LLUICtrlFactory::create<LLOutputMonitorCtrl>(monitor_param);
+ LLRect monitor_rect = p.monitor.rect();
+ S32 monitor_height = monitor_rect.getHeight();
+ monitor_rect.mLeft = speak_rect.getWidth() - monitor_rect.getWidth() - MONITOR_RIGHT_PAD;
+ monitor_rect.mRight = speak_rect.getWidth() - MONITOR_RIGHT_PAD;
+ monitor_rect.mBottom = (rect.getHeight() / 2) - (monitor_height / 2);
+ monitor_rect.mTop = monitor_rect.mBottom + monitor_height;
+ LLOutputMonitorCtrl::Params monitor_params = p.monitor;
+ monitor_params.draw_border(false);
+ monitor_params.rect(monitor_rect);
+ mOutputMonitor = LLUICtrlFactory::create<LLOutputMonitorCtrl>(monitor_params);
mSpeakBtn->addChild(mOutputMonitor);
- mPrivateCallPanel = NULL;
+ // never show "muted" because you can't mute yourself
+ mOutputMonitor->setIsMuted(false);
}
LLTalkButton::~LLTalkButton()
@@ -670,19 +950,22 @@ LLTalkButton::~LLTalkButton()
void LLTalkButton::draw()
{
- if(mSpeakBtn->getToggleState())
- {
- mOutputMonitor->setPower(gVoiceClient->getCurrentPower(gAgent.getID()));
- }
+ // Always provide speaking feedback. User can trigger speaking
+ // with keyboard or middle-mouse shortcut.
+ mOutputMonitor->setPower(gVoiceClient->getCurrentPower(gAgent.getID()));
LLUICtrl::draw();
}
+void LLTalkButton::setSpeakBtnToggleState(bool state)
+{
+ mSpeakBtn->setToggleState(state);
+}
+
void LLTalkButton::onClick_SpeakBtn()
{
bool speaking = mSpeakBtn->getToggleState();
gVoiceClient->setUserPTTState(speaking);
- mOutputMonitor->setIsMuted(!speaking);
}
void LLTalkButton::onClick_ShowBtn()
@@ -704,8 +987,7 @@ void LLTalkButton::onClick_ShowBtn()
mPrivateCallPanel = new LLVoiceControlPanel;
getRootView()->addChild(mPrivateCallPanel);
- y = LLBottomTray::getInstance()->getRect().getHeight()
- + mPrivateCallPanel->getRect().getHeight();
+ y = LLBottomTray::getInstance()->getRect().getHeight() + mPrivateCallPanel->getRect().getHeight();
LLRect rect;
rect.setLeftTopAndSize(x, y, mPrivateCallPanel->getRect().getWidth(), mPrivateCallPanel->getRect().getHeight());
@@ -723,3 +1005,70 @@ void LLTalkButton::onClick_ShowBtn()
mShowBtn->setToggleState(TRUE);
}
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+
+LLChicletNotificationCounterCtrl::LLChicletNotificationCounterCtrl(const Params& p)
+ : LLTextBox(p)
+ , mCounter(0)
+ , mInitialWidth(0)
+{
+ mInitialWidth = getRect().getWidth();
+}
+
+void LLChicletNotificationCounterCtrl::setCounter(S32 counter)
+{
+ mCounter = counter;
+
+ std::stringstream stream;
+ stream << getCounter();
+ if(mCounter != 0)
+ {
+ setText(stream.str());
+ }
+ else
+ {
+ setText(std::string(""));
+ }
+}
+
+LLRect LLChicletNotificationCounterCtrl::getRequiredRect()
+{
+ LLRect rc;
+ S32 text_width = getFont()->getWidth(getText());
+
+ rc.mRight = rc.mLeft + llmax(text_width, mInitialWidth);
+
+ return rc;
+}
+
+void LLChicletNotificationCounterCtrl::setValue(const LLSD& value)
+{
+ if(value.isInteger())
+ setCounter(value.asInteger());
+}
+
+LLSD LLChicletNotificationCounterCtrl::getValue() const
+{
+ return LLSD(getCounter());
+}
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+
+LLChicletAvatarIconCtrl::LLChicletAvatarIconCtrl(const Params& p)
+ : LLAvatarIconCtrl(p)
+{
+}
+
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+
+LLChicletSpeakerCtrl::LLChicletSpeakerCtrl(const Params&p)
+ : LLIconCtrl(p)
+{
+}
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index 11c3356c46..c20c81e052 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -33,134 +33,337 @@
#ifndef LL_LLCHICLET_H
#define LL_LLCHICLET_H
+#include "llavatariconctrl.h"
+#include "llbutton.h"
#include "llpanel.h"
+#include "lltextbox.h"
+#include "lloutputmonitorctrl.h"
-class LLTextBox;
-class LLIconCtrl;
-class LLAvatarIconCtrl;
class LLVoiceControlPanel;
-class LLOutputMonitorCtrl;
+class LLMenuGL;
+/*
+ * Class for displaying amount of messages/notifications(unread).
+*/
+class LLChicletNotificationCounterCtrl : public LLTextBox
+{
+public:
+
+ struct Params : public LLInitParam::Block<Params, LLTextBox::Params>
+ {
+ Params()
+ {};
+ };
+
+ /*
+ * Sets number of notifications
+ */
+ virtual void setCounter(S32 counter);
+
+ /*
+ * Returns number of notifications
+ */
+ virtual S32 getCounter() const { return mCounter; }
+
+ /*
+ * Returns width, required to display amount of notifications in text form.
+ * Width is the only valid value.
+ */
+ /*virtual*/ LLRect getRequiredRect();
+
+ /*
+ * Sets number of notifications using LLSD
+ */
+ /*virtual*/ void setValue(const LLSD& value);
+
+ /*
+ * Returns number of notifications wrapped in LLSD
+ */
+ /*virtual*/ LLSD getValue() const;
+
+protected:
+
+ LLChicletNotificationCounterCtrl(const Params& p);
+ friend class LLUICtrlFactory;
+
+private:
+
+ S32 mCounter;
+ S32 mInitialWidth;
+};
+
+/*
+ * Class for displaying avatar's icon.
+*/
+class LLChicletAvatarIconCtrl : public LLAvatarIconCtrl
+{
+public:
+
+ struct Params : public LLInitParam::Block<Params, LLAvatarIconCtrl::Params>
+ {
+ Params()
+ {
+ draw_tooltip(FALSE);
+ mouse_opaque(FALSE);
+ };
+ };
+
+protected:
+
+ LLChicletAvatarIconCtrl(const Params& p);
+ friend class LLUICtrlFactory;
+};
+
+/*
+ * Class for displaying status of Voice Chat
+*/
+class LLChicletSpeakerCtrl : public LLIconCtrl
+{
+public:
+
+ struct Params : public LLInitParam::Block<Params, LLIconCtrl::Params>
+ {
+ Params(){};
+ };
+protected:
+
+ LLChicletSpeakerCtrl(const Params&p);
+ friend class LLUICtrlFactory;
+};
+
+/*
+ * Base class for all chiclets.
+ */
class LLChiclet : public LLUICtrl
{
public:
struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
{
- Params(){};
+ Optional<bool> show_counter;
+
+ Params();
};
- virtual ~LLChiclet();
+ /*virtual*/ ~LLChiclet();
+
+ /*
+ * Associates chat session id with chiclet.
+ */
+ virtual void setSessionId(const LLUUID& session_id) { mSessionId = session_id; }
+ /*
+ * Returns associated chat session.
+ */
+ virtual const LLUUID& getSessionId() const { return mSessionId; }
+
+ /*
+ * Sets number of unread notifications.
+ */
virtual void setCounter(S32 counter) = 0;
+ /*
+ * Returns number of unread notifications.
+ */
virtual S32 getCounter() = 0;
- virtual void setShowCounter(bool show) {mShowCounter = show;};
+ /*
+ * Sets show counter state.
+ */
+ virtual void setShowCounter(bool show) { mShowCounter = show; }
+ /*
+ * Returns show counter state.
+ */
virtual bool getShowCounter() {return mShowCounter;};
- virtual boost::signals2::connection setLeftButtonClickCallback(
+ /*
+ * Connects chiclet clicked event with callback.
+ */
+ /*virtual*/ boost::signals2::connection setLeftButtonClickCallback(
const commit_callback_t& cb);
+ typedef boost::function<void (LLChiclet* ctrl, const LLSD& param)>
+ chiclet_size_changed_callback_t;
+
+ /*
+ * Connects chiclets size changed event with callback.
+ */
+ virtual boost::signals2::connection setChicletSizeChangedCallback(
+ const chiclet_size_changed_callback_t& cb);
+
+ /*
+ * Sets IM Session id using LLSD
+ */
+ /*virtual*/ LLSD getValue() const;
+
+ /*
+ * Returns IM Session id using LLSD
+ */
+ /*virtual*/ void setValue(const LLSD& value);
+
protected:
friend class LLUICtrlFactory;
LLChiclet(const Params& p);
- virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
+ /*
+ * Notifies subscribers about click on chiclet.
+ */
+ /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
+
+ /*
+ * Notifies subscribers about chiclet size changed event.
+ */
+ virtual void onChicletSizeChanged();
+
+private:
+
+ LLUUID mSessionId;
-protected:
- S32 mCounter;
bool mShowCounter;
+
+ typedef boost::signals2::signal<void (LLChiclet* ctrl, const LLSD& param)>
+ chiclet_size_changed_signal_t;
+
+ chiclet_size_changed_signal_t mChicletSizeChangedSignal;
};
+/*
+* Implements Instant Message chiclet.
+* IMChiclet displays avatar's icon, number of unread messages(optional)
+* and voice chat status(optional).
+*/
class LLIMChiclet : public LLChiclet
{
public:
- static LLChiclet* create(LLSD* imSessionId = NULL);
-
- void setCounter(S32);
-
- S32 getCounter() {return mCounter;};
-
- const LLSD& getIMSessionId() const {return mIMSessionId;};
+ struct Params : public LLInitParam::Block<Params, LLChiclet::Params>
+ {
+ Optional<LLChicletAvatarIconCtrl::Params> avatar_icon;
- void setIMSessionId(LLSD* imSessionId) {if (imSessionId) mIMSessionId = *imSessionId;};
- void setIMSessionName(const std::string& name);
- void setOtherParticipantId(const LLUUID& other_participant_id);
+ Optional<LLChicletNotificationCounterCtrl::Params> unread_notifications;
- void setShowSpeaker(bool show);
+ Optional<LLChicletSpeakerCtrl::Params> speaker;
- bool getShowSpeaker() {return mShowSpeaker;};
+ Optional<bool> show_speaker;
- enum SpeakerStatus
- {
- SPREAKER_ACTIVE,
- SPEAKER_IDLE
+ Params();
};
- void setSpeakerStatus(SpeakerStatus status);
-
- SpeakerStatus getSpeakerStatus() {return mSpeakerStatus;};
-
- ~LLIMChiclet();
+ /*virtual*/ ~LLIMChiclet();
+
+ /*
+ * Sets IM session name. This name will be displayed in chiclet tooltip.
+ */
+ virtual void setIMSessionName(const std::string& name);
+
+ /*
+ * Sets id of person/group user is chatting with.
+ */
+ virtual void setOtherParticipantId(const LLUUID& other_participant_id);
+
+ /*
+ * Shows/hides voice chat status control.
+ */
+ virtual void setShowSpeaker(bool show);
+
+ void setDockTongueVisible(bool visible);
+
+ /*
+ * Returns voice chat status control visibility.
+ */
+ virtual bool getShowSpeaker() {return mShowSpeaker;};
+
+ /*
+ * Sets number of unread messages. Will update chiclet's width if number text
+ * exceeds size of counter and notify it's parent about size change.
+ */
+ /*virtual*/ void setCounter(S32);
+
+ /*
+ * Returns number of unread messages.
+ */
+ /*virtual*/ S32 getCounter() { return mCounterCtrl->getCounter(); }
+
+ /*
+ * Shows/hides number of unread messages.
+ */
+ /*virtual*/ void setShowCounter(bool show);
+
+ /*
+ * Draws border around chiclet.
+ */
+ /*virtual*/ void draw();
+
+ /*
+ * Returns rect, required to display chiclet.
+ * Width is the only valid value.
+ */
+ /*virtual*/ LLRect getRequiredRect();
protected:
- LLIMChiclet(const LLChiclet::Params& p);
- friend class LLUICtrlFactory;
- S32 calcCounterWidth();
+ LLIMChiclet(const Params& p);
+ friend class LLUICtrlFactory;
- //overrides
-public:
+ /*
+ * Creates chiclet popup menu. Will create P2P or Group IM Chat menu
+ * based on other participant's id.
+ */
+ virtual void createPopupMenu();
- void setShowCounter(bool show);
+ /*
+ * Processes clicks on chiclet popup menu.
+ */
+ virtual void onMenuItemClicked(const LLSD& user_data);
- void draw();
+ /*
+ * Enables/disables menus based on relationship with other participant.
+ */
+ virtual void updateMenuItems();
- LLRect getRequiredRect();
+ /*
+ * Displays popup menu.
+ */
+ /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
protected:
- LLAvatarIconCtrl* mAvatar;
- LLTextBox* mCounterText;
- LLIconCtrl* mSpeaker;
+ LLChicletAvatarIconCtrl* mAvatarCtrl;
+ LLChicletNotificationCounterCtrl* mCounterCtrl;
+ LLChicletSpeakerCtrl* mSpeakerCtrl;
+
+ LLMenuGL* mPopupMenu;
- LLSD mIMSessionId;
bool mShowSpeaker;
- SpeakerStatus mSpeakerStatus;
+ bool mDockTongueVisible;
};
+/*
+ * Implements notification chiclet. Used to display total amount of unread messages
+ * across all IM sessions, total amount of system notifications.
+*/
class LLNotificationChiclet : public LLChiclet
{
public:
struct Params : public LLInitParam::Block<Params, LLChiclet::Params>
{
- Optional<LLUIImage*>
- image_unselected,
- image_selected,
- image_hover_selected,
- image_hover_unselected,
- image_disabled_selected,
- image_disabled,
- image_overlay;
-
- Optional<S32>
- label_left;
+ Optional<LLButton::Params> button;
+
+ Optional<LLChicletNotificationCounterCtrl::Params> unread_notifications;
Params();
};
- static LLChiclet* create(const Params& p);
+ /*virtual*/ void setCounter(S32 counter);
- void setCounter(S32 counter);
+ /*virtual*/S32 getCounter() { return mCounterCtrl->getCounter(); }
- S32 getCounter() {return mCounter;};
+ /*virtual*/ void setShowCounter(bool show);
boost::signals2::connection setClickCallback(const commit_callback_t& cb);
- virtual ~ LLNotificationChiclet();
+ /*virtual*/ ~ LLNotificationChiclet();
protected:
LLNotificationChiclet(const Params& p);
@@ -168,113 +371,228 @@ protected:
protected:
LLButton* mButton;
- LLTextBox* mCounterText;
+ LLChicletNotificationCounterCtrl* mCounterCtrl;
};
+/*
+ * Storage class for all IM chiclets. Provides mechanism to display,
+ * scroll, create, remove chiclets.
+*/
class LLChicletPanel : public LLPanel
{
public:
struct Params : public LLInitParam::Block<Params, LLPanel::Params>
{
- Params(){};
- };
+ Optional<S32> chiclet_padding,
+ scrolling_offset;
- static LLChicletPanel* create();
+ Optional<LLButton::Params> left_scroll_button,
+ right_scroll_button;
- LLChiclet* createChiclet(LLSD* imSessionId = NULL, S32 pos = 0);
+ Optional<S32> min_width;
- bool addChiclet(LLChiclet*, S32 pos);
+ Params();
+ };
- LLChiclet* getChiclet(S32 pos);
+ virtual ~LLChicletPanel();
- LLChiclet* findIMChiclet(LLSD* imSessionId);
+ /*
+ * Creates chiclet and adds it to chiclet list.
+ */
+ template<class T> T* createChiclet(const LLUUID& session_id = LLUUID::null, S32 index = 0);
- S32 getChicletCount() {return mChicletList.size();};
+ /*
+ * Returns pointer to chiclet of specified type at specified index.
+ */
+ template<class T> T* getChiclet(S32 index);
- void removeChiclet(S32 pos);
+ /*
+ * Returns pointer to LLChiclet at specified index.
+ */
+ LLChiclet* getChiclet(S32 index) { return getChiclet<LLChiclet>(index); }
- void removeChiclet(LLChiclet*);
+ /*
+ * Searches a chiclet using IM session id.
+ */
+ template<class T> T* findChiclet(const LLUUID& im_session_id);
- void removeIMChiclet(LLSD* imSessionId);
+ /*
+ * Returns number of hosted chiclets.
+ */
+ S32 getChicletCount() {return mChicletList.size();};
+ /*
+ * Returns index of chiclet in list.
+ */
+ S32 getChicletIndex(const LLChiclet* chiclet);
+
+ /*
+ * Removes chiclet by index.
+ */
+ void removeChiclet(S32 index);
+
+ /*
+ * Removes chiclet by pointer.
+ */
+ void removeChiclet(LLChiclet* chiclet);
+
+ /*
+ * Removes chiclet by IM session id.
+ */
+ void removeChiclet(const LLUUID& im_session_id);
+
+ /*
+ * Removes all chiclets.
+ */
void removeAll();
- void arrange();
-
- ~LLChicletPanel();
-
- void scrollLeft();
-
- void scrollRight();
-
- void onLeftScrollClick();
-
- void onRightScrollClick();
-
- boost::signals2::connection setChicletClickCallback(
+ boost::signals2::connection setChicletClickedCallback(
const commit_callback_t& cb);
- void onChicletClick(LLUICtrl*ctrl,const LLSD&param);
+ /*virtual*/ BOOL postBuild();
- //overrides
-public:
-
- void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE );
+ /*
+ * Reshapes controls and rearranges chiclets if needed.
+ */
+ /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE );
- void draw();
-
- BOOL postBuild();
+ /*virtual*/ void draw();
protected:
LLChicletPanel(const Params&p);
friend class LLUICtrlFactory;
- bool needsScrolling();
+ /*
+ * Adds chiclet to list and rearranges all chiclets.
+ */
+ bool addChiclet(LLChiclet*, S32 index);
+
+ /*
+ * Arranges chiclets.
+ */
+ void arrange();
+ /*
+ * Returns true if chiclets can be scrolled right.
+ */
bool canScrollRight();
+ /*
+ * Returns true if chiclets can be scrolled left.
+ */
bool canScrollLeft();
- enum ScrollDirection
- {
- SCROLL_LEFT = 1,
- SCROLL_RIGHT = -1
- };
+ /*
+ * Shows or hides chiclet scroll buttons if chiclets can or can not be scrolled.
+ */
+ void showScrollButtonsIfNeeded();
+
+ /*
+ * Shifts chiclets left or right.
+ */
+ void shiftChiclets(S32 offset, S32 start_index = 0);
+
+ /*
+ * Removes gaps between first chiclet and scroll area left side,
+ * last chiclet and scroll area right side.
+ */
+ void trimChiclets();
+
+ /*
+ * Scrolls chiclets to right or left.
+ */
+ void scroll(S32 offset);
+
+ /*
+ * Verifies that chiclets can be scrolled left, then calls scroll()
+ */
+ void scrollLeft();
- void scroll(ScrollDirection direction);
+ /*
+ * Verifies that chiclets can be scrolled right, then calls scroll()
+ */
+ void scrollRight();
+
+ /*
+ * Callback for left scroll button clicked
+ */
+ void onLeftScrollClick();
+
+ /*
+ * Callback for right scroll button clicked
+ */
+ void onRightScrollClick();
+
+ /*
+ * Callback for mouse wheel scrolled, calls scrollRight() or scrollLeft()
+ */
+ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
+
+ /*
+ * Notifies subscribers about click on chiclet.
+ * Do not place any code here, instead subscribe on event (see setChicletClickedCallback).
+ */
+ void onChicletClick(LLUICtrl*ctrl,const LLSD&param);
+
+ /*
+ * Callback for chiclet size changed event, rearranges chiclets.
+ */
+ void onChicletSizeChanged(LLChiclet* ctrl, const LLSD& param);
typedef std::vector<LLChiclet*> chiclet_list_t;
+ /*
+ * Removes chiclet from scroll area and chiclet list.
+ */
void removeChiclet(chiclet_list_t::iterator it);
- BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
+ S32 getChicletPadding() { return mChicletPadding; }
+
+ S32 getScrollingOffset() { return mScrollingOffset; }
protected:
chiclet_list_t mChicletList;
- LLButton* mLeftScroll;
- LLButton* mRightScroll;
- S32 mFirstToShow;
- S32 mLastToShow;
+ LLButton* mLeftScrollButton;
+ LLButton* mRightScrollButton;
LLPanel* mScrollArea;
-};
+ S32 mChicletPadding;
+ S32 mScrollingOffset;
+ S32 mMinWidth;
+ bool mShowControls;
+};
+/*
+ * Button displaying voice chat status. Displays voice chat options When clicked.
+*/
class LLTalkButton : public LLUICtrl
{
public:
- virtual ~LLTalkButton();
+ struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
+ {
+ Optional<LLButton::Params> speak_button,
+ show_button;
- void onClick_SpeakBtn();
- void onClick_ShowBtn();
+ Optional<LLOutputMonitorCtrl::Params> monitor;
- void draw();
+ Params();
+ };
+
+ /*virtual*/ ~LLTalkButton();
+
+ /*virtual*/ void draw();
+ void setSpeakBtnToggleState(bool state);
protected:
friend class LLUICtrlFactory;
- LLTalkButton(const LLUICtrl::Params& p);
+ LLTalkButton(const Params& p);
+
+ void onClick_SpeakBtn();
+
+ void onClick_ShowBtn();
private:
LLButton* mSpeakBtn;
@@ -283,4 +601,68 @@ private:
LLOutputMonitorCtrl* mOutputMonitor;
};
+template<class T>
+T* LLChicletPanel::createChiclet(const LLUUID& session_id /*= LLUUID::null*/, S32 index /*= 0*/)
+{
+ typename T::Params params;
+ T* chiclet = LLUICtrlFactory::create<T>(params);
+ if(!chiclet)
+ {
+ llwarns << "Could not create chiclet" << llendl;
+ return NULL;
+ }
+ if(!addChiclet(chiclet, index))
+ {
+ delete chiclet;
+ llwarns << "Could not add chiclet to chiclet panel" << llendl;
+ return NULL;
+ }
+
+ chiclet->setSessionId(session_id);
+
+ return chiclet;
+}
+
+template<class T>
+T* LLChicletPanel::findChiclet(const LLUUID& im_session_id)
+{
+ if(im_session_id.isNull())
+ {
+ return NULL;
+ }
+
+ chiclet_list_t::const_iterator it = mChicletList.begin();
+ for( ; mChicletList.end() != it; ++it)
+ {
+ LLChiclet* chiclet = *it;
+
+ if(chiclet->getSessionId() == im_session_id)
+ {
+ T* result = dynamic_cast<T*>(chiclet);
+ if(!result && chiclet)
+ {
+ llwarns << "Found chiclet but of wrong type " << llendl;
+ }
+ return result;
+ }
+ }
+ return NULL;
+}
+
+template<class T> T* LLChicletPanel::getChiclet(S32 index)
+{
+ if(index < 0 || index >= getChicletCount())
+ {
+ return NULL;
+ }
+
+ LLChiclet* chiclet = mChicletList[index];
+ T*result = dynamic_cast<T*>(chiclet);
+ if(!result && chiclet)
+ {
+ llwarns << "Found chiclet but of wrong type " << llendl;
+ }
+ return result;
+}
+
#endif // LL_LLCHICLET_H
diff --git a/indra/newview/llclassifiedstatsresponder.h b/indra/newview/llclassifiedstatsresponder.h
index c4591df8de..9c52ed5ae1 100644
--- a/indra/newview/llclassifiedstatsresponder.h
+++ b/indra/newview/llclassifiedstatsresponder.h
@@ -44,6 +44,7 @@ public:
//If we get back a normal response, handle it here
virtual void result(const LLSD& content);
//If we get back an error (not found, etc...), handle it here
+
virtual void error(U32 status, const std::string& reason);
protected:
diff --git a/indra/newview/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp
index 33aaac542b..31c2d93c05 100644
--- a/indra/newview/llcolorswatch.cpp
+++ b/indra/newview/llcolorswatch.cpp
@@ -48,10 +48,10 @@
#include "lltextbox.h"
#include "llfloatercolorpicker.h"
#include "llviewborder.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llfocusmgr.h"
-static LLDefaultWidgetRegistry::Register<LLColorSwatchCtrl> r("color_swatch");
+static LLDefaultChildRegistry::Register<LLColorSwatchCtrl> r("color_swatch");
LLColorSwatchCtrl::Params::Params()
: color("color", LLColor4::white),
@@ -227,7 +227,7 @@ void LLColorSwatchCtrl::draw()
{
if (!mFallbackImageName.empty())
{
- LLPointer<LLViewerImage> fallback_image = gImageList.getImageFromFile(mFallbackImageName);
+ LLPointer<LLViewerTexture> fallback_image = LLViewerTextureManager::getFetchedTextureFromFile(mFallbackImageName, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE);
if( fallback_image->getComponents() == 4 )
{
gl_rect_2d_checkerboard( interior );
diff --git a/indra/newview/llcolorswatch.h b/indra/newview/llcolorswatch.h
index a05926c2f5..e3e267f831 100644
--- a/indra/newview/llcolorswatch.h
+++ b/indra/newview/llcolorswatch.h
@@ -36,7 +36,7 @@
#include "lluictrl.h"
#include "v4color.h"
#include "llfloater.h"
-#include "llviewerimage.h"
+#include "llviewertexture.h"
#include "lltextbox.h"
//
@@ -45,7 +45,7 @@
class LLColor4;
class LLTextBox;
class LLFloaterColorPicker;
-class LLViewerImage;
+class LLViewerTexture;
class LLColorSwatchCtrl
: public LLUICtrl
@@ -60,13 +60,13 @@ public:
struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
{
- Optional<LLColor4> color;
- Optional<bool> can_apply_immediately;
- Optional<LLUIImage*> alpha_background_image;
- Optional<commit_callback_t> cancel_callback;
- Optional<commit_callback_t> select_callback;
- Optional<LLUIColor> border_color;
- Optional<S32> label_width;
+ Optional<LLColor4> color;
+ Optional<bool> can_apply_immediately;
+ Optional<LLUIImage*> alpha_background_image;
+ Optional<commit_callback_t> cancel_callback;
+ Optional<commit_callback_t> select_callback;
+ Optional<LLUIColor> border_color;
+ Optional<S32> label_width;
Optional<LLTextBox::Params> caption_text;
Optional<LLViewBorder::Params> border;
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index cb368974ae..d8bd32382f 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -229,7 +229,7 @@ S32 LLDrawable::findReferences(LLDrawable *drawablep)
return count;
}
-LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerImage *texturep)
+LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep)
{
LLMemType mt(LLMemType::MTYPE_DRAWABLE);
@@ -253,7 +253,7 @@ LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerImage *texturep)
return face;
}
-LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerImage *texturep)
+LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep)
{
LLMemType mt(LLMemType::MTYPE_DRAWABLE);
@@ -275,7 +275,7 @@ LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerImage *texturep)
}
-void LLDrawable::setNumFaces(const S32 newFaces, LLFacePool *poolp, LLViewerImage *texturep)
+void LLDrawable::setNumFaces(const S32 newFaces, LLFacePool *poolp, LLViewerTexture *texturep)
{
if (newFaces == (S32)mFaces.size())
{
@@ -298,7 +298,7 @@ void LLDrawable::setNumFaces(const S32 newFaces, LLFacePool *poolp, LLViewerImag
llassert_always(mFaces.size() == newFaces);
}
-void LLDrawable::setNumFacesFast(const S32 newFaces, LLFacePool *poolp, LLViewerImage *texturep)
+void LLDrawable::setNumFacesFast(const S32 newFaces, LLFacePool *poolp, LLViewerTexture *texturep)
{
if (newFaces <= (S32)mFaces.size() && newFaces >= (S32)mFaces.size()/2)
{
diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h
index f3ef0753e7..940e1fc968 100644
--- a/indra/newview/lldrawable.h
+++ b/indra/newview/lldrawable.h
@@ -58,7 +58,7 @@ class LLSpatialGroup;
class LLSpatialBridge;
class LLSpatialPartition;
class LLVOVolume;
-class LLViewerImage;
+class LLViewerTexture;
// Can have multiple silhouettes for each object
const U32 SILHOUETTE_HIGHLIGHT = 0;
@@ -125,11 +125,11 @@ public:
inline S32 getNumFaces() const;
//void removeFace(const S32 i); // SJB: Avoid using this, it's slow
- LLFace* addFace(LLFacePool *poolp, LLViewerImage *texturep);
- LLFace* addFace(const LLTextureEntry *te, LLViewerImage *texturep);
+ LLFace* addFace(LLFacePool *poolp, LLViewerTexture *texturep);
+ LLFace* addFace(const LLTextureEntry *te, LLViewerTexture *texturep);
void deleteFaces(S32 offset, S32 count);
- void setNumFaces(const S32 numFaces, LLFacePool *poolp, LLViewerImage *texturep);
- void setNumFacesFast(const S32 numFaces, LLFacePool *poolp, LLViewerImage *texturep);
+ void setNumFaces(const S32 numFaces, LLFacePool *poolp, LLViewerTexture *texturep);
+ void setNumFacesFast(const S32 numFaces, LLFacePool *poolp, LLViewerTexture *texturep);
void mergeFaces(LLDrawable* src);
void init();
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp
index 9f05ce3c46..3a064a4e7d 100644
--- a/indra/newview/lldrawpool.cpp
+++ b/indra/newview/lldrawpool.cpp
@@ -60,7 +60,7 @@ S32 LLDrawPool::sNumDrawPools = 0;
//=============================
// Draw Pool Implementation
//=============================
-LLDrawPool *LLDrawPool::createPool(const U32 type, LLViewerImage *tex0)
+LLDrawPool *LLDrawPool::createPool(const U32 type, LLViewerTexture *tex0)
{
LLDrawPool *poolp = NULL;
switch (type)
@@ -129,7 +129,7 @@ LLDrawPool::~LLDrawPool()
}
-LLViewerImage *LLDrawPool::getDebugTexture()
+LLViewerTexture *LLDrawPool::getDebugTexture()
{
return NULL;
}
@@ -244,7 +244,7 @@ void LLFacePool::destroy()
}
}
-void LLFacePool::dirtyTextures(const std::set<LLViewerImage*>& textures)
+void LLFacePool::dirtyTextures(const std::set<LLViewerFetchedTexture*>& textures)
{
}
@@ -279,7 +279,7 @@ S32 LLFacePool::drawLoopSetTex(face_array_t& face_list, S32 stage)
iter != face_list.end(); iter++)
{
LLFace *facep = *iter;
- gGL.getTexUnit(stage)->bind(facep->getTexture());
+ gGL.getTexUnit(stage)->bind(facep->getTexture()) ;
gGL.getTexUnit(0)->activate();
res += facep->renderIndexed();
}
@@ -295,13 +295,6 @@ void LLFacePool::drawLoop()
}
}
-void LLFacePool::renderFaceSelected(LLFace *facep,
- LLImageGL *image,
- const LLColor4 &color,
- const S32 index_offset, const S32 index_count)
-{
-}
-
void LLFacePool::enqueue(LLFace* facep)
{
mDrawFace.push_back(facep);
@@ -330,7 +323,7 @@ void LLFacePool::resetDrawOrders()
mDrawFace.resize(0);
}
-LLViewerImage *LLFacePool::getTexture()
+LLViewerTexture *LLFacePool::getTexture()
{
return NULL;
}
@@ -481,7 +474,7 @@ void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture)
{
if (params.mTexture.notNull())
{
- gGL.getTexUnit(0)->bind(params.mTexture.get());
+ gGL.getTexUnit(0)->bind(params.mTexture) ;
if (params.mTextureMatrix)
{
glMatrixMode(GL_TEXTURE);
diff --git a/indra/newview/lldrawpool.h b/indra/newview/lldrawpool.h
index 87c3ccaffe..966de41df3 100644
--- a/indra/newview/lldrawpool.h
+++ b/indra/newview/lldrawpool.h
@@ -39,8 +39,8 @@
#include "llvertexbuffer.h"
class LLFace;
-class LLImageGL;
-class LLViewerImage;
+class LLViewerTexture;
+class LLViewerFetchedTexture;
class LLSpatialGroup;
class LLDrawInfo;
@@ -77,7 +77,7 @@ public:
S32 getId() const { return mId; }
U32 getType() const { return mType; }
- virtual LLViewerImage *getDebugTexture();
+ virtual LLViewerTexture *getDebugTexture();
virtual void beginRenderPass( S32 pass );
virtual void endRenderPass( S32 pass );
virtual S32 getNumPasses();
@@ -103,9 +103,9 @@ public:
virtual BOOL verify() const { return TRUE; } // Verify that all data in the draw pool is correct!
virtual S32 getVertexShaderLevel() const { return mVertexShaderLevel; }
- static LLDrawPool* createPool(const U32 type, LLViewerImage *tex0 = NULL);
+ static LLDrawPool* createPool(const U32 type, LLViewerTexture *tex0 = NULL);
virtual LLDrawPool *instancePool() = 0; // Create an empty new instance of the pool.
- virtual LLViewerImage* getTexture() = 0;
+ virtual LLViewerTexture* getTexture() = 0;
virtual BOOL isFacePool() { return FALSE; }
virtual void resetDrawOrders() = 0;
@@ -139,8 +139,8 @@ public:
LLRenderPass(const U32 type);
virtual ~LLRenderPass();
/*virtual*/ LLDrawPool* instancePool();
- /*virtual*/ LLViewerImage* getDebugTexture() { return NULL; }
- LLViewerImage* getTexture() { return NULL; }
+ /*virtual*/ LLViewerTexture* getDebugTexture() { return NULL; }
+ LLViewerTexture* getTexture() { return NULL; }
BOOL isDead() { return FALSE; }
void resetDrawOrders() { }
@@ -169,11 +169,9 @@ public:
virtual void renderForSelect() = 0;
BOOL isDead() { return mReferences.empty(); }
- virtual void renderFaceSelected(LLFace *facep, LLImageGL *image, const LLColor4 &color,
- const S32 index_offset = 0, const S32 index_count = 0);
-
- virtual LLViewerImage *getTexture();
- virtual void dirtyTextures(const std::set<LLViewerImage*>& textures);
+
+ virtual LLViewerTexture *getTexture();
+ virtual void dirtyTextures(const std::set<LLViewerFetchedTexture*>& textures);
virtual void enqueue(LLFace *face);
virtual BOOL addFace(LLFace *face);
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 7e470bd01f..267f83f295 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -46,7 +46,7 @@
#include "lldrawable.h"
#include "llface.h"
#include "llviewercamera.h"
-#include "llviewerimagelist.h" // For debugging
+#include "llviewertexturelist.h" // For debugging
#include "llviewerobjectlist.h" // For debugging
#include "llviewerwindow.h"
#include "pipeline.h"
@@ -218,8 +218,8 @@ void LLDrawPoolAlpha::render(S32 pass)
}
gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
glColor4f(1,0,0,1);
- LLViewerImage::sSmokeImagep->addTextureStats(1024.f*1024.f);
- gGL.getTexUnit(0)->bind(LLViewerImage::sSmokeImagep.get());
+ LLViewerFetchedTexture::sSmokeImagep->addTextureStats(1024.f*1024.f);
+ gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sSmokeImagep) ;
renderAlphaHighlight(LLVertexBuffer::MAP_VERTEX |
LLVertexBuffer::MAP_TEXCOORD0);
}
@@ -294,7 +294,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask)
if (params.mTexture.notNull())
{
gGL.getTexUnit(0)->activate();
- gGL.getTexUnit(0)->bind(params.mTexture.get());
+ gGL.getTexUnit(0)->bind(params.mTexture) ;
params.mTexture->addTextureStats(params.mVSize);
if (params.mTextureMatrix)
{
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 51f4bbac5c..b15cd0b0dc 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -633,7 +633,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
if (pass==1 && (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_PARTICLES) || LLViewerPartSim::getMaxPartCount() <= 0))
{
// debug code to draw a sphere in place of avatar
- gGL.getTexUnit(0)->bind(LLViewerImage::sWhiteImagep.get());
+ gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sWhiteImagep);
gGL.setColorMask(true, true);
LLVector3 pos = avatarp->getPositionAgent();
gGL.color4f(1.0f, 1.0f, 1.0f, 0.7f);
@@ -819,7 +819,7 @@ void LLDrawPoolAvatar::renderForSelect()
//-----------------------------------------------------------------------------
// getDebugTexture()
//-----------------------------------------------------------------------------
-LLViewerImage *LLDrawPoolAvatar::getDebugTexture()
+LLViewerTexture *LLDrawPoolAvatar::getDebugTexture()
{
if (mReferences.empty())
{
diff --git a/indra/newview/lldrawpoolavatar.h b/indra/newview/lldrawpoolavatar.h
index 1e2630e1fb..6a2b7fc218 100644
--- a/indra/newview/lldrawpoolavatar.h
+++ b/indra/newview/lldrawpoolavatar.h
@@ -105,7 +105,7 @@ public:
void endDeferredRigid();
void endDeferredSkinned();
- /*virtual*/ LLViewerImage *getDebugTexture();
+ /*virtual*/ LLViewerTexture *getDebugTexture();
/*virtual*/ LLColor3 getDebugColor() const; // For AGP debug display
void renderAvatars(LLVOAvatar *single_avatar, S32 pass = -1); // renders only one avatar if single_avatar is not null.
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index ed6e55b7bc..971949e885 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -37,7 +37,6 @@
#include "llstl.h"
#include "llviewercontrol.h"
#include "lldir.h"
-#include "llimagegl.h"
#include "m3math.h"
#include "m4math.h"
#include "v4math.h"
@@ -51,7 +50,7 @@
#include "llsky.h"
#include "lltextureentry.h"
#include "llviewercamera.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "pipeline.h"
#include "llspatialpartition.h"
#include "llviewershadermgr.h"
@@ -143,9 +142,10 @@ void LLStandardBumpmap::restoreGL()
// llinfos << "Loading bumpmap: " << bump_image_id << " from viewerart" << llendl;
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mLabel = label;
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage =
- gImageList.getImage(LLUUID(bump_image_id),
+ LLViewerTextureManager::getFetchedTexture(LLUUID(bump_image_id),
TRUE,
FALSE,
+ LLViewerTexture::LOD_TEXTURE,
0,
0);
gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setLoadedCallback(LLBumpImageList::onSourceStandardLoaded, 0, TRUE, FALSE, NULL );
@@ -569,22 +569,23 @@ void LLDrawPoolBump::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL
// static
BOOL LLDrawPoolBump::bindBumpMap(LLDrawInfo& params, S32 channel)
{
- LLImageGL* bump = NULL;
+ LLViewerTexture* bump = NULL;
U8 bump_code = params.mBump;
- LLViewerImage* tex = params.mTexture;
+ LLViewerFetchedTexture* tex = LLViewerTextureManager::staticCastToFetchedTexture(params.mTexture) ;
+ if(!tex)
+ {
+ //if the texture is not a fetched texture
+ return FALSE;
+ }
switch( bump_code )
{
- case BE_NO_BUMP:
- bump = NULL;
+ case BE_NO_BUMP:
break;
case BE_BRIGHTNESS:
case BE_DARKNESS:
- if( tex )
- {
- bump = gBumpImageList.getBrightnessDarknessImage( tex, bump_code );
- }
+ bump = gBumpImageList.getBrightnessDarknessImage( tex, bump_code );
break;
default:
@@ -812,7 +813,7 @@ LLBumpImageList::~LLBumpImageList()
void LLBumpImageList::addTextureStats(U8 bump, const LLUUID& base_image_id, F32 virtual_size)
{
bump &= TEM_BUMP_MASK;
- LLViewerImage* bump_image = gStandardBumpmapList[bump].mImage;
+ LLViewerFetchedTexture* bump_image = gStandardBumpmapList[bump].mImage;
if( bump_image )
{
bump_image->addTextureStats(virtual_size);
@@ -826,11 +827,11 @@ void LLBumpImageList::updateImages()
for (bump_image_map_t::iterator iter = mBrightnessEntries.begin(); iter != mBrightnessEntries.end(); )
{
bump_image_map_t::iterator curiter = iter++;
- LLImageGL* image = curiter->second;
+ LLViewerTexture* image = curiter->second;
if( image )
{
BOOL destroy = TRUE;
- if( image->getHasGLTexture())
+ if( image->hasValidGLTexture())
{
if( image->getBoundRecently() )
{
@@ -853,11 +854,11 @@ void LLBumpImageList::updateImages()
for (bump_image_map_t::iterator iter = mDarknessEntries.begin(); iter != mDarknessEntries.end(); )
{
bump_image_map_t::iterator curiter = iter++;
- LLImageGL* image = curiter->second;
+ LLViewerTexture* image = curiter->second;
if( image )
{
BOOL destroy = TRUE;
- if( image->getHasGLTexture())
+ if( image->hasValidGLTexture())
{
if( image->getBoundRecently() )
{
@@ -881,16 +882,16 @@ void LLBumpImageList::updateImages()
// Note: the caller SHOULD NOT keep the pointer that this function returns. It may be updated as more data arrives.
-LLImageGL* LLBumpImageList::getBrightnessDarknessImage(LLViewerImage* src_image, U8 bump_code )
+LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedTexture* src_image, U8 bump_code )
{
llassert( (bump_code == BE_BRIGHTNESS) || (bump_code == BE_DARKNESS) );
- LLImageGL* bump = NULL;
+ LLViewerTexture* bump = NULL;
const F32 BRIGHTNESS_DARKNESS_PIXEL_AREA_THRESHOLD = 1000;
- if( src_image->mMaxVirtualSize > BRIGHTNESS_DARKNESS_PIXEL_AREA_THRESHOLD )
+ if( src_image->getMaxVirtualSize() > BRIGHTNESS_DARKNESS_PIXEL_AREA_THRESHOLD )
{
bump_image_map_t* entries_list = NULL;
- void (*callback_func)( BOOL success, LLViewerImage *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata ) = NULL;
+ void (*callback_func)( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata ) = NULL;
switch( bump_code )
{
@@ -917,14 +918,8 @@ LLImageGL* LLBumpImageList::getBrightnessDarknessImage(LLViewerImage* src_image,
LLPointer<LLImageRaw> raw = new LLImageRaw(1,1,1);
raw->clear(0x77, 0x77, 0x77, 0xFF);
- //------------------------------
- bump = new LLImageGL( raw, TRUE);
- //immediately assign bump to a global smart pointer in case some local smart pointer
- //accidently releases it.
- (*entries_list)[src_image->getID()] = bump;
- //------------------------------
-
- bump->setExplicitFormat(GL_ALPHA8, GL_ALPHA);
+ (*entries_list)[src_image->getID()] = LLViewerTextureManager::getLocalTexture( raw.get(), TRUE);
+ (*entries_list)[src_image->getID()]->setExplicitFormat(GL_ALPHA8, GL_ALPHA);
// Note: this may create an LLImageGL immediately
src_image->setLoadedCallback( callback_func, 0, TRUE, FALSE, new LLUUID(src_image->getID()) );
@@ -940,7 +935,7 @@ LLImageGL* LLBumpImageList::getBrightnessDarknessImage(LLViewerImage* src_image,
// static
-void LLBumpImageList::onSourceBrightnessLoaded( BOOL success, LLViewerImage *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata )
+void LLBumpImageList::onSourceBrightnessLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata )
{
LLUUID* source_asset_id = (LLUUID*)userdata;
LLBumpImageList::onSourceLoaded( success, src_vi, src, *source_asset_id, BE_BRIGHTNESS );
@@ -951,7 +946,7 @@ void LLBumpImageList::onSourceBrightnessLoaded( BOOL success, LLViewerImage *src
}
// static
-void LLBumpImageList::onSourceDarknessLoaded( BOOL success, LLViewerImage *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata )
+void LLBumpImageList::onSourceDarknessLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata )
{
LLUUID* source_asset_id = (LLUUID*)userdata;
LLBumpImageList::onSourceLoaded( success, src_vi, src, *source_asset_id, BE_DARKNESS );
@@ -961,7 +956,7 @@ void LLBumpImageList::onSourceDarknessLoaded( BOOL success, LLViewerImage *src_v
}
}
-void LLBumpImageList::onSourceStandardLoaded( BOOL success, LLViewerImage* src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata)
+void LLBumpImageList::onSourceStandardLoaded( BOOL success, LLViewerFetchedTexture* src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata)
{
if (success && LLPipeline::sRenderDeferred)
{
@@ -1028,7 +1023,7 @@ void LLBumpImageList::generateNormalMapFromAlpha(LLImageRaw* src, LLImageRaw* nr
}
// static
-void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerImage *src_vi, LLImageRaw* src, LLUUID& source_asset_id, EBumpEffect bump_code )
+void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLImageRaw* src, LLUUID& source_asset_id, EBumpEffect bump_code )
{
if( success )
{
@@ -1147,7 +1142,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerImage *src_vi, LLIma
//---------------------------------------------------
//immediately assign bump to a global smart pointer in case some local smart pointer
//accidently releases it.
- LLPointer<LLImageGL> bump = new LLImageGL( TRUE);
+ LLPointer<LLViewerTexture> bump = LLViewerTextureManager::getLocalTexture( TRUE);
if (!LLPipeline::sRenderDeferred)
{
@@ -1220,7 +1215,7 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture)
{
if (params.mTexture.notNull())
{
- gGL.getTexUnit(diffuse_channel)->bind(params.mTexture.get());
+ gGL.getTexUnit(diffuse_channel)->bind(params.mTexture) ;
params.mTexture->addTextureStats(params.mVSize);
}
else
diff --git a/indra/newview/lldrawpoolbump.h b/indra/newview/lldrawpoolbump.h
index 34c1e9c29f..bf940cf1e4 100644
--- a/indra/newview/lldrawpoolbump.h
+++ b/indra/newview/lldrawpoolbump.h
@@ -41,6 +41,7 @@
class LLImageRaw;
class LLSpatialGroup;
class LLDrawInfo;
+class LLViewerFetchedTexture;
class LLDrawPoolBump : public LLRenderPass
{
@@ -110,7 +111,7 @@ public:
LLStandardBumpmap( const std::string& label ) : mLabel(label) {}
std::string mLabel;
- LLPointer<LLViewerImage> mImage;
+ LLPointer<LLViewerFetchedTexture> mImage;
static U32 sStandardBumpmapCount; // Number of valid values in gStandardBumpmapList[]
@@ -140,21 +141,20 @@ public:
void updateImages();
- LLImageGL* getBrightnessDarknessImage(LLViewerImage* src_image, U8 bump_code);
-// LLImageGL* getTestImage();
+ LLViewerTexture* getBrightnessDarknessImage(LLViewerFetchedTexture* src_image, U8 bump_code);
void addTextureStats(U8 bump, const LLUUID& base_image_id, F32 virtual_size);
- static void onSourceBrightnessLoaded( BOOL success, LLViewerImage *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata );
- static void onSourceDarknessLoaded( BOOL success, LLViewerImage *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata );
- static void onSourceStandardLoaded( BOOL success, LLViewerImage *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata );
+ static void onSourceBrightnessLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata );
+ static void onSourceDarknessLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata );
+ static void onSourceStandardLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata );
static void generateNormalMapFromAlpha(LLImageRaw* src, LLImageRaw* nrm_image);
private:
- static void onSourceLoaded( BOOL success, LLViewerImage *src_vi, LLImageRaw* src, LLUUID& source_asset_id, EBumpEffect bump );
+ static void onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLImageRaw* src, LLUUID& source_asset_id, EBumpEffect bump );
private:
- typedef std::map<LLUUID, LLPointer<LLImageGL> > bump_image_map_t;
+ typedef std::map<LLUUID, LLPointer<LLViewerTexture> > bump_image_map_t;
bump_image_map_t mBrightnessEntries;
bump_image_map_t mDarknessEntries;
};
diff --git a/indra/newview/lldrawpoolsky.cpp b/indra/newview/lldrawpoolsky.cpp
index a9e0948ecf..8428be194f 100644
--- a/indra/newview/lldrawpoolsky.cpp
+++ b/indra/newview/lldrawpoolsky.cpp
@@ -41,7 +41,7 @@
#include "llface.h"
#include "llsky.h"
#include "llviewercamera.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerregion.h"
#include "llvosky.h"
#include "llworld.h" // To get water height
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index 2c644b0fd5..a01c9026c8 100644
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -49,7 +49,7 @@
#include "llviewerparceloverlay.h"
#include "llvosurfacepatch.h"
#include "llviewercamera.h"
-#include "llviewerimagelist.h" // To get alpha gradients
+#include "llviewertexturelist.h" // To get alpha gradients
#include "llworld.h"
#include "pipeline.h"
#include "llviewershadermgr.h"
@@ -62,28 +62,32 @@ S32 LLDrawPoolTerrain::sDetailMode = 1;
F32 LLDrawPoolTerrain::sDetailScale = DETAIL_SCALE;
static LLGLSLShader* sShader = NULL;
-LLDrawPoolTerrain::LLDrawPoolTerrain(LLViewerImage *texturep) :
+LLDrawPoolTerrain::LLDrawPoolTerrain(LLViewerTexture *texturep) :
LLFacePool(POOL_TERRAIN),
mTexturep(texturep)
{
// Hack!
sDetailScale = 1.f/gSavedSettings.getF32("RenderTerrainScale");
sDetailMode = gSavedSettings.getS32("RenderTerrainDetail");
- mAlphaRampImagep = gImageList.getImageFromFile("alpha_gradient.tga",
- TRUE, TRUE, GL_ALPHA8, GL_ALPHA,
+ mAlphaRampImagep = LLViewerTextureManager::getFetchedTextureFromFile("alpha_gradient.tga",
+ TRUE, TRUE,
+ LLViewerTexture::FETCHED_TEXTURE,
+ GL_ALPHA8, GL_ALPHA,
LLUUID("e97cf410-8e61-7005-ec06-629eba4cd1fb"));
- gGL.getTexUnit(0)->bind(mAlphaRampImagep.get());
+ gGL.getTexUnit(0)->bind(mAlphaRampImagep);
mAlphaRampImagep->setAddressMode(LLTexUnit::TAM_CLAMP);
- m2DAlphaRampImagep = gImageList.getImageFromFile("alpha_gradient_2d.j2c",
- TRUE, TRUE, GL_ALPHA8, GL_ALPHA,
+ m2DAlphaRampImagep = LLViewerTextureManager::getFetchedTextureFromFile("alpha_gradient_2d.j2c",
+ TRUE, TRUE,
+ LLViewerTexture::FETCHED_TEXTURE,
+ GL_ALPHA8, GL_ALPHA,
LLUUID("38b86f85-2575-52a9-a531-23108d8da837"));
- gGL.getTexUnit(0)->bind(m2DAlphaRampImagep.get());
+ gGL.getTexUnit(0)->bind(m2DAlphaRampImagep);
m2DAlphaRampImagep->setAddressMode(LLTexUnit::TAM_CLAMP);
- mTexturep->setBoostLevel(LLViewerImage::BOOST_TERRAIN);
+ mTexturep->setBoostLevel(LLViewerTexture::BOOST_TERRAIN);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
}
@@ -170,7 +174,7 @@ void LLDrawPoolTerrain::render(S32 pass)
LLVLComposition *compp = regionp->getComposition();
for (S32 i = 0; i < 4; i++)
{
- compp->mDetailTextures[i]->setBoostLevel(LLViewerImage::BOOST_TERRAIN);
+ compp->mDetailTextures[i]->setBoostLevel(LLViewerTexture::BOOST_TERRAIN);
compp->mDetailTextures[i]->addTextureStats(1024.f*1024.f); // assume large pixel area
}
@@ -289,10 +293,10 @@ void LLDrawPoolTerrain::renderFullShader()
// Hack! Get the region that this draw pool is rendering from!
LLViewerRegion *regionp = mDrawFace[0]->getDrawable()->getVObj()->getRegion();
LLVLComposition *compp = regionp->getComposition();
- LLViewerImage *detail_texture0p = compp->mDetailTextures[0];
- LLViewerImage *detail_texture1p = compp->mDetailTextures[1];
- LLViewerImage *detail_texture2p = compp->mDetailTextures[2];
- LLViewerImage *detail_texture3p = compp->mDetailTextures[3];
+ LLViewerTexture *detail_texture0p = compp->mDetailTextures[0];
+ LLViewerTexture *detail_texture1p = compp->mDetailTextures[1];
+ LLViewerTexture *detail_texture2p = compp->mDetailTextures[2];
+ LLViewerTexture *detail_texture3p = compp->mDetailTextures[3];
LLVector3d region_origin_global = gAgent.getRegion()->getOriginGlobal();
F32 offset_x = (F32)fmod(region_origin_global.mdV[VX], 1.0/(F64)sDetailScale)*sDetailScale;
@@ -363,7 +367,7 @@ void LLDrawPoolTerrain::renderFullShader()
// Alpha Ramp
//
S32 alpha_ramp = sShader->enableTexture(LLViewerShaderMgr::TERRAIN_ALPHARAMP);
- gGL.getTexUnit(alpha_ramp)->bind(m2DAlphaRampImagep.get());
+ gGL.getTexUnit(alpha_ramp)->bind(m2DAlphaRampImagep);
// GL_BLEND disabled by default
drawLoop();
@@ -429,10 +433,10 @@ void LLDrawPoolTerrain::renderFull4TU()
// Hack! Get the region that this draw pool is rendering from!
LLViewerRegion *regionp = mDrawFace[0]->getDrawable()->getVObj()->getRegion();
LLVLComposition *compp = regionp->getComposition();
- LLViewerImage *detail_texture0p = compp->mDetailTextures[0];
- LLViewerImage *detail_texture1p = compp->mDetailTextures[1];
- LLViewerImage *detail_texture2p = compp->mDetailTextures[2];
- LLViewerImage *detail_texture3p = compp->mDetailTextures[3];
+ LLViewerTexture *detail_texture0p = compp->mDetailTextures[0];
+ LLViewerTexture *detail_texture1p = compp->mDetailTextures[1];
+ LLViewerTexture *detail_texture2p = compp->mDetailTextures[2];
+ LLViewerTexture *detail_texture3p = compp->mDetailTextures[3];
LLVector3d region_origin_global = gAgent.getRegion()->getOriginGlobal();
F32 offset_x = (F32)fmod(region_origin_global.mdV[VX], 1.0/(F64)sDetailScale)*sDetailScale;
@@ -527,7 +531,7 @@ void LLDrawPoolTerrain::renderFull4TU()
//
// Stage 1: Generate alpha ramp for detail2/detail3 transition
//
- gGL.getTexUnit(1)->bind(m2DAlphaRampImagep.get());
+ gGL.getTexUnit(1)->bind(m2DAlphaRampImagep);
gGL.getTexUnit(1)->enable(LLTexUnit::TT_TEXTURE);
gGL.getTexUnit(1)->activate();
@@ -559,7 +563,7 @@ void LLDrawPoolTerrain::renderFull4TU()
//
// Stage 3: Generate alpha ramp for detail1/detail2 transition
//
- gGL.getTexUnit(3)->bind(m2DAlphaRampImagep.get());
+ gGL.getTexUnit(3)->bind(m2DAlphaRampImagep);
gGL.getTexUnit(3)->enable(LLTexUnit::TT_TEXTURE);
gGL.getTexUnit(3)->activate();
@@ -630,10 +634,10 @@ void LLDrawPoolTerrain::renderFull2TU()
// Hack! Get the region that this draw pool is rendering from!
LLViewerRegion *regionp = mDrawFace[0]->getDrawable()->getVObj()->getRegion();
LLVLComposition *compp = regionp->getComposition();
- LLViewerImage *detail_texture0p = compp->mDetailTextures[0];
- LLViewerImage *detail_texture1p = compp->mDetailTextures[1];
- LLViewerImage *detail_texture2p = compp->mDetailTextures[2];
- LLViewerImage *detail_texture3p = compp->mDetailTextures[3];
+ LLViewerTexture *detail_texture0p = compp->mDetailTextures[0];
+ LLViewerTexture *detail_texture1p = compp->mDetailTextures[1];
+ LLViewerTexture *detail_texture2p = compp->mDetailTextures[2];
+ LLViewerTexture *detail_texture3p = compp->mDetailTextures[3];
LLVector3d region_origin_global = gAgent.getRegion()->getOriginGlobal();
F32 offset_x = (F32)fmod(region_origin_global.mdV[VX], 1.0/(F64)sDetailScale)*sDetailScale;
@@ -671,7 +675,7 @@ void LLDrawPoolTerrain::renderFull2TU()
//
// Stage 0: Generate alpha ramp for detail0/detail1 transition
//
- gGL.getTexUnit(0)->bind(m2DAlphaRampImagep.get());
+ gGL.getTexUnit(0)->bind(m2DAlphaRampImagep);
glDisable(GL_TEXTURE_GEN_S);
glDisable(GL_TEXTURE_GEN_T);
@@ -709,7 +713,7 @@ void LLDrawPoolTerrain::renderFull2TU()
//
// Stage 0: Generate alpha ramp for detail1/detail2 transition
//
- gGL.getTexUnit(0)->bind(m2DAlphaRampImagep.get());
+ gGL.getTexUnit(0)->bind(m2DAlphaRampImagep);
// Set the texture matrix
glMatrixMode(GL_TEXTURE);
@@ -749,7 +753,7 @@ void LLDrawPoolTerrain::renderFull2TU()
// Stage 0: Generate alpha ramp for detail2/detail3 transition
//
gGL.getTexUnit(0)->activate();
- gGL.getTexUnit(0)->bind(m2DAlphaRampImagep.get());
+ gGL.getTexUnit(0)->bind(m2DAlphaRampImagep);
// Set the texture matrix
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
@@ -822,7 +826,7 @@ void LLDrawPoolTerrain::renderSimple()
gGL.getTexUnit(0)->activate();
gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
- gGL.getTexUnit(0)->bind(mTexturep.get());
+ gGL.getTexUnit(0)->bind(mTexturep);
LLVector3 origin_agent = mDrawFace[0]->getDrawable()->getVObj()->getRegion()->getOriginAgent();
F32 tscale = 1.f/256.f;
@@ -872,7 +876,7 @@ void LLDrawPoolTerrain::renderOwnership()
LLSurface *surfacep = surface_patchp->getSurface();
LLViewerRegion *regionp = surfacep->getRegion();
LLViewerParcelOverlay *overlayp = regionp->getParcelOverlay();
- LLImageGL *texturep = overlayp->getTexture();
+ LLViewerTexture *texturep = overlayp->getTexture();
gGL.getTexUnit(0)->bind(texturep);
@@ -920,9 +924,10 @@ void LLDrawPoolTerrain::renderForSelect()
}
}
-void LLDrawPoolTerrain::dirtyTextures(const std::set<LLViewerImage*>& textures)
+void LLDrawPoolTerrain::dirtyTextures(const std::set<LLViewerFetchedTexture*>& textures)
{
- if (textures.find(mTexturep) != textures.end())
+ LLViewerFetchedTexture* tex = LLViewerTextureManager::staticCastToFetchedTexture(mTexturep) ;
+ if (tex && textures.find(tex) != textures.end())
{
for (std::vector<LLFace*>::iterator iter = mReferences.begin();
iter != mReferences.end(); iter++)
@@ -933,12 +938,12 @@ void LLDrawPoolTerrain::dirtyTextures(const std::set<LLViewerImage*>& textures)
}
}
-LLViewerImage *LLDrawPoolTerrain::getTexture()
+LLViewerTexture *LLDrawPoolTerrain::getTexture()
{
return mTexturep;
}
-LLViewerImage *LLDrawPoolTerrain::getDebugTexture()
+LLViewerTexture *LLDrawPoolTerrain::getDebugTexture()
{
return mTexturep;
}
diff --git a/indra/newview/lldrawpoolterrain.h b/indra/newview/lldrawpoolterrain.h
index 19d09e2feb..2e2a36d533 100644
--- a/indra/newview/lldrawpoolterrain.h
+++ b/indra/newview/lldrawpoolterrain.h
@@ -37,7 +37,7 @@
class LLDrawPoolTerrain : public LLFacePool
{
- LLPointer<LLViewerImage> mTexturep;
+ LLPointer<LLViewerTexture> mTexturep;
public:
enum
{
@@ -53,7 +53,7 @@ public:
virtual U32 getVertexDataMask();
static S32 getDetailMode();
- LLDrawPoolTerrain(LLViewerImage *texturep);
+ LLDrawPoolTerrain(LLViewerTexture *texturep);
virtual ~LLDrawPoolTerrain();
/*virtual*/ LLDrawPool *instancePool();
@@ -73,14 +73,14 @@ public:
/*virtual*/ void beginRenderPass( S32 pass );
/*virtual*/ void endRenderPass( S32 pass );
/*virtual*/ void renderForSelect();
- /*virtual*/ void dirtyTextures(const std::set<LLViewerImage*>& textures);
- /*virtual*/ LLViewerImage *getTexture();
- /*virtual*/ LLViewerImage *getDebugTexture();
+ /*virtual*/ void dirtyTextures(const std::set<LLViewerFetchedTexture*>& textures);
+ /*virtual*/ LLViewerTexture *getTexture();
+ /*virtual*/ LLViewerTexture *getDebugTexture();
/*virtual*/ LLColor3 getDebugColor() const; // For AGP debug display
- LLPointer<LLViewerImage> mAlphaRampImagep;
- LLPointer<LLViewerImage> m2DAlphaRampImagep;
- LLPointer<LLViewerImage> mAlphaNoiseImagep;
+ LLPointer<LLViewerTexture> mAlphaRampImagep;
+ LLPointer<LLViewerTexture> m2DAlphaRampImagep;
+ LLPointer<LLViewerTexture> mAlphaNoiseImagep;
static S32 sDetailMode;
static F32 sDetailScale; // meters per texture
diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp
index 22634d96b0..f572e2cb44 100644
--- a/indra/newview/lldrawpooltree.cpp
+++ b/indra/newview/lldrawpooltree.cpp
@@ -47,11 +47,11 @@
S32 LLDrawPoolTree::sDiffTex = 0;
static LLGLSLShader* shader = NULL;
-LLDrawPoolTree::LLDrawPoolTree(LLViewerImage *texturep) :
+LLDrawPoolTree::LLDrawPoolTree(LLViewerTexture *texturep) :
LLFacePool(POOL_TREE),
mTexturep(texturep)
{
- gGL.getTexUnit(0)->bind(mTexturep.get());
+ gGL.getTexUnit(0)->bind(mTexturep);
mTexturep->setAddressMode(LLTexUnit::TAM_WRAP);
}
@@ -246,7 +246,7 @@ void LLDrawPoolTree::renderTree(BOOL selecting)
LLGLState normalize(GL_NORMALIZE, TRUE);
// Bind the texture for this tree.
- gGL.getTexUnit(sDiffTex)->bind(mTexturep.get());
+ gGL.getTexUnit(sDiffTex)->bind(mTexturep);
U32 indices_drawn = 0;
@@ -376,12 +376,12 @@ BOOL LLDrawPoolTree::verify() const
return TRUE;
}
-LLViewerImage *LLDrawPoolTree::getTexture()
+LLViewerTexture *LLDrawPoolTree::getTexture()
{
return mTexturep;
}
-LLViewerImage *LLDrawPoolTree::getDebugTexture()
+LLViewerTexture *LLDrawPoolTree::getDebugTexture()
{
return mTexturep;
}
diff --git a/indra/newview/lldrawpooltree.h b/indra/newview/lldrawpooltree.h
index 80c4fdfffe..bc7711d4e8 100644
--- a/indra/newview/lldrawpooltree.h
+++ b/indra/newview/lldrawpooltree.h
@@ -37,7 +37,7 @@
class LLDrawPoolTree : public LLFacePool
{
- LLPointer<LLViewerImage> mTexturep;
+ LLPointer<LLViewerTexture> mTexturep;
public:
enum
{
@@ -48,7 +48,7 @@ public:
virtual U32 getVertexDataMask() { return VERTEX_DATA_MASK; }
- LLDrawPoolTree(LLViewerImage *texturep);
+ LLDrawPoolTree(LLViewerTexture *texturep);
/*virtual*/ LLDrawPool *instancePool();
@@ -70,8 +70,8 @@ public:
/*virtual*/ S32 getNumPasses() { return 1; }
/*virtual*/ void renderForSelect();
/*virtual*/ BOOL verify() const;
- /*virtual*/ LLViewerImage *getTexture();
- /*virtual*/ LLViewerImage *getDebugTexture();
+ /*virtual*/ LLViewerTexture *getTexture();
+ /*virtual*/ LLViewerTexture *getDebugTexture();
/*virtual*/ LLColor3 getDebugColor() const; // For AGP debug display
static S32 sDiffTex;
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index 4a593ac4f8..16623ca2b6 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -45,7 +45,7 @@
#include "lldrawable.h"
#include "llface.h"
#include "llsky.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerregion.h"
#include "llvosky.h"
#include "llvowater.h"
@@ -69,17 +69,17 @@ LLVector3 LLDrawPoolWater::sLightDir;
LLDrawPoolWater::LLDrawPoolWater() :
LLFacePool(POOL_WATER)
{
- mHBTex[0] = gImageList.getImage(gSunTextureID, TRUE, TRUE);
- gGL.getTexUnit(0)->bind(mHBTex[0].get());
+ mHBTex[0] = LLViewerTextureManager::getFetchedTexture(gSunTextureID, TRUE, TRUE);
+ gGL.getTexUnit(0)->bind(mHBTex[0]) ;
mHBTex[0]->setAddressMode(LLTexUnit::TAM_CLAMP);
- mHBTex[1] = gImageList.getImage(gMoonTextureID, TRUE, TRUE);
- gGL.getTexUnit(0)->bind(mHBTex[1].get());
+ mHBTex[1] = LLViewerTextureManager::getFetchedTexture(gMoonTextureID, TRUE, TRUE);
+ gGL.getTexUnit(0)->bind(mHBTex[1]);
mHBTex[1]->setAddressMode(LLTexUnit::TAM_CLAMP);
- mWaterImagep = gImageList.getImage(WATER_TEST);
+ mWaterImagep = LLViewerTextureManager::getFetchedTexture(WATER_TEST);
mWaterImagep->setNoDelete() ;
- mWaterNormp = gImageList.getImage(DEFAULT_WATER_NORMAL);
+ mWaterNormp = LLViewerTextureManager::getFetchedTexture(DEFAULT_WATER_NORMAL);
mWaterNormp->setNoDelete() ;
restoreGL();
@@ -184,7 +184,7 @@ void LLDrawPoolWater::render(S32 pass)
mWaterImagep->addTextureStats(1024.f*1024.f);
gGL.getTexUnit(1)->activate();
gGL.getTexUnit(1)->enable(LLTexUnit::TT_TEXTURE);
- gGL.getTexUnit(1)->bind(mWaterImagep.get());
+ gGL.getTexUnit(1)->bind(mWaterImagep) ;
LLVector3 camera_up = LLViewerCamera::getInstance()->getUpAxis();
F32 up_dot = camera_up * LLVector3::z_axis;
@@ -329,7 +329,7 @@ void LLDrawPoolWater::renderReflection(LLFace* face)
LLGLSNoFog noFog;
- gGL.getTexUnit(0)->bind(mHBTex[dr].get());
+ gGL.getTexUnit(0)->bind(mHBTex[dr]);
LLOverrideFaceColor override(this, face->getFaceColor().mV);
face->renderIndexed();
@@ -419,11 +419,11 @@ void LLDrawPoolWater::shade()
// change mWaterNormp if needed
if (mWaterNormp->getID() != param_mgr->getNormalMapID())
{
- mWaterNormp = gImageList.getImage(param_mgr->getNormalMapID());
+ mWaterNormp = LLViewerTextureManager::getFetchedTexture(param_mgr->getNormalMapID());
}
mWaterNormp->addTextureStats(1024.f*1024.f);
- gGL.getTexUnit(bumpTex)->bind(mWaterNormp.get());
+ gGL.getTexUnit(bumpTex)->bind(mWaterNormp) ;
if (gSavedSettings.getBOOL("RenderWaterMipNormal"))
{
mWaterNormp->setFilteringOption(LLTexUnit::TFO_ANISOTROPIC);
@@ -587,20 +587,9 @@ void LLDrawPoolWater::renderForSelect()
return;
}
-
-void LLDrawPoolWater::renderFaceSelected(LLFace *facep,
- LLImageGL *image,
- const LLColor4 &color,
- const S32 index_offset, const S32 index_count)
-{
- // Can't select water
- return;
-}
-
-
-LLViewerImage *LLDrawPoolWater::getDebugTexture()
+LLViewerTexture *LLDrawPoolWater::getDebugTexture()
{
- return LLViewerImage::sSmokeImagep;
+ return LLViewerFetchedTexture::sSmokeImagep;
}
LLColor3 LLDrawPoolWater::getDebugColor() const
diff --git a/indra/newview/lldrawpoolwater.h b/indra/newview/lldrawpoolwater.h
index 6351041140..e28ac1cfab 100644
--- a/indra/newview/lldrawpoolwater.h
+++ b/indra/newview/lldrawpoolwater.h
@@ -43,9 +43,9 @@ class LLWaterSurface;
class LLDrawPoolWater: public LLFacePool
{
protected:
- LLPointer<LLViewerImage> mHBTex[2];
- LLPointer<LLViewerImage> mWaterImagep;
- LLPointer<LLViewerImage> mWaterNormp;
+ LLPointer<LLViewerTexture> mHBTex[2];
+ LLPointer<LLViewerTexture> mWaterImagep;
+ LLPointer<LLViewerTexture> mWaterNormp;
const LLWaterSurface *mWaterSurface;
public:
@@ -78,12 +78,10 @@ public:
/*virtual*/ S32 getNumPasses();
/*virtual*/ void render(S32 pass = 0);
- /*virtual*/ void renderFaceSelected(LLFace *facep, LLImageGL *image, const LLColor4 &color,
- const S32 index_offset = 0, const S32 index_count = 0);
/*virtual*/ void prerender();
/*virtual*/ void renderForSelect();
- /*virtual*/ LLViewerImage *getDebugTexture();
+ /*virtual*/ LLViewerTexture *getDebugTexture();
/*virtual*/ LLColor3 getDebugColor() const; // For AGP debug display
void renderReflection(LLFace* face);
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index 6ff65c7ed0..917b6fafbc 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -47,7 +47,7 @@
#include "llface.h"
#include "llrender.h"
-LLPointer<LLImageGL> LLDrawPoolWLSky::sCloudNoiseTexture = NULL;
+LLPointer<LLViewerTexture> LLDrawPoolWLSky::sCloudNoiseTexture = NULL;
LLPointer<LLImageRaw> LLDrawPoolWLSky::sCloudNoiseRawImage = NULL;
@@ -71,7 +71,7 @@ LLDrawPoolWLSky::LLDrawPoolWLSky(void) :
cloudNoiseFile->decode(sCloudNoiseRawImage, 0.0f);
- LLImageGL::create(sCloudNoiseTexture, sCloudNoiseRawImage, TRUE);
+ sCloudNoiseTexture = LLViewerTextureManager::getLocalTexture(sCloudNoiseRawImage.get(), TRUE);
LLWLParamManager::instance()->propagateParameters();
}
@@ -83,7 +83,7 @@ LLDrawPoolWLSky::~LLDrawPoolWLSky()
sCloudNoiseRawImage = NULL;
}
-LLViewerImage *LLDrawPoolWLSky::getDebugTexture()
+LLViewerTexture *LLDrawPoolWLSky::getDebugTexture()
{
return NULL;
}
@@ -224,7 +224,7 @@ void LLDrawPoolWLSky::renderHeavenlyBodies()
LLFace * face = gSky.mVOSkyp->mFace[LLVOSky::FACE_SUN];
if (gSky.mVOSkyp->getSun().getDraw() && face->getGeomCount())
{
- LLImageGL * tex = face->getTexture();
+ LLViewerTexture * tex = face->getTexture();
gGL.getTexUnit(0)->bind(tex);
LLColor4 color(gSky.mVOSkyp->getSun().getInterpColor());
LLFacePool::LLOverrideFaceColor color_override(this, color);
@@ -239,8 +239,7 @@ void LLDrawPoolWLSky::renderHeavenlyBodies()
// *NOTE: even though we already bound this texture above for the
// stars register combiners, we bind again here for defensive reasons,
// since LLImageGL::bind detects that it's a noop, and optimizes it out.
- LLImageGL * tex = face->getTexture();
- gGL.getTexUnit(0)->bind(tex);
+ gGL.getTexUnit(0)->bind(face->getTexture());
LLColor4 color(gSky.mVOSkyp->getMoon().getInterpColor());
F32 a = gSky.mVOSkyp->getMoon().getDirection().mV[2];
if (a > 0.f)
@@ -280,9 +279,8 @@ void LLDrawPoolWLSky::render(S32 pass)
// *NOTE: have to bind a texture here since register combiners blending in
// renderStars() requires something to be bound and we might as well only
- // bind the moon's texture once.
- LLImageGL * tex = gSky.mVOSkyp->mFace[LLVOSky::FACE_MOON]->getTexture();
- gGL.getTexUnit(0)->bind(tex);
+ // bind the moon's texture once.
+ gGL.getTexUnit(0)->bind(gSky.mVOSkyp->mFace[LLVOSky::FACE_MOON]->getTexture());
renderHeavenlyBodies();
@@ -306,7 +304,7 @@ LLDrawPoolWLSky *LLDrawPoolWLSky::instancePool()
return new LLDrawPoolWLSky();
}
-LLViewerImage* LLDrawPoolWLSky::getTexture()
+LLViewerTexture* LLDrawPoolWLSky::getTexture()
{
return NULL;
}
@@ -324,5 +322,5 @@ void LLDrawPoolWLSky::cleanupGL()
//static
void LLDrawPoolWLSky::restoreGL()
{
- LLImageGL::create(sCloudNoiseTexture, sCloudNoiseRawImage, TRUE);
+ sCloudNoiseTexture = LLViewerTextureManager::getLocalTexture(sCloudNoiseRawImage.get(), TRUE);
}
diff --git a/indra/newview/lldrawpoolwlsky.h b/indra/newview/lldrawpoolwlsky.h
index c7a1f3fe27..7ff760ac39 100644
--- a/indra/newview/lldrawpoolwlsky.h
+++ b/indra/newview/lldrawpoolwlsky.h
@@ -55,7 +55,7 @@ public:
/*virtual*/ void endPostDeferredPass(S32 pass) { endRenderPass(pass); }
/*virtual*/ void renderPostDeferred(S32 pass) { render(pass); }
- /*virtual*/ LLViewerImage *getDebugTexture();
+ /*virtual*/ LLViewerTexture *getDebugTexture();
/*virtual*/ void beginRenderPass( S32 pass );
/*virtual*/ void endRenderPass( S32 pass );
/*virtual*/ S32 getNumPasses() { return 1; }
@@ -65,11 +65,11 @@ public:
/*virtual*/ BOOL verify() const { return TRUE; } // Verify that all data in the draw pool is correct!
/*virtual*/ S32 getVertexShaderLevel() const { return mVertexShaderLevel; }
- //static LLDrawPool* createPool(const U32 type, LLViewerImage *tex0 = NULL);
+ //static LLDrawPool* createPool(const U32 type, LLViewerTexture *tex0 = NULL);
// Create an empty new instance of the pool.
/*virtual*/ LLDrawPoolWLSky *instancePool(); ///< covariant override
- /*virtual*/ LLViewerImage* getTexture();
+ /*virtual*/ LLViewerTexture* getTexture();
/*virtual*/ BOOL isFacePool() { return FALSE; }
/*virtual*/ void resetDrawOrders();
@@ -83,7 +83,7 @@ private:
void renderHeavenlyBodies();
private:
- static LLPointer<LLImageGL> sCloudNoiseTexture;
+ static LLPointer<LLViewerTexture> sCloudNoiseTexture;
static LLPointer<LLImageRaw> sCloudNoiseRawImage;
};
diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp
index 1953c29068..0bb5edf3f9 100644
--- a/indra/newview/lldynamictexture.cpp
+++ b/indra/newview/lldynamictexture.cpp
@@ -1,6 +1,6 @@
/**
* @file lldynamictexture.cpp
- * @brief Implementation of LLDynamicTexture class
+ * @brief Implementation of LLViewerDynamicTexture class
*
* $LicenseInfo:firstyear=2001&license=viewergpl$
*
@@ -42,24 +42,20 @@
#include "llviewerwindow.h"
#include "llviewercamera.h"
#include "llviewercontrol.h"
-#include "llviewerimage.h"
+#include "llviewertexture.h"
#include "llvertexbuffer.h"
#include "llviewerdisplay.h"
#include "llrender.h"
// static
-LLDynamicTexture::instance_list_t LLDynamicTexture::sInstances[ LLDynamicTexture::ORDER_COUNT ];
-S32 LLDynamicTexture::sNumRenders = 0;
+LLViewerDynamicTexture::instance_list_t LLViewerDynamicTexture::sInstances[ LLViewerDynamicTexture::ORDER_COUNT ];
+S32 LLViewerDynamicTexture::sNumRenders = 0;
//-----------------------------------------------------------------------------
-// LLDynamicTexture()
+// LLViewerDynamicTexture()
//-----------------------------------------------------------------------------
-LLDynamicTexture::LLDynamicTexture(S32 width, S32 height, S32 components, EOrder order, BOOL clamp) :
- mWidth(width),
- mHeight(height),
- mComponents(components),
- mTexture(NULL),
- mLastBindTime(0),
+LLViewerDynamicTexture::LLViewerDynamicTexture(S32 width, S32 height, S32 components, EOrder order, BOOL clamp) :
+ LLViewerTexture(width, height, components, FALSE),
mClamp(clamp)
{
llassert((1 <= components) && (components <= 4));
@@ -67,64 +63,56 @@ LLDynamicTexture::LLDynamicTexture(S32 width, S32 height, S32 components, EOrder
generateGLTexture();
llassert( 0 <= order && order < ORDER_COUNT );
- LLDynamicTexture::sInstances[ order ].insert(this);
+ LLViewerDynamicTexture::sInstances[ order ].insert(this);
}
//-----------------------------------------------------------------------------
-// LLDynamicTexture()
+// LLViewerDynamicTexture()
//-----------------------------------------------------------------------------
-LLDynamicTexture::~LLDynamicTexture()
+LLViewerDynamicTexture::~LLViewerDynamicTexture()
{
- releaseGLTexture();
for( S32 order = 0; order < ORDER_COUNT; order++ )
{
- LLDynamicTexture::sInstances[order].erase(this); // will fail in all but one case.
+ LLViewerDynamicTexture::sInstances[order].erase(this); // will fail in all but one case.
}
}
-//-----------------------------------------------------------------------------
-// releaseGLTexture()
-//-----------------------------------------------------------------------------
-void LLDynamicTexture::releaseGLTexture()
+//virtual
+S8 LLViewerDynamicTexture::getType() const
{
- if (mTexture.notNull())
- {
-// llinfos << "RELEASING " << (mWidth*mHeight*mComponents)/1024 << "K" << llendl;
- mTexture = NULL;
- }
+ return LLViewerTexture::DYNAMIC_TEXTURE ;
}
//-----------------------------------------------------------------------------
// generateGLTexture()
//-----------------------------------------------------------------------------
-void LLDynamicTexture::generateGLTexture()
+void LLViewerDynamicTexture::generateGLTexture()
{
+ LLViewerTexture::generateGLTexture() ;
generateGLTexture(-1, 0, 0, FALSE);
}
-void LLDynamicTexture::generateGLTexture(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format, BOOL swap_bytes)
+void LLViewerDynamicTexture::generateGLTexture(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format, BOOL swap_bytes)
{
if (mComponents < 1 || mComponents > 4)
{
llerrs << "Bad number of components in dynamic texture: " << mComponents << llendl;
}
- releaseGLTexture();
- LLPointer<LLImageRaw> raw_image = new LLImageRaw(mWidth, mHeight, mComponents);
- mTexture = new LLViewerImage(mWidth, mHeight, mComponents, FALSE);
+
+ LLPointer<LLImageRaw> raw_image = new LLImageRaw(mFullWidth, mFullHeight, mComponents);
if (internal_format >= 0)
{
- mTexture->setExplicitFormat(internal_format, primary_format, type_format, swap_bytes);
+ setExplicitFormat(internal_format, primary_format, type_format, swap_bytes);
}
-// llinfos << "ALLOCATING " << (mWidth*mHeight*mComponents)/1024 << "K" << llendl;
- mTexture->createGLTexture(0, raw_image);
- mTexture->setAddressMode((mClamp) ? LLTexUnit::TAM_CLAMP : LLTexUnit::TAM_WRAP);
- mTexture->setGLTextureCreated(false);
+ createGLTexture(0, raw_image);
+ setAddressMode((mClamp) ? LLTexUnit::TAM_CLAMP : LLTexUnit::TAM_WRAP);
+ mGLTexturep->setGLTextureCreated(false);
}
//-----------------------------------------------------------------------------
// render()
//-----------------------------------------------------------------------------
-BOOL LLDynamicTexture::render()
+BOOL LLViewerDynamicTexture::render()
{
return FALSE;
}
@@ -132,13 +120,13 @@ BOOL LLDynamicTexture::render()
//-----------------------------------------------------------------------------
// preRender()
//-----------------------------------------------------------------------------
-void LLDynamicTexture::preRender(BOOL clear_depth)
+void LLViewerDynamicTexture::preRender(BOOL clear_depth)
{
{
// force rendering to on-screen portion of frame buffer
LLCoordScreen window_pos;
gViewerWindow->getWindow()->getPosition( &window_pos );
- mOrigin.set(0, gViewerWindow->getWindowDisplayHeight() - mHeight); // top left corner
+ mOrigin.set(0, gViewerWindow->getWindowDisplayHeight() - mFullHeight); // top left corner
if (window_pos.mX < 0)
{
@@ -159,7 +147,7 @@ void LLDynamicTexture::preRender(BOOL clear_depth)
mCamera.setView(LLViewerCamera::getInstance()->getView());
mCamera.setNear(LLViewerCamera::getInstance()->getNear());
- glViewport(mOrigin.mX, mOrigin.mY, mWidth, mHeight);
+ glViewport(mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight);
if (clear_depth)
{
glClear(GL_DEPTH_BUFFER_BIT);
@@ -169,12 +157,16 @@ void LLDynamicTexture::preRender(BOOL clear_depth)
//-----------------------------------------------------------------------------
// postRender()
//-----------------------------------------------------------------------------
-void LLDynamicTexture::postRender(BOOL success)
+void LLViewerDynamicTexture::postRender(BOOL success)
{
{
if (success)
{
- success = mTexture->setSubImageFromFrameBuffer(0, 0, mOrigin.mX, mOrigin.mY, mWidth, mHeight);
+ if(mGLTexturep.isNull())
+ {
+ generateGLTexture() ;
+ }
+ success = mGLTexturep->setSubImageFromFrameBuffer(0, 0, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight);
}
}
@@ -194,7 +186,7 @@ void LLDynamicTexture::postRender(BOOL success)
// updateDynamicTextures()
// Calls update on each dynamic texture. Calls each group in order: "first," then "middle," then "last."
//-----------------------------------------------------------------------------
-BOOL LLDynamicTexture::updateAllInstances()
+BOOL LLViewerDynamicTexture::updateAllInstances()
{
sNumRenders = 0;
if (gGLManager.mIsDisabled)
@@ -206,10 +198,10 @@ BOOL LLDynamicTexture::updateAllInstances()
BOOL ret = FALSE ;
for( S32 order = 0; order < ORDER_COUNT; order++ )
{
- for (instance_list_t::iterator iter = LLDynamicTexture::sInstances[order].begin();
- iter != LLDynamicTexture::sInstances[order].end(); ++iter)
+ for (instance_list_t::iterator iter = LLViewerDynamicTexture::sInstances[order].begin();
+ iter != LLViewerDynamicTexture::sInstances[order].end(); ++iter)
{
- LLDynamicTexture *dynamicTexture = *iter;
+ LLViewerDynamicTexture *dynamicTexture = *iter;
if (dynamicTexture->needsRender())
{
glClear(GL_DEPTH_BUFFER_BIT);
@@ -236,30 +228,18 @@ BOOL LLDynamicTexture::updateAllInstances()
return ret;
}
-//virtual
-void LLDynamicTexture::restoreGLTexture()
-{
- generateGLTexture() ;
-}
-
-//virtual
-void LLDynamicTexture::destroyGLTexture()
-{
- releaseGLTexture() ;
-}
-
//-----------------------------------------------------------------------------
// static
// destroyGL()
//-----------------------------------------------------------------------------
-void LLDynamicTexture::destroyGL()
+void LLViewerDynamicTexture::destroyGL()
{
for( S32 order = 0; order < ORDER_COUNT; order++ )
{
- for (instance_list_t::iterator iter = LLDynamicTexture::sInstances[order].begin();
- iter != LLDynamicTexture::sInstances[order].end(); ++iter)
+ for (instance_list_t::iterator iter = LLViewerDynamicTexture::sInstances[order].begin();
+ iter != LLViewerDynamicTexture::sInstances[order].end(); ++iter)
{
- LLDynamicTexture *dynamicTexture = *iter;
+ LLViewerDynamicTexture *dynamicTexture = *iter;
dynamicTexture->destroyGLTexture() ;
}
}
@@ -269,7 +249,7 @@ void LLDynamicTexture::destroyGL()
// static
// restoreGL()
//-----------------------------------------------------------------------------
-void LLDynamicTexture::restoreGL()
+void LLViewerDynamicTexture::restoreGL()
{
if (gGLManager.mIsDisabled)
{
@@ -278,10 +258,10 @@ void LLDynamicTexture::restoreGL()
for( S32 order = 0; order < ORDER_COUNT; order++ )
{
- for (instance_list_t::iterator iter = LLDynamicTexture::sInstances[order].begin();
- iter != LLDynamicTexture::sInstances[order].end(); ++iter)
+ for (instance_list_t::iterator iter = LLViewerDynamicTexture::sInstances[order].begin();
+ iter != LLViewerDynamicTexture::sInstances[order].end(); ++iter)
{
- LLDynamicTexture *dynamicTexture = *iter;
+ LLViewerDynamicTexture *dynamicTexture = *iter;
dynamicTexture->restoreGLTexture() ;
}
}
diff --git a/indra/newview/lldynamictexture.h b/indra/newview/lldynamictexture.h
index 22e5a4819d..2a944eaada 100644
--- a/indra/newview/lldynamictexture.h
+++ b/indra/newview/lldynamictexture.h
@@ -1,6 +1,6 @@
/**
* @file lldynamictexture.h
- * @brief Implementation of LLDynamicTexture class
+ * @brief Implementation of LLViewerDynamicTexture class
*
* $LicenseInfo:firstyear=2002&license=viewergpl$
*
@@ -36,59 +36,52 @@
#include "llcamera.h"
#include "llgl.h"
#include "llcoord.h"
-#include "llimagegl.h"
+#include "llviewertexture.h"
+#include "llcamera.h"
-class LLDynamicTexture
+class LLViewerDynamicTexture : public LLViewerTexture
{
+protected:
+ /*virtual*/ ~LLViewerDynamicTexture();
+
public:
enum EOrder { ORDER_FIRST = 0, ORDER_MIDDLE = 1, ORDER_LAST = 2, ORDER_RESET = 3, ORDER_COUNT = 4 };
- LLDynamicTexture(S32 width,
+ LLViewerDynamicTexture(S32 width,
S32 height,
S32 components, // = 4,
EOrder order, // = ORDER_MIDDLE,
BOOL clamp);
- virtual ~LLDynamicTexture();
+
+ /*virtual*/ S8 getType() const ;
S32 getOriginX() { return mOrigin.mX; }
S32 getOriginY() { return mOrigin.mY; }
- S32 getWidth() { return mWidth; }
- S32 getHeight() { return mHeight; }
- S32 getComponents() { return mComponents; }
- S32 getSize() { return mWidth * mHeight * mComponents; }
+
+ S32 getSize() { return mFullWidth * mFullHeight * mComponents; }
virtual BOOL needsRender() { return TRUE; }
virtual void preRender(BOOL clear_depth = TRUE);
virtual BOOL render();
virtual void postRender(BOOL success);
- virtual void restoreGLTexture() ;
- virtual void destroyGLTexture() ;
-
- LLImageGL* getTexture(void) const { return mTexture; }
+ virtual void restoreGLTexture() {}
+ virtual void destroyGLTexture() {}
static BOOL updateAllInstances();
-
- static void destroyGL();
- static void restoreGL();
-
+ static void destroyGL() ;
+ static void restoreGL() ;
protected:
- void releaseGLTexture();
void generateGLTexture();
void generateGLTexture(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format, BOOL swap_bytes = FALSE);
protected:
- S32 mWidth;
- S32 mHeight;
- S32 mComponents;
- LLPointer<LLImageGL> mTexture;
- F32 mLastBindTime;
BOOL mClamp;
LLCoordGL mOrigin;
-
LLCamera mCamera;
- typedef std::set<LLDynamicTexture*> instance_list_t;
- static instance_list_t sInstances[ LLDynamicTexture::ORDER_COUNT ];
+
+ typedef std::set<LLViewerDynamicTexture*> instance_list_t;
+ static instance_list_t sInstances[ LLViewerDynamicTexture::ORDER_COUNT ];
static S32 sNumRenders;
};
diff --git a/indra/newview/lleventnotifier.cpp b/indra/newview/lleventnotifier.cpp
index e54d78de2e..80d4d21166 100644
--- a/indra/newview/lleventnotifier.cpp
+++ b/indra/newview/lleventnotifier.cpp
@@ -190,9 +190,12 @@ bool LLEventNotification::handleResponse(const LLSD& notification, const LLSD& r
switch (option)
{
case 0:
- gAgent.teleportViaLocation(getEventPosGlobal());
- LLFloaterWorldMap::getInstance()->trackLocation(getEventPosGlobal());
- break;
+ {
+ gAgent.teleportViaLocation(getEventPosGlobal());
+ LLFloaterWorldMap* floater_world_map = LLFloaterWorldMap::getInstance();
+ if(floater_world_map) floater_world_map->trackLocation(getEventPosGlobal());
+ break;
+ }
case 1:
gDisplayEventHack = TRUE;
LLFloaterReg::showInstance("search", LLSD().insert("panel", "event").insert("id", S32(getEventID())));
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 69edccacf0..bef9e40c49 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -47,7 +47,7 @@
#include "lllightconstants.h"
#include "llsky.h"
#include "llviewercamera.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llvosky.h"
#include "llvovolume.h"
#include "pipeline.h"
@@ -179,6 +179,10 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp)
void LLFace::destroy()
{
+ if(mTexture.notNull())
+ {
+ mTexture->removeFace(this) ;
+ }
if (mDrawPoolp)
{
mDrawPoolp->removeFace(this);
@@ -217,7 +221,7 @@ void LLFace::setWorldMatrix(const LLMatrix4 &mat)
llerrs << "Faces on this drawable are not independently modifiable\n" << llendl;
}
-void LLFace::setPool(LLFacePool* new_pool, LLViewerImage *texturep)
+void LLFace::setPool(LLFacePool* new_pool, LLViewerTexture *texturep)
{
LLMemType mt1(LLMemType::MTYPE_DRAWABLE);
@@ -247,9 +251,28 @@ void LLFace::setPool(LLFacePool* new_pool, LLViewerImage *texturep)
}
mDrawPoolp = new_pool;
}
- mTexture = texturep;
+ setTexture(texturep) ;
}
+void LLFace::setTexture(LLViewerTexture* tex)
+{
+ if(mTexture == tex)
+ {
+ return ;
+ }
+
+ if(mTexture.notNull())
+ {
+ mTexture->removeFace(this) ;
+ }
+
+ mTexture = tex ;
+
+ if(mTexture.notNull())
+ {
+ mTexture->addFace(this) ;
+ }
+}
void LLFace::setTEOffset(const S32 te_offset)
{
@@ -422,7 +445,7 @@ void LLFace::renderForSelect(U32 data_mask)
}
}
-void LLFace::renderSelected(LLImageGL *imagep, const LLColor4& color)
+void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color)
{
if(mDrawablep.isNull() || mVertexBuffer.isNull() || mDrawablep->getSpatialGroup() == NULL ||
mDrawablep->getSpatialGroup()->isState(LLSpatialGroup::GEOM_DIRTY))
@@ -463,8 +486,8 @@ void LLFace::renderSelected(LLImageGL *imagep, const LLColor4& color)
/* removed in lieu of raycast uv detection
void LLFace::renderSelectedUV()
{
- LLViewerImage* red_blue_imagep = gImageList.getImageFromFile("uv_test1.j2c", TRUE, TRUE);
- LLViewerImage* green_imagep = gImageList.getImageFromFile("uv_test2.tga", TRUE, TRUE);
+ LLViewerTexture* red_blue_imagep = LLViewerTextureManager::getFetchedTextureFromFile("uv_test1.j2c", TRUE, TRUE);
+ LLViewerTexture* green_imagep = LLViewerTextureManager::getFetchedTextureFromFile("uv_test2.tga", TRUE, TRUE);
LLGLSUVSelect object_select;
@@ -998,7 +1021,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
break;
case BE_BRIGHTNESS:
case BE_DARKNESS:
- if( mTexture.notNull() && mTexture->getHasGLTexture())
+ if( mTexture.notNull() && mTexture->hasValidGLTexture())
{
// Offset by approximately one texel
S32 cur_discard = mTexture->getDiscardLevel();
diff --git a/indra/newview/llface.h b/indra/newview/llface.h
index 8332eec19c..e0728fe15e 100644
--- a/indra/newview/llface.h
+++ b/indra/newview/llface.h
@@ -45,15 +45,15 @@
#include "xform.h"
#include "lldarrayptr.h"
#include "llvertexbuffer.h"
-#include "llviewerimage.h"
+#include "llviewertexture.h"
#include "lldrawable.h"
class LLFacePool;
class LLVolume;
-class LLViewerImage;
+class LLViewerTexture;
class LLTextureEntry;
class LLVertexProgram;
-class LLViewerImage;
+class LLViewerTexture;
class LLGeometryManager;
const F32 MIN_ALPHA_SIZE = 1024.f;
@@ -86,8 +86,8 @@ public:
U16 getGeomCount() const { return mGeomCount; } // vertex count for this face
U16 getGeomIndex() const { return mGeomIndex; } // index into draw pool
U16 getGeomStart() const { return mGeomIndex; } // index into draw pool
- LLViewerImage* getTexture() const { return mTexture; }
- void setTexture(LLViewerImage* tex) { mTexture = tex; }
+ LLViewerTexture* getTexture() const { return mTexture; }
+ void setTexture(LLViewerTexture* tex) ;
LLXformMatrix* getXform() const { return mXform; }
BOOL hasGeometry() const { return mGeomCount > 0; }
LLVector3 getPositionAgent() const;
@@ -119,10 +119,10 @@ public:
LLVertexBuffer* getVertexBuffer() const { return mVertexBuffer; }
void setPoolType(U32 type) { mPoolType = type; }
S32 getTEOffset() { return mTEOffset; }
- LLViewerImage* getTexture() { return mTexture; }
+ LLViewerTexture* getTexture() { return mTexture; }
void setViewerObject(LLViewerObject* object);
- void setPool(LLFacePool *pool, LLViewerImage *texturep);
+ void setPool(LLFacePool *pool, LLViewerTexture *texturep);
void setDrawable(LLDrawable *drawable);
void setTEOffset(const S32 te_offset);
@@ -171,7 +171,7 @@ public:
void renderSelectedUV();
void renderForSelect(U32 data_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0);
- void renderSelected(LLImageGL *image, const LLColor4 &color);
+ void renderSelected(LLViewerTexture *image, const LLColor4 &color);
F32 getKey() const { return mDistance; }
@@ -222,7 +222,7 @@ protected:
U32 mLastIndicesIndex;
LLXformMatrix* mXform;
- LLPointer<LLViewerImage> mTexture;
+ LLPointer<LLViewerTexture> mTexture;
LLPointer<LLDrawable> mDrawablep;
LLPointer<LLViewerObject> mVObjp;
S32 mTEOffset;
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index b373dd2241..f22114d3c8 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -44,7 +44,7 @@
#include "llsdserialize.h"
#include "llappviewer.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llui.h"
#include "llviewercontrol.h"
#include "llstat.h"
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 0e5b943dd3..72bfac70fc 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -43,11 +43,13 @@
#include "llagent.h"
#include "llinventorybridge.h"
#include "llinventorymodel.h"
+#include "llsidetray.h"
+#include "lltoggleablemenu.h"
#include "llviewerinventory.h"
#include "llviewermenu.h"
#include "llviewermenu.h"
-static LLDefaultWidgetRegistry::Register<LLFavoritesBarCtrl> r("favorites_bar");
+static LLDefaultChildRegistry::Register<LLFavoritesBarCtrl> r("favorites_bar");
// updateButtons's helper
struct LLFavoritesSort
@@ -69,41 +71,6 @@ struct LLFavoritesSort
}
};
-class LLVisibilityTrackingMenuGL : public LLMenuGL
-{
-protected:
- LLVisibilityTrackingMenuGL(const LLMenuGL::Params&);
- friend class LLUICtrlFactory;
-public:
- virtual void onVisibilityChange (BOOL curVisibilityIn);
- void setChevronRect(const LLRect& rect) { mChevronRect = rect; }
-
- bool getClosedByChevronClick() { return mClosedByChevronClick; }
- void resetClosedByChevronClick() { mClosedByChevronClick = false; }
-
-protected:
- bool mClosedByChevronClick;
- LLRect mChevronRect;
-};
-
-LLVisibilityTrackingMenuGL::LLVisibilityTrackingMenuGL(const LLMenuGL::Params& p)
-: LLMenuGL(p),
- mClosedByChevronClick(false)
-{
-}
-
-//virtual
-void LLVisibilityTrackingMenuGL::onVisibilityChange (BOOL curVisibilityIn)
-{
- S32 x,y;
- LLUI::getCursorPositionLocal(LLUI::getRootView(), &x, &y);
-
- if (!curVisibilityIn && mChevronRect.pointInRect(x, y))
- {
- mClosedByChevronClick = true;
- }
-}
-
LLFavoritesBarCtrl::LLFavoritesBarCtrl(const LLFavoritesBarCtrl::Params& p)
: LLUICtrl(p),
mFont(p.font.isProvided() ? p.font() : LLFontGL::getFontSansSerifSmall()),
@@ -213,7 +180,7 @@ void LLFavoritesBarCtrl::updateButtons(U32 bar_width)
const S32 buttonHPad = LLUI::sSettingGroups["config"]->getS32("ButtonHPad");
const S32 buttonHGap = 2;
const S32 buttonVGap = 2;
- static LLButton::Params default_button_params(LLUICtrlFactory::getDefaultParams<LLButton::Params>());
+ static LLButton::Params default_button_params(LLUICtrlFactory::getDefaultParams<LLButton>());
std::string flat_icon = "transparent.j2c";
std::string hover_icon = default_button_params.image_unselected.name;
std::string hover_icon_selected = default_button_params.image_selected.name;
@@ -249,6 +216,8 @@ void LLFavoritesBarCtrl::updateButtons(U32 bar_width)
}
}
+ bool recreate_buttons = true;
+
// If inventory items are not changed up to mFirstDropDownItem, no need to recreate them
if (mFirstDropDownItem == first_drop_down_item && (mItemNamesCache.size() == count || mItemNamesCache.size() == mFirstDropDownItem))
{
@@ -262,114 +231,125 @@ void LLFavoritesBarCtrl::updateButtons(U32 bar_width)
}
if (i == mFirstDropDownItem)
{
- // Chevron button should stay right aligned
- LLView *chevron_button = getChildView(std::string(">>"), FALSE, FALSE);
- if (chevron_button)
- {
- LLRect rect;
- rect.setOriginAndSize(bar_width - chevron_button_width - buttonHGap, buttonVGap, chevron_button_width, getRect().getHeight()-buttonVGap);
- chevron_button->setRect(rect);
+ recreate_buttons = false;
+ }
+ }
+
+ if (recreate_buttons)
+ {
+ mFirstDropDownItem = first_drop_down_item;
+
+ mItemNamesCache.clear();
+ for (S32 i = 0; i < mFirstDropDownItem; i++)
+ {
+ mItemNamesCache.put(items.get(i)->getName());
+ }
- S32 chevron_root_x, chevron_root_y;
- localPointToOtherView(rect.mLeft, rect.mBottom, &chevron_root_x, &chevron_root_y, LLUI::getRootView());
- mChevronRect.setOriginAndSize(chevron_root_x, chevron_root_y, rect.getWidth(), rect.getHeight());
+ // Rebuild the buttons only
+ // child_list_t is a linked list, so safe to erase from the middle if we pre-incrament the iterator
+ for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); )
+ {
+ child_list_const_iter_t cur_it = child_it++;
+ LLView* viewp = *cur_it;
+ LLButton* button = dynamic_cast<LLButton*>(viewp);
+ if (button)
+ {
+ removeChild(button);
+ delete button;
}
- return;
}
- }
- mFirstDropDownItem = first_drop_down_item;
+ // Adding buttons
+ for(S32 i = mFirstDropDownItem -1; i >= 0; i--)
+ {
- mItemNamesCache.clear();
- for (S32 i = 0; i < mFirstDropDownItem; i++)
- {
- mItemNamesCache.put(items.get(i)->getName());
- }
+ LLInventoryItem* item = items.get(i);
- // Rebuild the buttons only
- // child_list_t is a linked list, so safe to erase from the middle if we pre-incrament the iterator
- for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); )
- {
- child_list_const_iter_t cur_it = child_it++;
- LLView* viewp = *cur_it;
- LLButton* button = dynamic_cast<LLButton*>(viewp);
- if (button)
- {
- removeChild(button);
- delete button;
- }
- }
-
- // Adding buttons
- for(S32 i = 0; i < mFirstDropDownItem; i++)
- {
-
- LLInventoryItem* item = items.get(i);
-
- S32 buttonWidth = mFont->getWidth(item->getName()) + buttonHPad * 2;
-
- LLRect rect;
- rect.setOriginAndSize(curr_x, buttonVGap, buttonWidth, getRect().getHeight()-buttonVGap);
-
- LLButton::Params bparams;
- bparams.image_unselected.name(flat_icon);
- bparams.image_disabled.name(flat_icon);
- bparams.image_selected.name(hover_icon_selected);
- bparams.image_hover_selected.name(hover_icon_selected);
- bparams.image_disabled_selected.name(hover_icon_selected);
- bparams.image_hover_unselected.name(hover_icon);
- bparams.follows.flags (FOLLOWS_LEFT | FOLLOWS_BOTTOM);
- bparams.rect (rect);
- bparams.tab_stop(false);
- bparams.font(mFont);
- bparams.name(item->getName());
- bparams.tool_tip(item->getName());
- bparams.click_callback.function(boost::bind(&LLFavoritesBarCtrl::onButtonClick, this, item->getUUID()));
- bparams.rightclick_callback.function(boost::bind(&LLFavoritesBarCtrl::onButtonRightClick, this, item->getUUID()));
-
- addChildInBack(LLUICtrlFactory::create<LLButton> (bparams));
-
- curr_x += buttonWidth + buttonHGap;
+ S32 buttonWidth = mFont->getWidth(item->getName()) + buttonHPad * 2;
+
+ LLRect rect;
+ rect.setOriginAndSize(curr_x, buttonVGap, buttonWidth, getRect().getHeight()-buttonVGap);
+
+ LLButton::Params bparams;
+ bparams.image_unselected.name(flat_icon);
+ bparams.image_disabled.name(flat_icon);
+ bparams.image_selected.name(hover_icon_selected);
+ bparams.image_hover_selected.name(hover_icon_selected);
+ bparams.image_disabled_selected.name(hover_icon_selected);
+ bparams.image_hover_unselected.name(hover_icon);
+ bparams.follows.flags (FOLLOWS_LEFT | FOLLOWS_BOTTOM);
+ bparams.rect (rect);
+ bparams.tab_stop(false);
+ bparams.font(mFont);
+ bparams.name(item->getName());
+ bparams.tool_tip(item->getName());
+ bparams.click_callback.function(boost::bind(&LLFavoritesBarCtrl::onButtonClick, this, item->getUUID()));
+ bparams.rightclick_callback.function(boost::bind(&LLFavoritesBarCtrl::onButtonRightClick, this, item->getUUID()));
+
+ addChildInBack(LLUICtrlFactory::create<LLButton> (bparams));
+
+ curr_x += buttonWidth + buttonHGap;
+ }
}
// Chevron button
if (mFirstDropDownItem != count)
{
- LLButton::Params bparams;
-
- LLRect rect;
- rect.setOriginAndSize(bar_width - chevron_button_width - buttonHGap, buttonVGap, chevron_button_width, getRect().getHeight()-buttonVGap);
-
- bparams.follows.flags (FOLLOWS_LEFT | FOLLOWS_BOTTOM);
- bparams.image_unselected.name(flat_icon);
- bparams.image_disabled.name(flat_icon);
- bparams.image_selected.name(hover_icon_selected);
- bparams.image_hover_selected.name(hover_icon_selected);
- bparams.image_disabled_selected.name(hover_icon_selected);
- bparams.image_hover_unselected.name(hover_icon);
- bparams.rect (rect);
- bparams.tab_stop(false);
- bparams.font(mFont);
- bparams.name(">>");
- bparams.click_callback.function(boost::bind(&LLFavoritesBarCtrl::showDropDownMenu, this));
-
- addChildInBack(LLUICtrlFactory::create<LLButton> (bparams));
-
- S32 chevron_root_x, chevron_root_y;
- localPointToOtherView(rect.mLeft, rect.mBottom, &chevron_root_x, &chevron_root_y, LLUI::getRootView());
- mChevronRect.setOriginAndSize(chevron_root_x, chevron_root_y, rect.getWidth(), rect.getHeight());
+ // Chevron button should stay right aligned
+ LLView *chevron_button = getChildView(std::string(">>"), FALSE, FALSE);
+ if (chevron_button)
+ {
+ LLRect rect;
+ rect.setOriginAndSize(bar_width - chevron_button_width - buttonHGap, buttonVGap, chevron_button_width, getRect().getHeight()-buttonVGap);
+ chevron_button->setRect(rect);
+ chevron_button->setVisible(TRUE);
+ mChevronRect = rect;
+ }
+ else
+ {
+ LLButton::Params bparams;
+
+ LLRect rect;
+ rect.setOriginAndSize(bar_width - chevron_button_width - buttonHGap, buttonVGap, chevron_button_width, getRect().getHeight()-buttonVGap);
+
+ bparams.follows.flags (FOLLOWS_LEFT | FOLLOWS_BOTTOM);
+ bparams.image_unselected.name(flat_icon);
+ bparams.image_disabled.name(flat_icon);
+ bparams.image_selected.name(hover_icon_selected);
+ bparams.image_hover_selected.name(hover_icon_selected);
+ bparams.image_disabled_selected.name(hover_icon_selected);
+ bparams.image_hover_unselected.name(hover_icon);
+ bparams.rect (rect);
+ bparams.tab_stop(false);
+ bparams.font(mFont);
+ bparams.name(">>");
+ bparams.click_callback.function(boost::bind(&LLFavoritesBarCtrl::showDropDownMenu, this));
+
+ addChildInBack(LLUICtrlFactory::create<LLButton> (bparams));
+
+ mChevronRect = rect;
+ }
+ }
+ else
+ {
+ // Hide chevron button if all items are visible on bar
+ LLView *chevron_button = getChildView(std::string(">>"), FALSE, FALSE);
+ if (chevron_button)
+ {
+ chevron_button->setVisible(FALSE);
+ }
}
}
BOOL LLFavoritesBarCtrl::postBuild()
{
// make the popup menu available
- LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_favorites.xml", gMenuHolder);
+ LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_favorites.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
if (!menu)
{
menu = LLUICtrlFactory::getDefaultWidget<LLMenuGL>("inventory_menu");
}
- menu->setBackgroundColor(gSavedSkinSettings.getColor("MenuPopupBgColor"));
+ menu->setBackgroundColor(LLUIColorTable::instance().getColor("MenuPopupBgColor"));
mInventoryItemsPopupMenuHandle = menu->getHandle();
return TRUE;
@@ -400,25 +380,25 @@ void LLFavoritesBarCtrl::showDropDownMenu()
menu_p.visible(false);
menu_p.scrollable(true);
- LLVisibilityTrackingMenuGL* menu = LLUICtrlFactory::create<LLVisibilityTrackingMenuGL>(menu_p);
+ LLToggleableMenu* menu = LLUICtrlFactory::create<LLToggleableMenu>(menu_p);
mPopupMenuHandle = menu->getHandle();
}
- LLVisibilityTrackingMenuGL* menu = (LLVisibilityTrackingMenuGL*)mPopupMenuHandle.get();
+ LLToggleableMenu* menu = (LLToggleableMenu*)mPopupMenuHandle.get();
if(menu)
{
- if (menu->getClosedByChevronClick())
+ if (menu->getClosedByButtonClick())
{
- menu->resetClosedByChevronClick();
+ menu->resetClosedByButtonClick();
return;
}
if (menu->getVisible())
{
menu->setVisible(FALSE);
- menu->resetClosedByChevronClick();
+ menu->resetClosedByButtonClick();
return;
}
@@ -449,7 +429,7 @@ void LLFavoritesBarCtrl::showDropDownMenu()
menu->buildDrawLabels();
menu->updateParent(LLMenuGL::sMenuContainer);
- menu->setChevronRect(mChevronRect);
+ menu->setButtonRect(mChevronRect, this);
LLMenuGL::showPopup(this, menu, getRect().getWidth() - menu->getRect().getWidth(), 0);
return;
@@ -482,6 +462,7 @@ void LLFavoritesBarCtrl::showDropDownMenu()
item_params.label(item_name);
item_params.on_click.function(boost::bind(&LLFavoritesBarCtrl::onButtonClick, this, item->getUUID()));
+ item_params.rightclick_callback.function(boost::bind(&LLFavoritesBarCtrl::onButtonRightClick, this, item->getUUID()));
LLMenuItemCallGL *menu_item = LLUICtrlFactory::create<LLMenuItemCallGL>(item_params);
@@ -514,7 +495,7 @@ void LLFavoritesBarCtrl::showDropDownMenu()
menu->buildDrawLabels();
menu->updateParent(LLMenuGL::sMenuContainer);
- menu->setChevronRect(mChevronRect);
+ menu->setButtonRect(mChevronRect, this);
LLMenuGL::showPopup(this, menu, getRect().getWidth() - max_width, 0);
}
@@ -565,7 +546,11 @@ void LLFavoritesBarCtrl::doToSelected(const LLSD& userdata)
}
else if (action == "about")
{
- LLFloaterReg::showInstance("preview_landmark", LLSD(mSelectedItemID), TAKE_FOCUS_YES);
+ LLSD key;
+ key["type"] = "landmark";
+ key["id"] = mSelectedItemID;
+
+ LLSideTray::getInstance()->showPanel("panel_places", key);
}
else if (action == "rename")
{
diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h
index 646e98cabb..a559692331 100644
--- a/indra/newview/llfavoritesbar.h
+++ b/indra/newview/llfavoritesbar.h
@@ -34,7 +34,7 @@
#define LL_LLFAVORITESBARCTRL_H
#include "lluictrl.h"
-#include "lliconctrl.h"
+
#include "llinventorymodel.h"
class LLFavoritesBarCtrl : public LLUICtrl, public LLInventoryObserver
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index e863be40e1..fb724f30e0 100644
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -48,7 +48,7 @@
#include "llviewercontrol.h"
#include "llworld.h"
#include "lldrawpoolterrain.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llwindow.h"
#include "llui.h"
#include "llcontrol.h"
@@ -430,7 +430,6 @@ void LLFeatureManager::applyRecommendedSettings()
setGraphicsLevel(level, false);
gSavedSettings.setU32("RenderQualityPerformance", level);
- gSavedSettings.setBOOL("RenderCustomSettings", FALSE);
// now apply the tweaks to draw distance
// these are double negatives, because feature masks only work by
diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp
index 352ca3c863..de079b7123 100644
--- a/indra/newview/llfirstuse.cpp
+++ b/indra/newview/llfirstuse.cpp
@@ -145,7 +145,7 @@ void LLFirstUse::useBuild()
LLNotifications::instance().add("FirstBuild");
}
}
-
+/*
// static
void LLFirstUse::useLeftClickNoHit()
{
@@ -156,7 +156,7 @@ void LLFirstUse::useLeftClickNoHit()
LLNotifications::instance().add("FirstLeftClickNoHit");
}
}
-
+*/
// static
void LLFirstUse::useTeleport()
{
diff --git a/indra/newview/llfirstuse.h b/indra/newview/llfirstuse.h
index bb64cdd2c6..7b4f9f516f 100644
--- a/indra/newview/llfirstuse.h
+++ b/indra/newview/llfirstuse.h
@@ -95,7 +95,7 @@ public:
static void useMap();
static void useGoTo();
static void useBuild();
- static void useLeftClickNoHit();
+// static void useLeftClickNoHit();
static void useTeleport();
static void useOverrideKeys();
static void useAttach();
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index 8f2c6d538b..bafb69a835 100644
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -39,11 +39,10 @@
#include "llglheaders.h"
#include "llrendersphere.h"
#include "llviewerobject.h"
-#include "llimagegl.h"
#include "llagent.h"
#include "llsky.h"
#include "llviewercamera.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewercontrol.h"
#include "llviewerobjectlist.h"
#include "llviewerregion.h"
diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp
index 61a031d502..2cdb149f9a 100644
--- a/indra/newview/llfloaterabout.cpp
+++ b/indra/newview/llfloaterabout.cpp
@@ -77,7 +77,7 @@ static std::string get_viewer_release_notes_url();
// Default constructor
LLFloaterAbout::LLFloaterAbout(const LLSD& key)
-: LLFloater()
+: LLFloater(key)
{
//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_about.xml");
@@ -105,7 +105,7 @@ BOOL LLFloaterAbout::postBuild()
viewer_link_style->setVisible(true);
viewer_link_style->setFontName(LLStringUtil::null);
viewer_link_style->setLinkHREF(get_viewer_release_notes_url());
- viewer_link_style->setColor(gSavedSkinSettings.getColor4("HTMLLinkColor"));
+ viewer_link_style->setColor(LLUIColorTable::instance().getColor("HTMLLinkColor"));
// Version string
std::string version = LLTrans::getString("SECOND_LIFE_VIEWER")
@@ -113,7 +113,7 @@ BOOL LLFloaterAbout::postBuild()
LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VIEWER_BUILD,
__DATE__, __TIME__,
gSavedSettings.getString("VersionChannelName").c_str());
- support_widget->appendColoredText(version, FALSE, FALSE, LLUI::sSettingGroups["color"]->getColor("TextFgReadOnlyColor"));
+ support_widget->appendColoredText(version, FALSE, FALSE, LLUIColorTable::instance().getColor("TextFgReadOnlyColor"));
support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, viewer_link_style);
std::string support;
@@ -135,7 +135,7 @@ BOOL LLFloaterAbout::postBuild()
server_link_style->setVisible(true);
server_link_style->setFontName(LLStringUtil::null);
server_link_style->setLinkHREF(region->getCapability("ServerReleaseNotes"));
- server_link_style->setColor(gSavedSkinSettings.getColor4("HTMLLinkColor"));
+ server_link_style->setColor(LLUIColorTable::instance().getColor("HTMLLinkColor"));
const LLVector3d &pos = gAgent.getPositionGlobal();
LLUIString pos_text = getString("you_are_at");
@@ -157,7 +157,7 @@ BOOL LLFloaterAbout::postBuild()
support.append(gLastVersionChannel);
support.append("\n");
- support_widget->appendColoredText(support, FALSE, FALSE, LLUI::sSettingGroups["color"]->getColor("TextFgReadOnlyColor"));
+ support_widget->appendColoredText(support, FALSE, FALSE, LLUIColorTable::instance().getColor("TextFgReadOnlyColor"));
support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, server_link_style);
support = "\n\n";
@@ -245,7 +245,7 @@ BOOL LLFloaterAbout::postBuild()
support.append(getString ("PacketsLost", args) + "\n");
}
- support_widget->appendColoredText(support, FALSE, FALSE, LLUI::sSettingGroups["color"]->getColor("TextFgReadOnlyColor"));
+ support_widget->appendColoredText(support, FALSE, FALSE, LLUIColorTable::instance().getColor("TextFgReadOnlyColor"));
// Fix views
support_widget->setCursorPos(0);
diff --git a/indra/newview/llfloaterabout.h b/indra/newview/llfloaterabout.h
index 1b0f3cddd3..c15a20d549 100644
--- a/indra/newview/llfloaterabout.h
+++ b/indra/newview/llfloaterabout.h
@@ -36,12 +36,11 @@
#include "llfloater.h"
class LLFloaterAbout
- : public LLFloater, public LLFloaterSingleton<LLFloaterAbout>
+ : public LLFloater
{
- friend class LLUISingleton<LLFloaterAbout, VisibilityPolicy<LLFloater> >;
-public:
+ friend class LLFloaterReg;
+private:
LLFloaterAbout(const LLSD& key);
-protected:
virtual ~LLFloaterAbout();
public:
diff --git a/indra/newview/llfloateranimpreview.cpp b/indra/newview/llfloateranimpreview.cpp
index 12c4932293..979c5543e7 100644
--- a/indra/newview/llfloateranimpreview.cpp
+++ b/indra/newview/llfloateranimpreview.cpp
@@ -307,8 +307,9 @@ BOOL LLFloaterAnimPreview::postBuild()
motionp->setName(childGetValue("name_form").asString());
mAnimPreview->getDummyAvatar()->startMotion(mMotionID);
- childSetMinValue("playback_slider", 0.0);
- childSetMaxValue("playback_slider", 1.0);
+
+ getChild<LLSlider>("playback_slider")->setMinValue(0.0);
+ getChild<LLSlider>("playback_slider")->setMaxValue(1.0);
childSetValue("loop_check", LLSD(motionp->getLoop()));
childSetValue("loop_in_point", LLSD(motionp->getLoopIn() / motionp->getDuration() * 100.f));
@@ -325,7 +326,6 @@ BOOL LLFloaterAnimPreview::postBuild()
}
else
{
- delete mAnimPreview;
mAnimPreview = NULL;
mMotionID.setNull();
childSetValue("bad_animation_text", getString("failed_to_initialize"));
@@ -367,7 +367,6 @@ BOOL LLFloaterAnimPreview::postBuild()
//-----------------------------------------------------------------------------
LLFloaterAnimPreview::~LLFloaterAnimPreview()
{
- delete mAnimPreview;
mAnimPreview = NULL;
setEnabled(FALSE);
@@ -387,7 +386,7 @@ void LLFloaterAnimPreview::draw()
{
gGL.color3f(1.f, 1.f, 1.f);
- gGL.getTexUnit(0)->bind(mAnimPreview->getTexture());
+ gGL.getTexUnit(0)->bind(mAnimPreview);
gGL.begin( LLRender::QUADS );
{
@@ -1017,7 +1016,7 @@ void LLFloaterAnimPreview::onBtnOK(void* userdata)
//-----------------------------------------------------------------------------
// LLPreviewAnimation
//-----------------------------------------------------------------------------
-LLPreviewAnimation::LLPreviewAnimation(S32 width, S32 height) : LLDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE)
+LLPreviewAnimation::LLPreviewAnimation(S32 width, S32 height) : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE)
{
mNeedsUpdate = TRUE;
mCameraDistance = PREVIEW_CAMERA_DISTANCE;
@@ -1063,7 +1062,7 @@ BOOL LLPreviewAnimation::render()
glMatrixMode(GL_PROJECTION);
gGL.pushMatrix();
glLoadIdentity();
- glOrtho(0.0f, mWidth, 0.0f, mHeight, -1.0f, 1.0f);
+ glOrtho(0.0f, mFullWidth, 0.0f, mFullHeight, -1.0f, 1.0f);
glMatrixMode(GL_MODELVIEW);
gGL.pushMatrix();
@@ -1073,7 +1072,7 @@ BOOL LLPreviewAnimation::render()
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.color4f(0.15f, 0.2f, 0.3f, 1.f);
- gl_rect_2d_simple( mWidth, mHeight );
+ gl_rect_2d_simple( mFullWidth, mFullHeight );
glMatrixMode(GL_PROJECTION);
gGL.popMatrix();
@@ -1095,7 +1094,7 @@ BOOL LLPreviewAnimation::render()
target_pos + (mCameraOffset * av_rot) ); // point of interest
LLViewerCamera::getInstance()->setView(LLViewerCamera::getInstance()->getDefaultFOV() / mCameraZoom);
- LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mWidth, mHeight, FALSE);
+ LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, FALSE);
mCameraRelPos = LLViewerCamera::getInstance()->getOrigin() - avatarp->mHeadp->getWorldPosition();
diff --git a/indra/newview/llfloateranimpreview.h b/indra/newview/llfloateranimpreview.h
index 2f228c3ecd..7031e9a716 100644
--- a/indra/newview/llfloateranimpreview.h
+++ b/indra/newview/llfloateranimpreview.h
@@ -41,12 +41,14 @@
class LLVOAvatar;
class LLViewerJointMesh;
-class LLPreviewAnimation : public LLDynamicTexture
+class LLPreviewAnimation : public LLViewerDynamicTexture
{
-public:
- LLPreviewAnimation(S32 width, S32 height);
+protected:
virtual ~LLPreviewAnimation();
+public:
+ LLPreviewAnimation(S32 width, S32 height);
+
BOOL render();
void requestUpdate();
void rotate(F32 yaw_radians, F32 pitch_radians);
@@ -114,7 +116,7 @@ protected:
void draw();
void resetMotion();
- LLPreviewAnimation* mAnimPreview;
+ LLPointer< LLPreviewAnimation > mAnimPreview;
S32 mLastMouseX;
S32 mLastMouseY;
LLButton* mPlayButton;
diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp
index 8ad5a19d02..da2a4d9d93 100644
--- a/indra/newview/llfloaterauction.cpp
+++ b/indra/newview/llfloaterauction.cpp
@@ -47,7 +47,7 @@
#include "llcombobox.h"
#include "llnotify.h"
#include "llsavedsettingsglue.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
#include "lluictrlfactory.h"
@@ -72,7 +72,7 @@ void auction_tga_upload_done(const LLUUID& asset_id,
// Default constructor
LLFloaterAuction::LLFloaterAuction(const LLSD& key)
- : LLFloater(),
+ : LLFloater(key),
mParcelID(-1)
{
// LLUICtrlFactory::getInstance()->buildFloater(this, "floater_auction.xml");
@@ -186,7 +186,7 @@ void LLFloaterAuction::onClickSnapshot(void* data)
tga->encode(raw);
LLVFile::writeFile(tga->getData(), tga->getDataSize(), gVFS, self->mImageID, LLAssetType::AT_IMAGE_TGA);
- raw->biasedScaleToPowerOfTwo(LLViewerImage::MAX_IMAGE_SIZE_DEFAULT);
+ raw->biasedScaleToPowerOfTwo(LLViewerTexture::MAX_IMAGE_SIZE_DEFAULT);
llinfos << "Writing J2C..." << llendl;
@@ -194,7 +194,7 @@ void LLFloaterAuction::onClickSnapshot(void* data)
j2c->encode(raw, 0.0f);
LLVFile::writeFile(j2c->getData(), j2c->getDataSize(), gVFS, self->mImageID, LLAssetType::AT_TEXTURE);
- self->mImage = new LLImageGL((LLImageRaw*)raw, FALSE);
+ self->mImage = LLViewerTextureManager::getLocalTexture((LLImageRaw*)raw, FALSE);
gGL.getTexUnit(0)->bind(self->mImage);
self->mImage->setAddressMode(LLTexUnit::TAM_CLAMP);
}
diff --git a/indra/newview/llfloaterauction.h b/indra/newview/llfloaterauction.h
index b018316c64..86de0ae966 100644
--- a/indra/newview/llfloaterauction.h
+++ b/indra/newview/llfloaterauction.h
@@ -37,7 +37,7 @@
#include "llfloater.h"
#include "lluuid.h"
#include "llpointer.h"
-#include "llviewerimage.h"
+#include "llviewertexture.h"
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLFloaterAuction
@@ -46,18 +46,20 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLParcelSelection;
-class LLFloaterAuction : public LLFloater, public LLFloaterSingleton<LLFloaterAuction>
+class LLFloaterAuction : public LLFloater
{
- friend class LLUISingleton<LLFloaterAuction, VisibilityPolicy<LLFloater> >;
+ friend class LLFloaterReg;
public:
// LLFloater interface
/*virtual*/ void onClose(bool app_quitting) { setVisible(FALSE); }
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ void draw();
+
+private:
LLFloaterAuction(const LLSD& key);
~LLFloaterAuction();
-private:
+
void initialize();
static void onClickSnapshot(void* data);
@@ -67,7 +69,7 @@ private:
private:
LLTransactionID mTransactionID;
LLAssetID mImageID;
- LLPointer<LLImageGL> mImage;
+ LLPointer<LLViewerTexture> mImage;
LLSafeHandle<LLParcelSelection> mParcelp;
S32 mParcelID;
LLHost mParcelHost;
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index 2c2dcda633..92ce44fa42 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -33,22 +33,25 @@
#include "llfloateravatarpicker.h"
-#include "message.h"
-
+// Viewer includes
#include "llagent.h"
-#include "llbutton.h"
#include "llfocusmgr.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
+#include "llfoldervieweventlistener.h"
#include "llinventorymodel.h"
+#include "llviewercontrol.h"
+#include "llworld.h"
+
+// Linden libraries
+#include "llbutton.h"
#include "lllineeditor.h"
#include "llscrolllistctrl.h"
#include "llscrolllistitem.h"
#include "llscrolllistcell.h"
+#include "lltabcontainer.h"
#include "lltextbox.h"
#include "lluictrlfactory.h"
-#include "llviewercontrol.h"
-#include "llworld.h"
-#include "lltabcontainer.h"
+#include "message.h"
// static
LLFloaterAvatarPicker* LLFloaterAvatarPicker::sInstance = NULL;
diff --git a/indra/newview/llfloateravatarpicker.h b/indra/newview/llfloateravatarpicker.h
index 0f47401f23..0f28d8250b 100644
--- a/indra/newview/llfloateravatarpicker.h
+++ b/indra/newview/llfloateravatarpicker.h
@@ -87,6 +87,7 @@ private:
static LLFloaterAvatarPicker* sInstance;
+private:
// do not call these directly
LLFloaterAvatarPicker();
virtual ~LLFloaterAvatarPicker();
diff --git a/indra/newview/llfloaterbeacons.cpp b/indra/newview/llfloaterbeacons.cpp
index 052f334285..1c7ef77718 100644
--- a/indra/newview/llfloaterbeacons.cpp
+++ b/indra/newview/llfloaterbeacons.cpp
@@ -40,9 +40,9 @@
LLFloaterBeacons::LLFloaterBeacons(const LLSD& seed)
-: LLFloater()
+: LLFloater(seed)
{
- LLUICtrlFactory::getInstance()->buildFloater(this, "floater_beacons.xml");
+// LLUICtrlFactory::getInstance()->buildFloater(this, "floater_beacons.xml");
// Initialize pipeline states from saved settings.
// OK to do at floater constructor time because beacons do not display unless the floater is open
@@ -56,17 +56,11 @@ LLFloaterBeacons::LLFloaterBeacons(const LLSD& seed)
LLPipeline::setRenderParticleBeacons( gSavedSettings.getBOOL("particlesbeacon"));
LLPipeline::setRenderHighlights( gSavedSettings.getBOOL("renderhighlights"));
LLPipeline::setRenderBeacons( gSavedSettings.getBOOL("renderbeacons"));
+ mCommitCallbackRegistrar.add("Beacons.UICheck", boost::bind(&LLFloaterBeacons::onClickUICheck, this,_1));
}
BOOL LLFloaterBeacons::postBuild()
{
- childSetCommitCallback("touch_only", onClickUICheck, this);
- childSetCommitCallback("scripted", onClickUICheck, this);
- childSetCommitCallback("physical", onClickUICheck, this);
- childSetCommitCallback("sounds", onClickUICheck, this);
- childSetCommitCallback("particles", onClickUICheck, this);
- childSetCommitCallback("highlights", onClickUICheck, this);
- childSetCommitCallback("beacons", onClickUICheck, this);
return TRUE;
}
@@ -87,12 +81,11 @@ void LLFloaterBeacons::onClose(bool app_quitting)
// Callback attached to each check box control to both affect their main purpose
// and to implement the couple screwy interdependency rules that some have.
-//static
-void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl, void* data)
+
+void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl)
{
LLCheckBoxCtrl *check = (LLCheckBoxCtrl *)ctrl;
std::string name = check->getName();
- LLFloaterBeacons* view = (LLFloaterBeacons*)data;
if( name == "touch_only")
{
LLPipeline::toggleRenderScriptedTouchBeacons(NULL);
@@ -102,8 +95,8 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl, void* data)
LLPipeline::getRenderScriptedBeacons(NULL) )
{
LLPipeline::setRenderScriptedBeacons(FALSE);
- view->getChild<LLCheckBoxCtrl>("scripted")->setControlValue(LLSD(FALSE));
- view->getChild<LLCheckBoxCtrl>("touch_only")->setControlValue(LLSD(TRUE)); // just to be sure it's in sync with llpipeline
+ getChild<LLCheckBoxCtrl>("scripted")->setControlValue(LLSD(FALSE));
+ getChild<LLCheckBoxCtrl>("touch_only")->setControlValue(LLSD(TRUE)); // just to be sure it's in sync with llpipeline
}
}
else if(name == "scripted")
@@ -115,8 +108,8 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl, void* data)
LLPipeline::getRenderScriptedBeacons(NULL) )
{
LLPipeline::setRenderScriptedTouchBeacons(FALSE);
- view->getChild<LLCheckBoxCtrl>("touch_only")->setControlValue(LLSD(FALSE));
- view->getChild<LLCheckBoxCtrl>("scripted")->setControlValue(LLSD(TRUE)); // just to be sure it's in sync with llpipeline
+ getChild<LLCheckBoxCtrl>("touch_only")->setControlValue(LLSD(FALSE));
+ getChild<LLCheckBoxCtrl>("scripted")->setControlValue(LLSD(TRUE)); // just to be sure it's in sync with llpipeline
}
}
else if(name == "physical") LLPipeline::setRenderPhysicalBeacons(check->get());
@@ -131,8 +124,8 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl, void* data)
!LLPipeline::getRenderHighlights(NULL) )
{
LLPipeline::setRenderBeacons(TRUE);
- view->getChild<LLCheckBoxCtrl>("beacons")->setControlValue(LLSD(TRUE));
- view->getChild<LLCheckBoxCtrl>("highlights")->setControlValue(LLSD(FALSE)); // just to be sure it's in sync with llpipeline
+ getChild<LLCheckBoxCtrl>("beacons")->setControlValue(LLSD(TRUE));
+ getChild<LLCheckBoxCtrl>("highlights")->setControlValue(LLSD(FALSE)); // just to be sure it's in sync with llpipeline
}
}
else if(name == "beacons")
@@ -144,8 +137,8 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl, void* data)
!LLPipeline::getRenderHighlights(NULL) )
{
LLPipeline::setRenderHighlights(TRUE);
- view->getChild<LLCheckBoxCtrl>("highlights")->setControlValue(LLSD(TRUE));
- view->getChild<LLCheckBoxCtrl>("beacons")->setControlValue(LLSD(FALSE)); // just to be sure it's in sync with llpipeline
+ getChild<LLCheckBoxCtrl>("highlights")->setControlValue(LLSD(TRUE));
+ getChild<LLCheckBoxCtrl>("beacons")->setControlValue(LLSD(FALSE)); // just to be sure it's in sync with llpipeline
}
}
}
diff --git a/indra/newview/llfloaterbeacons.h b/indra/newview/llfloaterbeacons.h
index 8156e82ac3..94f853978a 100644
--- a/indra/newview/llfloaterbeacons.h
+++ b/indra/newview/llfloaterbeacons.h
@@ -36,22 +36,22 @@
#include "llfloater.h"
-class LLFloaterBeacons : public LLFloater, public LLFloaterSingleton<LLFloaterBeacons>
+class LLFloaterBeacons : public LLFloater
{
- friend class LLUISingleton<LLFloaterBeacons, VisibilityPolicy<LLFloater> >;
+ friend class LLFloaterReg;
public:
+
/*virtual*/ BOOL postBuild();
// Needed to make the floater visibility toggle the beacons.
// Too bad we can't just add control_name="BeaconAlwaysOn" to the XML.
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ void onClose(bool app_quitting);
+ void onClickUICheck(LLUICtrl *ctrl);
private:
LLFloaterBeacons(const LLSD& seed);
-
- static void onClickUICheck(LLUICtrl *ctrl, void* data);
};
#endif
diff --git a/indra/newview/llfloaterbuildoptions.cpp b/indra/newview/llfloaterbuildoptions.cpp
index 9dbd1db38e..30e9428df9 100644
--- a/indra/newview/llfloaterbuildoptions.cpp
+++ b/indra/newview/llfloaterbuildoptions.cpp
@@ -44,7 +44,7 @@
// Methods
//
LLFloaterBuildOptions::LLFloaterBuildOptions(const LLSD& key)
- : LLFloater()
+ : LLFloater(key)
{
//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_build_options.xml");
}
diff --git a/indra/newview/llfloaterbuildoptions.h b/indra/newview/llfloaterbuildoptions.h
index 61db303ba2..43cbb201c2 100644
--- a/indra/newview/llfloaterbuildoptions.h
+++ b/indra/newview/llfloaterbuildoptions.h
@@ -42,10 +42,10 @@
class LLFloaterBuildOptions
- : public LLFloater, public LLFloaterSingleton<LLFloaterBuildOptions>
+ : public LLFloater
{
- friend class LLUISingleton<LLFloaterBuildOptions, VisibilityPolicy<LLFloater> >;
-public:
+ friend class LLFloaterReg;
+private:
LLFloaterBuildOptions(const LLSD& key);
~LLFloaterBuildOptions();
};
diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp
index 65dc3cd9f0..29b91cab95 100644
--- a/indra/newview/llfloaterbulkpermission.cpp
+++ b/indra/newview/llfloaterbulkpermission.cpp
@@ -58,22 +58,22 @@
LLFloaterBulkPermission::LLFloaterBulkPermission(const LLSD& seed)
-: LLFloater(),
+: LLFloater(seed),
mDone(FALSE)
{
mID.generate();
- LLUICtrlFactory::getInstance()->buildFloater(this,"floater_bulk_perms.xml");
+// LLUICtrlFactory::getInstance()->buildFloater(this,"floater_bulk_perms.xml");
+ mCommitCallbackRegistrar.add("BulkPermission.Apply", boost::bind(&LLFloaterBulkPermission::onApplyBtn, this));
+ mCommitCallbackRegistrar.add("BulkPermission.Close", boost::bind(&LLFloaterBulkPermission::onCloseBtn, this));
+ mCommitCallbackRegistrar.add("BulkPermission.CheckAll", boost::bind(&LLFloaterBulkPermission::onCheckAll, this));
+ mCommitCallbackRegistrar.add("BulkPermission.UncheckAll", boost::bind(&LLFloaterBulkPermission::onUncheckAll, this));
+ mCommitCallbackRegistrar.add("BulkPermission.CommitCopy", boost::bind(&LLFloaterBulkPermission::onCommitCopy, this));
}
BOOL LLFloaterBulkPermission::postBuild()
{
- childSetEnabled("next_owner_transfer", gSavedSettings.getBOOL("BulkChangeNextOwnerCopy"));
- childSetAction("help", onHelpBtn, this);
- childSetAction("apply", onApplyBtn, this);
- childSetAction("close", onCloseBtn, this);
- childSetAction("check_all", onCheckAll, this);
- childSetAction("check_none", onUncheckAll, this);
- childSetCommitCallback("next_owner_copy", &onCommitCopy, this);
+// childSetAction("help", onHelpBtn, this); // this is not in use
+
return TRUE;
}
@@ -152,34 +152,32 @@ void LLFloaterBulkPermission::inventoryChanged(LLViewerObject* viewer_object,
}
}
-void LLFloaterBulkPermission::onApplyBtn(void* user_data)
+void LLFloaterBulkPermission::onApplyBtn()
{
- LLFloaterBulkPermission* self = static_cast<LLFloaterBulkPermission*>(user_data);
- self->doApply();
+ doApply();
}
-void LLFloaterBulkPermission::onHelpBtn(void* user_data)
-{
- LLNotifications::instance().add("HelpBulkPermission");
-}
+// angela -- this is not in use
+//void LLFloaterBulkPermission::onHelpBtn(void* user_data)
+//{
+// LLNotifications::instance().add("HelpBulkPermission");
+//}
-void LLFloaterBulkPermission::onCloseBtn(void* user_data)
+void LLFloaterBulkPermission::onCloseBtn()
{
- LLFloaterBulkPermission* self = static_cast<LLFloaterBulkPermission*>(user_data);
- self->onClose(false);
+ onClose(false);
}
//static
-void LLFloaterBulkPermission::onCommitCopy(LLUICtrl* ctrl, void* data)
+void LLFloaterBulkPermission::onCommitCopy()
{
- LLFloaterBulkPermission* self = static_cast<LLFloaterBulkPermission*>(data);
// Implements fair use
BOOL copyable = gSavedSettings.getBOOL("BulkChangeNextOwnerCopy");
if(!copyable)
{
gSavedSettings.setBOOL("BulkChangeNextOwnerTransfer", TRUE);
}
- LLCheckBoxCtrl* xfer = self->getChild<LLCheckBoxCtrl>("next_owner_transfer");
+ LLCheckBoxCtrl* xfer =getChild<LLCheckBoxCtrl>("next_owner_transfer");
xfer->setEnabled(copyable);
}
@@ -252,7 +250,6 @@ void LLFloaterBulkPermission::doCheckUncheckAll(BOOL check)
gSavedSettings.setBOOL("BulkChangeIncludeBodyParts" , check);
gSavedSettings.setBOOL("BulkChangeIncludeClothing" , check);
gSavedSettings.setBOOL("BulkChangeIncludeGestures" , check);
- gSavedSettings.setBOOL("BulkChangeIncludeLandmarks" , check);
gSavedSettings.setBOOL("BulkChangeIncludeNotecards" , check);
gSavedSettings.setBOOL("BulkChangeIncludeObjects" , check);
gSavedSettings.setBOOL("BulkChangeIncludeScripts" , check);
@@ -275,7 +272,6 @@ void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, Invent
( asstype == LLAssetType::AT_BODYPART && gSavedSettings.getBOOL("BulkChangeIncludeBodyParts" )) ||
( asstype == LLAssetType::AT_CLOTHING && gSavedSettings.getBOOL("BulkChangeIncludeClothing" )) ||
( asstype == LLAssetType::AT_GESTURE && gSavedSettings.getBOOL("BulkChangeIncludeGestures" )) ||
- ( asstype == LLAssetType::AT_LANDMARK && gSavedSettings.getBOOL("BulkChangeIncludeLandmarks" )) ||
( asstype == LLAssetType::AT_FAVORITE && gSavedSettings.getBOOL("BulkChangeIncludeFavourite" )) ||
( asstype == LLAssetType::AT_NOTECARD && gSavedSettings.getBOOL("BulkChangeIncludeNotecards" )) ||
( asstype == LLAssetType::AT_OBJECT && gSavedSettings.getBOOL("BulkChangeIncludeObjects" )) ||
diff --git a/indra/newview/llfloaterbulkpermission.h b/indra/newview/llfloaterbulkpermission.h
index 2ea12fbe69..c34e4413cc 100644
--- a/indra/newview/llfloaterbulkpermission.h
+++ b/indra/newview/llfloaterbulkpermission.h
@@ -46,14 +46,16 @@
#include "llviewerinventory.h"
-class LLFloaterBulkPermission : public LLFloater, public LLVOInventoryListener, public LLFloaterSingleton<LLFloaterBulkPermission>
+class LLFloaterBulkPermission : public LLFloater, public LLVOInventoryListener
{
+ friend class LLFloaterReg;
public:
- LLFloaterBulkPermission(const LLSD& seed);
BOOL postBuild();
private:
+
+ LLFloaterBulkPermission(const LLSD& seed);
virtual ~LLFloaterBulkPermission() {}
BOOL start(); // returns TRUE if the queue has started, otherwise FALSE.
@@ -77,12 +79,12 @@ private:
U8 key,
bool is_new);
- static void onHelpBtn(void* user_data);
- static void onCloseBtn(void* user_data);
- static void onApplyBtn(void* user_data);
- static void onCommitCopy(LLUICtrl* ctrl, void* data);
- static void onCheckAll( void* user_data) { ((LLFloaterBulkPermission*)user_data)->doCheckUncheckAll(TRUE); }
- static void onUncheckAll(void* user_data) { ((LLFloaterBulkPermission*)user_data)->doCheckUncheckAll(FALSE); }
+// static void onHelpBtn(void* user_data);
+ void onCloseBtn();
+ void onApplyBtn();
+ void onCommitCopy();
+ void onCheckAll() { doCheckUncheckAll(TRUE); }
+ void onUncheckAll() { doCheckUncheckAll(FALSE); }
// returns true if this is done
BOOL isDone() const { return (mCurrentObjectID.isNull() || (mObjectIDs.count() == 0)); }
diff --git a/indra/newview/llfloaterbump.cpp b/indra/newview/llfloaterbump.cpp
index e4e1c7efa2..8b64f913e0 100644
--- a/indra/newview/llfloaterbump.cpp
+++ b/indra/newview/llfloaterbump.cpp
@@ -45,11 +45,13 @@
///----------------------------------------------------------------------------
/// Class LLFloaterBump
///----------------------------------------------------------------------------
+extern BOOL gNoRender;
// Default constructor
LLFloaterBump::LLFloaterBump(const LLSD& key)
-: LLFloater()
+: LLFloater(key)
{
+ if(gNoRender) return;
//LLUICtrlFactory::getInstance()->buildFloater(this, "floater_bumps.xml");
}
diff --git a/indra/newview/llfloaterbump.h b/indra/newview/llfloaterbump.h
index b56817436c..1f2cb6d6ab 100644
--- a/indra/newview/llfloaterbump.h
+++ b/indra/newview/llfloaterbump.h
@@ -40,14 +40,17 @@ class LLMeanCollisionData;
class LLScrollListCtrl;
class LLFloaterBump
-: public LLFloater, public LLFloaterSingleton<LLFloaterBump>
+: public LLFloater
{
- friend class LLUISingleton<LLFloaterBump, VisibilityPolicy<LLFloater> >;
+ friend class LLFloaterReg;
protected:
void add(LLScrollListCtrl* list, LLMeanCollisionData *mcd);
public:
/*virtual*/ void onOpen(const LLSD& key);
+
+private:
+
LLFloaterBump(const LLSD& key);
virtual ~LLFloaterBump();
};
diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp
index 9c523522fd..6cae4b8abc 100644
--- a/indra/newview/llfloaterbuy.cpp
+++ b/indra/newview/llfloaterbuy.cpp
@@ -43,7 +43,7 @@
#include "llagent.h" // for agent id
#include "llalertdialog.h"
#include "llinventorymodel.h" // for gInventory
-#include "llinventoryview.h" // for get_item_icon
+#include "llfloaterinventory.h" // for get_item_icon
#include "llselectmgr.h"
#include "llscrolllistctrl.h"
#include "llviewerobject.h"
@@ -276,7 +276,7 @@ void LLFloaterBuy::inventoryChanged(LLViewerObject* obj,
std::string text = obj->getName();
if (!(next_owner_mask & PERM_COPY))
{
- text.append(getString("no_copy"));
+ text.append(LLTrans::getString("no_copy"));
}
if (!(next_owner_mask & PERM_MODIFY))
{
diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp
index 7a90275201..db4547e5bc 100644
--- a/indra/newview/llfloaterbuycontents.cpp
+++ b/indra/newview/llfloaterbuycontents.cpp
@@ -46,7 +46,7 @@
#include "llalertdialog.h"
#include "llcheckboxctrl.h"
#include "llinventorymodel.h" // for gInventory
-#include "llinventoryview.h" // for get_item_icon
+#include "llfloaterinventory.h" // for get_item_icon
#include "llselectmgr.h"
#include "llscrolllistctrl.h"
#include "llviewerobject.h"
@@ -287,7 +287,7 @@ void LLFloaterBuyContents::onClickBuy(void*)
// We may want to wear this item
if (sInstance->childGetValue("wear_check"))
{
- LLInventoryView::sWearNewClothing = TRUE;
+ LLFloaterInventory::sWearNewClothing = TRUE;
}
// Put the items where we put new folders.
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index e79142513b..ee3e465832 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -48,11 +48,11 @@ const F32 CAMERA_BUTTON_DELAY = 0.0f;
// Member functions
//
LLFloaterCamera::LLFloaterCamera(const LLSD& val)
-: LLFloater()
+: LLFloater(val)
{
- // For now, only used for size and tooltip strings
- const BOOL DONT_OPEN = FALSE;
- LLUICtrlFactory::getInstance()->buildFloater(this, "floater_camera.xml", DONT_OPEN);
+ //// For now, only used for size and tooltip strings
+ //const BOOL DONT_OPEN = FALSE;
+ //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_camera.xml", DONT_OPEN);
}
// virtual
@@ -67,20 +67,3 @@ BOOL LLFloaterCamera::postBuild()
return TRUE;
}
-// virtual
-void LLFloaterCamera::onOpen(const LLSD& key)
-{
- gSavedSettings.setBOOL("ShowCameraControls", TRUE);
-}
-
-// virtual
-void LLFloaterCamera::onClose(bool app_quitting)
-{
- destroy();
-
- if (!app_quitting)
- {
- gSavedSettings.setBOOL("ShowCameraControls", FALSE);
- }
-}
-
diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h
index f954e329eb..fabe8f577e 100644
--- a/indra/newview/llfloatercamera.h
+++ b/indra/newview/llfloatercamera.h
@@ -40,19 +40,18 @@ class LLJoystickCameraZoom;
class LLJoystickCameraTrack;
class LLFloaterCamera
- : public LLFloater,
- public LLFloaterSingleton<LLFloaterCamera>
+ : public LLFloater
{
- friend class LLUISingleton<LLFloaterCamera, VisibilityPolicy<LLFloater> >;
+ friend class LLFloaterReg;
private:
+
LLFloaterCamera(const LLSD& val);
~LLFloaterCamera() {};
- /*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ void onClose(bool app_quitting);
/*virtual*/ BOOL postBuild();
public:
+
LLJoystickCameraRotate* mRotate;
LLJoystickCameraZoom* mZoom;
LLJoystickCameraTrack* mTrack;
diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp
index 61ef3abda6..1ecbdd8e16 100644
--- a/indra/newview/llfloaterchat.cpp
+++ b/indra/newview/llfloaterchat.cpp
@@ -54,7 +54,6 @@
//#include "lllineeditor.h"
#include "llmutelist.h"
//#include "llresizehandle.h"
-#include "llchatbar.h"
#include "llrecentpeople.h"
#include "llstatusbar.h"
#include "llviewertexteditor.h"
@@ -63,7 +62,6 @@
#include "llviewerwindow.h"
#include "llviewercontrol.h"
#include "lluictrlfactory.h"
-#include "llchatbar.h"
#include "lllogchat.h"
#include "lltexteditor.h"
#include "lltextparser.h"
@@ -87,6 +85,7 @@
const F32 INSTANT_MSG_SIZE = 8.0f;
const F32 CHAT_MSG_SIZE = 8.0f;
+
//
// Global statics
//
@@ -96,10 +95,9 @@ LLColor4 get_text_color(const LLChat& chat);
// Member Functions
//
LLFloaterChat::LLFloaterChat(const LLSD& seed)
- : LLFloater(),
+ : LLFloater(seed),
mPanel(NULL)
{
- mFactoryMap["chat_panel"] = LLCallbackMap(createChatPanel, NULL);
mFactoryMap["active_speakers_panel"] = LLCallbackMap(createSpeakersPanel, NULL);
//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_chat_history.xml");
@@ -121,12 +119,6 @@ void LLFloaterChat::draw()
childSetValue("toggle_active_speakers_btn", childIsVisible("active_speakers_panel"));
- LLChatBar* chat_barp = findChild<LLChatBar>("chat_panel", TRUE);
- if (chat_barp)
- {
- chat_barp->refresh();
- }
-
mPanel->refreshSpeakers();
LLFloater::draw();
}
@@ -135,12 +127,6 @@ BOOL LLFloaterChat::postBuild()
{
mPanel = (LLPanelActiveSpeakers*)getChild<LLPanel>("active_speakers_panel");
- LLChatBar* chat_barp = findChild<LLChatBar>("chat_panel", TRUE);
- if (chat_barp)
- {
- chat_barp->setGestureCombo(getChild<LLComboBox>( "Gesture"));
- }
-
childSetCommitCallback("show mutes",onClickToggleShowMute,this); //show mutes
childSetVisible("Chat History Editor with mute",FALSE);
childSetAction("toggle_active_speakers_btn", onClickToggleActiveSpeakers, this);
@@ -218,7 +204,7 @@ void add_timestamped_line(LLViewerTextEditor* edit, LLChat chat, const LLColor4&
void log_chat_text(const LLChat& chat)
{
std::string histstr;
- if (gSavedPerAccountSettings.getBOOL("LogChatTimestamp"))
+ if (gSavedPerAccountSettings.getBOOL("LogTimestamp"))
histstr = LLLogChat::timestamp(gSavedPerAccountSettings.getBOOL("LogTimestampDate")) + chat.mText;
else
histstr = chat.mText;
@@ -228,7 +214,7 @@ void log_chat_text(const LLChat& chat)
// static
void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file)
{
- if ( gSavedPerAccountSettings.getBOOL("LogChat") && log_to_file)
+ if ( (gSavedPerAccountSettings.getS32("IMLogOptions")!=LOG_IM) && log_to_file)
{
log_chat_text(chat);
}
@@ -368,11 +354,11 @@ void LLFloaterChat::addChat(const LLChat& chat,
F32 size = CHAT_MSG_SIZE;
if (chat.mSourceType == CHAT_SOURCE_SYSTEM)
{
- text_color = gSavedSkinSettings.getColor("SystemChatColor");
+ text_color = LLUIColorTable::instance().getColor("SystemChatColor");
}
else if(from_instant_message)
{
- text_color = gSavedSkinSettings.getColor("IMChatColor");
+ text_color = LLUIColorTable::instance().getColor("IMChatColor");
size = INSTANT_MSG_SIZE;
}
// We display anything if it's not an IM. If it's an IM, check pref...
@@ -382,7 +368,7 @@ void LLFloaterChat::addChat(const LLChat& chat,
}
}
- if(from_instant_message && gSavedPerAccountSettings.getBOOL("LogChatIM"))
+ if(from_instant_message && (gSavedPerAccountSettings.getS32("IMLogOptions")== LOG_BOTH_TOGETHER))
log_chat_text(chat);
if(from_instant_message && gSavedSettings.getBOOL("IMInChatHistory"))
@@ -453,37 +439,37 @@ LLColor4 get_text_color(const LLChat& chat)
switch(chat.mSourceType)
{
case CHAT_SOURCE_SYSTEM:
- text_color = gSavedSkinSettings.getColor4("SystemChatColor");
+ text_color = LLUIColorTable::instance().getColor("SystemChatColor");
break;
case CHAT_SOURCE_AGENT:
if (chat.mFromID.isNull())
{
- text_color = gSavedSkinSettings.getColor4("SystemChatColor");
+ text_color = LLUIColorTable::instance().getColor("SystemChatColor");
}
else
{
if(gAgent.getID() == chat.mFromID)
{
- text_color = gSavedSkinSettings.getColor4("UserChatColor");
+ text_color = LLUIColorTable::instance().getColor("UserChatColor");
}
else
{
- text_color = gSavedSkinSettings.getColor4("AgentChatColor");
+ text_color = LLUIColorTable::instance().getColor("AgentChatColor");
}
}
break;
case CHAT_SOURCE_OBJECT:
if (chat.mChatType == CHAT_TYPE_DEBUG_MSG)
{
- text_color = gSavedSkinSettings.getColor4("ScriptErrorColor");
+ text_color = LLUIColorTable::instance().getColor("ScriptErrorColor");
}
else if ( chat.mChatType == CHAT_TYPE_OWNER )
{
- text_color = gSavedSkinSettings.getColor4("llOwnerSayChatColor");
+ text_color = LLUIColorTable::instance().getColor("llOwnerSayChatColor");
}
else
{
- text_color = gSavedSkinSettings.getColor4("ObjectChatColor");
+ text_color = LLUIColorTable::instance().getColor("ObjectChatColor");
}
break;
default:
@@ -540,13 +526,6 @@ void* LLFloaterChat::createSpeakersPanel(void* data)
return new LLPanelActiveSpeakers(LLLocalSpeakerMgr::getInstance(), TRUE);
}
-//static
-void* LLFloaterChat::createChatPanel(void* data)
-{
- LLChatBar* chatp = new LLChatBar();
- return chatp;
-}
-
// static
void LLFloaterChat::onClickToggleActiveSpeakers(void* userdata)
{
@@ -558,6 +537,6 @@ void LLFloaterChat::onClickToggleActiveSpeakers(void* userdata)
//static
LLFloaterChat* LLFloaterChat::getInstance()
{
- LLFloater* inst = LLFloaterReg::getInstance("chat", LLSD()) ;
- return dynamic_cast<LLFloaterChat*>(inst);
+ return LLFloaterReg::getTypedInstance<LLFloaterChat>("chat", LLSD()) ;
+
}
diff --git a/indra/newview/llfloaterchat.h b/indra/newview/llfloaterchat.h
index 2bae4ea0c2..b299d1ad10 100644
--- a/indra/newview/llfloaterchat.h
+++ b/indra/newview/llfloaterchat.h
@@ -51,6 +51,14 @@ class LLLogChat;
class LLVector3d;
class LLWindow;
+enum ELogOptions
+{
+ LOG_CHAT = 0,
+ LOG_IM = 1,
+ LOG_BOTH_TOGETHER = 2,
+ LOG_BOTH_SEPARATE = 3
+};
+
class LLFloaterChat : public LLFloater
{
public:
@@ -82,7 +90,6 @@ public:
static void chatFromLogFile(LLLogChat::ELogLineType type,std::string line, void* userdata);
static void loadHistory();
static void* createSpeakersPanel(void* data);
- static void* createChatPanel(void* data);
static LLFloaterChat* getInstance(); // *TODO:Skinning Deprecate
diff --git a/indra/newview/llfloaterchatterbox.cpp b/indra/newview/llfloaterchatterbox.cpp
index a283b445f5..3389770b2f 100644
--- a/indra/newview/llfloaterchatterbox.cpp
+++ b/indra/newview/llfloaterchatterbox.cpp
@@ -98,8 +98,7 @@ void* LLFloaterMyFriends::createGroupsPanel(void* data)
//static
LLFloaterMyFriends* LLFloaterMyFriends::getInstance()
{
- LLFloater* inst = LLFloaterReg::getInstance("contacts", "friends") ;
- return dynamic_cast<LLFloaterMyFriends*>(inst);
+ return LLFloaterReg::getTypedInstance<LLFloaterMyFriends>("contacts", "friends") ;
}
//
@@ -123,11 +122,14 @@ BOOL LLFloaterChatterBox::postBuild()
if (gSavedSettings.getBOOL("ContactsTornOff"))
{
LLFloaterMyFriends* floater_contacts = LLFloaterMyFriends::getInstance();
- // add then remove to set up relationship for re-attach
- addFloater(floater_contacts, FALSE);
- removeFloater(floater_contacts);
- // reparent to floater view
- gFloaterView->addChild(floater_contacts);
+ if(floater_contacts)
+ {
+ // add then remove to set up relationship for re-attach
+ addFloater(floater_contacts, FALSE);
+ removeFloater(floater_contacts);
+ // reparent to floater view
+ gFloaterView->addChild(floater_contacts);
+ }
}
else
{
@@ -137,11 +139,14 @@ BOOL LLFloaterChatterBox::postBuild()
if (gSavedSettings.getBOOL("ChatHistoryTornOff"))
{
LLFloaterChat* floater_chat = LLFloaterChat::getInstance();
- // add then remove to set up relationship for re-attach
- addFloater(floater_chat, FALSE);
- removeFloater(floater_chat);
- // reparent to floater view
- gFloaterView->addChild(floater_chat);
+ if(floater_chat)
+ {
+ // add then remove to set up relationship for re-attach
+ addFloater(floater_chat, FALSE);
+ removeFloater(floater_chat);
+ // reparent to floater view
+ gFloaterView->addChild(floater_chat);
+ }
}
else
{
@@ -249,11 +254,17 @@ void LLFloaterChatterBox::setMinimized(BOOL minimized)
{
LLFloater::setMinimized(minimized);
// HACK: potentially need to toggle console
- LLFloaterChat::getInstance()->updateConsoleVisibility();
+ LLFloaterChat* instance = LLFloaterChat::getInstance();
+ if(instance)
+ {
+ instance->updateConsoleVisibility();
+ }
}
void LLFloaterChatterBox::removeFloater(LLFloater* floaterp)
{
+ if(!floaterp) return;
+
if (floaterp->getName() == "chat floater")
{
// only my friends floater now locked
@@ -275,6 +286,8 @@ void LLFloaterChatterBox::addFloater(LLFloater* floaterp,
BOOL select_added_floater,
LLTabContainer::eInsertionPoint insertion_point)
{
+ if(!floaterp) return;
+
S32 num_locked_tabs = mTabContainer->getNumLockedTabs();
// already here
@@ -332,8 +345,7 @@ void LLFloaterChatterBox::addFloater(LLFloater* floaterp,
//static
LLFloaterChatterBox* LLFloaterChatterBox::getInstance()
{
- LLFloater* inst = LLFloaterReg::getInstance("communicate", LLSD()) ;
- return dynamic_cast<LLFloaterChatterBox*>(inst);
+ return LLFloaterReg::getTypedInstance<LLFloaterChatterBox>("communicate", LLSD()) ;
}
//static
@@ -351,6 +363,7 @@ LLFloater* LLFloaterChatterBox::getCurrentVoiceFloater()
else
{
LLFloaterChatterBox* floater = LLFloaterChatterBox::getInstance();
+ if(!floater) return NULL;
// iterator over all IM tabs (skip friends and near me)
for (S32 i = 0; i < floater->getFloaterCount(); i++)
{
diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp
index 4964f04556..c140518759 100644
--- a/indra/newview/llfloatercolorpicker.cpp
+++ b/indra/newview/llfloatercolorpicker.cpp
@@ -56,7 +56,6 @@
#include "llpointer.h"
#include "llimage.h"
#include "llmousehandler.h"
-#include "llimagegl.h"
#include "llglheaders.h"
#include "llcheckboxctrl.h"
#include "lltextbox.h"
@@ -161,7 +160,7 @@ void LLFloaterColorPicker::createUI ()
* ( bits + x + y * linesize + 2 ) = ( U8 )( bVal * 255.0f );
}
}
- mRGBImage = new LLImageGL ( (LLImageRaw*)raw, FALSE );
+ mRGBImage = LLViewerTextureManager::getLocalTexture( (LLImageRaw*)raw, FALSE );
gGL.getTexUnit(0)->bind(mRGBImage);
mRGBImage->setAddressMode(LLTexUnit::TAM_CLAMP);
@@ -173,7 +172,7 @@ void LLFloaterColorPicker::createUI ()
// argh!
const std::string s ( codec.str () );
- mPalette.push_back ( new LLColor4 ( gSavedSkinSettings.getColor4 ( s ) ) );
+ mPalette.push_back ( new LLColor4 ( LLUIColorTable::instance().getColor ( s ) ) );
}
}
@@ -1017,7 +1016,7 @@ BOOL LLFloaterColorPicker::handleMouseUp ( S32 x, S32 y, MASK mask )
std::ostringstream codec;
codec << "ColorPaletteEntry" << std::setfill ( '0' ) << std::setw ( 2 ) << curEntry + 1;
const std::string s ( codec.str () );
- gSavedSkinSettings.setColor4( s, *mPalette [ curEntry ] );
+ LLUIColorTable::instance().setColor(s, *mPalette [ curEntry ] );
}
}
diff --git a/indra/newview/llfloatercolorpicker.h b/indra/newview/llfloatercolorpicker.h
index 16f456b5bf..a16cde7f10 100644
--- a/indra/newview/llfloatercolorpicker.h
+++ b/indra/newview/llfloatercolorpicker.h
@@ -175,7 +175,7 @@ class LLFloaterColorPicker
const S32 mPaletteRegionHeight;
// image used to compose color grid
- LLPointer<LLImageGL> mRGBImage;
+ LLPointer<LLViewerTexture> mRGBImage;
// current swatch in use
LLColorSwatchCtrl* mSwatch;
diff --git a/indra/newview/llfloaterfonttest.cpp b/indra/newview/llfloaterfonttest.cpp
index 02791b711e..413992910e 100644
--- a/indra/newview/llfloaterfonttest.cpp
+++ b/indra/newview/llfloaterfonttest.cpp
@@ -42,25 +42,11 @@
#include "lluictrlfactory.h"
-LLFloaterFontTest* LLFloaterFontTest::sInstance = NULL;
-
-LLFloaterFontTest::LLFloaterFontTest()
+LLFloaterFontTest::LLFloaterFontTest(const LLSD& key)
: LLFloater("floater_font_test")
{
- LLUICtrlFactory::getInstance()->buildFloater(this, "floater_font_test.xml");
}
LLFloaterFontTest::~LLFloaterFontTest()
{
- sInstance = NULL;
-}
-
-// static
-void LLFloaterFontTest::show(void *unused)
-{
- if (!sInstance)
- sInstance = new LLFloaterFontTest();
-
- sInstance->openFloater();
- sInstance->setFocus(TRUE);
}
diff --git a/indra/newview/llfloaterfonttest.h b/indra/newview/llfloaterfonttest.h
index eb2d410387..4406a9f36a 100644
--- a/indra/newview/llfloaterfonttest.h
+++ b/indra/newview/llfloaterfonttest.h
@@ -39,14 +39,10 @@
class LLFloaterFontTest:
public LLFloater
{
-public:
- static void show(void* unused);
-
+ friend class LLFloaterReg;
private:
- LLFloaterFontTest();
+ LLFloaterFontTest(const LLSD& key);
~LLFloaterFontTest();
-
- static LLFloaterFontTest* sInstance;
};
#endif
diff --git a/indra/newview/llfloaterfriends.cpp b/indra/newview/llfloaterfriends.cpp
index 1e8129c7d3..1e8e7bad74 100644
--- a/indra/newview/llfloaterfriends.cpp
+++ b/indra/newview/llfloaterfriends.cpp
@@ -46,7 +46,7 @@
#include "llfloateravatarpicker.h"
#include "llviewerwindow.h"
#include "llbutton.h"
-#include "llfriendactions.h"
+#include "llavataractions.h"
#include "llinventorymodel.h"
#include "llnamelistctrl.h"
#include "llnotify.h"
@@ -62,7 +62,7 @@
#include "lltextbox.h"
#include "llvoiceclient.h"
-// *TODO: Move more common stuff to LLFriendActions?
+// *TODO: Move more common stuff to LLAvatarActions?
//Maximum number of people you can select to do an operation on at once.
#define MAX_FRIEND_SELECT 20
@@ -546,7 +546,7 @@ void LLPanelFriends::onClickProfile(void* user_data)
if(ids.size() > 0)
{
LLUUID agent_id = ids[0];
- LLFriendActions::showProfile(agent_id);
+ LLAvatarActions::showProfile(agent_id);
}
}
@@ -560,11 +560,11 @@ void LLPanelFriends::onClickIM(void* user_data)
{
if(ids.size() == 1)
{
- LLFriendActions::startIM(ids[0]);
+ LLAvatarActions::startIM(ids[0]);
}
else
{
- LLFriendActions::startConference(ids);
+ LLAvatarActions::startConference(ids);
}
}
}
@@ -576,7 +576,7 @@ void LLPanelFriends::onPickAvatar(const std::vector<std::string>& names,
{
if (names.empty()) return;
if (ids.empty()) return;
- LLFriendActions::requestFriendshipDialog(ids[0], names[0]);
+ LLAvatarActions::requestFriendshipDialog(ids[0], names[0]);
}
// static
@@ -595,14 +595,14 @@ void LLPanelFriends::onClickAddFriend(void* user_data)
void LLPanelFriends::onClickRemove(void* user_data)
{
LLPanelFriends* panelp = (LLPanelFriends*)user_data;
- LLFriendActions::removeFriendsDialog(panelp->getSelectedIDs());
+ LLAvatarActions::removeFriendsDialog(panelp->getSelectedIDs());
}
// static
void LLPanelFriends::onClickOfferTeleport(void* user_data)
{
LLPanelFriends* panelp = (LLPanelFriends*)user_data;
- LLFriendActions::offerTeleport(panelp->getSelectedIDs());
+ LLAvatarActions::offerTeleport(panelp->getSelectedIDs());
}
// static
diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp
index c3448d52c9..5a4de579c2 100644
--- a/indra/newview/llfloatergesture.cpp
+++ b/indra/newview/llfloatergesture.cpp
@@ -44,7 +44,7 @@
#include "llcombobox.h"
#include "llgesturemgr.h"
#include "llinventorymodel.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
#include "llkeyboard.h"
#include "lllineeditor.h"
#include "llpreviewgesture.h"
@@ -56,7 +56,7 @@
#include "lltrans.h"
#include "lluictrlfactory.h"
#include "llviewergesture.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerinventory.h"
#include "llvoavatar.h"
#include "llviewercontrol.h"
@@ -322,7 +322,7 @@ void LLFloaterGesture::onClickInventory(void* data)
if (!list) return;
const LLUUID& item_id = list->getCurrentID();
- LLInventoryView* inv = LLInventoryView::showAgentInventory();
+ LLFloaterInventory* inv = LLFloaterInventory::showAgentInventory();
if (!inv) return;
inv->getPanel()->setSelection(item_id, TRUE);
}
diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp
index 58cbe02d6d..6d603fa5c8 100644
--- a/indra/newview/llfloatergodtools.cpp
+++ b/indra/newview/llfloatergodtools.cpp
@@ -50,6 +50,7 @@
#include "llcombobox.h"
#include "lldraghandle.h"
#include "llfloater.h"
+#include "llfloaterreg.h"
#include "llfocusmgr.h"
#include "llfloatertopobjects.h"
#include "lllineeditor.h"
@@ -105,7 +106,7 @@ void LLFloaterGodTools::onOpen(const LLSD& key)
// static
void LLFloaterGodTools::refreshAll()
{
- LLFloaterGodTools* god_tools = getInstance();
+ LLFloaterGodTools* god_tools = LLFloaterReg::getTypedInstance<LLFloaterGodTools>("god_tools");
if (god_tools)
{
if (gAgent.getRegionHost() != god_tools->mCurrentHost)
@@ -119,7 +120,7 @@ void LLFloaterGodTools::refreshAll()
LLFloaterGodTools::LLFloaterGodTools(const LLSD& key)
-: LLFloater(),
+: LLFloater(key),
mCurrentHost(LLHost::invalid),
mUpdateTimer()
{
@@ -127,13 +128,16 @@ LLFloaterGodTools::LLFloaterGodTools(const LLSD& key)
mFactoryMap["region"] = LLCallbackMap(createPanelRegion, this);
mFactoryMap["objects"] = LLCallbackMap(createPanelObjects, this);
mFactoryMap["request"] = LLCallbackMap(createPanelRequest, this);
- LLUICtrlFactory::getInstance()->buildFloater(this, "floater_god_tools.xml");
+// LLUICtrlFactory::getInstance()->buildFloater(this, "floater_god_tools.xml");
- sendRegionInfoRequest();
+}
+BOOL LLFloaterGodTools::postBuild()
+{
+ sendRegionInfoRequest();
childShowTab("GodTools Tabs", "region");
+ return TRUE;
}
-
// static
void* LLFloaterGodTools::createPanelGrid(void *userdata)
{
@@ -166,10 +170,7 @@ LLFloaterGodTools::~LLFloaterGodTools()
{
// children automatically deleted
}
-BOOL LLFloaterGodTools::postBuild()
-{
- return TRUE;
-}
+
U32 LLFloaterGodTools::computeRegionFlags() const
{
@@ -187,10 +188,10 @@ void LLFloaterGodTools::updatePopup(LLCoordGL center, MASK mask)
// virtual
void LLFloaterGodTools::onClose(bool app_quitting)
{
- if (getInstance())
- {
- getInstance()->setVisible(FALSE);
- }
+ LLFloaterGodTools* god_tools = LLFloaterReg::getTypedInstance<LLFloaterGodTools>("god_tools");
+ if(!god_tools) return;
+ god_tools->setVisible(FALSE);
+
}
// virtual
@@ -271,16 +272,19 @@ void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg)
regionp->setWaterHeight(water_height);
regionp->setBillableFactor(billable_factor);
}
+
+ LLFloaterGodTools* god_tools = LLFloaterReg::getTypedInstance<LLFloaterGodTools>("god_tools");
+ if (!god_tools) return;
// push values to god tools, if available
if ( gAgent.isGodlike()
- && instanceVisible()
- && getInstance()->mPanelRegionTools
- && getInstance()->mPanelObjectTools
+ && LLFloaterReg::instanceVisible("god_tools")
+ && god_tools->mPanelRegionTools
+ && god_tools->mPanelObjectTools
&& msg )
{
- LLPanelRegionTools* rtool = getInstance()->mPanelRegionTools;
- getInstance()->mCurrentHost = host;
+ LLPanelRegionTools* rtool = god_tools->mPanelRegionTools;
+ god_tools->mCurrentHost = host;
// store locally
rtool->setSimName(sim_name);
@@ -293,7 +297,7 @@ void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg)
rtool->setRedirectGridY(redirect_grid_y);
rtool->enableAllWidgets();
- LLPanelObjectTools *otool = getInstance()->mPanelObjectTools;
+ LLPanelObjectTools *otool = god_tools->mPanelObjectTools;
otool->setCheckFlags(region_flags);
otool->enableAllWidgets();
@@ -336,14 +340,17 @@ void LLFloaterGodTools::sendRegionInfoRequest()
void LLFloaterGodTools::sendGodUpdateRegionInfo()
{
+ LLFloaterGodTools* god_tools = LLFloaterReg::getTypedInstance<LLFloaterGodTools>("god_tools");
+ if (!god_tools) return;
+
LLViewerRegion *regionp = gAgent.getRegion();
if (gAgent.isGodlike()
- && getInstance()->mPanelRegionTools
+ && god_tools->mPanelRegionTools
&& regionp
&& gAgent.getRegionHost() == mCurrentHost)
{
LLMessageSystem *msg = gMessageSystem;
- LLPanelRegionTools *rtool = getInstance()->mPanelRegionTools;
+ LLPanelRegionTools *rtool = god_tools->mPanelRegionTools;
msg->newMessage("GodUpdateRegionInfo");
msg->nextBlockFast(_PREHASH_AgentData);
@@ -403,58 +410,31 @@ const F32 PRICE_PER_METER_MAX = 100.f;
LLPanelRegionTools::LLPanelRegionTools()
: LLPanel()
{
+ mCommitCallbackRegistrar.add("RegionTools.ChangeAnything", boost::bind(&LLPanelRegionTools::onChangeAnything, this));
+ mCommitCallbackRegistrar.add("RegionTools.ChangePrelude", boost::bind(&LLPanelRegionTools::onChangePrelude, this));
+ mCommitCallbackRegistrar.add("RegionTools.BakeTerrain", boost::bind(&LLPanelRegionTools::onBakeTerrain, this));
+ mCommitCallbackRegistrar.add("RegionTools.RevertTerrain", boost::bind(&LLPanelRegionTools::onRevertTerrain, this));
+ mCommitCallbackRegistrar.add("RegionTools.SwapTerrain", boost::bind(&LLPanelRegionTools::onSwapTerrain, this));
+ mCommitCallbackRegistrar.add("RegionTools.Refresh", boost::bind(&LLPanelRegionTools::onRefresh, this));
+ mCommitCallbackRegistrar.add("RegionTools.ApplyChanges", boost::bind(&LLPanelRegionTools::onApplyChanges, this));
+ mCommitCallbackRegistrar.add("RegionTools.SelectRegion", boost::bind(&LLPanelRegionTools::onSelectRegion, this));
+ mCommitCallbackRegistrar.add("RegionTools.SaveState", boost::bind(&LLPanelRegionTools::onSaveState, this));
}
BOOL LLPanelRegionTools::postBuild()
{
- childSetCommitCallback("region name", onChangeAnything, this);
getChild<LLLineEditor>("region name")->setKeystrokeCallback(onChangeSimName, this);
childSetPrevalidate("region name", &LLLineEditor::prevalidatePrintableNotPipe);
-
- childSetCommitCallback("check prelude", onChangePrelude, this);
- childSetCommitCallback("check fixed sun", onChangeAnything, this);
- childSetCommitCallback("check reset home", onChangeAnything, this);
- childSetCommitCallback("check visible", onChangeAnything, this);
- childSetCommitCallback("check damage", onChangeAnything, this);
- childSetCommitCallback("block dwell", onChangeAnything, this);
- childSetCommitCallback("block terraform", onChangeAnything, this);
- childSetCommitCallback("allow transfer", onChangeAnything, this);
- childSetCommitCallback("is sandbox", onChangeAnything, this);
-
- childSetAction("Bake Terrain", onBakeTerrain, this);
- childSetAction("Revert Terrain", onRevertTerrain, this);
- childSetAction("Swap Terrain", onSwapTerrain, this);
-
- childSetCommitCallback("estate", onChangeAnything, this);
childSetPrevalidate("estate", &LLLineEditor::prevalidatePositiveS32);
-
- childSetCommitCallback("parentestate", onChangeAnything, this);
childSetPrevalidate("parentestate", &LLLineEditor::prevalidatePositiveS32);
childDisable("parentestate");
-
- childSetCommitCallback("gridposx", onChangeAnything, this);
childSetPrevalidate("gridposx", &LLLineEditor::prevalidatePositiveS32);
childDisable("gridposx");
-
- childSetCommitCallback("gridposy", onChangeAnything, this);
childSetPrevalidate("gridposy", &LLLineEditor::prevalidatePositiveS32);
childDisable("gridposy");
-
- childSetCommitCallback("redirectx", onChangeAnything, this);
+
childSetPrevalidate("redirectx", &LLLineEditor::prevalidatePositiveS32);
-
- childSetCommitCallback("redirecty", onChangeAnything, this);
childSetPrevalidate("redirecty", &LLLineEditor::prevalidatePositiveS32);
-
- childSetCommitCallback("billable factor", onChangeAnything, this);
-
- childSetCommitCallback("land cost", onChangeAnything, this);
-
- childSetAction("Refresh", onRefresh, this);
- childSetAction("Apply", onApplyChanges, this);
-
- childSetAction("Select Region", onSelectRegion, this);
- childSetAction("Autosave now", onSaveState, this);
return TRUE;
}
@@ -541,8 +521,6 @@ void LLPanelRegionTools::enableAllWidgets()
childEnable("Autosave now");
}
-
-// static
void LLPanelRegionTools::onSaveState(void* userdata)
{
if (gAgent.isGodlike())
@@ -739,28 +717,25 @@ void LLPanelRegionTools::setPricePerMeter(S32 price)
childSetValue("land cost", price);
}
-// static
-void LLPanelRegionTools::onChangeAnything(LLUICtrl* ctrl, void* userdata)
+void LLPanelRegionTools::onChangeAnything()
{
- if (userdata && gAgent.isGodlike())
+ if (gAgent.isGodlike())
{
- LLPanelRegionTools* region_tools = (LLPanelRegionTools*) userdata;
- region_tools->childEnable("Apply");
+ childEnable("Apply");
}
}
-// static
-void LLPanelRegionTools::onChangePrelude(LLUICtrl* ctrl, void* data)
+void LLPanelRegionTools::onChangePrelude()
{
// checking prelude auto-checks fixed sun
- LLPanelRegionTools* self = (LLPanelRegionTools*)data;
- if (self->childGetValue("check prelude").asBoolean())
+ if (childGetValue("check prelude").asBoolean())
{
- self->childSetValue("check fixed sun", TRUE);
- self->childSetValue("check reset home", TRUE);
+ childSetValue("check fixed sun", TRUE);
+ childSetValue("check reset home", TRUE);
+ onChangeAnything();
}
// pass on to default onChange handler
- onChangeAnything(ctrl, data);
+
}
// static
@@ -773,49 +748,50 @@ void LLPanelRegionTools::onChangeSimName(LLLineEditor* caller, void* userdata )
}
}
-//static
-void LLPanelRegionTools::onRefresh(void* userdata)
+
+void LLPanelRegionTools::onRefresh()
{
+ LLFloaterGodTools* god_tools = LLFloaterReg::getTypedInstance<LLFloaterGodTools>("god_tools");
+ if(!god_tools) return;
LLViewerRegion *region = gAgent.getRegion();
if (region && gAgent.isGodlike())
{
- LLFloaterGodTools::getInstance()->sendRegionInfoRequest();
+ god_tools->sendRegionInfoRequest();
+ //LLFloaterGodTools::getInstance()->sendRegionInfoRequest();
+ //LLFloaterReg::getTypedInstance<LLFloaterGodTools>("god_tools")->sendRegionInfoRequest();
}
}
-// static
-void LLPanelRegionTools::onApplyChanges(void* userdata)
+void LLPanelRegionTools::onApplyChanges()
{
+ LLFloaterGodTools* god_tools = LLFloaterReg::getTypedInstance<LLFloaterGodTools>("god_tools");
+ if(!god_tools) return;
LLViewerRegion *region = gAgent.getRegion();
- if (region && userdata && gAgent.isGodlike())
+ if (region && gAgent.isGodlike())
{
- LLPanelRegionTools* region_tools = (LLPanelRegionTools*) userdata;
-
- region_tools->childDisable("Apply");
- LLFloaterGodTools::getInstance()->sendGodUpdateRegionInfo();
+ childDisable("Apply");
+ god_tools->sendGodUpdateRegionInfo();
+ //LLFloaterReg::getTypedInstance<LLFloaterGodTools>("god_tools")->sendGodUpdateRegionInfo();
}
}
-// static
-void LLPanelRegionTools::onBakeTerrain(void *userdata)
+void LLPanelRegionTools::onBakeTerrain()
{
LLPanelRequestTools::sendRequest("terrain", "bake", gAgent.getRegionHost());
}
-// static
-void LLPanelRegionTools::onRevertTerrain(void *userdata)
+void LLPanelRegionTools::onRevertTerrain()
{
LLPanelRequestTools::sendRequest("terrain", "revert", gAgent.getRegionHost());
}
-// static
-void LLPanelRegionTools::onSwapTerrain(void *userdata)
+
+void LLPanelRegionTools::onSwapTerrain()
{
LLPanelRequestTools::sendRequest("terrain", "swap", gAgent.getRegionHost());
}
-// static
-void LLPanelRegionTools::onSelectRegion(void* userdata)
+void LLPanelRegionTools::onSelectRegion()
{
llinfos << "LLPanelRegionTools::onSelectRegion" << llendl;
@@ -860,6 +836,8 @@ const F32 HOURS_TO_RADIANS = (2.f*F_PI)/24.f;
LLPanelGridTools::LLPanelGridTools() :
LLPanel()
{
+ mCommitCallbackRegistrar.add("GridTools.KickAll", boost::bind(&LLPanelGridTools::onClickKickAll, this));
+ mCommitCallbackRegistrar.add("GridTools.FlushMapVisibilityCaches", boost::bind(&LLPanelGridTools::onClickFlushMapVisibilityCaches, this));
}
// Destroys the object
@@ -869,9 +847,6 @@ LLPanelGridTools::~LLPanelGridTools()
BOOL LLPanelGridTools::postBuild()
{
- childSetAction("Kick all users", onClickKickAll, this);
- childSetAction("Flush This Region's Map Visibility Caches", onClickFlushMapVisibilityCaches, this);
-
return TRUE;
}
@@ -879,9 +854,7 @@ void LLPanelGridTools::refresh()
{
}
-
-// static
-void LLPanelGridTools::onClickKickAll(void* userdata)
+void LLPanelGridTools::onClickKickAll()
{
LLNotifications::instance().add("KickAllUsers", LLSD(), LLSD(), LLPanelGridTools::confirmKick);
}
@@ -921,9 +894,7 @@ bool LLPanelGridTools::finishKick(const LLSD& notification, const LLSD& response
return false;
}
-
-// static
-void LLPanelGridTools::onClickFlushMapVisibilityCaches(void* data)
+void LLPanelGridTools::onClickFlushMapVisibilityCaches()
{
LLNotifications::instance().add("FlushMapVisibilityCaches", LLSD(), LLSD(), flushMapVisibilityCachesConfirm);
}
@@ -981,6 +952,15 @@ LLPanelObjectTools::LLPanelObjectTools()
: LLPanel(),
mTargetAvatar()
{
+ mCommitCallbackRegistrar.add("ObjectTools.ChangeAnything", boost::bind(&LLPanelObjectTools::onChangeAnything, this));
+ mCommitCallbackRegistrar.add("ObjectTools.DeletePublicOwnedBy", boost::bind(&LLPanelObjectTools::onClickDeletePublicOwnedBy, this));
+ mCommitCallbackRegistrar.add("ObjectTools.DeleteAllScriptedOwnedBy", boost::bind(&LLPanelObjectTools::onClickDeleteAllScriptedOwnedBy, this));
+ mCommitCallbackRegistrar.add("ObjectTools.DeleteAllOwnedBy", boost::bind(&LLPanelObjectTools::onClickDeleteAllOwnedBy, this));
+ mCommitCallbackRegistrar.add("ObjectTools.ApplyChanges", boost::bind(&LLPanelObjectTools::onApplyChanges, this));
+ mCommitCallbackRegistrar.add("ObjectTools.Set", boost::bind(&LLPanelObjectTools::onClickSet, this));
+ mCommitCallbackRegistrar.add("ObjectTools.GetTopColliders", boost::bind(&LLPanelObjectTools::onGetTopColliders, this));
+ mCommitCallbackRegistrar.add("ObjectTools.GetTopScripts", boost::bind(&LLPanelObjectTools::onGetTopScripts, this));
+ mCommitCallbackRegistrar.add("ObjectTools.GetScriptDigest", boost::bind(&LLPanelObjectTools::onGetScriptDigest, this));
}
// Destroys the object
@@ -991,22 +971,6 @@ LLPanelObjectTools::~LLPanelObjectTools()
BOOL LLPanelObjectTools::postBuild()
{
- childSetCommitCallback("disable scripts", onChangeAnything, this);
- childSetCommitCallback("disable collisions", onChangeAnything, this);
- childSetCommitCallback("disable physics", onChangeAnything, this);
-
- childSetAction("Apply", onApplyChanges, this);
-
- childSetAction("Set Target", onClickSet, this);
-
- childSetAction("Delete Target's Scripted Objects On Others Land", onClickDeletePublicOwnedBy, this);
- childSetAction("Delete Target's Scripted Objects On *Any* Land", onClickDeleteAllScriptedOwnedBy, this);
- childSetAction("Delete *ALL* Of Target's Objects", onClickDeleteAllOwnedBy, this);
-
- childSetAction("Get Top Colliders", onGetTopColliders, this);
- childSetAction("Get Top Scripts", onGetTopScripts, this);
- childSetAction("Scripts digest", onGetScriptDigest, this);
-
return TRUE;
}
@@ -1095,30 +1059,33 @@ void LLPanelObjectTools::enableAllWidgets()
}
-// static
-void LLPanelObjectTools::onGetTopColliders(void* userdata)
+void LLPanelObjectTools::onGetTopColliders()
{
+ LLFloaterTopObjects* instance = LLFloaterReg::getTypedInstance<LLFloaterTopObjects>("top_objects");
+ if(!instance) return;
+
if (gAgent.isGodlike())
{
- LLFloaterTopObjects::show();
+ LLFloaterReg::showInstance("top_objects");
LLFloaterTopObjects::setMode(STAT_REPORT_TOP_COLLIDERS);
- LLFloaterTopObjects::onRefresh(NULL);
+ instance->onRefresh();
}
}
-// static
-void LLPanelObjectTools::onGetTopScripts(void* userdata)
+void LLPanelObjectTools::onGetTopScripts()
{
+ LLFloaterTopObjects* instance = LLFloaterReg::getTypedInstance<LLFloaterTopObjects>("top_objects");
+ if(!instance) return;
+
if (gAgent.isGodlike())
{
- LLFloaterTopObjects::show();
+ LLFloaterReg::showInstance("top_objects");
LLFloaterTopObjects::setMode(STAT_REPORT_TOP_SCRIPTS);
- LLFloaterTopObjects::onRefresh(NULL);
+ instance->onRefresh();
}
}
-// static
-void LLPanelObjectTools::onGetScriptDigest(void* userdata)
+void LLPanelObjectTools::onGetScriptDigest()
{
if (gAgent.isGodlike())
{
@@ -1128,20 +1095,20 @@ void LLPanelObjectTools::onGetScriptDigest(void* userdata)
}
}
-void LLPanelObjectTools::onClickDeletePublicOwnedBy(void* userdata)
+void LLPanelObjectTools::onClickDeletePublicOwnedBy()
{
// Bring up view-modal dialog
- LLPanelObjectTools* panelp = (LLPanelObjectTools*)userdata;
- if (!panelp->mTargetAvatar.isNull())
+
+ if (!mTargetAvatar.isNull())
{
- panelp->mSimWideDeletesFlags =
+ mSimWideDeletesFlags =
SWD_SCRIPTED_ONLY | SWD_OTHERS_LAND_ONLY;
LLSD args;
- args["AVATAR_NAME"] = panelp->childGetValue("target_avatar_name").asString();
+ args["AVATAR_NAME"] = childGetValue("target_avatar_name").asString();
LLSD payload;
- payload["avatar_id"] = panelp->mTargetAvatar;
- payload["flags"] = (S32)panelp->mSimWideDeletesFlags;
+ payload["avatar_id"] = mTargetAvatar;
+ payload["flags"] = (S32)mSimWideDeletesFlags;
LLNotifications::instance().add( "GodDeleteAllScriptedPublicObjectsByUser",
args,
@@ -1150,20 +1117,18 @@ void LLPanelObjectTools::onClickDeletePublicOwnedBy(void* userdata)
}
}
-// static
-void LLPanelObjectTools::onClickDeleteAllScriptedOwnedBy(void* userdata)
+void LLPanelObjectTools::onClickDeleteAllScriptedOwnedBy()
{
// Bring up view-modal dialog
- LLPanelObjectTools* panelp = (LLPanelObjectTools*)userdata;
- if (!panelp->mTargetAvatar.isNull())
+ if (!mTargetAvatar.isNull())
{
- panelp->mSimWideDeletesFlags = SWD_SCRIPTED_ONLY;
+ mSimWideDeletesFlags = SWD_SCRIPTED_ONLY;
LLSD args;
- args["AVATAR_NAME"] = panelp->childGetValue("target_avatar_name").asString();
+ args["AVATAR_NAME"] = childGetValue("target_avatar_name").asString();
LLSD payload;
- payload["avatar_id"] = panelp->mTargetAvatar;
- payload["flags"] = (S32)panelp->mSimWideDeletesFlags;
+ payload["avatar_id"] = mTargetAvatar;
+ payload["flags"] = (S32)mSimWideDeletesFlags;
LLNotifications::instance().add( "GodDeleteAllScriptedObjectsByUser",
args,
@@ -1172,20 +1137,18 @@ void LLPanelObjectTools::onClickDeleteAllScriptedOwnedBy(void* userdata)
}
}
-// static
-void LLPanelObjectTools::onClickDeleteAllOwnedBy(void* userdata)
+void LLPanelObjectTools::onClickDeleteAllOwnedBy()
{
// Bring up view-modal dialog
- LLPanelObjectTools* panelp = (LLPanelObjectTools*)userdata;
- if (!panelp->mTargetAvatar.isNull())
+ if (!mTargetAvatar.isNull())
{
- panelp->mSimWideDeletesFlags = 0;
+ mSimWideDeletesFlags = 0;
LLSD args;
- args["AVATAR_NAME"] = panelp->childGetValue("target_avatar_name").asString();
+ args["AVATAR_NAME"] = childGetValue("target_avatar_name").asString();
LLSD payload;
- payload["avatar_id"] = panelp->mTargetAvatar;
- payload["flags"] = (S32)panelp->mSimWideDeletesFlags;
+ payload["avatar_id"] = mTargetAvatar;
+ payload["flags"] = (S32)mSimWideDeletesFlags;
LLNotifications::instance().add( "GodDeleteAllObjectsByUser",
args,
@@ -1209,11 +1172,10 @@ bool LLPanelObjectTools::callbackSimWideDeletes( const LLSD& notification, const
return false;
}
-void LLPanelObjectTools::onClickSet(void* data)
+void LLPanelObjectTools::onClickSet()
{
- LLPanelObjectTools* panelp = (LLPanelObjectTools*) data;
// grandparent is a floater, which can have a dependent
- gFloaterView->getParentFloater(panelp)->addDependentFloater(LLFloaterAvatarPicker::show(callbackAvatarID, data));
+ gFloaterView->getParentFloater(this)->addDependentFloater(LLFloaterAvatarPicker::show(callbackAvatarID, this));
}
void LLPanelObjectTools::onClickSetBySelection(void* data)
@@ -1247,28 +1209,25 @@ void LLPanelObjectTools::callbackAvatarID(const std::vector<std::string>& names,
object_tools->refresh();
}
-
-// static
-void LLPanelObjectTools::onChangeAnything(LLUICtrl* ctrl, void* userdata)
+void LLPanelObjectTools::onChangeAnything()
{
- if (userdata && gAgent.isGodlike())
+ if (gAgent.isGodlike())
{
- LLPanelObjectTools* object_tools = (LLPanelObjectTools*) userdata;
- object_tools->childEnable("Apply");
+ childEnable("Apply");
}
}
-// static
-void LLPanelObjectTools::onApplyChanges(void* userdata)
+void LLPanelObjectTools::onApplyChanges()
{
+ LLFloaterGodTools* god_tools = LLFloaterReg::getTypedInstance<LLFloaterGodTools>("god_tools");
+ if(!god_tools) return;
LLViewerRegion *region = gAgent.getRegion();
if (region && gAgent.isGodlike())
{
- LLPanelObjectTools* object_tools = (LLPanelObjectTools*) userdata;
// TODO -- implement this
-
- object_tools->childDisable("Apply");
- LLFloaterGodTools::getInstance()->sendGodUpdateRegionInfo();
+ childDisable("Apply");
+ god_tools->sendGodUpdateRegionInfo();
+ //LLFloaterReg::getTypedInstance<LLFloaterGodTools>("god_tools")->sendGodUpdateRegionInfo();
}
}
@@ -1283,6 +1242,7 @@ const std::string AGENT_REGION = "Agent Region";
LLPanelRequestTools::LLPanelRequestTools():
LLPanel()
{
+ mCommitCallbackRegistrar.add("GodTools.Request", boost::bind(&LLPanelRequestTools::onClickRequest, this));
}
LLPanelRequestTools::~LLPanelRequestTools()
@@ -1291,8 +1251,6 @@ LLPanelRequestTools::~LLPanelRequestTools()
BOOL LLPanelRequestTools::postBuild()
{
- childSetAction("Make Request", onClickRequest, this);
-
refresh();
return TRUE;
@@ -1353,21 +1311,19 @@ void LLPanelRequestTools::sendRequest(const std::string& request,
msg->sendReliable(host);
}
-// static
-void LLPanelRequestTools::onClickRequest(void* data)
+void LLPanelRequestTools::onClickRequest()
{
- LLPanelRequestTools* self = (LLPanelRequestTools*)data;
- const std::string dest = self->childGetValue("destination").asString();
+ const std::string dest = childGetValue("destination").asString();
if(dest == SELECTION)
{
- std::string req = self->childGetValue("request");
+ std::string req =childGetValue("request");
req = req.substr(0, req.find_first_of(" "));
- std::string param = self->childGetValue("parameter");
+ std::string param = childGetValue("parameter");
LLSelectMgr::getInstance()->sendGodlikeRequest(req, param);
}
else if(dest == AGENT_REGION)
{
- self->sendRequest(gAgent.getRegionHost());
+ sendRequest(gAgent.getRegionHost());
}
else
{
@@ -1379,7 +1335,7 @@ void LLPanelRequestTools::onClickRequest(void* data)
if(dest == regionp->getName())
{
// found it
- self->sendRequest(regionp->getHost());
+ sendRequest(regionp->getHost());
}
}
}
diff --git a/indra/newview/llfloatergodtools.h b/indra/newview/llfloatergodtools.h
index 6c4b438808..2564b15b37 100644
--- a/indra/newview/llfloatergodtools.h
+++ b/indra/newview/llfloatergodtools.h
@@ -57,9 +57,9 @@ class LLTextBox;
class LLMessageSystem;
class LLFloaterGodTools
- : public LLFloater, public LLFloaterSingleton<LLFloaterGodTools>
+ : public LLFloater
{
- friend class LLUISingleton<LLFloaterGodTools, VisibilityPolicy<LLFloater> >;
+ friend class LLFloaterReg;
public:
enum EGodPanel
@@ -98,12 +98,16 @@ public:
// Send possibly changed values to simulator.
void sendGodUpdateRegionInfo();
+private:
+
+ LLFloaterGodTools(const LLSD& key);
+ ~LLFloaterGodTools();
+
protected:
U32 computeRegionFlags() const;
protected:
- LLFloaterGodTools(const LLSD& key);
- ~LLFloaterGodTools();
+
/*virtual*/ BOOL postBuild();
// When the floater is going away, reset any options that need to be
// cleared.
@@ -133,16 +137,17 @@ public:
/*virtual*/ void refresh();
- static void onSaveState(void* data);
- static void onChangeAnything(LLUICtrl* ctrl, void* userdata);
- static void onChangePrelude(LLUICtrl* ctrl, void* data);
+ static void onSaveState(void* userdata);
static void onChangeSimName(LLLineEditor* caller, void* userdata);
- static void onApplyChanges(void* userdata);
- static void onBakeTerrain(void *userdata);
- static void onRevertTerrain(void *userdata);
- static void onSwapTerrain(void *userdata);
- static void onSelectRegion(void *userdata);
- static void onRefresh(void* userdata);
+
+ void onChangeAnything();
+ void onChangePrelude();
+ void onApplyChanges();
+ void onBakeTerrain();
+ void onRevertTerrain();
+ void onSwapTerrain();
+ void onSelectRegion();
+ void onRefresh();
// set internal checkboxes/spinners/combos
const std::string getSimName() const;
@@ -194,11 +199,11 @@ public:
void refresh();
- static void onClickKickAll(void *data);
+ void onClickKickAll();
static bool confirmKick(const LLSD& notification, const LLSD& response);
static bool finishKick(const LLSD& notification, const LLSD& response);
static void onDragSunPhase(LLUICtrl *ctrl, void *userdata);
- static void onClickFlushMapVisibilityCaches(void* data);
+ void onClickFlushMapVisibilityCaches();
static bool flushMapVisibilityCachesConfirm(const LLSD& notification, const LLSD& response);
protected:
@@ -227,17 +232,17 @@ public:
void enableAllWidgets();
void setCheckFlags(U32 flags);
- static void onChangeAnything(LLUICtrl* ctrl, void* data);
- static void onApplyChanges(void* data);
- static void onClickSet(void* data);
+ void onChangeAnything();
+ void onApplyChanges();
+ void onClickSet();
static void callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* data);
- static void onClickDeletePublicOwnedBy(void* data);
- static void onClickDeleteAllScriptedOwnedBy(void* data);
- static void onClickDeleteAllOwnedBy(void* data);
+ void onClickDeletePublicOwnedBy();
+ void onClickDeleteAllScriptedOwnedBy();
+ void onClickDeleteAllOwnedBy();
static bool callbackSimWideDeletes(const LLSD& notification, const LLSD& response);
- static void onGetTopColliders(void* data);
- static void onGetTopScripts(void* data);
- static void onGetScriptDigest(void* data);
+ void onGetTopColliders();
+ void onGetTopScripts();
+ void onGetScriptDigest();
static void onClickSetBySelection(void* data);
protected:
@@ -267,7 +272,7 @@ public:
const LLHost& host);
protected:
- static void onClickRequest(void *data);
+ void onClickRequest();
void sendRequest(const LLHost& host);
};
diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp
index 38915ebff9..8121a1cc10 100644
--- a/indra/newview/llfloaterhardwaresettings.cpp
+++ b/indra/newview/llfloaterhardwaresettings.cpp
@@ -38,7 +38,7 @@
#include "llfloaterpreference.h"
#include "llviewerwindow.h"
#include "llviewercontrol.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llfeaturemanager.h"
#include "llstartup.h"
#include "pipeline.h"
@@ -47,7 +47,7 @@
#include "llradiogroup.h"
#include "lluictrlfactory.h"
#include "llwindow.h"
-#include "llimagegl.h"
+#include "llslider.h"
LLFloaterHardwareSettings* LLFloaterHardwareSettings::sHardwareSettings = NULL;
@@ -91,10 +91,10 @@ void LLFloaterHardwareSettings::refresh()
void LLFloaterHardwareSettings::refreshEnabledState()
{
- S32 min_tex_mem = LLViewerImageList::getMinVideoRamSetting();
- S32 max_tex_mem = LLViewerImageList::getMaxVideoRamSetting();
- childSetMinValue("GrapicsCardTextureMemory", min_tex_mem);
- childSetMaxValue("GrapicsCardTextureMemory", max_tex_mem);
+ S32 min_tex_mem = LLViewerTextureList::getMinVideoRamSetting();
+ S32 max_tex_mem = LLViewerTextureList::getMaxVideoRamSetting();
+ getChild<LLSlider>("GrapicsCardTextureMemory")->setMinValue(min_tex_mem);
+ getChild<LLSlider>("GrapicsCardTextureMemory")->setMinValue(max_tex_mem);
if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderVBOEnable") ||
!gGLManager.mHasVertexBufferObject)
@@ -217,3 +217,4 @@ void LLFloaterHardwareSettings::onBtnOK( void* userdata )
fp->closeFloater(false);
}
+
diff --git a/indra/newview/llfloaterhud.cpp b/indra/newview/llfloaterhud.cpp
index 4379d25a66..dd70560bb7 100644
--- a/indra/newview/llfloaterhud.cpp
+++ b/indra/newview/llfloaterhud.cpp
@@ -42,8 +42,6 @@
// Linden libs
#include "lluictrlfactory.h"
-// statics
-LLFloaterHUD* LLFloaterHUD::sInstance = 0;
///----------------------------------------------------------------------------
/// Class LLFloaterHUD
@@ -51,12 +49,18 @@ LLFloaterHUD* LLFloaterHUD::sInstance = 0;
#define super LLFloater /* superclass */
// Default constructor
-LLFloaterHUD::LLFloaterHUD()
-: LLFloater(),
+LLFloaterHUD::LLFloaterHUD(const LLSD& key)
+: LLFloater(key),
mWebBrowser(0)
{
- // Create floater from its XML definition
- LLUICtrlFactory::getInstance()->buildFloater(this, "floater_hud.xml");
+ // do not build the floater if there the url is empty
+ if (gSavedSettings.getString("TutorialURL") == "")
+ {
+ LLNotifications::instance().add("TutorialNotFound");
+ return;
+ }
+
+ //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_hud.xml");
// Don't grab the focus as it will impede performing in-world actions
// while using the HUD
@@ -68,62 +72,35 @@ LLFloaterHUD::LLFloaterHUD()
// Opaque background since we never get the focus
setBackgroundOpaque(TRUE);
+}
+BOOL LLFloaterHUD::postBuild()
+{
mWebBrowser = getChild<LLWebBrowserCtrl>("floater_hud_browser" );
if (mWebBrowser)
{
// Open links in internal browser
mWebBrowser->setOpenInExternalBrowser(false);
-
+
// This is a "chrome" floater, so we don't want anything to
// take focus (as the user needs to be able to walk with
// arrow keys during tutorial).
mWebBrowser->setTakeFocusOnClick(false);
-
+
std::string language = LLUI::getLanguage();
std::string base_url = gSavedSettings.getString("TutorialURL");
-
+
std::string url = base_url + language + "/";
mWebBrowser->navigateTo(url);
}
-}
-
-// Get the instance
-LLFloaterHUD* LLFloaterHUD::getInstance()
-{
- if (!sInstance)
- {
- sInstance = new LLFloaterHUD();
- }
- return sInstance;
+
+ return TRUE;
}
// Destructor
LLFloaterHUD::~LLFloaterHUD()
{
- // Clear out the one instance if it's ours
- if (sInstance == this)
- {
- sInstance = NULL;
- }
}
-
-// Show the HUD
-void LLFloaterHUD::showHUD()
-{
- // do not build the floater if there the url is empty
- if (gSavedSettings.getString("TutorialURL") == "")
- {
- LLNotifications::instance().add("TutorialNotFound");
- return;
- }
-
- // Create the instance if necessary
- LLFloaterHUD* hud = getInstance();
- hud->openFloater();
- hud->setFrontmost(FALSE);
-}
-
// Save our visibility state on close in case the user accidentally
// quit the application while the tutorial was visible.
// virtual
diff --git a/indra/newview/llfloaterhud.h b/indra/newview/llfloaterhud.h
index 2d58685b58..33ed9faa67 100644
--- a/indra/newview/llfloaterhud.h
+++ b/indra/newview/llfloaterhud.h
@@ -39,22 +39,20 @@ class LLWebBrowserCtrl;
class LLFloaterHUD : public LLFloater
{
+ friend class LLFloaterReg;
public:
- static LLFloaterHUD* getInstance(); ///< get instance creating if necessary
-
- static void showHUD(); ///< show the HUD
// Save our visibility state during close
/*virtual*/ void onClose(bool app_quitting);
-
+ BOOL postBuild();
+
private:
// Handles its own construction and destruction, so private.
- LLFloaterHUD();
+ LLFloaterHUD(const LLSD& key);
/*virtual*/ ~LLFloaterHUD();
private:
LLWebBrowserCtrl* mWebBrowser; ///< the actual web browser control
- static LLFloaterHUD* sInstance;
};
#endif // LL_LLFLOATERHUD_H
diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp
index faa4f0ec99..26b969224e 100644
--- a/indra/newview/llfloaterimagepreview.cpp
+++ b/indra/newview/llfloaterimagepreview.cpp
@@ -56,7 +56,7 @@
#include "llvoavatar.h"
#include "pipeline.h"
#include "lluictrlfactory.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llstring.h"
//static
@@ -142,9 +142,6 @@ LLFloaterImagePreview::~LLFloaterImagePreview()
clearAllPreviewTextures();
mRawImagep = NULL;
- delete mAvatarPreview;
- delete mSculptedPreview;
-
mImagep = NULL ;
}
@@ -252,7 +249,7 @@ void LLFloaterImagePreview::draw()
}
else
{
- mImagep = new LLImageGL(mRawImagep, FALSE) ;
+ mImagep = LLViewerTextureManager::getLocalTexture(mRawImagep.get(), FALSE) ;
gGL.getTexUnit(0)->unbind(mImagep->getTarget()) ;
gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mImagep->getTexName());
@@ -294,11 +291,11 @@ void LLFloaterImagePreview::draw()
if (selected == 9)
{
- gGL.getTexUnit(0)->bind(mSculptedPreview->getTexture());
+ gGL.getTexUnit(0)->bind(mSculptedPreview);
}
else
{
- gGL.getTexUnit(0)->bind(mAvatarPreview->getTexture());
+ gGL.getTexUnit(0)->bind(mAvatarPreview);
}
gGL.begin( LLRender::QUADS );
@@ -606,7 +603,7 @@ void LLFloaterImagePreview::onMouseCaptureLostImagePreview(LLMouseHandler* handl
//-----------------------------------------------------------------------------
// LLImagePreviewAvatar
//-----------------------------------------------------------------------------
-LLImagePreviewAvatar::LLImagePreviewAvatar(S32 width, S32 height) : LLDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE)
+LLImagePreviewAvatar::LLImagePreviewAvatar(S32 width, S32 height) : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE)
{
mNeedsUpdate = TRUE;
mTargetJoint = NULL;
@@ -697,7 +694,7 @@ BOOL LLImagePreviewAvatar::render()
glMatrixMode(GL_PROJECTION);
gGL.pushMatrix();
glLoadIdentity();
- glOrtho(0.0f, mWidth, 0.0f, mHeight, -1.0f, 1.0f);
+ glOrtho(0.0f, mFullWidth, 0.0f, mFullHeight, -1.0f, 1.0f);
glMatrixMode(GL_MODELVIEW);
gGL.pushMatrix();
@@ -706,7 +703,7 @@ BOOL LLImagePreviewAvatar::render()
LLGLSUIDefault def;
gGL.color4f(0.15f, 0.2f, 0.3f, 1.f);
- gl_rect_2d_simple( mWidth, mHeight );
+ gl_rect_2d_simple( mFullWidth, mFullHeight );
glMatrixMode(GL_PROJECTION);
gGL.popMatrix();
@@ -728,9 +725,9 @@ BOOL LLImagePreviewAvatar::render()
stop_glerror();
- LLViewerCamera::getInstance()->setAspect((F32)mWidth / mHeight);
+ LLViewerCamera::getInstance()->setAspect((F32)mFullWidth / mFullHeight);
LLViewerCamera::getInstance()->setView(LLViewerCamera::getInstance()->getDefaultFOV() / mCameraZoom);
- LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mWidth, mHeight, FALSE);
+ LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, FALSE);
LLVertexBuffer::unbind();
avatarp->updateLOD();
@@ -788,7 +785,7 @@ void LLImagePreviewAvatar::pan(F32 right, F32 up)
// LLImagePreviewSculpted
//-----------------------------------------------------------------------------
-LLImagePreviewSculpted::LLImagePreviewSculpted(S32 width, S32 height) : LLDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE)
+LLImagePreviewSculpted::LLImagePreviewSculpted(S32 width, S32 height) : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE)
{
mNeedsUpdate = TRUE;
mCameraDistance = 0.f;
@@ -871,7 +868,7 @@ BOOL LLImagePreviewSculpted::render()
glMatrixMode(GL_PROJECTION);
gGL.pushMatrix();
glLoadIdentity();
- glOrtho(0.0f, mWidth, 0.0f, mHeight, -1.0f, 1.0f);
+ glOrtho(0.0f, mFullWidth, 0.0f, mFullHeight, -1.0f, 1.0f);
glMatrixMode(GL_MODELVIEW);
gGL.pushMatrix();
@@ -879,7 +876,7 @@ BOOL LLImagePreviewSculpted::render()
gGL.color4f(0.15f, 0.2f, 0.3f, 1.f);
- gl_rect_2d_simple( mWidth, mHeight );
+ gl_rect_2d_simple( mFullWidth, mFullHeight );
glMatrixMode(GL_PROJECTION);
gGL.popMatrix();
@@ -902,9 +899,9 @@ BOOL LLImagePreviewSculpted::render()
stop_glerror();
- LLViewerCamera::getInstance()->setAspect((F32) mWidth / mHeight);
+ LLViewerCamera::getInstance()->setAspect((F32) mFullWidth / mFullHeight);
LLViewerCamera::getInstance()->setView(LLViewerCamera::getInstance()->getDefaultFOV() / mCameraZoom);
- LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mWidth, mHeight, FALSE);
+ LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, FALSE);
const LLVolumeFace &vf = mVolume->getVolumeFace(0);
U32 num_indices = vf.mIndices.size();
diff --git a/indra/newview/llfloaterimagepreview.h b/indra/newview/llfloaterimagepreview.h
index 6a4de3d3cc..e2781b8231 100644
--- a/indra/newview/llfloaterimagepreview.h
+++ b/indra/newview/llfloaterimagepreview.h
@@ -44,12 +44,14 @@ class LLVOAvatar;
class LLTextBox;
class LLVertexBuffer;
-class LLImagePreviewSculpted : public LLDynamicTexture
+class LLImagePreviewSculpted : public LLViewerDynamicTexture
{
- public:
- LLImagePreviewSculpted(S32 width, S32 height);
+protected:
virtual ~LLImagePreviewSculpted();
+ public:
+ LLImagePreviewSculpted(S32 width, S32 height);
+
void setPreviewTarget(LLImageRaw *imagep, F32 distance);
void setTexture(U32 name) { mTextureName = name; }
@@ -73,12 +75,14 @@ class LLImagePreviewSculpted : public LLDynamicTexture
};
-class LLImagePreviewAvatar : public LLDynamicTexture
+class LLImagePreviewAvatar : public LLViewerDynamicTexture
{
-public:
- LLImagePreviewAvatar(S32 width, S32 height);
+protected:
virtual ~LLImagePreviewAvatar();
+public:
+ LLImagePreviewAvatar(S32 width, S32 height);
+
void setPreviewTarget(const std::string& joint_name, const std::string& mesh_name, LLImageRaw* imagep, F32 distance, BOOL male);
void setTexture(U32 name) { mTextureName = name; }
void clearPreviewTexture(const std::string& mesh_name);
@@ -127,13 +131,13 @@ protected:
bool loadImage(const std::string& filename);
LLPointer<LLImageRaw> mRawImagep;
- LLImagePreviewAvatar* mAvatarPreview;
- LLImagePreviewSculpted* mSculptedPreview;
+ LLPointer<LLImagePreviewAvatar> mAvatarPreview;
+ LLPointer<LLImagePreviewSculpted> mSculptedPreview;
S32 mLastMouseX;
S32 mLastMouseY;
LLRect mPreviewRect;
LLRectf mPreviewImageRect;
- LLPointer<LLImageGL> mImagep ;
+ LLPointer<LLViewerTexture> mImagep ;
static S32 sUploadAmount;
};
diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp
index 57f4bcf319..2256120362 100644
--- a/indra/newview/llfloaterinspect.cpp
+++ b/indra/newview/llfloaterinspect.cpp
@@ -37,7 +37,7 @@
#include "llfloaterreg.h"
#include "llfloateravatarinfo.h"
#include "llfloatertools.h"
-#include "llfriendactions.h"
+#include "llavataractions.h"
#include "llcachename.h"
#include "llscrolllistctrl.h"
#include "llscrolllistitem.h"
@@ -48,13 +48,28 @@
#include "llviewerobject.h"
#include "lluictrlfactory.h"
-LLFloaterInspect* LLFloaterInspect::sInstance = NULL;
+//LLFloaterInspect* LLFloaterInspect::sInstance = NULL;
-LLFloaterInspect::LLFloaterInspect(void)
- : LLFloater(),
+LLFloaterInspect::LLFloaterInspect(const LLSD& key)
+ : LLFloater(key),
mDirty(FALSE)
{
- LLUICtrlFactory::getInstance()->buildFloater(this, "floater_inspect.xml");
+ //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_inspect.xml");
+ mCommitCallbackRegistrar.add("Inspect.OwnerProfile", boost::bind(&LLFloaterInspect::onClickOwnerProfile, this));
+ mCommitCallbackRegistrar.add("Inspect.CreatorProfile", boost::bind(&LLFloaterInspect::onClickCreatorProfile, this));
+ mCommitCallbackRegistrar.add("Inspect.SelectObject", boost::bind(&LLFloaterInspect::onSelectObject, this));
+}
+
+BOOL LLFloaterInspect::postBuild()
+{
+ mObjectList = getChild<LLScrollListCtrl>("object_list");
+// childSetAction("button owner",onClickOwnerProfile, this);
+// childSetAction("button creator",onClickCreatorProfile, this);
+// childSetCommitCallback("object_list", onSelectObject, NULL);
+
+ refresh();
+
+ return TRUE;
}
LLFloaterInspect::~LLFloaterInspect(void)
@@ -72,14 +87,14 @@ LLFloaterInspect::~LLFloaterInspect(void)
{
LLFloaterReg::showInstance("build", LLSD(), TRUE);
}
- sInstance = NULL;
+ //sInstance = NULL;
}
-
+/*
BOOL LLFloaterInspect::isVisible()
{
return (!!sInstance);
-}
-
+}*/
+/*
void LLFloaterInspect::show(void* ignored)
{
// setForceSelection ensures that the pie menu does not deselect things when it
@@ -99,15 +114,22 @@ void LLFloaterInspect::show(void* ignored)
sInstance->mObjectSelection = LLSelectMgr::getInstance()->getSelection();
sInstance->refresh();
}
-
-void LLFloaterInspect::onClickCreatorProfile(void* ctrl)
+*/
+void LLFloaterInspect::onOpen(const LLSD& key)
+{
+ BOOL forcesel = LLSelectMgr::getInstance()->setForceSelection(TRUE);
+ LLToolMgr::getInstance()->setTransientTool(LLToolCompInspect::getInstance());
+ LLSelectMgr::getInstance()->setForceSelection(forcesel); // restore previouis value
+ mObjectSelection = LLSelectMgr::getInstance()->getSelection();
+ refresh();
+}
+void LLFloaterInspect::onClickCreatorProfile()
{
- if(sInstance->mObjectList->getAllSelected().size() == 0)
+ if(mObjectList->getAllSelected().size() == 0)
{
return;
}
- LLScrollListItem* first_selected =
- sInstance->mObjectList->getFirstSelected();
+ LLScrollListItem* first_selected =mObjectList->getFirstSelected();
if (first_selected)
{
@@ -120,19 +142,18 @@ void LLFloaterInspect::onClickCreatorProfile(void* ctrl)
return (obj_id == node->getObject()->getID());
}
} func(first_selected->getUUID());
- LLSelectNode* node = sInstance->mObjectSelection->getFirstNode(&func);
+ LLSelectNode* node = mObjectSelection->getFirstNode(&func);
if(node)
{
- LLFriendActions::showProfile(node->mPermissions->getCreator());
+ LLAvatarActions::showProfile(node->mPermissions->getCreator());
}
}
}
-void LLFloaterInspect::onClickOwnerProfile(void* ctrl)
+void LLFloaterInspect::onClickOwnerProfile()
{
- if(sInstance->mObjectList->getAllSelected().size() == 0) return;
- LLScrollListItem* first_selected =
- sInstance->mObjectList->getFirstSelected();
+ if(mObjectList->getAllSelected().size() == 0) return;
+ LLScrollListItem* first_selected =mObjectList->getFirstSelected();
if (first_selected)
{
@@ -146,46 +167,34 @@ void LLFloaterInspect::onClickOwnerProfile(void* ctrl)
return (obj_id == node->getObject()->getID());
}
} func(selected_id);
- LLSelectNode* node = sInstance->mObjectSelection->getFirstNode(&func);
+ LLSelectNode* node = mObjectSelection->getFirstNode(&func);
if(node)
{
const LLUUID& owner_id = node->mPermissions->getOwner();
- LLFriendActions::showProfile(owner_id);
+ LLAvatarActions::showProfile(owner_id);
}
}
}
-BOOL LLFloaterInspect::postBuild()
-{
- mObjectList = getChild<LLScrollListCtrl>("object_list");
- childSetAction("button owner",onClickOwnerProfile, this);
- childSetAction("button creator",onClickCreatorProfile, this);
- childSetCommitCallback("object_list", onSelectObject, NULL);
- return TRUE;
-}
-
-void LLFloaterInspect::onSelectObject(LLUICtrl* ctrl, void* user_data)
+void LLFloaterInspect::onSelectObject()
{
if(LLFloaterInspect::getSelectedUUID() != LLUUID::null)
{
- sInstance->childSetEnabled("button owner", true);
- sInstance->childSetEnabled("button creator", true);
+ childSetEnabled("button owner", true);
+ childSetEnabled("button creator", true);
}
}
LLUUID LLFloaterInspect::getSelectedUUID()
{
- if(sInstance)
+ if(mObjectList->getAllSelected().size() > 0)
{
- if(sInstance->mObjectList->getAllSelected().size() > 0)
+ LLScrollListItem* first_selected =mObjectList->getFirstSelected();
+ if (first_selected)
{
- LLScrollListItem* first_selected =
- sInstance->mObjectList->getFirstSelected();
- if (first_selected)
- {
- return first_selected->getUUID();
- }
+ return first_selected->getUUID();
}
+
}
return LLUUID::null;
}
@@ -263,7 +272,7 @@ void LLFloaterInspect::refresh()
{
mObjectList->selectNthItem(0);
}
- onSelectObject(this, NULL);
+ onSelectObject();
mObjectList->setScrollPos(pos);
}
@@ -275,10 +284,7 @@ void LLFloaterInspect::onFocusReceived()
void LLFloaterInspect::dirty()
{
- if(sInstance)
- {
- sInstance->setDirty();
- }
+ setDirty();
}
void LLFloaterInspect::draw()
diff --git a/indra/newview/llfloaterinspect.h b/indra/newview/llfloaterinspect.h
index 57bba6864f..ce9485ee74 100644
--- a/indra/newview/llfloaterinspect.h
+++ b/indra/newview/llfloaterinspect.h
@@ -44,29 +44,33 @@ class LLUICtrl;
class LLFloaterInspect : public LLFloater
{
+ friend class LLFloaterReg;
public:
- virtual ~LLFloaterInspect(void);
- static void show(void* ignored = NULL);
+
+// static void show(void* ignored = NULL);
+ void onOpen(const LLSD& key);
virtual BOOL postBuild();
- static void dirty();
- static LLUUID getSelectedUUID();
+ void dirty();
+ LLUUID getSelectedUUID();
virtual void draw();
virtual void refresh();
- static BOOL isVisible();
+// static BOOL isVisible();
virtual void onFocusReceived();
- static void onClickCreatorProfile(void* ctrl);
- static void onClickOwnerProfile(void* ctrl);
- static void onSelectObject(LLUICtrl* ctrl, void* user_data);
+ void onClickCreatorProfile();
+ void onClickOwnerProfile();
+ void onSelectObject();
LLScrollListCtrl* mObjectList;
protected:
// protected members
- LLFloaterInspect();
void setDirty() { mDirty = TRUE; }
bool mDirty;
private:
+
+ LLFloaterInspect(const LLSD& key);
+ virtual ~LLFloaterInspect(void);
// static data
- static LLFloaterInspect* sInstance;
+// static LLFloaterInspect* sInstance;
LLSafeHandle<LLObjectSelection> mObjectSelection;
};
diff --git a/indra/newview/llfloaterinventory.cpp b/indra/newview/llfloaterinventory.cpp
new file mode 100644
index 0000000000..cf78d7d34f
--- /dev/null
+++ b/indra/newview/llfloaterinventory.cpp
@@ -0,0 +1,1953 @@
+/**
+ * @file llfloaterinventory.cpp
+ * @brief Implementation of the inventory view and associated stuff.
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ *
+ * Copyright (c) 2001-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h"
+
+#include <utility> // for std::pair<>
+
+#include "llfloaterinventory.h"
+
+// library includes
+#include "llagent.h"
+#include "llagentwearables.h"
+#include "llcallingcard.h"
+#include "llfloaterreg.h"
+#include "llsdserialize.h"
+#include "llfiltereditor.h"
+#include "llspinctrl.h"
+#include "llui.h"
+#include "message.h"
+
+// newview includes
+#include "llappviewer.h"
+#include "llfirstuse.h"
+#include "llfloateravatarinfo.h"
+#include "llfloaterchat.h"
+#include "llfloatercustomize.h"
+#include "llfocusmgr.h"
+#include "llfolderview.h"
+#include "llgesturemgr.h"
+#include "lliconctrl.h"
+#include "llimview.h"
+#include "llinventorybridge.h"
+#include "llinventoryclipboard.h"
+#include "llinventorymodel.h"
+#include "lllineeditor.h"
+#include "llmenugl.h"
+#include "llpreviewanim.h"
+#include "llpreviewgesture.h"
+#include "llpreviewlandmark.h"
+#include "llpreviewnotecard.h"
+#include "llpreviewscript.h"
+#include "llpreviewsound.h"
+#include "llpreviewtexture.h"
+#include "llresmgr.h"
+#include "llscrollbar.h"
+#include "llscrollcontainer.h"
+#include "llselectmgr.h"
+#include "lltabcontainer.h"
+#include "lltooldraganddrop.h"
+#include "lluictrlfactory.h"
+#include "llviewerinventory.h"
+#include "llviewermessage.h"
+#include "llviewerobjectlist.h"
+#include "llviewerregion.h"
+#include "llviewerwindow.h"
+#include "llvoavatarself.h"
+#include "llwearablelist.h"
+
+static LLDefaultChildRegistry::Register<LLInventoryPanel> r("inventory_panel");
+
+//BOOL LLFloaterInventory::sOpenNextNewItem = FALSE;
+BOOL LLFloaterInventory::sWearNewClothing = FALSE;
+LLUUID LLFloaterInventory::sWearNewClothingTransactionID;
+
+///----------------------------------------------------------------------------
+/// LLFloaterInventoryFinder
+///----------------------------------------------------------------------------
+
+LLFloaterInventoryFinder::LLFloaterInventoryFinder(LLFloaterInventory* inventory_view)
+: LLFloater(),
+ mFloaterInventory(inventory_view),
+ mFilter(inventory_view->mActivePanel->getFilter())
+{
+ LLUICtrlFactory::getInstance()->buildFloater(this, "floater_inventory_view_finder.xml");
+ updateElementsFromFilter();
+}
+
+
+void LLFloaterInventoryFinder::onCheckSinceLogoff(LLUICtrl *ctrl, void *user_data)
+{
+ LLFloaterInventoryFinder *self = (LLFloaterInventoryFinder *)user_data;
+ if (!self) return;
+
+ bool since_logoff= self->childGetValue("check_since_logoff");
+
+ if (!since_logoff &&
+ !( self->mSpinSinceDays->get() || self->mSpinSinceHours->get() ) )
+ {
+ self->mSpinSinceHours->set(1.0f);
+ }
+}
+BOOL LLFloaterInventoryFinder::postBuild()
+{
+ const LLRect& viewrect = mFloaterInventory->getRect();
+ setRect(LLRect(viewrect.mLeft - getRect().getWidth(), viewrect.mTop, viewrect.mLeft, viewrect.mTop - getRect().getHeight()));
+
+ childSetAction("All", selectAllTypes, this);
+ childSetAction("None", selectNoTypes, this);
+
+ mSpinSinceHours = getChild<LLSpinCtrl>("spin_hours_ago");
+ childSetCommitCallback("spin_hours_ago", onTimeAgo, this);
+
+ mSpinSinceDays = getChild<LLSpinCtrl>("spin_days_ago");
+ childSetCommitCallback("spin_days_ago", onTimeAgo, this);
+
+ // mCheckSinceLogoff = getChild<LLSpinCtrl>("check_since_logoff");
+ childSetCommitCallback("check_since_logoff", onCheckSinceLogoff, this);
+
+ childSetAction("Close", onCloseBtn, this);
+
+ updateElementsFromFilter();
+ return TRUE;
+}
+void LLFloaterInventoryFinder::onTimeAgo(LLUICtrl *ctrl, void *user_data)
+{
+ LLFloaterInventoryFinder *self = (LLFloaterInventoryFinder *)user_data;
+ if (!self) return;
+
+ bool since_logoff=true;
+ if ( self->mSpinSinceDays->get() || self->mSpinSinceHours->get() )
+ {
+ since_logoff = false;
+ }
+ self->childSetValue("check_since_logoff", since_logoff);
+}
+
+void LLFloaterInventoryFinder::changeFilter(LLInventoryFilter* filter)
+{
+ mFilter = filter;
+ updateElementsFromFilter();
+}
+
+void LLFloaterInventoryFinder::updateElementsFromFilter()
+{
+ if (!mFilter)
+ return;
+
+ // Get data needed for filter display
+ U32 filter_types = mFilter->getFilterTypes();
+ std::string filter_string = mFilter->getFilterSubString();
+ LLInventoryFilter::EFolderShow show_folders = mFilter->getShowFolderState();
+ U32 hours = mFilter->getHoursAgo();
+
+ // update the ui elements
+ LLFloater::setTitle(mFilter->getName());
+ childSetValue("check_animation", (S32) (filter_types & 0x1 << LLInventoryType::IT_ANIMATION));
+
+ childSetValue("check_calling_card", (S32) (filter_types & 0x1 << LLInventoryType::IT_CALLINGCARD));
+ childSetValue("check_clothing", (S32) (filter_types & 0x1 << LLInventoryType::IT_WEARABLE));
+ childSetValue("check_gesture", (S32) (filter_types & 0x1 << LLInventoryType::IT_GESTURE));
+ childSetValue("check_landmark", (S32) (filter_types & 0x1 << LLInventoryType::IT_LANDMARK));
+ childSetValue("check_notecard", (S32) (filter_types & 0x1 << LLInventoryType::IT_NOTECARD));
+ childSetValue("check_object", (S32) (filter_types & 0x1 << LLInventoryType::IT_OBJECT));
+ childSetValue("check_script", (S32) (filter_types & 0x1 << LLInventoryType::IT_LSL));
+ childSetValue("check_sound", (S32) (filter_types & 0x1 << LLInventoryType::IT_SOUND));
+ childSetValue("check_texture", (S32) (filter_types & 0x1 << LLInventoryType::IT_TEXTURE));
+ childSetValue("check_snapshot", (S32) (filter_types & 0x1 << LLInventoryType::IT_SNAPSHOT));
+ childSetValue("check_show_empty", show_folders == LLInventoryFilter::SHOW_ALL_FOLDERS);
+ childSetValue("check_since_logoff", mFilter->isSinceLogoff());
+ mSpinSinceHours->set((F32)(hours % 24));
+ mSpinSinceDays->set((F32)(hours / 24));
+}
+
+void LLFloaterInventoryFinder::draw()
+{
+ LLMemType mt(LLMemType::MTYPE_INVENTORY_DRAW);
+ U32 filter = 0xffffffff;
+ BOOL filtered_by_all_types = TRUE;
+
+ if (!childGetValue("check_animation"))
+ {
+ filter &= ~(0x1 << LLInventoryType::IT_ANIMATION);
+ filtered_by_all_types = FALSE;
+ }
+
+
+ if (!childGetValue("check_calling_card"))
+ {
+ filter &= ~(0x1 << LLInventoryType::IT_CALLINGCARD);
+ filtered_by_all_types = FALSE;
+ }
+
+ if (!childGetValue("check_clothing"))
+ {
+ filter &= ~(0x1 << LLInventoryType::IT_WEARABLE);
+ filtered_by_all_types = FALSE;
+ }
+
+ if (!childGetValue("check_gesture"))
+ {
+ filter &= ~(0x1 << LLInventoryType::IT_GESTURE);
+ filtered_by_all_types = FALSE;
+ }
+
+ if (!childGetValue("check_landmark"))
+
+
+ {
+ filter &= ~(0x1 << LLInventoryType::IT_LANDMARK);
+ filtered_by_all_types = FALSE;
+ }
+
+ if (!childGetValue("check_notecard"))
+ {
+ filter &= ~(0x1 << LLInventoryType::IT_NOTECARD);
+ filtered_by_all_types = FALSE;
+ }
+
+ if (!childGetValue("check_object"))
+ {
+ filter &= ~(0x1 << LLInventoryType::IT_OBJECT);
+ filter &= ~(0x1 << LLInventoryType::IT_ATTACHMENT);
+ filtered_by_all_types = FALSE;
+ }
+
+ if (!childGetValue("check_script"))
+ {
+ filter &= ~(0x1 << LLInventoryType::IT_LSL);
+ filtered_by_all_types = FALSE;
+ }
+
+ if (!childGetValue("check_sound"))
+ {
+ filter &= ~(0x1 << LLInventoryType::IT_SOUND);
+ filtered_by_all_types = FALSE;
+ }
+
+ if (!childGetValue("check_texture"))
+ {
+ filter &= ~(0x1 << LLInventoryType::IT_TEXTURE);
+ filtered_by_all_types = FALSE;
+ }
+
+ if (!childGetValue("check_snapshot"))
+ {
+ filter &= ~(0x1 << LLInventoryType::IT_SNAPSHOT);
+ filtered_by_all_types = FALSE;
+ }
+
+ if (!filtered_by_all_types)
+ {
+ // don't include folders in filter, unless I've selected everything
+ filter &= ~(0x1 << LLInventoryType::IT_CATEGORY);
+ }
+
+ // update the panel, panel will update the filter
+ mFloaterInventory->mActivePanel->setShowFolderState(getCheckShowEmpty() ?
+ LLInventoryFilter::SHOW_ALL_FOLDERS : LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
+ mFloaterInventory->mActivePanel->setFilterTypes(filter);
+ if (getCheckSinceLogoff())
+ {
+ mSpinSinceDays->set(0);
+ mSpinSinceHours->set(0);
+ }
+ U32 days = (U32)mSpinSinceDays->get();
+ U32 hours = (U32)mSpinSinceHours->get();
+ if (hours > 24)
+ {
+ days += hours / 24;
+ hours = (U32)hours % 24;
+ mSpinSinceDays->set((F32)days);
+ mSpinSinceHours->set((F32)hours);
+ }
+ hours += days * 24;
+ mFloaterInventory->mActivePanel->setHoursAgo(hours);
+ mFloaterInventory->mActivePanel->setSinceLogoff(getCheckSinceLogoff());
+ mFloaterInventory->setFilterTextFromFilter();
+
+ LLFloater::draw();
+}
+
+void LLFloaterInventoryFinder::onClose(bool app_quitting)
+{
+ gSavedSettings.setBOOL("Inventory.ShowFilters", FALSE);
+ // If you want to reset the filter on close, do it here. This functionality was
+ // hotly debated - Paulm
+#if 0
+ if (mFloaterInventory)
+ {
+ LLFloaterInventory::onResetFilter((void *)mFloaterInventory);
+ }
+#endif
+ destroy();
+}
+
+
+BOOL LLFloaterInventoryFinder::getCheckShowEmpty()
+{
+ return childGetValue("check_show_empty");
+}
+
+BOOL LLFloaterInventoryFinder::getCheckSinceLogoff()
+{
+ return childGetValue("check_since_logoff");
+}
+
+void LLFloaterInventoryFinder::onCloseBtn(void* user_data)
+{
+ LLFloaterInventoryFinder* finderp = (LLFloaterInventoryFinder*)user_data;
+ finderp->closeFloater();
+}
+
+// static
+void LLFloaterInventoryFinder::selectAllTypes(void* user_data)
+{
+ LLFloaterInventoryFinder* self = (LLFloaterInventoryFinder*)user_data;
+ if(!self) return;
+
+ self->childSetValue("check_animation", TRUE);
+ self->childSetValue("check_calling_card", TRUE);
+ self->childSetValue("check_clothing", TRUE);
+ self->childSetValue("check_gesture", TRUE);
+ self->childSetValue("check_landmark", TRUE);
+ self->childSetValue("check_notecard", TRUE);
+ self->childSetValue("check_object", TRUE);
+ self->childSetValue("check_script", TRUE);
+ self->childSetValue("check_sound", TRUE);
+ self->childSetValue("check_texture", TRUE);
+ self->childSetValue("check_snapshot", TRUE);
+
+/*
+ self->mCheckCallingCard->set(TRUE);
+ self->mCheckClothing->set(TRUE);
+ self->mCheckGesture->set(TRUE);
+ self->mCheckLandmark->set(TRUE);
+ self->mCheckNotecard->set(TRUE);
+ self->mCheckObject->set(TRUE);
+ self->mCheckScript->set(TRUE);
+ self->mCheckSound->set(TRUE);
+ self->mCheckTexture->set(TRUE);
+ self->mCheckSnapshot->set(TRUE);*/
+}
+
+//static
+void LLFloaterInventoryFinder::selectNoTypes(void* user_data)
+{
+ LLFloaterInventoryFinder* self = (LLFloaterInventoryFinder*)user_data;
+ if(!self) return;
+
+ /*
+ self->childSetValue("check_animation", FALSE);
+ self->mCheckCallingCard->set(FALSE);
+ self->mCheckClothing->set(FALSE);
+ self->mCheckGesture->set(FALSE);
+ self->mCheckLandmark->set(FALSE);
+ self->mCheckNotecard->set(FALSE);
+ self->mCheckObject->set(FALSE);
+ self->mCheckScript->set(FALSE);
+ self->mCheckSound->set(FALSE);
+ self->mCheckTexture->set(FALSE);
+ self->mCheckSnapshot->set(FALSE);*/
+
+
+ self->childSetValue("check_animation", FALSE);
+ self->childSetValue("check_calling_card", FALSE);
+ self->childSetValue("check_clothing", FALSE);
+ self->childSetValue("check_gesture", FALSE);
+ self->childSetValue("check_landmark", FALSE);
+ self->childSetValue("check_notecard", FALSE);
+ self->childSetValue("check_object", FALSE);
+ self->childSetValue("check_script", FALSE);
+ self->childSetValue("check_sound", FALSE);
+ self->childSetValue("check_texture", FALSE);
+ self->childSetValue("check_snapshot", FALSE);
+}
+
+
+///----------------------------------------------------------------------------
+/// LLFloaterInventory
+///----------------------------------------------------------------------------
+void LLSaveFolderState::setApply(BOOL apply)
+{
+ mApply = apply;
+ // before generating new list of open folders, clear the old one
+ if(!apply)
+ {
+ clearOpenFolders();
+ }
+}
+
+void LLSaveFolderState::doFolder(LLFolderViewFolder* folder)
+{
+ LLMemType mt(LLMemType::MTYPE_INVENTORY_DO_FOLDER);
+ if(mApply)
+ {
+ // we're applying the open state
+ LLInvFVBridge* bridge = (LLInvFVBridge*)folder->getListener();
+ if(!bridge) return;
+ LLUUID id(bridge->getUUID());
+ if(mOpenFolders.find(id) != mOpenFolders.end())
+ {
+ folder->setOpen(TRUE);
+ }
+ else
+ {
+ // keep selected filter in its current state, this is less jarring to user
+ if (!folder->isSelected())
+ {
+ folder->setOpen(FALSE);
+ }
+ }
+ }
+ else
+ {
+ // we're recording state at this point
+ if(folder->isOpen())
+ {
+ LLInvFVBridge* bridge = (LLInvFVBridge*)folder->getListener();
+ if(!bridge) return;
+ mOpenFolders.insert(bridge->getUUID());
+ }
+ }
+}
+
+LLFloaterInventory::LLFloaterInventory(const LLSD& key)
+ : LLFloater(key)
+{
+ LLMemType mt(LLMemType::MTYPE_INVENTORY_VIEW_INIT);
+ // Menu Callbacks (non contex menus)
+ mCommitCallbackRegistrar.add("Inventory.DoToSelected", boost::bind(&LLFloaterInventory::doToSelected, this, _2));
+ mCommitCallbackRegistrar.add("Inventory.CloseAllFolders", boost::bind(&LLFloaterInventory::closeAllFolders, this));
+ mCommitCallbackRegistrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyTrash", LLAssetType::AT_TRASH));
+ mCommitCallbackRegistrar.add("Inventory.EmptyLostAndFound", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyLostAndFound", LLAssetType::AT_LOST_AND_FOUND));
+ mCommitCallbackRegistrar.add("Inventory.DoCreate", boost::bind(&LLFloaterInventory::doCreate, this, _2));
+ mCommitCallbackRegistrar.add("Inventory.NewWindow", boost::bind(&LLFloaterInventory::newWindow, this));
+ mCommitCallbackRegistrar.add("Inventory.ShowFilters", boost::bind(&LLFloaterInventory::toggleFindOptions, this));
+ mCommitCallbackRegistrar.add("Inventory.ResetFilters", boost::bind(&LLFloaterInventory::resetFilters, this));
+ mCommitCallbackRegistrar.add("Inventory.SetSortBy", boost::bind(&LLFloaterInventory::setSortBy, this, _2));
+
+ // Controls
+ // *TODO: Just use persistant settings for each of these
+ U32 sort_order = gSavedSettings.getU32("InventorySortOrder");
+ BOOL sort_by_name = ! ( sort_order & LLInventoryFilter::SO_DATE );
+ BOOL sort_folders_by_name = ( sort_order & LLInventoryFilter::SO_FOLDERS_BY_NAME );
+ BOOL sort_system_folders_to_top = ( sort_order & LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP );
+
+ gSavedSettings.declareBOOL("Inventory.ShowFilters", FALSE, "Declared in code", FALSE);
+ gSavedSettings.declareBOOL("Inventory.SortByName", sort_by_name, "Declared in code", FALSE);
+ gSavedSettings.declareBOOL("Inventory.SortByDate", !sort_by_name, "Declared in code", FALSE);
+ gSavedSettings.declareBOOL("Inventory.FoldersAlwaysByName", sort_folders_by_name, "Declared in code", FALSE);
+ gSavedSettings.declareBOOL("Inventory.SystemFoldersToTop", sort_system_folders_to_top, "Declared in code", FALSE);
+
+ mSavedFolderState = new LLSaveFolderState();
+ mSavedFolderState->setApply(FALSE);
+
+ //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_inventory.xml");
+}
+
+BOOL LLFloaterInventory::postBuild()
+{
+ gInventory.addObserver(this);
+
+ mFilterTabs = getChild<LLTabContainer>("inventory filter tabs");
+ mFilterTabs->setCommitCallback(boost::bind(&LLFloaterInventory::onFilterSelected, this));
+
+ //panel->getFilter()->markDefault();
+
+ // Set up the default inv. panel/filter settings.
+ mActivePanel = getChild<LLInventoryPanel>("All Items");
+ if (mActivePanel)
+ {
+ // "All Items" is the previous only view, so it gets the InventorySortOrder
+ mActivePanel->setSortOrder(gSavedSettings.getU32("InventorySortOrder"));
+ mActivePanel->getFilter()->markDefault();
+ mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
+ mActivePanel->setSelectCallback(boost::bind(&LLInventoryPanel::onSelectionChange, mActivePanel, _1, _2));
+ }
+ LLInventoryPanel* recent_items_panel = getChild<LLInventoryPanel>("Recent Items");
+ if (recent_items_panel)
+ {
+ recent_items_panel->setSinceLogoff(TRUE);
+ recent_items_panel->setSortOrder(LLInventoryFilter::SO_DATE);
+ recent_items_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
+ recent_items_panel->getFilter()->markDefault();
+ recent_items_panel->setSelectCallback(boost::bind(&LLInventoryPanel::onSelectionChange, recent_items_panel, _1, _2));
+ }
+
+ // Now load the stored settings from disk, if available.
+ std::ostringstream filterSaveName;
+ filterSaveName << gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "filters.xml");
+ llinfos << "LLFloaterInventory::init: reading from " << filterSaveName << llendl;
+ llifstream file(filterSaveName.str());
+ LLSD savedFilterState;
+ if (file.is_open())
+ {
+ LLSDSerialize::fromXML(savedFilterState, file);
+ file.close();
+
+ // Load the persistent "Recent Items" settings.
+ // Note that the "All Items" settings do not persist.
+ if(recent_items_panel)
+ {
+ if(savedFilterState.has(recent_items_panel->getFilter()->getName()))
+ {
+ LLSD recent_items = savedFilterState.get(
+ recent_items_panel->getFilter()->getName());
+ recent_items_panel->getFilter()->fromLLSD(recent_items);
+ }
+ }
+
+ }
+
+
+ mFilterEditor = getChild<LLFilterEditor>("inventory search editor");
+ if (mFilterEditor)
+ {
+ mFilterEditor->setCommitCallback(boost::bind(&LLFloaterInventory::onFilterEdit, this, _2));
+ }
+
+ // *TODO:Get the cost info from the server
+ const std::string upload_cost("10");
+ childSetLabelArg("Upload Image", "[COST]", upload_cost);
+ childSetLabelArg("Upload Sound", "[COST]", upload_cost);
+ childSetLabelArg("Upload Animation", "[COST]", upload_cost);
+ childSetLabelArg("Bulk Upload", "[COST]", upload_cost);
+
+ return TRUE;
+}
+
+// Destroys the object
+LLFloaterInventory::~LLFloaterInventory( void )
+{
+ // Save the filters state.
+ LLSD filterRoot;
+ LLInventoryPanel* all_items_panel = getChild<LLInventoryPanel>("All Items");
+ if (all_items_panel)
+ {
+ LLInventoryFilter* filter = all_items_panel->getFilter();
+ LLSD filterState;
+ filter->toLLSD(filterState);
+ filterRoot[filter->getName()] = filterState;
+ }
+
+ LLInventoryPanel* recent_items_panel = getChild<LLInventoryPanel>("Recent Items");
+ if (recent_items_panel)
+ {
+ LLInventoryFilter* filter = recent_items_panel->getFilter();
+ LLSD filterState;
+ filter->toLLSD(filterState);
+ filterRoot[filter->getName()] = filterState;
+ }
+
+ std::ostringstream filterSaveName;
+ filterSaveName << gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "filters.xml");
+ llofstream filtersFile(filterSaveName.str());
+ if(!LLSDSerialize::toPrettyXML(filterRoot, filtersFile))
+ {
+ llwarns << "Could not write to filters save file " << filterSaveName << llendl;
+ }
+ else
+ filtersFile.close();
+
+ gInventory.removeObserver(this);
+ delete mSavedFolderState;
+}
+
+void LLFloaterInventory::draw()
+{
+ if (LLInventoryModel::isEverythingFetched())
+ {
+ LLLocale locale(LLLocale::USER_LOCALE);
+ std::ostringstream title;
+ //title << "Inventory";
+ title<<getString("Title");
+ std::string item_count_string;
+ LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount());
+ title << " (" << item_count_string << getString("Items")<<")";
+ //TODO:: Translate mFilterText
+ title << mFilterText;
+ setTitle(title.str());
+ }
+ if (mActivePanel && mFilterEditor)
+ {
+ mFilterEditor->setText(mActivePanel->getFilterSubString());
+ }
+ LLFloater::draw();
+}
+
+void LLOpenFilteredFolders::doItem(LLFolderViewItem *item)
+{
+ if (item->getFiltered())
+ {
+ item->getParentFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP);
+ }
+}
+
+void LLOpenFilteredFolders::doFolder(LLFolderViewFolder* folder)
+{
+ if (folder->getFiltered() && folder->getParentFolder())
+ {
+ folder->getParentFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP);
+ }
+ // if this folder didn't pass the filter, and none of its descendants did
+ else if (!folder->getFiltered() && !folder->hasFilteredDescendants())
+ {
+ folder->setOpenArrangeRecursively(FALSE, LLFolderViewFolder::RECURSE_NO);
+ }
+}
+
+void LLSelectFirstFilteredItem::doItem(LLFolderViewItem *item)
+{
+ if (item->getFiltered() && !mItemSelected)
+ {
+ item->getRoot()->setSelection(item, FALSE, FALSE);
+ if (item->getParentFolder())
+ {
+ item->getParentFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP);
+ }
+ item->getRoot()->scrollToShowSelection();
+ mItemSelected = TRUE;
+ }
+}
+
+void LLSelectFirstFilteredItem::doFolder(LLFolderViewFolder* folder)
+{
+ if (folder->getFiltered() && !mItemSelected)
+ {
+ folder->getRoot()->setSelection(folder, FALSE, FALSE);
+ if (folder->getParentFolder())
+ {
+ folder->getParentFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP);
+ }
+ folder->getRoot()->scrollToShowSelection();
+ mItemSelected = TRUE;
+ }
+}
+
+void LLOpenFoldersWithSelection::doItem(LLFolderViewItem *item)
+{
+ if (item->getParentFolder() && item->isSelected())
+ {
+ item->getParentFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP);
+ }
+}
+
+void LLOpenFoldersWithSelection::doFolder(LLFolderViewFolder* folder)
+{
+ if (folder->getParentFolder() && folder->isSelected())
+ {
+ folder->getParentFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP);
+ }
+}
+
+void LLFloaterInventory::startSearch()
+{
+ // this forces focus to line editor portion of search editor
+ if (mFilterEditor)
+ {
+ mFilterEditor->focusFirstItem(TRUE);
+ }
+}
+
+// virtual, from LLView
+void LLFloaterInventory::setVisible( BOOL visible )
+{
+ LLFloater::setVisible(visible);
+}
+
+void LLFloaterInventory::onOpen(const LLSD& key)
+{
+ LLFirstUse::useInventory();
+}
+
+// Destroy all but the last floater, which is made invisible.
+void LLFloaterInventory::onClose(bool app_quitting)
+{
+ if (getKey().asInteger() != 0)
+ {
+ destroy();
+ }
+ else
+ {
+ // clear filters, but save user's folder state first
+ if (!mActivePanel->getRootFolder()->isFilterModified())
+ {
+ mSavedFolderState->setApply(FALSE);
+ mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
+ }
+ setVisible(FALSE);
+ }
+}
+
+BOOL LLFloaterInventory::handleKeyHere(KEY key, MASK mask)
+{
+ LLFolderView* root_folder = mActivePanel ? mActivePanel->getRootFolder() : NULL;
+ if (root_folder)
+ {
+ // first check for user accepting current search results
+ if (mFilterEditor
+ && mFilterEditor->hasFocus()
+ && (key == KEY_RETURN
+ || key == KEY_DOWN)
+ && mask == MASK_NONE)
+ {
+ // move focus to inventory proper
+ mActivePanel->setFocus(TRUE);
+ root_folder->scrollToShowSelection();
+ return TRUE;
+ }
+
+ if (mActivePanel->hasFocus() && key == KEY_UP)
+ {
+ startSearch();
+ }
+ }
+
+ return LLFloater::handleKeyHere(key, mask);
+
+}
+
+void LLFloaterInventory::changed(U32 mask)
+{
+ std::ostringstream title;
+ //title << "Inventory";
+ title<<getString("Title");
+ if (LLInventoryModel::backgroundFetchActive())
+ {
+ LLLocale locale(LLLocale::USER_LOCALE);
+ std::string item_count_string;
+ LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount());
+ title << " ( "<< getString("Fetched") << item_count_string << getString("Items")<<")";
+ }
+ //TODO:: Translate mFilterText
+ title << mFilterText;
+ setTitle(title.str());
+
+}
+
+//static
+LLFloaterInventory* LLFloaterInventory::newInstance()
+{
+ LLMemType mt(LLMemType::MTYPE_INVENTORY_VIEW_SHOW);
+ static S32 inst_count = 1;
+ return LLFloaterReg::getTypedInstance<LLFloaterInventory>("inventory", LLSD(inst_count++));
+}
+
+//----------------------------------------------------------------------------
+// menu callbacks
+
+void LLFloaterInventory::doToSelected(const LLSD& userdata)
+{
+ getPanel()->getRootFolder()->doToSelected(&gInventory, userdata);
+}
+
+void LLFloaterInventory::closeAllFolders()
+{
+ getPanel()->getRootFolder()->closeAllFolders();
+}
+
+void LLFloaterInventory::doCreate(const LLSD& userdata)
+{
+ menu_create_inventory_item(getPanel()->getRootFolder(), NULL, userdata);
+}
+
+void LLFloaterInventory::newWindow()
+{
+ LLFloaterInventory* iv = newInstance();
+ iv->getActivePanel()->setFilterTypes(getActivePanel()->getFilterTypes());
+ iv->getActivePanel()->setFilterSubString(getActivePanel()->getFilterSubString());
+ iv->openFloater();
+
+ // force onscreen
+ gFloaterView->adjustToFitScreen(iv, FALSE);
+}
+
+void LLFloaterInventory::resetFilters()
+{
+ LLFloaterInventoryFinder *finder = getFinder();
+ getActivePanel()->getFilter()->resetDefault();
+ if (finder)
+ {
+ finder->updateElementsFromFilter();
+ }
+
+ setFilterTextFromFilter();
+}
+
+void LLFloaterInventory::setSortBy(const LLSD& userdata)
+{
+ std::string sort_field = userdata.asString();
+ if (sort_field == "name")
+ {
+ U32 order = getActivePanel()->getSortOrder();
+ getActivePanel()->setSortOrder( order & ~LLInventoryFilter::SO_DATE );
+
+ gSavedSettings.setBOOL("Inventory.SortByName", TRUE );
+ gSavedSettings.setBOOL("Inventory.SortByDate", FALSE );
+ }
+ else if (sort_field == "date")
+ {
+ U32 order = getActivePanel()->getSortOrder();
+ getActivePanel()->setSortOrder( order | LLInventoryFilter::SO_DATE );
+
+ gSavedSettings.setBOOL("Inventory.SortByName", FALSE );
+ gSavedSettings.setBOOL("Inventory.SortByDate", TRUE );
+ }
+ else if (sort_field == "foldersalwaysbyname")
+ {
+ U32 order = getActivePanel()->getSortOrder();
+ if ( order & LLInventoryFilter::SO_FOLDERS_BY_NAME )
+ {
+ order &= ~LLInventoryFilter::SO_FOLDERS_BY_NAME;
+
+ gSavedSettings.setBOOL("Inventory.FoldersAlwaysByName", FALSE );
+ }
+ else
+ {
+ order |= LLInventoryFilter::SO_FOLDERS_BY_NAME;
+
+ gSavedSettings.setBOOL("Inventory.FoldersAlwaysByName", TRUE );
+ }
+ getActivePanel()->setSortOrder( order );
+ }
+ else if (sort_field == "systemfolderstotop")
+ {
+ U32 order = getActivePanel()->getSortOrder();
+ if ( order & LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP )
+ {
+ order &= ~LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP;
+
+ gSavedSettings.setBOOL("Inventory.SystemFoldersToTop", FALSE );
+ }
+ else
+ {
+ order |= LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP;
+
+ gSavedSettings.setBOOL("Inventory.SystemFoldersToTop", TRUE );
+ }
+ getActivePanel()->setSortOrder( order );
+ }
+}
+
+//----------------------------------------------------------------------------
+
+// static
+LLFloaterInventory* LLFloaterInventory::showAgentInventory()
+{
+ LLFloaterInventory* iv = NULL;
+ if (!gAgent.cameraMouselook())
+ {
+ iv = LLFloaterReg::showTypedInstance<LLFloaterInventory>("inventory", LLSD());
+ }
+ return iv;
+}
+
+// static
+LLFloaterInventory* LLFloaterInventory::getActiveInventory()
+{
+ LLFloaterInventory* res = NULL;
+ LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory");
+ S32 z_min = S32_MAX;
+ for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter)
+ {
+ LLFloaterInventory* iv = dynamic_cast<LLFloaterInventory*>(*iter);
+ if (iv)
+ {
+ S32 z_order = gFloaterView->getZOrder(iv);
+ if (z_order < z_min)
+ {
+ res = iv;
+ z_min = z_order;
+ }
+ }
+ }
+ return res;
+}
+
+// static
+void LLFloaterInventory::cleanup()
+{
+ LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory");
+ for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end();)
+ {
+ LLFloaterInventory* iv = dynamic_cast<LLFloaterInventory*>(*iter++);
+ if (iv)
+ {
+ iv->destroy();
+ }
+ }
+}
+
+void LLFloaterInventory::toggleFindOptions()
+{
+ LLMemType mt(LLMemType::MTYPE_INVENTORY_VIEW_TOGGLE);
+ LLFloater *floater = getFinder();
+ if (!floater)
+ {
+ LLFloaterInventoryFinder * finder = new LLFloaterInventoryFinder(this);
+ mFinderHandle = finder->getHandle();
+ finder->openFloater();
+ addDependentFloater(mFinderHandle);
+
+ // start background fetch of folders
+ gInventory.startBackgroundFetch();
+
+ gSavedSettings.setBOOL("Inventory.ShowFilters", TRUE);
+ }
+ else
+ {
+ floater->closeFloater();
+
+ gSavedSettings.setBOOL("Inventory.ShowFilters", FALSE);
+ }
+}
+
+// static
+BOOL LLFloaterInventory::filtersVisible(void* user_data)
+{
+ LLFloaterInventory* self = (LLFloaterInventory*)user_data;
+ if(!self) return FALSE;
+
+ return self->getFinder() != NULL;
+}
+
+void LLFloaterInventory::onClearSearch()
+{
+ LLFloater *finder = getFinder();
+ if (mActivePanel)
+ {
+ mActivePanel->setFilterSubString(LLStringUtil::null);
+ mActivePanel->setFilterTypes(0xffffffff);
+ }
+
+ if (finder)
+ {
+ LLFloaterInventoryFinder::selectAllTypes(finder);
+ }
+
+ // re-open folders that were initially open
+ if (mActivePanel)
+ {
+ mSavedFolderState->setApply(TRUE);
+ mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
+ LLOpenFoldersWithSelection opener;
+ mActivePanel->getRootFolder()->applyFunctorRecursively(opener);
+ mActivePanel->getRootFolder()->scrollToShowSelection();
+ }
+}
+
+void LLFloaterInventory::onFilterEdit(const std::string& search_string )
+{
+ if (search_string == "")
+ {
+ onClearSearch();
+ }
+ if (!mActivePanel)
+ {
+ return;
+ }
+
+ gInventory.startBackgroundFetch();
+
+ std::string filter_text = search_string;
+ std::string uppercase_search_string = filter_text;
+ LLStringUtil::toUpper(uppercase_search_string);
+ if (mActivePanel->getFilterSubString().empty() && uppercase_search_string.empty())
+ {
+ // current filter and new filter empty, do nothing
+ return;
+ }
+
+ // save current folder open state if no filter currently applied
+ if (!mActivePanel->getRootFolder()->isFilterModified())
+ {
+ mSavedFolderState->setApply(FALSE);
+ mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
+ }
+
+ // set new filter string
+ mActivePanel->setFilterSubString(uppercase_search_string);
+}
+
+
+ //static
+ BOOL LLFloaterInventory::incrementalFind(LLFolderViewItem* first_item, const char *find_text, BOOL backward)
+ {
+ LLFloaterInventory* active_view = NULL;
+
+ LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory");
+ for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter)
+ {
+ LLFloaterInventory* iv = dynamic_cast<LLFloaterInventory*>(*iter);
+ if (iv)
+ {
+ if (gFocusMgr.childHasKeyboardFocus(iv))
+ {
+ active_view = iv;
+ break;
+ }
+ }
+ }
+
+ if (!active_view)
+ {
+ return FALSE;
+ }
+
+ std::string search_string(find_text);
+
+ if (search_string.empty())
+ {
+ return FALSE;
+ }
+
+ if (active_view->mActivePanel &&
+ active_view->mActivePanel->getRootFolder()->search(first_item, search_string, backward))
+ {
+ return TRUE;
+ }
+
+ return FALSE;
+ }
+
+void LLFloaterInventory::onFilterSelected()
+{
+ // Find my index
+ mActivePanel = (LLInventoryPanel*)childGetVisibleTab("inventory filter tabs");
+
+ if (!mActivePanel)
+ {
+ return;
+ }
+ LLInventoryFilter* filter = mActivePanel->getFilter();
+ LLFloaterInventoryFinder *finder = getFinder();
+ if (finder)
+ {
+ finder->changeFilter(filter);
+ }
+ if (filter->isActive())
+ {
+ // If our filter is active we may be the first thing requiring a fetch so we better start it here.
+ gInventory.startBackgroundFetch();
+ }
+ setFilterTextFromFilter();
+}
+
+BOOL LLFloaterInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg)
+{
+ // Check to see if we are auto scrolling from the last frame
+ LLInventoryPanel* panel = (LLInventoryPanel*)this->getActivePanel();
+ BOOL needsToScroll = panel->getScrollableContainer()->needsToScroll(x, y, LLScrollContainer::VERTICAL);
+ if(mFilterTabs)
+ {
+ if(needsToScroll)
+ {
+ mFilterTabs->startDragAndDropDelayTimer();
+ }
+ }
+
+ BOOL handled = LLFloater::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
+
+ return handled;
+}
+const std::string& get_item_icon_name(LLAssetType::EType asset_type,
+ LLInventoryType::EType inventory_type,
+ U32 attachment_point,
+ BOOL item_is_multi )
+{
+ EInventoryIcon idx = OBJECT_ICON_NAME;
+ if ( item_is_multi )
+ {
+ idx = OBJECT_MULTI_ICON_NAME;
+ }
+
+ switch(asset_type)
+ {
+ case LLAssetType::AT_TEXTURE:
+ if(LLInventoryType::IT_SNAPSHOT == inventory_type)
+ {
+ idx = SNAPSHOT_ICON_NAME;
+ }
+ else
+ {
+ idx = TEXTURE_ICON_NAME;
+ }
+ break;
+
+ case LLAssetType::AT_SOUND:
+ idx = SOUND_ICON_NAME;
+ break;
+ case LLAssetType::AT_CALLINGCARD:
+ if(attachment_point!= 0)
+ {
+ idx = CALLINGCARD_ONLINE_ICON_NAME;
+ }
+ else
+ {
+ idx = CALLINGCARD_OFFLINE_ICON_NAME;
+ }
+ break;
+ case LLAssetType::AT_LANDMARK:
+ if(attachment_point!= 0)
+ {
+ idx = LANDMARK_VISITED_ICON_NAME;
+ }
+ else
+ {
+ idx = LANDMARK_ICON_NAME;
+ }
+ break;
+ case LLAssetType::AT_SCRIPT:
+ case LLAssetType::AT_LSL_TEXT:
+ case LLAssetType::AT_LSL_BYTECODE:
+ idx = SCRIPT_ICON_NAME;
+ break;
+ case LLAssetType::AT_CLOTHING:
+ idx = CLOTHING_ICON_NAME;
+ case LLAssetType::AT_BODYPART :
+ if(LLAssetType::AT_BODYPART == asset_type)
+ {
+ idx = BODYPART_ICON_NAME;
+ }
+ switch(LLInventoryItem::II_FLAGS_WEARABLES_MASK & attachment_point)
+ {
+ case WT_SHAPE:
+ idx = BODYPART_SHAPE_ICON_NAME;
+ break;
+ case WT_SKIN:
+ idx = BODYPART_SKIN_ICON_NAME;
+ break;
+ case WT_HAIR:
+ idx = BODYPART_HAIR_ICON_NAME;
+ break;
+ case WT_EYES:
+ idx = BODYPART_EYES_ICON_NAME;
+ break;
+ case WT_SHIRT:
+ idx = CLOTHING_SHIRT_ICON_NAME;
+ break;
+ case WT_PANTS:
+ idx = CLOTHING_PANTS_ICON_NAME;
+ break;
+ case WT_SHOES:
+ idx = CLOTHING_SHOES_ICON_NAME;
+ break;
+ case WT_SOCKS:
+ idx = CLOTHING_SOCKS_ICON_NAME;
+ break;
+ case WT_JACKET:
+ idx = CLOTHING_JACKET_ICON_NAME;
+ break;
+ case WT_GLOVES:
+ idx = CLOTHING_GLOVES_ICON_NAME;
+ break;
+ case WT_UNDERSHIRT:
+ idx = CLOTHING_UNDERSHIRT_ICON_NAME;
+ break;
+ case WT_UNDERPANTS:
+ idx = CLOTHING_UNDERPANTS_ICON_NAME;
+ break;
+ case WT_SKIRT:
+ idx = CLOTHING_SKIRT_ICON_NAME;
+ break;
+ case WT_ALPHA:
+ idx = CLOTHING_ALPHA_ICON_NAME;
+ break;
+ case WT_TATTOO:
+ idx = CLOTHING_TATTOO_ICON_NAME;
+ break;
+ default:
+ // no-op, go with choice above
+ break;
+ }
+ break;
+ case LLAssetType::AT_NOTECARD:
+ idx = NOTECARD_ICON_NAME;
+ break;
+ case LLAssetType::AT_ANIMATION:
+ idx = ANIMATION_ICON_NAME;
+ break;
+ case LLAssetType::AT_GESTURE:
+ idx = GESTURE_ICON_NAME;
+ break;
+ case LLAssetType::AT_FAVORITE:
+ //TODO - need bette idx
+ idx = LANDMARK_ICON_NAME;
+ break;
+ case LLAssetType::AT_LINK:
+ idx = BODYPART_ICON_NAME; // Seraph replace this with broken item link icon
+ break;
+ case LLAssetType::AT_LINK_FOLDER:
+ idx = BODYPART_ICON_NAME; // Seraph replace this with broken folder link icon
+ break;
+ default:
+ break;
+ }
+
+ return ICON_NAME[idx];
+}
+
+LLUIImagePtr get_item_icon(LLAssetType::EType asset_type,
+ LLInventoryType::EType inventory_type,
+ U32 attachment_point,
+ BOOL item_is_multi)
+{
+ const std::string& icon_name = get_item_icon_name(asset_type, inventory_type, attachment_point, item_is_multi );
+ return LLUI::getUIImage(icon_name);
+}
+
+const std::string LLInventoryPanel::DEFAULT_SORT_ORDER = std::string("InventorySortOrder");
+const std::string LLInventoryPanel::RECENTITEMS_SORT_ORDER = std::string("RecentItemsSortOrder");
+const std::string LLInventoryPanel::INHERIT_SORT_ORDER = std::string("");
+
+LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p)
+: LLPanel(p),
+ mInventoryObserver(NULL),
+ mFolders(NULL),
+ mScroller(NULL),
+ mSortOrderSetting(p.sort_order_setting),
+ mInventory(p.inventory),
+ mAllowMultiSelect(p.allow_multi_select)
+{
+ // contex menu callbacks
+ mCommitCallbackRegistrar.add("Inventory.DoToSelected", boost::bind(&LLInventoryPanel::doToSelected, this, _2));
+ mCommitCallbackRegistrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyTrash", LLAssetType::AT_TRASH));
+ mCommitCallbackRegistrar.add("Inventory.EmptyLostAndFound", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyLostAndFound", LLAssetType::AT_LOST_AND_FOUND));
+ mCommitCallbackRegistrar.add("Inventory.DoCreate", boost::bind(&LLInventoryPanel::doCreate, this, _2));
+ mCommitCallbackRegistrar.add("Inventory.AttachObject", boost::bind(&LLInventoryPanel::attachObject, this, _2));
+ mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&LLInventoryPanel::beginIMSession, this));
+
+ setBackgroundColor(LLUIColorTable::instance().getColor("InventoryBackgroundColor"));
+ setBackgroundVisible(TRUE);
+ setBackgroundOpaque(TRUE);
+}
+
+BOOL LLInventoryPanel::postBuild()
+{
+ LLMemType mt(LLMemType::MTYPE_INVENTORY_POST_BUILD);
+
+ mCommitCallbackRegistrar.pushScope(); // registered as a widget; need to push callback scope ourselves
+
+ // create root folder
+ {
+ LLRect folder_rect(0,
+ 0,
+ getRect().getWidth(),
+ 0);
+ LLFolderView::Params p;
+ p.name = getName();
+ p.rect = folder_rect;
+ p.parent_panel = this;
+ mFolders = LLUICtrlFactory::create<LLFolderView>(p);
+ mFolders->setAllowMultiSelect(mAllowMultiSelect);
+ }
+
+ mCommitCallbackRegistrar.popScope();
+
+ mFolders->setCallbackRegistrar(&mCommitCallbackRegistrar);
+
+ // scroller
+ {
+ LLRect scroller_view_rect = getRect();
+ scroller_view_rect.translate(-scroller_view_rect.mLeft, -scroller_view_rect.mBottom);
+ LLScrollContainer::Params p;
+ p.name("Inventory Scroller");
+ p.rect(scroller_view_rect);
+ p.follows.flags(FOLLOWS_ALL);
+ p.reserve_scroll_corner(true);
+ p.tab_stop(true);
+ mScroller = LLUICtrlFactory::create<LLScrollContainer>(p);
+ }
+ addChild(mScroller);
+ mScroller->addChild(mFolders);
+
+ mFolders->setScrollContainer(mScroller);
+
+ // set up the callbacks from the inventory we're viewing, and then
+ // build everything.
+ mInventoryObserver = new LLInventoryPanelObserver(this);
+ mInventory->addObserver(mInventoryObserver);
+ rebuildViewsFor(LLUUID::null, LLInventoryObserver::ADD);
+
+ // bit of a hack to make sure the inventory is open.
+ mFolders->openFolder(std::string("My Inventory"));
+
+ if (mSortOrderSetting != INHERIT_SORT_ORDER)
+ {
+ setSortOrder(gSavedSettings.getU32(mSortOrderSetting));
+ }
+ else
+ {
+ setSortOrder(gSavedSettings.getU32(DEFAULT_SORT_ORDER));
+ }
+ mFolders->setSortOrder(mFolders->getFilter()->getSortOrder());
+
+ return TRUE;
+}
+
+LLInventoryPanel::~LLInventoryPanel()
+{
+ // should this be a global setting?
+ if (mFolders)
+ {
+ U32 sort_order = mFolders->getSortOrder();
+ if (mSortOrderSetting != INHERIT_SORT_ORDER)
+ {
+ gSavedSettings.setU32(mSortOrderSetting, sort_order);
+ }
+ }
+
+ // LLView destructor will take care of the sub-views.
+ mInventory->removeObserver(mInventoryObserver);
+ delete mInventoryObserver;
+ mScroller = NULL;
+}
+
+ LLMemType mt(LLMemType::MTYPE_INVENTORY_FROM_XML);
+void LLInventoryPanel::draw()
+{
+ // select the desired item (in case it wasn't loaded when the selection was requested)
+ mFolders->updateSelection();
+ LLPanel::draw();
+}
+
+void LLInventoryPanel::setFilterTypes(U32 filter_types)
+{
+ mFolders->getFilter()->setFilterTypes(filter_types);
+}
+
+void LLInventoryPanel::setFilterPermMask(PermissionMask filter_perm_mask)
+{
+ mFolders->getFilter()->setFilterPermissions(filter_perm_mask);
+}
+
+void LLInventoryPanel::setFilterSubString(const std::string& string)
+{
+ mFolders->getFilter()->setFilterSubString(string);
+}
+
+void LLInventoryPanel::setSortOrder(U32 order)
+{
+ mFolders->getFilter()->setSortOrder(order);
+ if (mFolders->getFilter()->isModified())
+ {
+ mFolders->setSortOrder(order);
+ // try to keep selection onscreen, even if it wasn't to start with
+ mFolders->scrollToShowSelection();
+ }
+}
+
+void LLInventoryPanel::setSinceLogoff(BOOL sl)
+{
+ mFolders->getFilter()->setDateRangeLastLogoff(sl);
+}
+
+void LLInventoryPanel::setHoursAgo(U32 hours)
+{
+ mFolders->getFilter()->setHoursAgo(hours);
+}
+
+void LLInventoryPanel::setShowFolderState(LLInventoryFilter::EFolderShow show)
+{
+ mFolders->getFilter()->setShowFolderState(show);
+}
+
+LLInventoryFilter::EFolderShow LLInventoryPanel::getShowFolderState()
+{
+ return mFolders->getFilter()->getShowFolderState();
+}
+
+void LLInventoryPanel::modelChanged(U32 mask)
+{
+ LLFastTimer t2(LLFastTimer::FTM_REFRESH);
+
+ bool handled = false;
+ if(mask & LLInventoryObserver::LABEL)
+ {
+ handled = true;
+ // label change - empty out the display name for each object
+ // in this change set.
+ const std::set<LLUUID>& changed_items = gInventory.getChangedIDs();
+ std::set<LLUUID>::const_iterator id_it = changed_items.begin();
+ std::set<LLUUID>::const_iterator id_end = changed_items.end();
+ LLFolderViewItem* view = NULL;
+ LLInvFVBridge* bridge = NULL;
+ for (;id_it != id_end; ++id_it)
+ {
+ view = mFolders->getItemByID(*id_it);
+ if(view)
+ {
+ // request refresh on this item (also flags for filtering)
+ bridge = (LLInvFVBridge*)view->getListener();
+ if(bridge)
+ { // Clear the display name first, so it gets properly re-built during refresh()
+ bridge->clearDisplayName();
+ }
+ view->refresh();
+ }
+ }
+ }
+ if((mask & (LLInventoryObserver::STRUCTURE
+ | LLInventoryObserver::ADD
+ | LLInventoryObserver::REMOVE)) != 0)
+ {
+ handled = true;
+ // Record which folders are open by uuid.
+ LLInventoryModel* model = getModel();
+ if (model)
+ {
+ const std::set<LLUUID>& changed_items = gInventory.getChangedIDs();
+
+ std::set<LLUUID>::const_iterator id_it = changed_items.begin();
+ std::set<LLUUID>::const_iterator id_end = changed_items.end();
+ for (;id_it != id_end; ++id_it)
+ {
+ // sync view with model
+ LLInventoryObject* model_item = model->getObject(*id_it);
+ LLFolderViewItem* view_item = mFolders->getItemByID(*id_it);
+
+ if (model_item)
+ {
+ if (!view_item)
+ {
+ // this object was just created, need to build a view for it
+ if ((mask & LLInventoryObserver::ADD) != LLInventoryObserver::ADD)
+ {
+ llwarns << *id_it << " is in model but not in view, but ADD flag not set" << llendl;
+ }
+ buildNewViews(*id_it);
+
+ // select any newly created object
+ // that has the auto rename at top of folder
+ // root set
+ if(mFolders->getRoot()->needsAutoRename())
+ {
+ setSelection(*id_it, FALSE);
+ }
+ }
+ else
+ {
+ // this object was probably moved, check its parent
+ if ((mask & LLInventoryObserver::STRUCTURE) != LLInventoryObserver::STRUCTURE)
+ {
+ llwarns << *id_it << " is in model and in view, but STRUCTURE flag not set" << llendl;
+ }
+
+ LLFolderViewFolder* new_parent = (LLFolderViewFolder*)mFolders->getItemByID(model_item->getParentUUID());
+ if (view_item->getParentFolder() != new_parent)
+ {
+ view_item->getParentFolder()->extractItem(view_item);
+ view_item->addToFolder(new_parent, mFolders);
+ }
+ }
+ }
+ else
+ {
+ if (view_item)
+ {
+ if ((mask & LLInventoryObserver::REMOVE) != LLInventoryObserver::REMOVE)
+ {
+ llwarns << *id_it << " is not in model but in view, but REMOVE flag not set" << llendl;
+ }
+ // item in view but not model, need to delete view
+ view_item->destroyView();
+ }
+ else
+ {
+ llwarns << *id_it << "Item does not exist in either view or model, but notification triggered" << llendl;
+ }
+ }
+ }
+ }
+ }
+
+ if (!handled)
+ {
+ // it's a small change that only requires a refresh.
+ // *TODO: figure out a more efficient way to do the refresh
+ // since it is expensive on large inventories
+ mFolders->refresh();
+ }
+}
+
+void LLInventoryPanel::rebuildViewsFor(const LLUUID& id, U32 mask)
+{
+ LLFolderViewItem* old_view = NULL;
+
+ // get old LLFolderViewItem
+ old_view = mFolders->getItemByID(id);
+ if (old_view && id.notNull())
+ {
+ old_view->destroyView();
+ }
+
+ buildNewViews(id);
+}
+
+void LLInventoryPanel::buildNewViews(const LLUUID& id)
+{
+ LLMemType mt(LLMemType::MTYPE_INVENTORY_BUILD_NEW_VIEWS);
+ LLFolderViewItem* itemp = NULL;
+ LLInventoryObject* objectp = gInventory.getObject(id);
+
+ if (objectp)
+ {
+ if (objectp->getType() <= LLAssetType::AT_NONE ||
+ objectp->getType() >= LLAssetType::AT_COUNT)
+ {
+ llwarns << "LLInventoryPanel::buildNewViews called with objectp->mType == "
+ << ((S32) objectp->getType())
+ << " (shouldn't happen)" << llendl;
+ }
+ else if (objectp->getType() == LLAssetType::AT_CATEGORY &&
+ objectp->getActualType() != LLAssetType::AT_LINK_FOLDER)
+ {
+ LLInvFVBridge* new_listener = LLInvFVBridge::createBridge(objectp->getType(),
+ objectp->getType(),
+ LLInventoryType::IT_CATEGORY,
+ this,
+ objectp->getUUID());
+
+ if (new_listener)
+ {
+ LLFolderViewFolder::Params p;
+ p.name = new_listener->getDisplayName();
+ p.icon = new_listener->getIcon();
+ p.root = mFolders;
+ p.listener = new_listener;
+ LLFolderViewFolder* folderp = LLUICtrlFactory::create<LLFolderViewFolder>(p);
+
+ folderp->setItemSortOrder(mFolders->getSortOrder());
+ itemp = folderp;
+ }
+ }
+ else
+ {
+ // Build new view for item
+ LLInventoryItem* item = (LLInventoryItem*)objectp;
+ LLInvFVBridge* new_listener = LLInvFVBridge::createBridge(item->getType(),
+ item->getActualType(),
+ item->getInventoryType(),
+ this,
+ item->getUUID(),
+ item->getFlags());
+
+ if (new_listener)
+ {
+ LLFolderViewItem::Params params;
+ params.name(new_listener->getDisplayName());
+ params.icon(new_listener->getIcon());
+ params.creation_date(new_listener->getCreationDate());
+ params.root(mFolders);
+ params.listener(new_listener);
+ params.rect(LLRect (0, 0, 0, 0));
+ itemp = LLUICtrlFactory::create<LLFolderViewItem> (params);
+ }
+ }
+
+ LLFolderViewFolder* parent_folder = (LLFolderViewFolder*)mFolders->getItemByID(objectp->getParentUUID());
+
+ if (itemp)
+ {
+ if (parent_folder)
+ {
+ itemp->addToFolder(parent_folder, mFolders);
+ }
+ else
+ {
+ llwarns << "Couldn't find parent folder for child " << itemp->getLabel() << llendl;
+ delete itemp;
+ }
+ }
+ }
+ if ((id.isNull() ||
+ (objectp && objectp->getType() == LLAssetType::AT_CATEGORY)))
+ {
+ LLViewerInventoryCategory::cat_array_t* categories;
+ LLViewerInventoryItem::item_array_t* items;
+
+ mInventory->lockDirectDescendentArrays(id, categories, items);
+ if(categories)
+ {
+ S32 count = categories->count();
+ for(S32 i = 0; i < count; ++i)
+ {
+ LLInventoryCategory* cat = categories->get(i);
+ buildNewViews(cat->getUUID());
+ }
+ }
+ if(items)
+ {
+ S32 count = items->count();
+ for(S32 i = 0; i < count; ++i)
+ {
+ LLInventoryItem* item = items->get(i);
+ buildNewViews(item->getUUID());
+ }
+ }
+ mInventory->unlockDirectDescendentArrays(id);
+ }
+}
+
+struct LLConfirmPurgeData
+{
+ LLUUID mID;
+ LLInventoryModel* mModel;
+};
+
+class LLIsNotWorn : public LLInventoryCollectFunctor
+{
+public:
+ LLIsNotWorn() {}
+ virtual ~LLIsNotWorn() {}
+ virtual bool operator()(LLInventoryCategory* cat,
+ LLInventoryItem* item)
+ {
+ return !gAgentWearables.isWearingItem(item->getUUID());
+ }
+};
+
+class LLOpenFolderByID : public LLFolderViewFunctor
+{
+public:
+ LLOpenFolderByID(const LLUUID& id) : mID(id) {}
+ virtual ~LLOpenFolderByID() {}
+ virtual void doFolder(LLFolderViewFolder* folder)
+ {
+ if (folder->getListener() && folder->getListener()->getUUID() == mID) folder->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP);
+ }
+ virtual void doItem(LLFolderViewItem* item) {}
+protected:
+ const LLUUID& mID;
+};
+
+
+void LLInventoryPanel::openSelected()
+{
+ LLFolderViewItem* folder_item = mFolders->getCurSelectedItem();
+ if(!folder_item) return;
+ LLInvFVBridge* bridge = (LLInvFVBridge*)folder_item->getListener();
+ if(!bridge) return;
+ bridge->openItem();
+}
+
+BOOL LLInventoryPanel::handleHover(S32 x, S32 y, MASK mask)
+{
+ BOOL handled = LLView::handleHover(x, y, mask);
+ if(handled)
+ {
+ ECursorType cursor = getWindow()->getCursor();
+ if (LLInventoryModel::backgroundFetchActive() && cursor == UI_CURSOR_ARROW)
+ {
+ // replace arrow cursor with arrow and hourglass cursor
+ getWindow()->setCursor(UI_CURSOR_WORKING);
+ }
+ }
+ else
+ {
+ getWindow()->setCursor(UI_CURSOR_ARROW);
+ }
+ return TRUE;
+}
+
+BOOL LLInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg)
+{
+
+ BOOL handled = LLPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
+
+ if (handled)
+ {
+ mFolders->setDragAndDropThisFrame();
+ }
+
+ return handled;
+}
+
+void LLInventoryPanel::onFocusLost()
+{
+ // inventory no longer handles cut/copy/paste/delete
+ if (LLEditMenuHandler::gEditMenuHandler == mFolders)
+ {
+ LLEditMenuHandler::gEditMenuHandler = NULL;
+ }
+
+ LLPanel::onFocusLost();
+}
+
+void LLInventoryPanel::onFocusReceived()
+{
+ // inventory now handles cut/copy/paste/delete
+ LLEditMenuHandler::gEditMenuHandler = mFolders;
+
+ LLPanel::onFocusReceived();
+}
+
+
+void LLInventoryPanel::openAllFolders()
+{
+ mFolders->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_DOWN);
+ mFolders->arrangeAll();
+}
+
+void LLInventoryPanel::openDefaultFolderForType(LLAssetType::EType type)
+{
+ LLUUID category_id = mInventory->findCategoryUUIDForType(type);
+ LLOpenFolderByID opener(category_id);
+ mFolders->applyFunctorRecursively(opener);
+}
+
+void LLInventoryPanel::setSelection(const LLUUID& obj_id, BOOL take_keyboard_focus)
+{
+ mFolders->setSelectionByID(obj_id, take_keyboard_focus);
+}
+
+void LLInventoryPanel::clearSelection()
+{
+ mFolders->clearSelection();
+}
+
+void LLInventoryPanel::onSelectionChange(const std::deque<LLFolderViewItem*>& items, BOOL user_action)
+{
+ LLFolderView* fv = getRootFolder();
+ if (fv->needsAutoRename()) // auto-selecting a new user-created asset and preparing to rename
+ {
+ fv->setNeedsAutoRename(FALSE);
+ if (items.size()) // new asset is visible and selected
+ {
+ fv->startRenamingSelectedItem();
+ }
+ }
+}
+
+//----------------------------------------------------------------------------
+
+void LLInventoryPanel::doToSelected(const LLSD& userdata)
+{
+ mFolders->doToSelected(&gInventory, userdata);
+}
+
+void LLInventoryPanel::doCreate(const LLSD& userdata)
+{
+ menu_create_inventory_item(mFolders, LLFolderBridge::sSelf, userdata);
+}
+
+bool LLInventoryPanel::beginIMSession()
+{
+ std::set<LLUUID> selected_items;
+ mFolders->getSelectionList(selected_items);
+
+ std::string name;
+ static int session_num = 1;
+
+ LLDynamicArray<LLUUID> members;
+ EInstantMessage type = IM_SESSION_CONFERENCE_START;
+
+ std::set<LLUUID>::const_iterator iter;
+ for (iter = selected_items.begin(); iter != selected_items.end(); iter++)
+ {
+
+ LLUUID item = *iter;
+ LLFolderViewItem* folder_item = mFolders->getItemByID(item);
+
+ if(folder_item)
+ {
+ LLFolderViewEventListener* fve_listener = folder_item->getListener();
+ if (fve_listener && (fve_listener->getInventoryType() == LLInventoryType::IT_CATEGORY))
+ {
+
+ LLFolderBridge* bridge = (LLFolderBridge*)folder_item->getListener();
+ if(!bridge) return true;
+ LLViewerInventoryCategory* cat = bridge->getCategory();
+ if(!cat) return true;
+ name = cat->getName();
+ LLUniqueBuddyCollector is_buddy;
+ LLInventoryModel::cat_array_t cat_array;
+ LLInventoryModel::item_array_t item_array;
+ gInventory.collectDescendentsIf(bridge->getUUID(),
+ cat_array,
+ item_array,
+ LLInventoryModel::EXCLUDE_TRASH,
+ is_buddy);
+ S32 count = item_array.count();
+ if(count > 0)
+ {
+ LLFloaterReg::showInstance("communicate");
+ // create the session
+ LLAvatarTracker& at = LLAvatarTracker::instance();
+ LLUUID id;
+ for(S32 i = 0; i < count; ++i)
+ {
+ id = item_array.get(i)->getCreatorUUID();
+ if(at.isBuddyOnline(id))
+ {
+ members.put(id);
+ }
+ }
+ }
+ }
+ else
+ {
+ LLFolderViewItem* folder_item = mFolders->getItemByID(item);
+ if(!folder_item) return true;
+ LLInvFVBridge* listenerp = (LLInvFVBridge*)folder_item->getListener();
+
+ if (listenerp->getInventoryType() == LLInventoryType::IT_CALLINGCARD)
+ {
+ LLInventoryItem* inv_item = gInventory.getItem(listenerp->getUUID());
+
+ if (inv_item)
+ {
+ LLAvatarTracker& at = LLAvatarTracker::instance();
+ LLUUID id = inv_item->getCreatorUUID();
+
+ if(at.isBuddyOnline(id))
+ {
+ members.put(id);
+ }
+ }
+ } //if IT_CALLINGCARD
+ } //if !IT_CATEGORY
+ }
+ } //for selected_items
+
+ // the session_id is randomly generated UUID which will be replaced later
+ // with a server side generated number
+
+ if (name.empty())
+ {
+ name = llformat("Session %d", session_num++);
+ }
+
+ gIMMgr->addSession(name, type, members[0], members);
+
+ return true;
+}
+
+bool LLInventoryPanel::attachObject(const LLSD& userdata)
+{
+ std::set<LLUUID> selected_items;
+ mFolders->getSelectionList(selected_items);
+ LLUUID id = *selected_items.begin();
+
+ std::string joint_name = userdata.asString();
+ LLVOAvatar *avatarp = static_cast<LLVOAvatar*>(gAgent.getAvatarObject());
+ LLViewerJointAttachment* attachmentp = NULL;
+ for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin();
+ iter != avatarp->mAttachmentPoints.end(); )
+ {
+ LLVOAvatar::attachment_map_t::iterator curiter = iter++;
+ LLViewerJointAttachment* attachment = curiter->second;
+ if (attachment->getName() == joint_name)
+ {
+ attachmentp = attachment;
+ break;
+ }
+ }
+ if (attachmentp == NULL)
+ {
+ return true;
+ }
+ LLViewerInventoryItem* item = (LLViewerInventoryItem*)gInventory.getItem(id);
+
+ if(item && gInventory.isObjectDescendentOf(id, gInventory.getRootFolderID()))
+ {
+ rez_attachment(item, attachmentp);
+ }
+ else if(item && item->isComplete())
+ {
+ // must be in library. copy it to our inventory and put it on.
+ LLPointer<LLInventoryCallback> cb = new RezAttachmentCallback(attachmentp);
+ copy_inventory_item(gAgent.getID(),
+ item->getPermissions().getOwner(),
+ item->getUUID(),
+ LLUUID::null,
+ std::string(),
+ cb);
+ }
+ gFocusMgr.setKeyboardFocus(NULL);
+
+ return true;
+}
+
+
+//----------------------------------------------------------------------------
+
+// static DEBUG ONLY:
+void LLInventoryPanel::dumpSelectionInformation(void* user_data)
+{
+ LLInventoryPanel* iv = (LLInventoryPanel*)user_data;
+ iv->mFolders->dumpSelectionInformation();
+}
+
+BOOL LLInventoryPanel::getSinceLogoff()
+{
+ return mFolders->getFilter()->isSinceLogoff();
+}
+
+void example_param_block_usage()
+{
+ LLInventoryPanel::Params param_block;
+ param_block.name(std::string("inventory"));
+
+ param_block.sort_order_setting(LLInventoryPanel::RECENTITEMS_SORT_ORDER);
+ param_block.allow_multi_select(true);
+ param_block.filter(LLInventoryPanel::Filter()
+ .sort_order(1)
+ .types(0xffff0000));
+ param_block.inventory(&gInventory);
+ param_block.has_border(true);
+
+ LLUICtrlFactory::create<LLInventoryPanel>(param_block);
+
+ param_block = LLInventoryPanel::Params();
+ param_block.name(std::string("inventory"));
+
+ //LLSD param_block_sd;
+ //param_block_sd["sort_order_setting"] = LLInventoryPanel::RECENTITEMS_SORT_ORDER;
+ //param_block_sd["allow_multi_select"] = true;
+ //param_block_sd["filter"]["sort_order"] = 1;
+ //param_block_sd["filter"]["types"] = (S32)0xffff0000;
+ //param_block_sd["has_border"] = true;
+
+ //LLInitParam::LLSDParser(param_block_sd).parse(param_block);
+
+ LLUICtrlFactory::create<LLInventoryPanel>(param_block);
+}
diff --git a/indra/newview/llfloaterinventory.h b/indra/newview/llfloaterinventory.h
new file mode 100644
index 0000000000..35ac1ab380
--- /dev/null
+++ b/indra/newview/llfloaterinventory.h
@@ -0,0 +1,369 @@
+/**
+ * @file llfloaterinventory.h
+ * @brief LLFloaterInventory, LLInventoryFolder, and LLInventoryItem
+ * class definition
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ *
+ * Copyright (c) 2001-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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_LLINVENTORYVIEW_H
+#define LL_LLINVENTORYVIEW_H
+
+#include "llassetstorage.h"
+#include "lldarray.h"
+#include "llfloater.h"
+#include "llinventory.h"
+#include "llinventoryfilter.h"
+#include "llfolderview.h"
+#include "llinventorymodel.h"
+#include "lluictrlfactory.h"
+#include <set>
+
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Class LLFloaterInventory
+//
+// This is the agent inventory _floater_.
+// It deals with the buttons and views used to navigate as
+// well as controls the behavior of the overall object.
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+class LLFolderViewItem;
+class LLInventoryFilter;
+class LLInventoryModel;
+class LLInvFVBridge;
+class LLMenuBarGL;
+class LLCheckBoxCtrl;
+class LLSpinCtrl;
+class LLScrollContainer;
+class LLTextBox;
+class LLIconCtrl;
+class LLSaveFolderState;
+class LLFilterEditor;
+class LLTabContainer;
+
+class LLInventoryPanel : public LLPanel
+{
+public:
+ static const std::string DEFAULT_SORT_ORDER;
+ static const std::string RECENTITEMS_SORT_ORDER;
+ static const std::string INHERIT_SORT_ORDER;
+
+ struct Filter : public LLInitParam::Block<Filter>
+ {
+ Optional<U32> sort_order;
+ Optional<U32> types;
+ Optional<std::string> search_string;
+
+ Filter()
+ : sort_order("sort_order"),
+ types("types", 0xffffffff),
+ search_string("search_string")
+ {}
+ };
+
+ struct Params
+ : public LLInitParam::Block<Params, LLPanel::Params>
+ {
+ Optional<std::string> sort_order_setting;
+ Optional<LLInventoryModel*> inventory;
+ Optional<bool> allow_multi_select;
+ Optional<Filter> filter;
+
+ Params()
+ : sort_order_setting("sort_order_setting"),
+ inventory("", &gInventory),
+ allow_multi_select("allow_multi_select", true),
+ filter("filter")
+ {}
+ };
+
+protected:
+ LLInventoryPanel(const Params&);
+ friend class LLUICtrlFactory;
+
+public:
+ ~LLInventoryPanel();
+
+ LLInventoryModel* getModel() { return mInventory; }
+
+ BOOL postBuild();
+
+ // LLView methods
+ void draw();
+ BOOL handleHover(S32 x, S32 y, MASK mask);
+ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg);
+ // LLUICtrl methods
+ /*virtual*/ void onFocusLost();
+ /*virtual*/ void onFocusReceived();
+
+ // Call this method to set the selection.
+ void openAllFolders();
+ void openDefaultFolderForType(LLAssetType::EType);
+ void setSelection(const LLUUID& obj_id, BOOL take_keyboard_focus);
+ void setSelectCallback(const LLFolderView::signal_t::slot_type& cb) { if (mFolders) mFolders->setSelectCallback(cb); }
+ void clearSelection();
+ LLInventoryFilter* getFilter() { return mFolders->getFilter(); }
+ void setFilterTypes(U32 filter);
+ U32 getFilterTypes() const { return mFolders->getFilterTypes(); }
+ void setFilterPermMask(PermissionMask filter_perm_mask);
+ U32 getFilterPermMask() const { return mFolders->getFilterPermissions(); }
+ void setFilterSubString(const std::string& string);
+ const std::string getFilterSubString() { return mFolders->getFilterSubString(); }
+ void setSortOrder(U32 order);
+ U32 getSortOrder() { return mFolders->getSortOrder(); }
+ void setSinceLogoff(BOOL sl);
+ void setHoursAgo(U32 hours);
+ BOOL getSinceLogoff();
+
+ void setShowFolderState(LLInventoryFilter::EFolderShow show);
+ LLInventoryFilter::EFolderShow getShowFolderState();
+ void setAllowMultiSelect(BOOL allow) { mFolders->setAllowMultiSelect(allow); }
+ // This method is called when something has changed about the inventory.
+ void modelChanged(U32 mask);
+ LLFolderView* getRootFolder() { return mFolders; }
+ LLScrollContainer* getScrollableContainer() { return mScroller; }
+
+ void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action);
+
+ // Callbacks
+ void doToSelected(const LLSD& userdata);
+ void doCreate(const LLSD& userdata);
+ bool beginIMSession();
+ bool attachObject(const LLSD& userdata);
+
+ // DEBUG ONLY:
+ static void dumpSelectionInformation(void* user_data);
+
+ void openSelected();
+ void unSelectAll() { mFolders->setSelection(NULL, FALSE, FALSE); }
+
+protected:
+ // Given the id and the parent, build all of the folder views.
+ void rebuildViewsFor(const LLUUID& id, U32 mask);
+ void buildNewViews(const LLUUID& id);
+
+protected:
+ LLInventoryModel* mInventory;
+ LLInventoryObserver* mInventoryObserver;
+ LLFolderView* mFolders;
+ LLScrollContainer* mScroller;
+ BOOL mAllowMultiSelect;
+ std::string mSortOrderSetting;
+};
+
+class LLFloaterInventory;
+
+class LLFloaterInventoryFinder : public LLFloater
+{
+public:
+ LLFloaterInventoryFinder( LLFloaterInventory* inventory_view);
+ virtual void draw();
+ virtual void onClose(bool app_quitting);
+ /*virtual*/ BOOL postBuild();
+ void changeFilter(LLInventoryFilter* filter);
+ void updateElementsFromFilter();
+ BOOL getCheckShowEmpty();
+ BOOL getCheckSinceLogoff();
+
+ static void onTimeAgo(LLUICtrl*, void *);
+ static void onCheckSinceLogoff(LLUICtrl*, void *);
+ static void onCloseBtn(void* user_data);
+ static void selectAllTypes(void* user_data);
+ static void selectNoTypes(void* user_data);
+
+protected:
+ LLFloaterInventory* mFloaterInventory;
+ LLSpinCtrl* mSpinSinceDays;
+ LLSpinCtrl* mSpinSinceHours;
+ LLInventoryFilter* mFilter;
+};
+
+class LLFloaterInventory : public LLFloater, LLInventoryObserver
+{
+friend class LLFloaterInventoryFinder;
+
+public:
+ LLFloaterInventory(const LLSD& key);
+ ~LLFloaterInventory();
+
+ /*virtual*/ void changed(U32 mask);
+
+ BOOL postBuild();
+
+ //
+ // Misc functions
+ //
+ void setFilterTextFromFilter() { mFilterText = mActivePanel->getFilter()->getFilterText(); }
+ void startSearch();
+
+ // Spawn a new inventory view
+ static LLFloaterInventory* newInstance();
+
+ // This method makes sure that an inventory view exists, is
+ // visible, and has focus. The view chosen is returned.
+ static LLFloaterInventory* showAgentInventory();
+
+ // Return the active inventory view if there is one. Active is
+ // defined as the inventory that is the closest to the front, and
+ // is visible.
+ static LLFloaterInventory* getActiveInventory();
+
+ // This method calls showAgentInventory() if no views are visible,
+ // or hides/destroyes them all if any are visible.
+ static void toggleVisibility();
+ static void toggleVisibility(void*) { toggleVisibility(); }
+
+ // Final cleanup, destroy all open inventory views.
+ static void cleanup();
+
+ // LLView & LLFloater functionality
+ virtual void onOpen(const LLSD& key);
+ virtual void onClose(bool app_quitting);
+ virtual void setVisible(BOOL visible);
+ virtual void draw();
+ virtual BOOL handleKeyHere(KEY key, MASK mask);
+
+ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg);
+
+
+ LLInventoryPanel* getPanel() { return mActivePanel; }
+ LLInventoryPanel* getActivePanel() { return mActivePanel; }
+
+ static BOOL filtersVisible(void* user_data);
+ void onClearSearch();
+ static void onFoldersByName(void *user_data);
+ static BOOL checkFoldersByName(void *user_data);
+ void onFilterEdit(const std::string& search_string );
+ static BOOL incrementalFind(LLFolderViewItem* first_item, const char *find_text, BOOL backward);
+ void onFilterSelected();
+
+ const std::string getFilterSubString() { return mActivePanel->getFilterSubString(); }
+ void setFilterSubString(const std::string& string) { mActivePanel->setFilterSubString(string); }
+
+ // menu callbacks
+ void doToSelected(const LLSD& userdata);
+ void closeAllFolders();
+ void doCreate(const LLSD& userdata);
+ void newWindow();
+ void resetFilters();
+ void setSortBy(const LLSD& userdata);
+
+ // HACK: Until we can route this info through the instant message hierarchy
+ static BOOL sWearNewClothing;
+ static LLUUID sWearNewClothingTransactionID; // wear all clothing in this transaction
+
+ void toggleFindOptions();
+
+ LLFloaterInventoryFinder* getFinder() { return (LLFloaterInventoryFinder*)mFinderHandle.get(); }
+
+protected:
+ LLFilterEditor* mFilterEditor;
+ LLTabContainer* mFilterTabs;
+ LLHandle<LLFloater> mFinderHandle;
+ LLInventoryPanel* mActivePanel;
+ LLSaveFolderState* mSavedFolderState;
+
+ std::string mFilterText;
+};
+
+class LLSelectFirstFilteredItem : public LLFolderViewFunctor
+{
+public:
+ LLSelectFirstFilteredItem() : mItemSelected(FALSE) {}
+ virtual ~LLSelectFirstFilteredItem() {}
+ virtual void doFolder(LLFolderViewFolder* folder);
+ virtual void doItem(LLFolderViewItem* item);
+ BOOL wasItemSelected() { return mItemSelected; }
+protected:
+ BOOL mItemSelected;
+};
+
+class LLOpenFilteredFolders : public LLFolderViewFunctor
+{
+public:
+ LLOpenFilteredFolders() {}
+ virtual ~LLOpenFilteredFolders() {}
+ virtual void doFolder(LLFolderViewFolder* folder);
+ virtual void doItem(LLFolderViewItem* item);
+};
+
+class LLSaveFolderState : public LLFolderViewFunctor
+{
+public:
+ LLSaveFolderState() : mApply(FALSE) {}
+ virtual ~LLSaveFolderState() {}
+ virtual void doFolder(LLFolderViewFolder* folder);
+ virtual void doItem(LLFolderViewItem* item) {}
+ void setApply(BOOL apply);
+ void clearOpenFolders() { mOpenFolders.clear(); }
+protected:
+ std::set<LLUUID> mOpenFolders;
+ BOOL mApply;
+};
+
+class LLOpenFoldersWithSelection : public LLFolderViewFunctor
+{
+public:
+ LLOpenFoldersWithSelection() {}
+ virtual ~LLOpenFoldersWithSelection() {}
+ virtual void doFolder(LLFolderViewFolder* folder);
+ virtual void doItem(LLFolderViewItem* item);
+};
+
+///----------------------------------------------------------------------------
+/// Function declarations, constants, enums, and typedefs
+///----------------------------------------------------------------------------
+
+// useful functions with the inventory view
+
+class LLInventoryCategory;
+class LLInventoryItem;
+
+const std::string& get_item_icon_name(LLAssetType::EType asset_type,
+ LLInventoryType::EType inventory_type,
+ U32 attachment_point,
+ BOOL item_is_multi );
+
+LLUIImagePtr get_item_icon(LLAssetType::EType asset_type,
+ LLInventoryType::EType inventory_type,
+ U32 attachment_point,
+ BOOL item_is_multi );
+
+#endif // LL_LLINVENTORYVIEW_H
+
+
+
diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp
index c73218cd0f..06fe2a84c8 100644
--- a/indra/newview/llfloaterjoystick.cpp
+++ b/indra/newview/llfloaterjoystick.cpp
@@ -48,7 +48,7 @@
#include "llcheckboxctrl.h"
LLFloaterJoystick::LLFloaterJoystick(const LLSD& data)
- : LLFloater()
+ : LLFloater(data)
{
//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_joystick.xml");
diff --git a/indra/newview/llfloaterjoystick.h b/indra/newview/llfloaterjoystick.h
index 9c66b3a895..f3559c28e9 100644
--- a/indra/newview/llfloaterjoystick.h
+++ b/indra/newview/llfloaterjoystick.h
@@ -38,11 +38,11 @@
class LLCheckBoxCtrl;
-class LLFloaterJoystick : public LLFloater, public LLFloaterSingleton<LLFloaterJoystick >
+class LLFloaterJoystick : public LLFloater
{
+ friend class LLFloaterReg;
+
public:
- LLFloaterJoystick(const LLSD& data);
- virtual ~LLFloaterJoystick();
virtual BOOL postBuild();
virtual void refresh();
@@ -52,6 +52,10 @@ public:
static void setSNDefaults();
private:
+
+ LLFloaterJoystick(const LLSD& data);
+ virtual ~LLFloaterJoystick();
+
static void onCommitJoystickEnabled(LLUICtrl*, void*);
static void onClickRestoreSNDefaults(void*);
static void onClickCancel(void*);
diff --git a/indra/newview/llfloaterlagmeter.cpp b/indra/newview/llfloaterlagmeter.cpp
index 82deaef4a9..da6dceb149 100644
--- a/indra/newview/llfloaterlagmeter.cpp
+++ b/indra/newview/llfloaterlagmeter.cpp
@@ -36,7 +36,7 @@
#include "lluictrlfactory.h"
#include "llviewerstats.h"
-#include "llviewerimage.h"
+#include "llviewertexture.h"
#include "llviewercontrol.h"
#include "llappviewer.h"
@@ -51,7 +51,7 @@ const std::string LAG_WARNING_IMAGE_NAME = "lag_status_warning.tga";
const std::string LAG_GOOD_IMAGE_NAME = "lag_status_good.tga";
LLFloaterLagMeter::LLFloaterLagMeter(const LLSD& key)
- : LLFloater()
+ : LLFloater(key)
{
// LLUICtrlFactory::getInstance()->buildFloater(this, "floater_lagmeter.xml");
mCommitCallbackRegistrar.add("LagMeter.ClickShrink", boost::bind(&LLFloaterLagMeter::onClickShrink, this));
@@ -185,7 +185,7 @@ void LLFloaterLagMeter::determineClient()
{
mClientCause->setText( getString("client_texture_loading_cause_msg", mStringArgs) );
}
- else if((BYTES_TO_MEGA_BYTES(LLViewerImage::sBoundTextureMemoryInBytes)) > LLViewerImage::sMaxBoundTextureMemInMegaBytes)
+ else if((BYTES_TO_MEGA_BYTES(LLViewerTexture::sBoundTextureMemoryInBytes)) > LLViewerTexture::sMaxBoundTextureMemInMegaBytes)
{
mClientCause->setText( getString("client_texture_memory_cause_msg", mStringArgs) );
}
diff --git a/indra/newview/llfloaterlagmeter.h b/indra/newview/llfloaterlagmeter.h
index 6d2086839e..592630636a 100644
--- a/indra/newview/llfloaterlagmeter.h
+++ b/indra/newview/llfloaterlagmeter.h
@@ -37,18 +37,17 @@
class LLTextBox;
-class LLFloaterLagMeter : public LLFloater, public LLFloaterSingleton<LLFloaterLagMeter>
+class LLFloaterLagMeter : public LLFloater
{
- friend class LLUISingleton<LLFloaterLagMeter, VisibilityPolicy<LLFloater> >;
+ friend class LLFloaterReg;
public:
- LLFloaterLagMeter(const LLSD& key);
- /*virtual*/ ~LLFloaterLagMeter();
-
/*virtual*/ void draw();
/*virtual*/ BOOL postBuild();
private:
-
+
+ LLFloaterLagMeter(const LLSD& key);
+ /*virtual*/ ~LLFloaterLagMeter();
void determineClient();
void determineNetwork();
void determineServer();
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index f3275913e4..149df61b35 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -52,7 +52,7 @@
#include "llfloaterauction.h"
#include "llfloatergroups.h"
#include "llfloatergroupinfo.h"
-#include "llfriendactions.h"
+#include "llavataractions.h"
#include "lllineeditor.h"
#include "llnamelistctrl.h"
#include "llnotify.h"
@@ -68,7 +68,7 @@
#include "lltexturectrl.h"
#include "lluiconstants.h"
#include "lluictrlfactory.h"
-#include "llviewerimagelist.h" // LLUIImageList
+#include "llviewertexturelist.h" // LLUIImageList
#include "llviewermessage.h"
#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
@@ -149,23 +149,50 @@ void send_parcel_select_objects(S32 parcel_local_id, S32 return_type,
//static
LLPanelLandObjects* LLFloaterLand::getCurrentPanelLandObjects()
{
- return LLFloaterLand::getInstance()->mPanelObjects;
+ LLFloaterLand* land_instance = LLFloaterReg::getTypedInstance<LLFloaterLand>("about_land");
+ if(land_instance)
+ {
+ return land_instance->mPanelObjects;
+ }
+ else
+ {
+ return NULL;
+ }
}
//static
LLPanelLandCovenant* LLFloaterLand::getCurrentPanelLandCovenant()
{
- return LLFloaterLand::getInstance()->mPanelCovenant;
+ LLFloaterLand* land_instance = LLFloaterReg::getTypedInstance<LLFloaterLand>("about_land");
+ if(land_instance)
+ {
+ return land_instance->mPanelCovenant;
+ }
+ else
+ {
+ return NULL;
+ }
}
// static
void LLFloaterLand::refreshAll()
{
- LLFloaterLand::getInstance()->refresh();
+ LLFloaterLand* land_instance = LLFloaterReg::getTypedInstance<LLFloaterLand>("about_land");
+ if(land_instance)
+ {
+ land_instance->refresh();
+ }
}
void LLFloaterLand::onOpen(const LLSD& key)
{
+ // moved from triggering show instance in llviwermenu.cpp
+
+ if (LLViewerParcelMgr::getInstance()->selectionEmpty())
+ {
+ LLViewerParcelMgr::getInstance()->selectParcelAt(gAgent.getPositionGlobal());
+ }
+
// Done automatically when the selected parcel's properties arrive
// (and hence we have the local id).
// LLViewerParcelMgr::getInstance()->sendParcelAccessListRequest(AL_ACCESS | AL_BAN | AL_RENTER);
@@ -196,7 +223,7 @@ void LLFloaterLand::onClose(bool app_quitting)
LLFloaterLand::LLFloaterLand(const LLSD& seed)
-: LLFloater()
+: LLFloater(seed)
{
mFactoryMap["land_general_panel"] = LLCallbackMap(createPanelLandGeneral, this);
mFactoryMap["land_covenant_panel"] = LLCallbackMap(createPanelLandCovenant, this);
@@ -205,7 +232,7 @@ LLFloaterLand::LLFloaterLand(const LLSD& seed)
mFactoryMap["land_media_panel"] = LLCallbackMap(createPanelLandMedia, this);
mFactoryMap["land_access_panel"] = LLCallbackMap(createPanelLandAccess, this);
- LLUICtrlFactory::getInstance()->buildFloater(this, "floater_about_land.xml", false);
+ //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_about_land.xml", false);
sObserver = new LLParcelSelectionObserver();
LLViewerParcelMgr::getInstance()->addObserver( sObserver );
@@ -784,7 +811,7 @@ void LLPanelLandGeneral::onClickProfile(void* data)
else
{
const LLUUID& avatar_id = parcel->getOwnerID();
- LLFriendActions::showProfile(avatar_id);
+ LLAvatarActions::showProfile(avatar_id);
}
}
@@ -1057,7 +1084,7 @@ void LLPanelLandObjects::onDoubleClickOwner(void *userdata)
}
else
{
- LLFriendActions::showProfile(owner_id);
+ LLAvatarActions::showProfile(owner_id);
}
}
}
@@ -1463,26 +1490,26 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo
if (is_group_owned)
{
- item_params.cells.add().type("icon").value(self->mIconGroup->getName()).column("type");
- item_params.cells.add().value(OWNER_GROUP).font(FONT).column("online_status");
+ item_params.columns.add().type("icon").value(self->mIconGroup->getName()).column("type");
+ item_params.columns.add().value(OWNER_GROUP).font(FONT).column("online_status");
}
else if (is_online)
{
- item_params.cells.add().type("icon").value(self->mIconAvatarOnline->getName()).column("type");
- item_params.cells.add().value(OWNER_ONLINE).font(FONT).column("online_status");
+ item_params.columns.add().type("icon").value(self->mIconAvatarOnline->getName()).column("type");
+ item_params.columns.add().value(OWNER_ONLINE).font(FONT).column("online_status");
}
else // offline
{
- item_params.cells.add().type("icon").value(self->mIconAvatarOffline->getName()).column("type");
- item_params.cells.add().value(OWNER_OFFLINE).font(FONT).column("online_status");
+ item_params.columns.add().type("icon").value(self->mIconAvatarOffline->getName()).column("type");
+ item_params.columns.add().value(OWNER_OFFLINE).font(FONT).column("online_status");
}
// Placeholder for name.
- item_params.cells.add().font(FONT).column("name");
+ item_params.columns.add().font(FONT).column("name");
object_count_str = llformat("%d", object_count);
- item_params.cells.add().value(object_count_str).font(FONT).column("count");
- item_params.cells.add().value(formatted_time((time_t)most_recent_time)).font(FONT).column("mostrecent");
+ item_params.columns.add().value(object_count_str).font(FONT).column("count");
+ item_params.columns.add().value(formatted_time((time_t)most_recent_time)).font(FONT).column("mostrecent");
self->mOwnerList->addRow(item_params);
@@ -1693,7 +1720,6 @@ LLPanelLandOptions::LLPanelLandOptions(LLParcelSelectionHandle& parcel)
mCheckFly(NULL),
mCheckGroupScripts(NULL),
mCheckOtherScripts(NULL),
- mCheckLandmark(NULL),
mCheckShowDirectory(NULL),
mCategoryCombo(NULL),
mLandingTypeCombo(NULL),
@@ -1727,10 +1753,6 @@ BOOL LLPanelLandOptions::postBuild()
childSetCommitCallback("edit land check", onCommitAny, this);
- mCheckLandmark = getChild<LLCheckBoxCtrl>( "check landmark");
- childSetCommitCallback("check landmark", onCommitAny, this);
-
-
mCheckGroupScripts = getChild<LLCheckBoxCtrl>( "check group scripts");
childSetCommitCallback("check group scripts", onCommitAny, this);
@@ -1856,9 +1878,6 @@ void LLPanelLandOptions::refresh()
mCheckFly ->set(FALSE);
mCheckFly ->setEnabled(FALSE);
- mCheckLandmark ->set(FALSE);
- mCheckLandmark ->setEnabled(FALSE);
-
mCheckGroupScripts ->set(FALSE);
mCheckGroupScripts ->setEnabled(FALSE);
@@ -1909,9 +1928,6 @@ void LLPanelLandOptions::refresh()
mCheckFly ->set( parcel->getAllowFly() );
mCheckFly ->setEnabled( can_change_options );
- mCheckLandmark ->set( parcel->getAllowLandmark() );
- mCheckLandmark ->setEnabled( can_change_options );
-
mCheckGroupScripts ->set( parcel->getAllowGroupScripts() || parcel->getAllowOtherScripts());
mCheckGroupScripts ->setEnabled( can_change_options && !parcel->getAllowOtherScripts());
@@ -2126,7 +2142,7 @@ void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata)
BOOL allow_terraform = self->mCheckEditLand->get();
BOOL allow_damage = !self->mCheckSafe->get();
BOOL allow_fly = self->mCheckFly->get();
- BOOL allow_landmark = self->mCheckLandmark->get();
+ BOOL allow_landmark = TRUE; // cannot restrict landmark creation
BOOL allow_group_scripts = self->mCheckGroupScripts->get() || self->mCheckOtherScripts->get();
BOOL allow_other_scripts = self->mCheckOtherScripts->get();
BOOL allow_publish = FALSE;
diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h
index 74c1205e1f..8f86766e3d 100644
--- a/indra/newview/llfloaterland.h
+++ b/indra/newview/llfloaterland.h
@@ -39,6 +39,7 @@
#include "llfloater.h"
#include "llpointer.h" // LLPointer<>
+//#include "llviewertexturelist.h"
#include "llsafehandle.h"
typedef std::set<LLUUID, lluuid_less> uuid_list_t;
@@ -71,9 +72,9 @@ class LLPanelLandRenters;
class LLPanelLandCovenant;
class LLFloaterLand
-: public LLFloater, public LLFloaterSingleton<LLFloaterLand>
+: public LLFloater
{
- friend class LLUISingleton<LLFloaterLand, VisibilityPolicy<LLFloater> >;
+ friend class LLFloaterReg;
public:
static void refreshAll();
@@ -85,13 +86,14 @@ public:
virtual void onOpen(const LLSD& key);
virtual BOOL postBuild();
-protected:
-
+private:
// Does its own instance management, so clients not allowed
// to allocate or destroy.
LLFloaterLand(const LLSD& seed);
virtual ~LLFloaterLand();
+protected:
+
/*virtual*/ void refresh();
static void* createPanelLandGeneral(void* data);
@@ -328,7 +330,6 @@ private:
LLCheckBoxCtrl* mCheckFly;
LLCheckBoxCtrl* mCheckGroupScripts;
LLCheckBoxCtrl* mCheckOtherScripts;
- LLCheckBoxCtrl* mCheckLandmark;
LLCheckBoxCtrl* mCheckShowDirectory;
LLComboBox* mCategoryCombo;
diff --git a/indra/newview/llfloaterlandholdings.cpp b/indra/newview/llfloaterlandholdings.cpp
index 223cca50b2..fbefd40c60 100644
--- a/indra/newview/llfloaterlandholdings.cpp
+++ b/indra/newview/llfloaterlandholdings.cpp
@@ -292,15 +292,16 @@ void LLFloaterLandHoldings::buttonCore(S32 which)
F64 global_z = gAgent.getPositionGlobal().mdV[VZ];
LLVector3d pos_global(global_x, global_y, global_z);
+ LLFloaterWorldMap* floater_world_map = LLFloaterWorldMap::getInstance();
switch(which)
{
case 0:
gAgent.teleportViaLocation(pos_global);
- LLFloaterWorldMap::getInstance()->trackLocation(pos_global);
+ if(floater_world_map) floater_world_map->trackLocation(pos_global);
break;
case 1:
- LLFloaterWorldMap::getInstance()->trackLocation(pos_global);
+ if(floater_world_map) floater_world_map->trackLocation(pos_global);
LLFloaterReg::showInstance("world_map", "center");
break;
default:
diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp
index 6660650c56..f9fc467c05 100644
--- a/indra/newview/llfloatermap.cpp
+++ b/indra/newview/llfloatermap.cpp
@@ -94,7 +94,7 @@ BOOL LLFloaterMap::postBuild()
registrar.add("Minimap.Zoom", boost::bind(&LLFloaterMap::handleZoom, this, _2));
registrar.add("Minimap.Tracker", boost::bind(&LLFloaterMap::handleStopTracking, this, _2));
- mPopupMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_minimap.xml", gMenuHolder);
+ mPopupMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_minimap.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
if (mPopupMenu && !LLTracker::isTracking(0))
{
mPopupMenu->setItemEnabled ("Stop Tracking", false);
diff --git a/indra/newview/llfloatermemleak.cpp b/indra/newview/llfloatermemleak.cpp
index 3f2fcc26db..529bd68e03 100644
--- a/indra/newview/llfloatermemleak.cpp
+++ b/indra/newview/llfloatermemleak.cpp
@@ -42,26 +42,56 @@
#include "llmath.h"
#include "llviewerwindow.h"
-LLFloaterMemLeak* LLFloaterMemLeak::sInstance = NULL;
U32 LLFloaterMemLeak::sMemLeakingSpeed = 0 ; //bytes leaked per frame
U32 LLFloaterMemLeak::sMaxLeakedMem = 0 ; //maximum allowed leaked memory
U32 LLFloaterMemLeak::sTotalLeaked = 0 ;
S32 LLFloaterMemLeak::sStatus = LLFloaterMemLeak::STOP ;
BOOL LLFloaterMemLeak::sbAllocationFailed = FALSE ;
-LLFloaterMemLeak::LLFloaterMemLeak()
- : LLFloater()
+LLFloaterMemLeak::LLFloaterMemLeak(const LLSD& key)
+ : LLFloater(key)
{
setTitle("Memory Leaking Simulation Floater");
+ mCommitCallbackRegistrar.add("MemLeak.ChangeLeakingSpeed", boost::bind(&LLFloaterMemLeak::onChangeLeakingSpeed, this));
+ mCommitCallbackRegistrar.add("MemLeak.ChangeMaxMemLeaking", boost::bind(&LLFloaterMemLeak::onChangeMaxMemLeaking, this));
+ mCommitCallbackRegistrar.add("MemLeak.Start", boost::bind(&LLFloaterMemLeak::onClickStart, this));
+ mCommitCallbackRegistrar.add("MemLeak.Stop", boost::bind(&LLFloaterMemLeak::onClickStop, this));
+ mCommitCallbackRegistrar.add("MemLeak.Release", boost::bind(&LLFloaterMemLeak::onClickRelease, this));
+ mCommitCallbackRegistrar.add("MemLeak.Close", boost::bind(&LLFloaterMemLeak::onClickClose, this));
}
+//----------------------------------------------
+BOOL LLFloaterMemLeak::postBuild(void)
+{
+ F32 a, b ;
+ a = childGetValue("leak_speed").asReal();
+ if(a > (F32)(0xFFFFFFFF))
+ {
+ sMemLeakingSpeed = 0xFFFFFFFF ;
+ }
+ else
+ {
+ sMemLeakingSpeed = (U32)a ;
+ }
+ b = childGetValue("max_leak").asReal();
+ if(b > (F32)0xFFF)
+ {
+ sMaxLeakedMem = 0xFFFFFFFF ;
+ }
+ else
+ {
+ sMaxLeakedMem = ((U32)b) << 20 ;
+ }
+
+ sbAllocationFailed = FALSE ;
+ return TRUE ;
+}
LLFloaterMemLeak::~LLFloaterMemLeak()
{
release() ;
sMemLeakingSpeed = 0 ; //bytes leaked per frame
sMaxLeakedMem = 0 ; //maximum allowed leaked memory
- sInstance = NULL ;
}
void LLFloaterMemLeak::release()
@@ -117,79 +147,56 @@ void LLFloaterMemLeak::idle()
}
//----------------------
-void LLFloaterMemLeak::onChangeLeakingSpeed(LLUICtrl* ctrl, void* userData)
+void LLFloaterMemLeak::onChangeLeakingSpeed()
{
- LLFloaterMemLeak *mem_leak = (LLFloaterMemLeak *)userData;
- if (mem_leak)
- {
- F32 tmp ;
- tmp = mem_leak->childGetValue("leak_speed").asReal();
+ F32 tmp ;
+ tmp =childGetValue("leak_speed").asReal();
- if(tmp > (F32)0xFFFFFFFF)
- {
- sMemLeakingSpeed = 0xFFFFFFFF ;
- }
- else
- {
- sMemLeakingSpeed = (U32)tmp ;
- }
+ if(tmp > (F32)0xFFFFFFFF)
+ {
+ sMemLeakingSpeed = 0xFFFFFFFF ;
}
+ else
+ {
+ sMemLeakingSpeed = (U32)tmp ;
+ }
+
}
-void LLFloaterMemLeak::onChangeMaxMemLeaking(LLUICtrl* ctrl, void* userData)
+void LLFloaterMemLeak::onChangeMaxMemLeaking()
{
- LLFloaterMemLeak *mem_leak = (LLFloaterMemLeak *)userData;
- if (mem_leak)
+
+ F32 tmp ;
+ tmp =childGetValue("max_leak").asReal();
+ if(tmp > (F32)0xFFF)
{
- F32 tmp ;
- tmp = mem_leak->childGetValue("max_leak").asReal();
- if(tmp > (F32)0xFFF)
- {
- sMaxLeakedMem = 0xFFFFFFFF ;
- }
- else
- {
- sMaxLeakedMem = ((U32)tmp) << 20 ;
- }
+ sMaxLeakedMem = 0xFFFFFFFF ;
}
+ else
+ {
+ sMaxLeakedMem = ((U32)tmp) << 20 ;
+ }
+
}
-void LLFloaterMemLeak::onClickStart(void* userData)
+void LLFloaterMemLeak::onClickStart()
{
sStatus = START ;
}
-void LLFloaterMemLeak::onClickStop(void* userData)
+void LLFloaterMemLeak::onClickStop()
{
sStatus = STOP ;
}
-void LLFloaterMemLeak::onClickRelease(void* userData)
+void LLFloaterMemLeak::onClickRelease()
{
sStatus = RELEASE ;
}
-void LLFloaterMemLeak::onClickClose(void* userData)
-{
- if (sInstance)
- {
- sInstance->setVisible(FALSE);
- }
-}
-
-//----------------------------------------------
-
-BOOL LLFloaterMemLeak::postBuild(void)
+void LLFloaterMemLeak::onClickClose()
{
- childSetCommitCallback("leak_speed", onChangeLeakingSpeed, this);
- childSetCommitCallback("max_leak", onChangeMaxMemLeaking, this);
-
- childSetAction("start_btn", onClickStart, this);
- childSetAction("stop_btn", onClickStop, this);
- childSetAction("release_btn", onClickRelease, this);
- childSetAction("close_btn", onClickClose, this);
-
- return TRUE ;
+ setVisible(FALSE);
}
void LLFloaterMemLeak::draw()
@@ -219,50 +226,3 @@ void LLFloaterMemLeak::draw()
LLFloater::draw();
}
-
-// static instance of it
-LLFloaterMemLeak* LLFloaterMemLeak::instance()
-{
- if (!sInstance)
- {
- sInstance = new LLFloaterMemLeak();
- LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_mem_leaking.xml", FALSE);
-
- if(sInstance)
- {
- F32 a, b ;
- a = sInstance->childGetValue("leak_speed").asReal();
- if(a > (F32)(0xFFFFFFFF))
- {
- sMemLeakingSpeed = 0xFFFFFFFF ;
- }
- else
- {
- sMemLeakingSpeed = (U32)a ;
- }
- b = sInstance->childGetValue("max_leak").asReal();
- if(b > (F32)0xFFF)
- {
- sMaxLeakedMem = 0xFFFFFFFF ;
- }
- else
- {
- sMaxLeakedMem = ((U32)b) << 20 ;
- }
-
- sbAllocationFailed = FALSE ;
- }
- }
- return sInstance ;
-}
-
-void LLFloaterMemLeak::show(void*)
-{
- instance()->openFloater();
-}
-
-LLFloaterMemLeak* LLFloaterMemLeak::getInstance()
-{
- return sInstance ;
-}
-
diff --git a/indra/newview/llfloatermemleak.h b/indra/newview/llfloatermemleak.h
index 7d9d5f9c5f..763af943ba 100644
--- a/indra/newview/llfloatermemleak.h
+++ b/indra/newview/llfloatermemleak.h
@@ -37,34 +37,28 @@
class LLFloaterMemLeak : public LLFloater
{
+ friend class LLFloaterReg;
public:
- LLFloaterMemLeak();
- virtual ~LLFloaterMemLeak();
-
/// initialize all the callbacks for the menu
- //void initCallbacks(void);
+
virtual BOOL postBuild() ;
virtual void draw() ;
-
- /// one and one instance only
- static LLFloaterMemLeak* instance();
- static void onChangeLeakingSpeed(LLUICtrl* ctrl, void* userData);
- static void onChangeMaxMemLeaking(LLUICtrl* ctrl, void* userData);
- static void onClickStart(void* userData);
- static void onClickStop(void* userData);
- static void onClickRelease(void* userData);
- static void onClickClose(void* userData);
-
- /// show off our menu
- static void show(void*);
+ void onChangeLeakingSpeed();
+ void onChangeMaxMemLeaking();
+ void onClickStart();
+ void onClickStop();
+ void onClickRelease();
+ void onClickClose();
public:
- static LLFloaterMemLeak* getInstance() ;
void idle() ;
void stop() ;
private:
+
+ LLFloaterMemLeak(const LLSD& key);
+ virtual ~LLFloaterMemLeak();
void release() ;
private:
@@ -75,9 +69,6 @@ private:
START
} ;
- // one instance on the inside
- static LLFloaterMemLeak* sInstance;
-
static U32 sMemLeakingSpeed ; //bytes leaked per frame
static U32 sMaxLeakedMem ; //maximum allowed leaked memory
static U32 sTotalLeaked ;
diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp
index 3d5d2b733f..f06af5ca1e 100644
--- a/indra/newview/llfloaternotificationsconsole.cpp
+++ b/indra/newview/llfloaternotificationsconsole.cpp
@@ -161,7 +161,7 @@ bool LLNotificationChannelPanel::update(const LLSD& payload, bool passed_filter)
// LLFloaterNotificationConsole
//
LLFloaterNotificationConsole::LLFloaterNotificationConsole(const LLSD& key)
-: LLFloater()
+: LLFloater(key)
{
mCommitCallbackRegistrar.add("ClickAdd", boost::bind(&LLFloaterNotificationConsole::onClickAdd, this));
diff --git a/indra/newview/llfloaternotificationsconsole.h b/indra/newview/llfloaternotificationsconsole.h
index b85437c3c5..fe161e66f0 100644
--- a/indra/newview/llfloaternotificationsconsole.h
+++ b/indra/newview/llfloaternotificationsconsole.h
@@ -38,11 +38,11 @@
#include "llnotifications.h"
class LLFloaterNotificationConsole :
- public LLFloater,
- public LLFloaterSingleton<LLFloaterNotificationConsole>
+ public LLFloater
{
+ friend class LLFloaterReg;
+
public:
- LLFloaterNotificationConsole(const LLSD& key);
// LLPanel
BOOL postBuild();
@@ -55,6 +55,7 @@ public:
void updateResizeLimits();
private:
+ LLFloaterNotificationConsole(const LLSD& key);
void onClickAdd();
};
diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp
index 4d782a1814..ba23a58b37 100644
--- a/indra/newview/llfloateropenobject.cpp
+++ b/indra/newview/llfloateropenobject.cpp
@@ -46,9 +46,10 @@
#include "llagent.h" // for agent id
#include "llalertdialog.h"
#include "llinventorybridge.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
#include "llinventorymodel.h"
#include "llpanelinventory.h"
+#include "llfloaterreg.h"
#include "llselectmgr.h"
#include "lluiconstants.h"
#include "llviewerobject.h"
@@ -56,29 +57,44 @@
#include "llviewerwindow.h"
-LLFloaterOpenObject* LLFloaterOpenObject::sInstance = NULL;
-
-LLFloaterOpenObject::LLFloaterOpenObject()
-: LLFloater(),
+LLFloaterOpenObject::LLFloaterOpenObject(const LLSD& key)
+: LLFloater(key),
mPanelInventory(NULL),
mDirty(TRUE)
{
- LLUICtrlFactory::getInstance()->buildFloater(this,"floater_openobject.xml");
+// LLUICtrlFactory::getInstance()->buildFloater(this,"floater_openobject.xml");
+ mCommitCallbackRegistrar.add("OpenObject.MoveToInventory", boost::bind(&LLFloaterOpenObject::onClickMoveToInventory, this));
+ mCommitCallbackRegistrar.add("OpenObject.MoveAndWear", boost::bind(&LLFloaterOpenObject::onClickMoveAndWear, this));
}
LLFloaterOpenObject::~LLFloaterOpenObject()
{
- sInstance = NULL;
+// sInstance = NULL;
}
// virtual
BOOL LLFloaterOpenObject::postBuild()
{
- childSetAction("copy_to_inventory_button", onClickMoveToInventory, this);
- childSetAction("copy_and_wear_button", onClickMoveAndWear, this);
childSetTextArg("object_name", "[DESC]", std::string("Object") ); // *Note: probably do not want to translate this
mPanelInventory = getChild<LLPanelInventory>("object_contents");
return TRUE;
}
+
+void LLFloaterOpenObject::onOpen(const LLSD& key)
+{
+ LLObjectSelectionHandle object_selection = LLSelectMgr::getInstance()->getSelection();
+ if (object_selection->getRootObjectCount() != 1)
+ {
+ LLNotifications::instance().add("UnableToViewContentsMoreThanOne");
+ closeFloater();
+ return;
+ }
+ if(!(object_selection->getPrimaryObject()))
+ {
+ closeFloater();
+ return;
+ }
+ mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
+}
void LLFloaterOpenObject::refresh()
{
mPanelInventory->refresh();
@@ -99,7 +115,6 @@ void LLFloaterOpenObject::refresh()
}
childSetTextArg("object_name", "[DESC]", name);
-
childSetEnabled("copy_to_inventory_button", enabled);
childSetEnabled("copy_and_wear_button", enabled);
@@ -115,34 +130,11 @@ void LLFloaterOpenObject::draw()
LLFloater::draw();
}
-// static
void LLFloaterOpenObject::dirty()
{
- if (sInstance) sInstance->mDirty = TRUE;
+ mDirty = TRUE;
}
-// static
-void LLFloaterOpenObject::show()
-{
- LLObjectSelectionHandle object_selection = LLSelectMgr::getInstance()->getSelection();
- if (object_selection->getRootObjectCount() != 1)
- {
- LLNotifications::instance().add("UnableToViewContentsMoreThanOne");
- return;
- }
-
- // Create a new instance only if needed
- if (!sInstance)
- {
- sInstance = new LLFloaterOpenObject();
- sInstance->center();
- }
-
- sInstance->openFloater();
- sInstance->setFocus(TRUE);
-
- sInstance->mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
-}
void LLFloaterOpenObject::moveToInventory(bool wear)
@@ -170,7 +162,7 @@ void LLFloaterOpenObject::moveToInventory(bool wear)
}
else
{
- parent_category_id = gAgent.getInventoryRootID();
+ parent_category_id = gInventory.getRootFolderID();
}
LLUUID category_id = gInventory.createNewCategory(parent_category_id,
LLAssetType::AT_NONE,
@@ -201,8 +193,8 @@ void LLFloaterOpenObject::callbackMoveInventory(S32 result, void* data)
if (result == 0)
{
- LLInventoryView::showAgentInventory();
- LLInventoryView* view = LLInventoryView::getActiveInventory();
+ LLFloaterInventory::showAgentInventory();
+ LLFloaterInventory* view = LLFloaterInventory::getActiveInventory();
if (view)
{
view->getPanel()->setSelection(cat->mCatID, TAKE_FOCUS_NO);
@@ -212,20 +204,15 @@ void LLFloaterOpenObject::callbackMoveInventory(S32 result, void* data)
delete cat;
}
-
-// static
-void LLFloaterOpenObject::onClickMoveToInventory(void* data)
+void LLFloaterOpenObject::onClickMoveToInventory()
{
- LLFloaterOpenObject* self = (LLFloaterOpenObject*)data;
- self->moveToInventory(false);
- self->closeFloater();
+ moveToInventory(false);
+ closeFloater();
}
-// static
-void LLFloaterOpenObject::onClickMoveAndWear(void* data)
+void LLFloaterOpenObject::onClickMoveAndWear()
{
- LLFloaterOpenObject* self = (LLFloaterOpenObject*)data;
- self->moveToInventory(true);
- self->closeFloater();
+ moveToInventory(true);
+ closeFloater();
}
diff --git a/indra/newview/llfloateropenobject.h b/indra/newview/llfloateropenobject.h
index 0097a85690..0df3780ac4 100644
--- a/indra/newview/llfloateropenobject.h
+++ b/indra/newview/llfloateropenobject.h
@@ -46,9 +46,10 @@ class LLPanelInventory;
class LLFloaterOpenObject
: public LLFloater
{
+ friend class LLFloaterReg;
public:
- static void show();
- static void dirty();
+
+ void dirty();
struct LLCatAndWear
{
@@ -57,20 +58,25 @@ public:
};
protected:
- LLFloaterOpenObject();
- ~LLFloaterOpenObject();
+
/*virtual*/ BOOL postBuild();
void refresh();
void draw();
+ virtual void onOpen(const LLSD& key);
+// virtual void onClose();
void moveToInventory(bool wear);
- static void onClickMoveToInventory(void* data);
- static void onClickMoveAndWear(void* data);
+ void onClickMoveToInventory();
+ void onClickMoveAndWear();
static void callbackMoveInventory(S32 result, void* data);
+private:
+
+ LLFloaterOpenObject(const LLSD& key);
+ ~LLFloaterOpenObject();
+
protected:
- static LLFloaterOpenObject* sInstance;
LLPanelInventory* mPanelInventory;
LLSafeHandle<LLObjectSelection> mObjectSelection;
diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp
index 1ef71a9d53..c4f1ebe8aa 100644
--- a/indra/newview/llfloaterperms.cpp
+++ b/indra/newview/llfloaterperms.cpp
@@ -42,51 +42,44 @@
LLFloaterPerms::LLFloaterPerms(const LLSD& seed)
-: LLFloater()
+: LLFloater(seed)
{
- LLUICtrlFactory::getInstance()->buildFloater(this, "floater_perm_prefs.xml");
+ //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_perm_prefs.xml");
+ mCommitCallbackRegistrar.add("Perms.Copy", boost::bind(&LLFloaterPerms::onCommitCopy, this));
+ mCommitCallbackRegistrar.add("Perms.OK", boost::bind(&LLFloaterPerms::onClickOK, this));
+ mCommitCallbackRegistrar.add("Perms.Cancel", boost::bind(&LLFloaterPerms::onClickCancel, this));
+
}
BOOL LLFloaterPerms::postBuild()
{
- childSetEnabled("next_owner_transfer", gSavedSettings.getBOOL("NextOwnerCopy"));
- childSetAction("help", onClickHelp, this);
- childSetAction("ok", onClickOK, this);
- childSetAction("cancel", onClickCancel, this);
- childSetCommitCallback("next_owner_copy", &onCommitCopy, this);
refresh();
return TRUE;
}
-//static
-void LLFloaterPerms::onClickOK(void* data)
+void LLFloaterPerms::onClickOK()
{
- LLFloaterPerms* self = static_cast<LLFloaterPerms*>(data);
- self->ok();
- self->closeFloater();
+ ok();
+ closeFloater();
}
-//static
-void LLFloaterPerms::onClickCancel(void* data)
+void LLFloaterPerms::onClickCancel()
{
- LLFloaterPerms* self = static_cast<LLFloaterPerms*>(data);
- self->cancel();
- self->closeFloater();
+ cancel();
+ closeFloater();
}
-//static
-void LLFloaterPerms::onCommitCopy(LLUICtrl* ctrl, void* data)
+void LLFloaterPerms::onCommitCopy()
{
- LLFloaterPerms* self = static_cast<LLFloaterPerms*>(data);
// Implements fair use
BOOL copyable = gSavedSettings.getBOOL("NextOwnerCopy");
if(!copyable)
{
gSavedSettings.setBOOL("NextOwnerTransfer", TRUE);
}
- LLCheckBoxCtrl* xfer = self->getChild<LLCheckBoxCtrl>("next_owner_transfer");
+ LLCheckBoxCtrl* xfer = getChild<LLCheckBoxCtrl>("next_owner_transfer");
xfer->setEnabled(copyable);
}
@@ -152,9 +145,3 @@ U32 LLFloaterPerms::getNextOwnerPerms(std::string prefix)
return flags;
}
-
-//static
-void LLFloaterPerms::onClickHelp(void* data)
-{
- LLNotifications::instance().add("ClickUploadHelpPermissions");
-}
diff --git a/indra/newview/llfloaterperms.h b/indra/newview/llfloaterperms.h
index 805039efe4..a1897a5c00 100644
--- a/indra/newview/llfloaterperms.h
+++ b/indra/newview/llfloaterperms.h
@@ -36,18 +36,18 @@
#include "llfloater.h"
-class LLFloaterPerms : public LLFloater, public LLFloaterSingleton<LLFloaterPerms>
+class LLFloaterPerms : public LLFloater
{
- friend class LLUISingleton<LLFloaterPerms, VisibilityPolicy<LLFloater> >;
+ friend class LLFloaterReg;
public:
/*virtual*/ void onClose(bool app_quitting = false);
/*virtual*/ BOOL postBuild();
void ok();
void cancel();
- static void onClickOK(void*);
- static void onClickCancel(void*);
- static void onCommitCopy(LLUICtrl* ctrl, void* data);
+ void onClickOK();
+ void onClickCancel();
+ void onCommitCopy();
// Convenience methods to get current permission preference bitfields from saved settings:
static U32 getEveryonePerms(std::string prefix=""); // prefix + "EveryoneCopy"
static U32 getGroupPerms(std::string prefix=""); // prefix + "ShareWithGroup"
@@ -57,9 +57,6 @@ private:
LLFloaterPerms(const LLSD& seed);
void refresh();
- /// callback for the menus help button
- static void onClickHelp(void* data);
-
BOOL // cached values only for implementing cancel.
mShareWithGroup,
mEveryoneCopy,
diff --git a/indra/newview/llfloaterpostcard.cpp b/indra/newview/llfloaterpostcard.cpp
index 4a68e3092e..696531c208 100644
--- a/indra/newview/llfloaterpostcard.cpp
+++ b/indra/newview/llfloaterpostcard.cpp
@@ -61,7 +61,7 @@
#include "llimagej2c.h"
#include "llvfile.h"
#include "llvfs.h"
-
+#include "llviewertexture.h"
#include "llassetuploadresponders.h"
#include <boost/regex.hpp> //boost.regex lib
@@ -77,7 +77,7 @@ LLFloaterPostcard::instance_list_t LLFloaterPostcard::sInstances;
/// Class LLFloaterPostcard
///----------------------------------------------------------------------------
-LLFloaterPostcard::LLFloaterPostcard(LLImageJPEG* jpeg, LLImageGL *img, const LLVector2& img_scale, const LLVector3d& pos_taken_global)
+LLFloaterPostcard::LLFloaterPostcard(LLImageJPEG* jpeg, LLViewerTexture *img, const LLVector2& img_scale, const LLVector3d& pos_taken_global)
: LLFloater(),
mJPEGImage(jpeg),
mViewerImage(img),
@@ -130,7 +130,7 @@ BOOL LLFloaterPostcard::postBuild()
// static
-LLFloaterPostcard* LLFloaterPostcard::showFromSnapshot(LLImageJPEG *jpeg, LLImageGL *img, const LLVector2 &image_scale, const LLVector3d& pos_taken_global)
+LLFloaterPostcard* LLFloaterPostcard::showFromSnapshot(LLImageJPEG *jpeg, LLViewerTexture *img, const LLVector2 &image_scale, const LLVector3d& pos_taken_global)
{
// Take the images from the caller
// It's now our job to clean them up
@@ -181,7 +181,7 @@ void LLFloaterPostcard::draw()
rect.mBottom,
rect.getWidth(),
rect.getHeight(),
- mViewerImage,
+ mViewerImage.get(),
LLColor4::white);
}
glMatrixMode(GL_TEXTURE);
diff --git a/indra/newview/llfloaterpostcard.h b/indra/newview/llfloaterpostcard.h
index 5abb97e15f..98910f85f9 100644
--- a/indra/newview/llfloaterpostcard.h
+++ b/indra/newview/llfloaterpostcard.h
@@ -41,20 +41,20 @@
class LLTextEditor;
class LLLineEditor;
class LLButton;
-class LLImageGL;
+class LLViewerTexture;
class LLImageJPEG;
class LLFloaterPostcard
: public LLFloater
{
public:
- LLFloaterPostcard(LLImageJPEG* jpeg, LLImageGL *img, const LLVector2& img_scale, const LLVector3d& pos_taken_global);
+ LLFloaterPostcard(LLImageJPEG* jpeg, LLViewerTexture *img, const LLVector2& img_scale, const LLVector3d& pos_taken_global);
virtual ~LLFloaterPostcard();
virtual BOOL postBuild();
virtual void draw();
- static LLFloaterPostcard* showFromSnapshot(LLImageJPEG *jpeg, LLImageGL *img, const LLVector2& img_scale, const LLVector3d& pos_taken_global);
+ static LLFloaterPostcard* showFromSnapshot(LLImageJPEG *jpeg, LLViewerTexture *img, const LLVector2& img_scale, const LLVector3d& pos_taken_global);
static void onClickCancel(void* data);
static void onClickSend(void* data);
@@ -73,7 +73,7 @@ public:
protected:
LLPointer<LLImageJPEG> mJPEGImage;
- LLPointer<LLImageGL> mViewerImage;
+ LLPointer<LLViewerTexture> mViewerImage;
LLTransactionID mTransactionID;
LLAssetID mAssetID;
LLVector2 mImageScale;
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 15d57ebbcc..903471ea94 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -45,6 +45,7 @@
#include "llagent.h"
#include "llavatarconstants.h"
#include "llcheckboxctrl.h"
+#include "llcolorswatch.h"
#include "llcombobox.h"
#include "llcommandhandler.h"
#include "lldirpicker.h"
@@ -57,6 +58,7 @@
#include "llfloatervoicedevicesettings.h"
#include "llkeyboard.h"
#include "llmodaldialog.h"
+#include "llnavigationbar.h"
#include "llpanellogin.h"
#include "llradiogroup.h"
#include "llsky.h"
@@ -90,13 +92,8 @@
#include "llspinctrl.h"
#include "llstartup.h"
#include "lltextbox.h"
-
#include "llui.h"
-
-#include "llviewerimage.h"
-#include "llviewerimagelist.h"
#include "llviewerobjectlist.h"
-
#include "llvoavatar.h"
#include "llvovolume.h"
#include "llwindow.h"
@@ -173,6 +170,7 @@ void LLVoiceSetKeyDialog::onCancel(void* user_data)
void free_web_media(LLMediaBase *media_source);
void handleHTMLLinkColorChanged(const LLSD& newvalue);
+void handleNameTagOptionChanged(const LLSD& newvalue);
LLMediaBase *get_web_media();
bool callback_clear_browser_cache(const LLSD& notification, const LLSD& response);
@@ -224,11 +222,20 @@ bool callback_clear_browser_cache(const LLSD& notification, const LLSD& response
S32 option = LLNotification::getSelectedOption(notification, response);
if ( option == 0 ) // YES
{
+ // clean web
LLMediaBase *media_source = get_web_media();
if (media_source)
media_source->clearCache();
free_web_media(media_source);
+
+ // clean nav bar history
+ LLNavigationBar::getInstance()->clearHistoryCache();
+
+ // flag client texture cache for clearing next time the client runs
+ gSavedSettings.setBOOL("PurgeCacheOnNextStartup", TRUE);
+ LLNotifications::instance().add("CacheWillClear");
}
+
return false;
}
@@ -238,6 +245,18 @@ void handleHTMLLinkColorChanged(const LLSD& newvalue)
LLStyleMap::instance().update();
}
+void handleNameTagOptionChanged(const LLSD& newvalue)
+{
+ S32 name_tag_option = S32(newvalue);
+ if(name_tag_option==2)
+ {
+ gSavedSettings.setBOOL("SmallAvatarNames", TRUE);
+ }
+ else
+ {
+ gSavedSettings.setBOOL("SmallAvatarNames", FALSE);
+ }
+}
bool callback_skip_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater)
{
@@ -318,8 +337,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.Cancel", boost::bind(&LLFloaterPreference::onBtnCancel, this));
mCommitCallbackRegistrar.add("Pref.OK", boost::bind(&LLFloaterPreference::onBtnOK, this));
- mCommitCallbackRegistrar.add("Pref.ClearCache", boost::bind(&LLFloaterPreference::onClickClearCache, (void*)NULL));
- mCommitCallbackRegistrar.add("Pref.WebClearCache", boost::bind(&LLFloaterPreference::onClickBrowserClearCache, (void*)NULL));
+// mCommitCallbackRegistrar.add("Pref.ClearCache", boost::bind(&LLFloaterPreference::onClickClearCache, this));
+ mCommitCallbackRegistrar.add("Pref.WebClearCache", boost::bind(&LLFloaterPreference::onClickBrowserClearCache, this));
mCommitCallbackRegistrar.add("Pref.SetCache", boost::bind(&LLFloaterPreference::onClickSetCache, this));
mCommitCallbackRegistrar.add("Pref.ResetCache", boost::bind(&LLFloaterPreference::onClickResetCache, this));
mCommitCallbackRegistrar.add("Pref.ClickSkin", boost::bind(&LLFloaterPreference::onClickSkin, this,_1, _2));
@@ -329,10 +348,10 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.ClickSkipDialogs", boost::bind(&LLFloaterPreference::onClickSkipDialogs, this));
mCommitCallbackRegistrar.add("Pref.ClickResetDialogs", boost::bind(&LLFloaterPreference::onClickResetDialogs, this));
mCommitCallbackRegistrar.add("Pref.ClickEnablePopup", boost::bind(&LLFloaterPreference::onClickEnablePopup, this));
+ mCommitCallbackRegistrar.add("Pref.ClickDisablePopup", boost::bind(&LLFloaterPreference::onClickDisablePopup, this));
mCommitCallbackRegistrar.add("Pref.LogPath", boost::bind(&LLFloaterPreference::onClickLogPath, this));
mCommitCallbackRegistrar.add("Pref.Logging", boost::bind(&LLFloaterPreference::onCommitLogging, this));
mCommitCallbackRegistrar.add("Pref.OpenHelp", boost::bind(&LLFloaterPreference::onOpenHelp, this));
- mCommitCallbackRegistrar.add("Pref.ChangeCustom", boost::bind(&LLFloaterPreference::onChangeCustom, this));
mCommitCallbackRegistrar.add("Pref.UpdateMeterText", boost::bind(&LLFloaterPreference::updateMeterText, this, _1));
mCommitCallbackRegistrar.add("Pref.HardwareSettings", boost::bind(&LLFloaterPreference::onOpenHardwareSettings, this));
mCommitCallbackRegistrar.add("Pref.HardwareDefaults", boost::bind(&LLFloaterPreference::setHardwareDefaults, this));
@@ -342,9 +361,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.AutoDetectAspect", boost::bind(&LLFloaterPreference::onCommitAutoDetectAspect, this));
mCommitCallbackRegistrar.add("Pref.onSelectAspectRatio", boost::bind(&LLFloaterPreference::onKeystrokeAspectRatio, this));
mCommitCallbackRegistrar.add("Pref.QualityPerformance", boost::bind(&LLFloaterPreference::onChangeQuality, this, _2));
-
- gSavedSkinSettings.getControl("HTMLLinkColor")->getCommitSignal()->connect(boost::bind(&handleHTMLLinkColorChanged, _2));
+ gSavedSettings.getControl("AvatarNameTagMode")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2));
}
BOOL LLFloaterPreference::postBuild()
@@ -352,6 +370,8 @@ BOOL LLFloaterPreference::postBuild()
LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core");
if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab")))
tabcontainer->selectFirstTab();
+ S32 show_avatar_nametag_options = gSavedSettings.getS32("AvatarNameTagMode");
+ handleNameTagOptionChanged(LLSD(show_avatar_nametag_options));
return TRUE;
}
@@ -373,6 +393,10 @@ void LLFloaterPreference::draw()
{
BOOL has_first_selected = (getChildRef<LLScrollListCtrl>("disabled_popups").getFirstSelected()!=NULL);
gSavedSettings.setBOOL("FirstSelectedDisabledPopups", has_first_selected);
+
+ has_first_selected = (getChildRef<LLScrollListCtrl>("enabled_popups").getFirstSelected()!=NULL);
+ gSavedSettings.setBOOL("FirstSelectedEnabledPopups", has_first_selected);
+
LLFloater::draw();
}
@@ -459,7 +483,7 @@ void LLFloaterPreference::apply()
applyResolution();
// Only set window size if we're not in fullscreen mode
- if(gSavedSettings.getBOOL("NotFullScreen"))
+ if(!gSavedSettings.getBOOL("WindowFullScreen"))
{
applyWindowSize();
}
@@ -544,7 +568,7 @@ void LLFloaterPreference::onBtnOK()
apply();
closeFloater(false);
gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE );
- gSavedSkinSettings.saveToFile(gSavedSettings.getString("SkinningSettingsFile") , TRUE );
+ LLUIColorTable::instance().saveUserSettings();
std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE);
// save all settings, even if equals defaults
gCrashSettings.saveToFile(crash_settings_filename, FALSE);
@@ -605,19 +629,6 @@ void LLFloaterPreference::updateUserInfo(const std::string& visibility, bool im_
}
-void LLFloaterPreference::onChangeCustom()
-{
- // if custom is turned off, reset everything to defaults
- if (this && getChild<LLCheckBoxCtrl>("CustomSettings")->getValue())
- {
- U32 set = (U32)getChild<LLSliderCtrl>("QualityPerformanceSelection")->getValueF32();
- LLFeatureManager::getInstance()->setGraphicsLevel(set, true);
- updateMeterText(getChild<LLSliderCtrl>("DrawDistance"));
- }
-
- refreshEnabledGraphics();
-}
-
void LLFloaterPreference::refreshEnabledGraphics()
{
LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
@@ -642,17 +653,16 @@ void LLFloaterPreference::updateMeterText(LLUICtrl* ctrl)
m1->setVisible(two_digits);
m2->setVisible(!two_digits);
}
-
-// static
-void LLFloaterPreference::onClickClearCache(void*)
+/*
+void LLFloaterPreference::onClickClearCache()
{
// flag client cache for clearing next time the client runs
gSavedSettings.setBOOL("PurgeCacheOnNextStartup", TRUE);
LLNotifications::instance().add("CacheWillClear");
}
+*/
-// static
-void LLFloaterPreference::onClickBrowserClearCache(void*)
+void LLFloaterPreference::onClickBrowserClearCache()
{
LLNotifications::instance().add("ConfirmClearBrowserCache", LLSD(), LLSD(), callback_clear_browser_cache);
}
@@ -660,6 +670,8 @@ void LLFloaterPreference::onClickBrowserClearCache(void*)
void LLFloaterPreference::onClickSetCache()
{
std::string cur_name(gSavedSettings.getString("CacheLocation"));
+// std::string cur_top_folder(gDirUtilp->getBaseFileName(cur_name));
+
std::string proposed_name(cur_name);
LLDirPicker& picker = LLDirPicker::instance();
@@ -671,14 +683,17 @@ void LLFloaterPreference::onClickSetCache()
std::string dir_name = picker.getDirName();
if (!dir_name.empty() && dir_name != cur_name)
{
- childSetText("cache_location", dir_name);
+ std::string new_top_folder(gDirUtilp->getBaseFileName(dir_name));
LLNotifications::instance().add("CacheWillBeMoved");
gSavedSettings.setString("NewCacheLocation", dir_name);
+ gSavedSettings.setString("NewCacheLocationTopFolder", new_top_folder);
}
else
{
std::string cache_location = gDirUtilp->getCacheDir();
- childSetText("cache_location", cache_location);
+ gSavedSettings.setString("CacheLocation", cache_location);
+ std::string top_folder(gDirUtilp->getBaseFileName(cache_location));
+ gSavedSettings.setString("CacheLocationTopFolder", top_folder);
}
}
@@ -687,10 +702,13 @@ void LLFloaterPreference::onClickResetCache()
if (!gSavedSettings.getString("CacheLocation").empty())
{
gSavedSettings.setString("NewCacheLocation", "");
+ gSavedSettings.setString("NewCacheLocationTopFolder", "");
LLNotifications::instance().add("CacheWillBeMoved");
}
std::string cache_location = gDirUtilp->getCacheDir(true);
- childSetText("cache_location", cache_location);
+ gSavedSettings.setString("CacheLocation", cache_location);
+ std::string top_folder(gDirUtilp->getBaseFileName(cache_location));
+ gSavedSettings.setString("CacheLocationTopFolder", top_folder);
}
void LLFloaterPreference::onClickSkin(LLUICtrl* ctrl, const LLSD& userdata)
@@ -781,12 +799,6 @@ void LLFloaterPreference::buildLists(void* data)
void LLFloaterPreference::refreshEnabledState()
{
- // disable graphics settings and exit if it's not set to custom
- if(!gSavedSettings.getBOOL("RenderCustomSettings"))
- {
- return;
- }
-
LLCheckBoxCtrl* ctrl_reflections = getChild<LLCheckBoxCtrl>("Reflections");
LLRadioGroup* radio_reflection_detail = getChild<LLRadioGroup>("ReflectionDetailRadio");
@@ -1034,6 +1046,22 @@ void LLFloaterPreference::onClickEnablePopup()
buildLists(this);
}
+void LLFloaterPreference::onClickDisablePopup()
+{
+ LLScrollListCtrl& enabled_popups = getChildRef<LLScrollListCtrl>("enabled_popups");
+
+ std::vector<LLScrollListItem*> items = enabled_popups.getAllSelected();
+ std::vector<LLScrollListItem*>::iterator itor;
+ for (itor = items.begin(); itor != items.end(); ++itor)
+ {
+ LLNotificationTemplatePtr templatep = LLNotifications::instance().getTemplate(*(std::string*)((*itor)->getUserdata()));
+ //gSavedSettings.setWarning(templatep->mName, TRUE);
+ std::string notification_name = templatep->mName;
+ LLUI::sSettingGroups["ignores"]->setBOOL(notification_name, FALSE);
+ }
+
+ buildLists(this);
+}
void LLFloaterPreference::resetAllIgnored()
{
for (LLNotifications::TemplateMap::const_iterator iter = LLNotifications::instance().templatesBegin();
@@ -1062,15 +1090,17 @@ void LLFloaterPreference::setAllIgnored()
void LLFloaterPreference::onClickLogPath()
{
- std::string proposed_name(childGetText("log_path_string"));
+ std::string proposed_name(gSavedPerAccountSettings.getString("InstantMessageLogPath"));
LLDirPicker& picker = LLDirPicker::instance();
if (!picker.getDir(&proposed_name ) )
{
return; //Canceled!
}
-
- childSetText("log_path_string", picker.getDirName());
+ std::string chat_log_dir = picker.getDirName();
+ std::string chat_log_top_folder= gDirUtilp->getBaseFileName(chat_log_dir);
+ gSavedPerAccountSettings.setString("InstantMessageLogPath",chat_log_dir);
+ gSavedPerAccountSettings.setString("InstantMessageLogFolder",chat_log_top_folder);
}
void LLFloaterPreference::onCommitLogging()
@@ -1080,15 +1110,17 @@ void LLFloaterPreference::onCommitLogging()
void LLFloaterPreference::enableHistory()
{
- if (childGetValue("log_instant_messages").asBoolean() || childGetValue("log_chat").asBoolean())
+ if (childGetValue("log_instant_messages").asBoolean())
{
- childEnable("log_show_history");
+ childEnable("ChatIMLogs");
childEnable("log_path_button");
+ childEnable("show_timestamps_check_im");
}
else
{
- childDisable("log_show_history");
+ childDisable("ChatIMLogs");
childDisable("log_path_button");
+ childDisable("show_timestamps_check_im");
}
}
@@ -1122,10 +1154,10 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im
childEnable("send_im_to_email");
childSetValue("send_im_to_email", im_via_email);
childEnable("log_instant_messages");
- childEnable("log_chat");
+// childEnable("log_chat");
childEnable("busy_response");
- childEnable("log_instant_messages_timestamp");
- childEnable("log_chat_timestamp");
+// childEnable("log_instant_messages_timestamp");
+// childEnable("log_chat_timestamp");
childEnable("log_chat_IM");
childEnable("log_date_timestamp");
@@ -1245,11 +1277,16 @@ void LLFloaterPreference::applyResolution()
S32 num_resolutions;
LLWindow::LLWindowResolution* supported_resolutions =
gViewerWindow->getWindow()->getSupportedResolutions(num_resolutions);
- U32 resIndex = getChild<LLComboBox>("fullscreen combo")->getCurrentIndex();
+ S32 resIndex = getChild<LLComboBox>("fullscreen combo")->getCurrentIndex();
+ if (resIndex == -1)
+ {
+ // use highest resolution if nothing selected
+ resIndex = num_resolutions - 1;
+ }
gSavedSettings.setS32("FullScreenWidth", supported_resolutions[resIndex].mWidth);
gSavedSettings.setS32("FullScreenHeight", supported_resolutions[resIndex].mHeight);
- gViewerWindow->requestResolutionUpdate(!gSavedSettings.getBOOL("NotFullScreen"));
+ gViewerWindow->requestResolutionUpdate(gSavedSettings.getBOOL("WindowFullScreen"));
send_agent_update(TRUE);
@@ -1298,6 +1335,12 @@ LLPanelPreference::LLPanelPreference()
//
mCommitCallbackRegistrar.add("setControlFalse", boost::bind(&LLPanelPreference::setControlFalse,this, _2));
}
+
+static void applyUIColor(const std::string& color_name, LLUICtrl* ctrl, const LLSD& param)
+{
+ LLUIColorTable::instance().setColor(color_name, LLColor4(param));
+}
+
//virtual
BOOL LLPanelPreference::postBuild()
{
@@ -1460,6 +1503,55 @@ BOOL LLPanelPreference::postBuild()
refresh();
}
+
+ if(hasChild("user") && hasChild("agent") && hasChild("im")
+ && hasChild("system") && hasChild("script_error") && hasChild("objects")
+ && hasChild("owner") && hasChild("background") && hasChild("links"))
+ {
+ LLColorSwatchCtrl* color_swatch = getChild<LLColorSwatchCtrl>("user");
+ color_swatch->setCommitCallback(boost::bind(&applyUIColor, "UserChatColor", _1, _2));
+ color_swatch->setOriginal(LLUIColorTable::instance().getColor("UserChatColor"));
+
+ color_swatch = getChild<LLColorSwatchCtrl>("agent");
+ color_swatch->setCommitCallback(boost::bind(&applyUIColor, "AgentChatColor", _1, _2));
+ color_swatch->setOriginal(LLUIColorTable::instance().getColor("AgentChatColor"));
+
+ color_swatch = getChild<LLColorSwatchCtrl>("im");
+ color_swatch->setCommitCallback(boost::bind(&applyUIColor, "IMChatColor", _1, _2));
+ color_swatch->setOriginal(LLUIColorTable::instance().getColor("IMChatColor"));
+
+ color_swatch = getChild<LLColorSwatchCtrl>("system");
+ color_swatch->setCommitCallback(boost::bind(&applyUIColor, "SystemChatColor", _1, _2));
+ color_swatch->setOriginal(LLUIColorTable::instance().getColor("SystemChatColor"));
+
+ color_swatch = getChild<LLColorSwatchCtrl>("script_error");
+ color_swatch->setCommitCallback(boost::bind(&applyUIColor, "ScriptErrorColor", _1, _2));
+ color_swatch->setOriginal(LLUIColorTable::instance().getColor("ScriptErrorColor"));
+
+ color_swatch = getChild<LLColorSwatchCtrl>("objects");
+ color_swatch->setCommitCallback(boost::bind(&applyUIColor, "ObjectChatColor", _1, _2));
+ color_swatch->setOriginal(LLUIColorTable::instance().getColor("ObjectChatColor"));
+
+ color_swatch = getChild<LLColorSwatchCtrl>("owner");
+ color_swatch->setCommitCallback(boost::bind(&applyUIColor, "llOwnerSayChatColor", _1, _2));
+ color_swatch->setOriginal(LLUIColorTable::instance().getColor("llOwnerSayChatColor"));
+
+ color_swatch = getChild<LLColorSwatchCtrl>("background");
+ color_swatch->setCommitCallback(boost::bind(&applyUIColor, "BackgroundChatColor", _1, _2));
+ color_swatch->setOriginal(LLUIColorTable::instance().getColor("BackgroundChatColor"));
+
+ color_swatch = getChild<LLColorSwatchCtrl>("links");
+ color_swatch->setCommitCallback(boost::bind(&applyUIColor, "HTMLLinkColor", _1, _2));
+ color_swatch->setOriginal(LLUIColorTable::instance().getColor("HTMLLinkColor"));
+ }
+
+ if(hasChild("effect_color_swatch"))
+ {
+ LLColorSwatchCtrl* color_swatch = getChild<LLColorSwatchCtrl>("effect_color_swatch");
+ color_swatch->setCommitCallback(boost::bind(&applyUIColor, "EffectColor", _1, _2));
+ color_swatch->setOriginal(LLUIColorTable::instance().getColor("EffectColor"));
+ }
+
apply();
return true;
}
@@ -1475,16 +1567,25 @@ void LLPanelPreference::apply()
// Process view on top of the stack
LLView* curview = view_stack.front();
view_stack.pop_front();
- LLUICtrl* ctrl = dynamic_cast<LLUICtrl*>(curview);
- if (ctrl)
+
+ LLColorSwatchCtrl* color_swatch = dynamic_cast<LLColorSwatchCtrl *>(curview);
+ if (color_swatch)
+ {
+ mSavedColors[color_swatch->getName()] = color_swatch->get();
+ }
+ else
{
- LLControlVariable* control = ctrl->getControlVariable();
- if (control)
+ LLUICtrl* ctrl = dynamic_cast<LLUICtrl*>(curview);
+ if (ctrl)
{
- mSavedValues[control] = control->getValue();
+ LLControlVariable* control = ctrl->getControlVariable();
+ if (control)
+ {
+ mSavedValues[control] = control->getValue();
+ }
}
}
-
+
// Push children onto the end of the work stack
for (child_list_t::const_iterator iter = curview->getChildList()->begin();
iter != curview->getChildList()->end(); ++iter)
@@ -1504,6 +1605,17 @@ void LLPanelPreference::cancel()
LLSD ctrl_value = iter->second;
control->set(ctrl_value);
}
+
+ for (string_color_map_t::iterator iter = mSavedColors.begin();
+ iter != mSavedColors.end(); ++iter)
+ {
+ LLColorSwatchCtrl* color_swatch = findChild<LLColorSwatchCtrl>(iter->first);
+ if(color_swatch)
+ {
+ color_swatch->set(iter->second);
+ color_swatch->onCommit();
+ }
+ }
}
void LLPanelPreference::setControlFalse(const LLSD& user_data)
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index afff610c69..23e05a1ccf 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -87,8 +87,8 @@ protected:
void onBtnApply();
void onOpenHelp();
- static void onClickClearCache(void*);
- static void onClickBrowserClearCache(void*);
+// void onClickClearCache();
+ void onClickBrowserClearCache();
// if the custom settings box is clicked
void onChangeCustom();
@@ -112,6 +112,7 @@ public:
void onClickSkipDialogs();
void onClickResetDialogs();
void onClickEnablePopup();
+ void onClickDisablePopup();
void resetAllIgnored();
void setAllIgnored();
void onClickLogPath();
@@ -163,6 +164,9 @@ public:
private:
typedef std::map<LLControlVariable*, LLSD> control_values_map_t;
control_values_map_t mSavedValues;
+
+ typedef std::map<std::string, LLColor4> string_color_map_t;
+ string_color_map_t mSavedColors;
};
#endif // LL_LLPREFERENCEFLOATER_H
diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp
index dc72b66949..8e86aa3ba9 100644
--- a/indra/newview/llfloaterproperties.cpp
+++ b/indra/newview/llfloaterproperties.cpp
@@ -44,7 +44,7 @@
#include "llbutton.h"
#include "llcheckboxctrl.h"
#include "llfloatergroupinfo.h"
-#include "llfriendactions.h"
+#include "llavataractions.h"
#include "llinventorymodel.h"
#include "lllineeditor.h"
#include "llradiogroup.h"
@@ -303,12 +303,14 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
// do not enable the UI for incomplete items.
LLViewerInventoryItem* i = (LLViewerInventoryItem*)item;
BOOL is_complete = i->isComplete();
-
+ const BOOL cannot_restrict_permissions = LLInventoryType::cannotRestrictPermissions(i->getInventoryType());
+ const BOOL is_calling_card = (i->getInventoryType() == LLInventoryType::IT_CALLINGCARD);
const LLPermissions& perm = item->getPermissions();
const BOOL can_agent_manipulate = gAgent.allowOperation(PERM_OWNER, perm,
GP_OBJECT_MANIPULATE);
const BOOL can_agent_sell = gAgent.allowOperation(PERM_OWNER, perm,
- GP_OBJECT_SET_SALE);
+ GP_OBJECT_SET_SALE) &&
+ !cannot_restrict_permissions;
const BOOL is_link = LLAssetType::lookupIsLinkType(i->getActualType());
// You need permission to modify the object to modify an inventory
@@ -325,11 +327,11 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
// ITEM NAME & DESC //
//////////////////////
BOOL is_modifiable = gAgent.allowOperation(PERM_MODIFY, perm,
- GP_OBJECT_MANIPULATE)
- && is_obj_modify && is_complete;
+ GP_OBJECT_MANIPULATE)
+ && is_obj_modify && is_complete;
childSetEnabled("LabelItemNameTitle",TRUE);
- childSetEnabled("LabelItemName",is_modifiable);
+ childSetEnabled("LabelItemName",is_modifiable && !is_calling_card); // for now, don't allow rename of calling cards
childSetText("LabelItemName",item->getName());
childSetEnabled("LabelItemDescTitle",TRUE);
childSetEnabled("LabelItemDesc",is_modifiable);
@@ -492,7 +494,7 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
/////////////
// Check for ability to change values.
- if (is_link)
+ if (is_link || cannot_restrict_permissions)
{
childSetEnabled("CheckShareWithGroup",FALSE);
childSetEnabled("CheckEveryoneCopy",FALSE);
@@ -558,9 +560,9 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
childSetEnabled("CheckPurchase",is_complete);
childSetEnabled("NextOwnerLabel",TRUE);
- childSetEnabled("CheckNextOwnerModify",base_mask & PERM_MODIFY);
- childSetEnabled("CheckNextOwnerCopy",base_mask & PERM_COPY);
- childSetEnabled("CheckNextOwnerTransfer",next_owner_mask & PERM_COPY);
+ childSetEnabled("CheckNextOwnerModify",(base_mask & PERM_MODIFY) && !cannot_restrict_permissions);
+ childSetEnabled("CheckNextOwnerCopy",(base_mask & PERM_COPY) && !cannot_restrict_permissions);
+ childSetEnabled("CheckNextOwnerTransfer",(next_owner_mask & PERM_COPY) && !cannot_restrict_permissions);
childSetEnabled("RadioSaleType",is_complete && is_for_sale);
childSetEnabled("TextPrice",is_complete && is_for_sale);
@@ -611,7 +613,7 @@ void LLFloaterProperties::onClickCreator(void* data)
if(!item) return;
if(!item->getCreatorUUID().isNull())
{
- LLFriendActions::showProfile(item->getCreatorUUID());
+ LLAvatarActions::showProfile(item->getCreatorUUID());
}
}
@@ -628,7 +630,7 @@ void LLFloaterProperties::onClickOwner(void* data)
}
else
{
- LLFriendActions::showProfile(item->getPermissions().getOwner());
+ LLAvatarActions::showProfile(item->getPermissions().getOwner());
}
}
@@ -658,6 +660,7 @@ void LLFloaterProperties::onCommitName(LLUICtrl* ctrl, void* data)
{
new_item->updateServer(FALSE);
gInventory.updateItem(new_item);
+ gInventory.updateLinkedObjects(new_item->getUUID());
gInventory.notifyObservers();
}
else
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 57a3bf9445..009902b453 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -58,6 +58,7 @@
#include "llfloatergodtools.h" // for send_sim_wide_deletes()
#include "llfloatertopobjects.h" // added to fix SL-32336
#include "llfloatergroups.h"
+#include "llfloaterreg.h"
#include "llfloatertelehub.h"
#include "llfloaterwindlight.h"
#include "llinventorymodel.h"
@@ -75,8 +76,8 @@
#include "llviewercontrol.h"
#include "lluictrlfactory.h"
#include "llviewerinventory.h"
-#include "llviewerimage.h"
-#include "llviewerimagelist.h"
+#include "llviewertexture.h"
+#include "llviewertexturelist.h"
#include "llviewerregion.h"
#include "llviewerstats.h"
#include "llviewertexteditor.h"
@@ -164,9 +165,9 @@ bool estate_dispatch_initialized = false;
LLUUID LLFloaterRegionInfo::sRequestInvoice;
LLFloaterRegionInfo::LLFloaterRegionInfo(const LLSD& seed)
- : LLFloater()
+ : LLFloater(seed)
{
- LLUICtrlFactory::getInstance()->buildFloater(this, "floater_region_info.xml", FALSE);
+ //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_region_info.xml", FALSE);
}
BOOL LLFloaterRegionInfo::postBuild()
@@ -247,7 +248,8 @@ void LLFloaterRegionInfo::requestRegionInfo()
void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**)
{
static LLDispatcher dispatch;
- if(!findInstance())
+ LLFloaterRegionInfo* floater = LLFloaterReg::getTypedInstance<LLFloaterRegionInfo>("region_info");
+ if(!floater)
{
return;
}
@@ -257,7 +259,7 @@ void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**)
LLPanelEstateInfo::initDispatch(dispatch);
}
- LLTabContainer* tab = findInstance()->getChild<LLTabContainer>("region_panels");
+ LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels");
LLPanelEstateInfo* panel = (LLPanelEstateInfo*)tab->getChild<LLPanel>("Estate");
// unpack the message
@@ -283,14 +285,14 @@ void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**)
void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
{
LLPanel* panel;
-
+ LLFloaterRegionInfo* floater = LLFloaterReg::getTypedInstance<LLFloaterRegionInfo>("region_info");
llinfos << "LLFloaterRegionInfo::processRegionInfo" << llendl;
- if(!findInstance())
+ if(!floater)
{
return;
}
- LLTabContainer* tab = findInstance()->getChild<LLTabContainer>("region_panels");
+ LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels");
LLViewerRegion* region = gAgent.getRegion();
BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate());
@@ -377,13 +379,13 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
panel->childSetEnabled("sun_hour_slider", allow_modify && !use_estate_sun);
panel->setCtrlsEnabled(allow_modify);
- getInstance()->refreshFromRegion( gAgent.getRegion() );
+ floater->refreshFromRegion( gAgent.getRegion() );
}
// static
LLPanelEstateInfo* LLFloaterRegionInfo::getPanelEstate()
{
- LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance();
+ LLFloaterRegionInfo* floater = LLFloaterReg::getTypedInstance<LLFloaterRegionInfo>("region_info");
if (!floater) return NULL;
LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels");
LLPanelEstateInfo* panel = (LLPanelEstateInfo*)tab->getChild<LLPanel>("Estate");
@@ -393,7 +395,7 @@ LLPanelEstateInfo* LLFloaterRegionInfo::getPanelEstate()
// static
LLPanelEstateCovenant* LLFloaterRegionInfo::getPanelCovenant()
{
- LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance();
+ LLFloaterRegionInfo* floater = LLFloaterReg::getTypedInstance<LLFloaterRegionInfo>("region_info");
if (!floater) return NULL;
LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels");
LLPanelEstateCovenant* panel = (LLPanelEstateCovenant*)tab->getChild<LLPanel>("Covenant");
@@ -611,7 +613,8 @@ BOOL LLPanelRegionGeneralInfo::postBuild()
childSetAction("kick_btn", onClickKick, this);
childSetAction("kick_all_btn", onClickKickAll, this);
childSetAction("im_btn", onClickMessage, this);
- childSetAction("manage_telehub_btn", onClickManageTelehub, this);
+// childSetAction("manage_telehub_btn", onClickManageTelehub, this);
+ mCommitCallbackRegistrar.add("RegionInfo.Cancel", boost::bind(&LLPanelRegionGeneralInfo::onClickManageTelehub, this));
return LLPanelRegionInfo::postBuild();
}
@@ -719,11 +722,9 @@ bool LLPanelRegionGeneralInfo::onMessageCommit(const LLSD& notification, const L
return false;
}
-// static
-void LLPanelRegionGeneralInfo::onClickManageTelehub(void* data)
+void LLPanelRegionGeneralInfo::onClickManageTelehub()
{
- LLFloaterRegionInfo::getInstance()->closeFloater();
-
+ LLFloaterReg::getInstance("region_info")->closeFloater();
LLFloaterTelehub::show();
}
@@ -958,8 +959,10 @@ void LLPanelRegionDebugInfo::onClickTopColliders(void* data)
strings_t strings;
strings.push_back("1"); // one physics step
LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
- LLFloaterTopObjects::show();
- LLFloaterTopObjects::clearList();
+ LLFloaterTopObjects* instance = LLFloaterReg::getTypedInstance<LLFloaterTopObjects>("top_objects");
+ if(!instance) return;
+ LLFloaterReg::showInstance("top_objects");
+ instance->clearList();
self->sendEstateOwnerMessage(gMessageSystem, "colliders", invoice, strings);
}
@@ -970,8 +973,10 @@ void LLPanelRegionDebugInfo::onClickTopScripts(void* data)
strings_t strings;
strings.push_back("6"); // top 5 scripts
LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
- LLFloaterTopObjects::show();
- LLFloaterTopObjects::clearList();
+ LLFloaterTopObjects* instance = LLFloaterReg::getTypedInstance<LLFloaterTopObjects>("top_objects");
+ if(!instance) return;
+ LLFloaterReg::showInstance("top_objects");
+ instance->clearList();
self->sendEstateOwnerMessage(gMessageSystem, "scripts", invoice, strings);
}
@@ -1139,11 +1144,11 @@ BOOL LLPanelRegionTextureInfo::validateTextureSizes()
if (!texture_ctrl) continue;
LLUUID image_asset_id = texture_ctrl->getImageAssetID();
- LLViewerImage* img = gImageList.getImage(image_asset_id);
+ LLViewerTexture* img = LLViewerTextureManager::getFetchedTexture(image_asset_id);
S32 components = img->getComponents();
// Must ask for highest resolution version's width. JC
- S32 width = img->getWidth(0);
- S32 height = img->getHeight(0);
+ S32 width = img->getFullWidth();
+ S32 height = img->getFullHeight();
//llinfos << "texture detail " << i << " is " << width << "x" << height << "x" << components << llendl;
@@ -1254,7 +1259,7 @@ BOOL LLPanelRegionTerrainInfo::sendUpdate()
// Grab estate information in case the user decided to set the
// region back to estate time. JC
- LLFloaterRegionInfo* floater = LLFloaterRegionInfo::getInstance();
+ LLFloaterRegionInfo* floater = LLFloaterReg::getTypedInstance<LLFloaterRegionInfo>("region_info");
if (!floater) return true;
LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels");
diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h
index b3a1fcb7ca..be4becf7e7 100644
--- a/indra/newview/llfloaterregioninfo.h
+++ b/indra/newview/llfloaterregioninfo.h
@@ -59,11 +59,11 @@ class LLPanelRegionTerrainInfo;
class LLPanelEstateInfo;
class LLPanelEstateCovenant;
-class LLFloaterRegionInfo : public LLFloater, public LLFloaterSingleton<LLFloaterRegionInfo>
+class LLFloaterRegionInfo : public LLFloater
{
- friend class LLUISingleton<LLFloaterRegionInfo, VisibilityPolicy<LLFloater> >;
+ friend class LLFloaterReg;
public:
- ~LLFloaterRegionInfo();
+
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ BOOL postBuild();
@@ -86,8 +86,12 @@ public:
void requestRegionInfo();
-protected:
+private:
+
LLFloaterRegionInfo(const LLSD& seed);
+ ~LLFloaterRegionInfo();
+
+protected:
void refreshFromRegion(LLViewerRegion* region);
// member data
@@ -166,7 +170,7 @@ protected:
bool onKickAllCommit(const LLSD& notification, const LLSD& response);
static void onClickMessage(void* userdata);
bool onMessageCommit(const LLSD& notification, const LLSD& response);
- static void onClickManageTelehub(void* data);
+ void onClickManageTelehub();
};
/////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp
index 4b175cdc27..8c96734057 100644
--- a/indra/newview/llfloaterreporter.cpp
+++ b/indra/newview/llfloaterreporter.cpp
@@ -53,7 +53,7 @@
#include "llagent.h"
#include "llbutton.h"
#include "llcheckboxctrl.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
#include "lllineeditor.h"
#include "lltexturectrl.h"
#include "llscrolllistctrl.h"
@@ -73,7 +73,7 @@
#include "lltoolmgr.h"
#include "llresourcedata.h" // for LLResourceData
#include "llviewerwindow.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llworldmap.h"
#include "llfilepicker.h"
#include "llfloateravatarpicker.h"
@@ -825,7 +825,7 @@ void LLFloaterReporter::takeScreenshot()
llwarns << "Unable to take screenshot" << llendl;
return;
}
- LLPointer<LLImageJ2C> upload_data = LLViewerImageList::convertToUploadFile(raw);
+ LLPointer<LLImageJ2C> upload_data = LLViewerTextureList::convertToUploadFile(raw);
// create a resource data
mResourceDatap->mInventoryType = LLInventoryType::IT_NONE;
@@ -855,10 +855,10 @@ void LLFloaterReporter::takeScreenshot()
mResourceDatap->mAssetInfo.mType);
// store in the image list so it doesn't try to fetch from the server
- LLPointer<LLViewerImage> image_in_list = new LLViewerImage(mResourceDatap->mAssetInfo.mUuid, TRUE);
+ LLPointer<LLViewerFetchedTexture> image_in_list =
+ LLViewerTextureManager::getFetchedTexture(mResourceDatap->mAssetInfo.mUuid, TRUE, FALSE, LLViewerTexture::FETCHED_TEXTURE);
image_in_list->createGLTexture(0, raw);
- gImageList.addImage(image_in_list);
-
+
// the texture picker then uses that texture
LLTexturePicker* texture = getChild<LLTextureCtrl>("screenshot");
if (texture)
diff --git a/indra/newview/llfloaterreporter.h b/indra/newview/llfloaterreporter.h
index da1dda9c78..52bea736bf 100644
--- a/indra/newview/llfloaterreporter.h
+++ b/indra/newview/llfloaterreporter.h
@@ -39,7 +39,7 @@
#include "v3math.h"
class LLMessageSystem;
-class LLViewerImage;
+class LLViewerTexture;
class LLInventoryItem;
class LLViewerObject;
class LLAgent;
diff --git a/indra/newview/llfloaterscriptdebug.cpp b/indra/newview/llfloaterscriptdebug.cpp
index b2bb343681..6cca4927a9 100644
--- a/indra/newview/llfloaterscriptdebug.cpp
+++ b/indra/newview/llfloaterscriptdebug.cpp
@@ -45,7 +45,7 @@
#include "llviewertexteditor.h"
#include "llviewercontrol.h"
#include "llviewerobjectlist.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
//
// Statics
@@ -131,7 +131,7 @@ void LLFloaterScriptDebug::addScriptLine(const std::string &utf8mesg, const std:
if (objectp)
{
- objectp->setIcon(gImageList.getImageFromFile("script_error.j2c", TRUE, TRUE));
+ objectp->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", TRUE, TRUE));
floater_label = llformat("%s(%.2f, %.2f)", user_name.c_str(), objectp->getPositionRegion().mV[VX], objectp->getPositionRegion().mV[VY]);
}
else
diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp
index 8b6102c67f..53b40f8b7a 100644
--- a/indra/newview/llfloatersettingsdebug.cpp
+++ b/indra/newview/llfloatersettingsdebug.cpp
@@ -80,10 +80,6 @@ BOOL LLFloaterSettingsDebug::postBuild()
{
gSavedPerAccountSettings.applyToAll(&func);
}
- if (key == "all" || key == "skin")
- {
- gSavedSkinSettings.applyToAll(&func);
- }
settings_combo->sortByName();
settings_combo->updateSelection();
diff --git a/indra/newview/llfloatersettingsdebug.h b/indra/newview/llfloatersettingsdebug.h
index 87833793af..e7dda3a5f4 100644
--- a/indra/newview/llfloatersettingsdebug.h
+++ b/indra/newview/llfloatersettingsdebug.h
@@ -38,14 +38,11 @@
#include "lltexteditor.h"
class LLFloaterSettingsDebug
-: public LLFloater,
- public LLFloaterSingleton<LLFloaterSettingsDebug>
+: public LLFloater
{
+ friend class LLFloaterReg;
+
public:
- // key - selects which settings to show, one of:
- // "all", "base", "account", "skin"
- LLFloaterSettingsDebug(const LLSD& key);
- virtual ~LLFloaterSettingsDebug();
virtual BOOL postBuild();
virtual void draw();
@@ -56,6 +53,12 @@ public:
void onCommitSettings();
void onClickDefault();
+private:
+ // key - selects which settings to show, one of:
+ // "all", "base", "account", "skin"
+ LLFloaterSettingsDebug(const LLSD& key);
+ virtual ~LLFloaterSettingsDebug();
+
protected:
LLTextEditor* mComment;
};
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index cb4f2a6711..38d8420c96 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -140,12 +140,12 @@ public:
LLFloaterSnapshot::ESnapshotFormat getSnapshotFormat() const { return mSnapshotFormat; }
BOOL getSnapshotUpToDate() const { return mSnapshotUpToDate; }
BOOL isSnapshotActive() { return mSnapshotActive; }
- LLImageGL* getThumbnailImage() const { return mThumbnailImage ; }
+ LLViewerTexture* getThumbnailImage() const { return mThumbnailImage ; }
S32 getThumbnailWidth() const { return mThumbnailWidth ; }
S32 getThumbnailHeight() const { return mThumbnailHeight ; }
BOOL getThumbnailLock() const { return mThumbnailUpdateLock ; }
BOOL getThumbnailUpToDate() const { return mThumbnailUpToDate ;}
- LLImageGL* getCurrentImage();
+ LLViewerTexture* getCurrentImage();
F32 getImageAspect();
F32 getAspect() ;
LLRect getImageRect();
@@ -170,7 +170,7 @@ public:
private:
LLColor4 mColor;
- LLPointer<LLImageGL> mViewerImage[2]; //used to represent the scene when the frame is frozen.
+ LLPointer<LLViewerTexture> mViewerImage[2]; //used to represent the scene when the frame is frozen.
LLRect mImageRect[2];
S32 mWidth[2];
S32 mHeight[2];
@@ -178,7 +178,7 @@ private:
S32 mMaxImageSize ;
//thumbnail image
- LLPointer<LLImageGL> mThumbnailImage ;
+ LLPointer<LLViewerTexture> mThumbnailImage ;
S32 mThumbnailWidth ;
S32 mThumbnailHeight ;
LLRect mPreviewRect ;
@@ -278,7 +278,7 @@ void LLSnapshotLivePreview::setMaxImageSize(S32 size)
}
}
-LLImageGL* LLSnapshotLivePreview::getCurrentImage()
+LLViewerTexture* LLSnapshotLivePreview::getCurrentImage()
{
return mViewerImage[mCurImageIndex];
}
@@ -723,7 +723,7 @@ void LLSnapshotLivePreview::generateThumbnailImage(BOOL force_update)
if(raw)
{
- mThumbnailImage = new LLImageGL(raw, FALSE);
+ mThumbnailImage = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE);
mThumbnailUpToDate = TRUE ;
}
@@ -871,8 +871,8 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
scaled->expandToPowerOfTwo(1024, FALSE);
}
- previewp->mViewerImage[previewp->mCurImageIndex] = new LLImageGL(scaled, FALSE);
- LLPointer<LLImageGL> curr_preview_image = previewp->mViewerImage[previewp->mCurImageIndex];
+ previewp->mViewerImage[previewp->mCurImageIndex] = LLViewerTextureManager::getLocalTexture(scaled.get(), FALSE);
+ LLPointer<LLViewerTexture> curr_preview_image = previewp->mViewerImage[previewp->mCurImageIndex];
gGL.getTexUnit(0)->bind(curr_preview_image);
if (previewp->getSnapshotType() != SNAPSHOT_TEXTURE)
{
@@ -1297,7 +1297,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
floater->childSetColor("file_size_label",
shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD
&& got_bytes
- && previewp->getDataSize() > MAX_POSTCARD_DATASIZE ? LLColor4::red : LLUI::sSettingGroups["color"]->getColor( "LabelTextColor" ));
+ && previewp->getDataSize() > MAX_POSTCARD_DATASIZE ? LLUIColor(LLColor4::red) : LLUIColorTable::instance().getColor( "LabelTextColor" ));
switch(shot_type)
{
diff --git a/indra/newview/llfloatertelehub.cpp b/indra/newview/llfloatertelehub.cpp
index 1d2d3b98f2..174350ddf4 100644
--- a/indra/newview/llfloatertelehub.cpp
+++ b/indra/newview/llfloatertelehub.cpp
@@ -93,8 +93,6 @@ LLFloaterTelehub::LLFloaterTelehub()
gMessageSystem->setHandlerFunc("TelehubInfo", processTelehubInfo);
LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_telehub.xml");
-
- mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
}
BOOL LLFloaterTelehub::postBuild()
{
@@ -113,6 +111,10 @@ BOOL LLFloaterTelehub::postBuild()
return TRUE;
}
+void LLFloaterTelehub::onOpen(const LLSD& key)
+{
+ mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
+}
LLFloaterTelehub::~LLFloaterTelehub()
{
sInstance = NULL;
diff --git a/indra/newview/llfloatertelehub.h b/indra/newview/llfloatertelehub.h
index b639338dfc..86749dcc0b 100644
--- a/indra/newview/llfloatertelehub.h
+++ b/indra/newview/llfloatertelehub.h
@@ -49,6 +49,7 @@ public:
virtual void draw();
/*virtual*/ BOOL postBuild();
+ void onOpen(const LLSD& key);
static BOOL renderBeacons();
static void addBeacons();
diff --git a/indra/newview/llfloatertestlistview.cpp b/indra/newview/llfloatertestlistview.cpp
new file mode 100644
index 0000000000..f7a327c088
--- /dev/null
+++ b/indra/newview/llfloatertestlistview.cpp
@@ -0,0 +1,77 @@
+/**
+* @file llfloatertestlistview.cpp
+* @brief Tests of programmatic manipulation of LLListView widgets
+*
+* $LicenseInfo:firstyear=2009&license=viewergpl$
+*
+* Copyright (c) 2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h"
+
+#include "llfloatertestlistview.h"
+
+// Viewer includes
+#include "lllistview.h"
+
+// Linden library includes
+//#include "lluictrlfactory.h"
+
+LLFloaterTestListView::LLFloaterTestListView(const LLSD& seed)
+: LLFloater(seed),
+ mListView(NULL)
+{
+ // set up named callback functions for test buttons
+ mCommitCallbackRegistrar.add("TestListView.Test1",
+ boost::bind(&LLFloaterTestListView::onClickTest1, this));
+ mCommitCallbackRegistrar.add("TestListView.Test2",
+ boost::bind(&LLFloaterTestListView::onClickTest2, this));
+}
+
+LLFloaterTestListView::~LLFloaterTestListView()
+{}
+
+BOOL LLFloaterTestListView::postBuild()
+{
+ mListView = getChild<LLListView>("test_list_view");
+ // just set a random property
+ mListView->setString("set programmatically");
+ return LLFloater::postBuild();
+}
+
+void LLFloaterTestListView::onListViewChanged()
+{
+ llinfos << "JAMESDEBUG list view changed" << llendl;
+}
+
+void LLFloaterTestListView::onClickTest1()
+{
+ llinfos << "JAMESDEBUG test 1" << llendl;
+}
+
+void LLFloaterTestListView::onClickTest2()
+{
+ llinfos << "JAMESDEBUG test 2" << llendl;
+}
diff --git a/indra/newview/llfloatertestlistview.h b/indra/newview/llfloatertestlistview.h
new file mode 100644
index 0000000000..053da95def
--- /dev/null
+++ b/indra/newview/llfloatertestlistview.h
@@ -0,0 +1,64 @@
+/**
+* @file llfloatertestlistview.h
+* @brief Tests of programmatic manipulation of LLListView widgets
+*
+* $LicenseInfo:firstyear=2009&license=viewergpl$
+*
+* Copyright (c) 2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 LLFLOATERTESTLISTVIEW_H
+#define LLFLOATERTESTLISTVIEW_H
+
+#include "llfloater.h"
+
+class LLListView;
+class LLSD;
+
+class LLFloaterTestListView : public LLFloater
+{
+ friend class LLFloaterReg;
+public:
+ // nothing yet
+
+private:
+ // Construction handled by LLFloaterReg
+ LLFloaterTestListView(const LLSD& seed);
+ ~LLFloaterTestListView();
+
+ /*virtual*/ BOOL postBuild();
+
+ // Perform some debug action when the list-view sends change notification
+ void onListViewChanged();
+
+ // Debug function hookups for buttons
+ void onClickTest1();
+ void onClickTest2();
+
+private:
+ LLListView* mListView;
+};
+
+#endif
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index 4bcf470317..4704630147 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -445,7 +445,8 @@ void LLFloaterTools::draw()
void LLFloaterTools::dirty()
{
mDirty = TRUE;
- LLFloaterOpenObject::dirty();
+ LLFloaterOpenObject* instance = LLFloaterReg::getTypedInstance<LLFloaterOpenObject>("openobject");
+ if (instance) instance->dirty();
}
// Clean up any tool state that should not persist when the
diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp
index 29ac0c66f8..bf5a1141a6 100644
--- a/indra/newview/llfloatertopobjects.cpp
+++ b/indra/newview/llfloatertopobjects.cpp
@@ -40,6 +40,7 @@
#include "llagent.h"
#include "llbutton.h"
#include "llfloatergodtools.h"
+#include "llfloaterreg.h"
#include "llparcel.h"
#include "llscrolllistctrl.h"
#include "llscrolllistitem.h"
@@ -53,11 +54,11 @@
#include "lluictrlfactory.h"
#include "llviewerwindow.h"
-LLFloaterTopObjects* LLFloaterTopObjects::sInstance = NULL;
+//LLFloaterTopObjects* LLFloaterTopObjects::sInstance = NULL;
// Globals
// const U32 TIME_STR_LENGTH = 30;
-
+/*
// static
void LLFloaterTopObjects::show()
{
@@ -68,21 +69,28 @@ void LLFloaterTopObjects::show()
}
sInstance = new LLFloaterTopObjects();
- LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_top_objects.xml");
+// LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_top_objects.xml");
sInstance->center();
}
-
-LLFloaterTopObjects::LLFloaterTopObjects()
-: LLFloater(),
+*/
+LLFloaterTopObjects::LLFloaterTopObjects(const LLSD& key)
+: LLFloater(key),
mInitialized(FALSE),
mtotalScore(0.f)
{
- sInstance = this;
+ mCommitCallbackRegistrar.add("TopObjects.ShowBeacon", boost::bind(&LLFloaterTopObjects::onClickShowBeacon, this));
+ mCommitCallbackRegistrar.add("TopObjects.ReturnSelected", boost::bind(&LLFloaterTopObjects::onReturnSelected, this));
+ mCommitCallbackRegistrar.add("TopObjects.ReturnAll", boost::bind(&LLFloaterTopObjects::onReturnAll, this));
+ mCommitCallbackRegistrar.add("TopObjects.DisableSelected", boost::bind(&LLFloaterTopObjects::onDisableSelected, this));
+ mCommitCallbackRegistrar.add("TopObjects.DisableAll", boost::bind(&LLFloaterTopObjects::onDisableAll, this));
+ mCommitCallbackRegistrar.add("TopObjects.Refresh", boost::bind(&LLFloaterTopObjects::onRefresh, this));
+ mCommitCallbackRegistrar.add("TopObjects.GetByObjectName", boost::bind(&LLFloaterTopObjects::onGetByObjectName, this));
+ mCommitCallbackRegistrar.add("TopObjects.GetByOwnerName", boost::bind(&LLFloaterTopObjects::onGetByOwnerName, this));
+ mCommitCallbackRegistrar.add("TopObjects.CommitObjectsList",boost::bind(&LLFloaterTopObjects::onCommitObjectsList, this));
}
LLFloaterTopObjects::~LLFloaterTopObjects()
{
- sInstance = NULL;
}
// virtual
@@ -90,24 +98,11 @@ BOOL LLFloaterTopObjects::postBuild()
{
LLScrollListCtrl *objects_list = getChild<LLScrollListCtrl>("objects_list");
childSetFocus("objects_list");
- childSetCommitCallback("objects_list", onCommitObjectsList, this);
objects_list->setDoubleClickCallback(onDoubleClickObjectsList, this);
objects_list->setCommitOnSelectionChange(TRUE);
- childSetAction("show_beacon_btn", onClickShowBeacon, this);
setDefaultBtn("show_beacon_btn");
- childSetAction("return_selected_btn", onReturnSelected, this);
- childSetAction("return_all_btn", onReturnAll, this);
- childSetAction("disable_selected_btn", onDisableSelected, this);
- childSetAction("disable_all_btn", onDisableAll, this);
- childSetAction("refresh_btn", onRefresh, this);
-
-
- childSetAction("filter_object_btn", onGetByObjectNameClicked, this);
- childSetAction("filter_owner_btn", onGetByOwnerNameClicked, this);
-
-
/*
LLLineEditor* line_editor = getChild<LLLineEditor>("owner_name_editor");
if (line_editor)
@@ -129,19 +124,29 @@ BOOL LLFloaterTopObjects::postBuild()
return TRUE;
}
+// static
+void LLFloaterTopObjects::setMode(U32 mode)
+{
+ LLFloaterTopObjects* instance = LLFloaterReg::getTypedInstance<LLFloaterTopObjects>("top_objects");
+ if(!instance) return;
+ instance->mCurrentMode = mode;
+}
+// static
void LLFloaterTopObjects::handle_land_reply(LLMessageSystem* msg, void** data)
{
+ LLFloaterTopObjects* instance = LLFloaterReg::getTypedInstance<LLFloaterTopObjects>("top_objects");
+ if(!instance) return;
// Make sure dialog is on screen
- show();
- sInstance->handleReply(msg, data);
+ LLFloaterReg::showInstance("top_objects");
+ instance->handleReply(msg, data);
//HACK: for some reason sometimes top scripts originally comes back
//with no results even though they're there
- if (!sInstance->mObjectListIDs.size() && !sInstance->mInitialized)
+ if (!instance->mObjectListIDs.size() && !instance->mInitialized)
{
- sInstance->onRefresh(NULL);
- sInstance->mInitialized = TRUE;
+ instance->onRefresh();
+ instance->mInitialized = TRUE;
}
}
@@ -260,12 +265,9 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
}
}
-// static
-void LLFloaterTopObjects::onCommitObjectsList(LLUICtrl* ctrl, void* data)
+void LLFloaterTopObjects::onCommitObjectsList()
{
- LLFloaterTopObjects* self = (LLFloaterTopObjects*)data;
-
- self->updateSelectionInfo();
+ updateSelectionInfo();
}
void LLFloaterTopObjects::updateSelectionInfo()
@@ -292,11 +294,9 @@ void LLFloaterTopObjects::onDoubleClickObjectsList(void* data)
}
// static
-void LLFloaterTopObjects::onClickShowBeacon(void* data)
+void LLFloaterTopObjects::onClickShowBeacon()
{
- LLFloaterTopObjects* self = (LLFloaterTopObjects*)data;
- if (!self) return;
- self->showBeacon();
+ showBeacon();
}
void LLFloaterTopObjects::doToObjects(int action, bool all)
@@ -360,22 +360,24 @@ void LLFloaterTopObjects::doToObjects(int action, bool all)
bool LLFloaterTopObjects::callbackReturnAll(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
+ LLFloaterTopObjects* instance = LLFloaterReg::getTypedInstance<LLFloaterTopObjects>("top_objects");
+ if(!instance) return false;
if (option == 0)
{
- sInstance->doToObjects(ACTION_RETURN, true);
+ instance->doToObjects(ACTION_RETURN, true);
}
return false;
}
-void LLFloaterTopObjects::onReturnAll(void* data)
+void LLFloaterTopObjects::onReturnAll()
{
LLNotifications::instance().add("ReturnAllTopObjects", LLSD(), LLSD(), &callbackReturnAll);
}
-void LLFloaterTopObjects::onReturnSelected(void* data)
+void LLFloaterTopObjects::onReturnSelected()
{
- sInstance->doToObjects(ACTION_RETURN, false);
+ doToObjects(ACTION_RETURN, false);
}
@@ -383,52 +385,52 @@ void LLFloaterTopObjects::onReturnSelected(void* data)
bool LLFloaterTopObjects::callbackDisableAll(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
+ LLFloaterTopObjects* instance = LLFloaterReg::getTypedInstance<LLFloaterTopObjects>("top_objects");
+ if(!instance) return false;
if (option == 0)
{
- sInstance->doToObjects(ACTION_DISABLE, true);
+ instance->doToObjects(ACTION_DISABLE, true);
}
return false;
}
-void LLFloaterTopObjects::onDisableAll(void* data)
+void LLFloaterTopObjects::onDisableAll()
{
LLNotifications::instance().add("DisableAllTopObjects", LLSD(), LLSD(), callbackDisableAll);
}
-void LLFloaterTopObjects::onDisableSelected(void* data)
+void LLFloaterTopObjects::onDisableSelected()
{
- sInstance->doToObjects(ACTION_DISABLE, false);
+ doToObjects(ACTION_DISABLE, false);
}
-//static
+
void LLFloaterTopObjects::clearList()
{
- LLCtrlListInterface *list = sInstance->childGetListInterface("objects_list");
+ LLCtrlListInterface *list = childGetListInterface("objects_list");
if (list)
{
list->operateOnAll(LLCtrlListInterface::OP_DELETE);
}
- sInstance->mObjectListData.clear();
- sInstance->mObjectListIDs.clear();
- sInstance->mtotalScore = 0.f;
+ mObjectListData.clear();
+ mObjectListIDs.clear();
+ mtotalScore = 0.f;
}
-//static
-void LLFloaterTopObjects::onRefresh(void* data)
+
+void LLFloaterTopObjects::onRefresh()
{
U32 mode = STAT_REPORT_TOP_SCRIPTS;
U32 flags = 0;
std::string filter = "";
- if (sInstance)
- {
- mode = sInstance->mCurrentMode;
- flags = sInstance->mFlags;
- filter = sInstance->mFilter;
- sInstance->clearList();
- }
+ mode = mCurrentMode;
+ flags = mFlags;
+ filter = mFilter;
+ clearList();
+
LLMessageSystem *msg = gMessageSystem;
msg->newMessageFast(_PREHASH_LandStatRequest);
@@ -443,31 +445,22 @@ void LLFloaterTopObjects::onRefresh(void* data)
msg->sendReliable(gAgent.getRegionHost());
- if (sInstance)
- {
- sInstance->mFilter.clear();
- sInstance->mFlags = 0;
- }
+ mFilter.clear();
+ mFlags = 0;
}
-void LLFloaterTopObjects::onGetByObjectName(LLUICtrl* ctrl, void* data)
+void LLFloaterTopObjects::onGetByObjectName()
{
- if (sInstance)
- {
- sInstance->mFlags = STAT_FILTER_BY_OBJECT;
- sInstance->mFilter = sInstance->childGetText("object_name_editor");
- onRefresh(NULL);
- }
+ mFlags = STAT_FILTER_BY_OBJECT;
+ mFilter = childGetText("object_name_editor");
+ onRefresh();
}
-void LLFloaterTopObjects::onGetByOwnerName(LLUICtrl* ctrl, void* data)
+void LLFloaterTopObjects::onGetByOwnerName()
{
- if (sInstance)
- {
- sInstance->mFlags = STAT_FILTER_BY_OWNER;
- sInstance->mFilter = sInstance->childGetText("owner_name_editor");
- onRefresh(NULL);
- }
+ mFlags = STAT_FILTER_BY_OWNER;
+ mFilter = childGetText("owner_name_editor");
+ onRefresh();
}
void LLFloaterTopObjects::showBeacon()
diff --git a/indra/newview/llfloatertopobjects.h b/indra/newview/llfloatertopobjects.h
index 58cbf5d2ce..ee3c5d3cce 100644
--- a/indra/newview/llfloatertopobjects.h
+++ b/indra/newview/llfloatertopobjects.h
@@ -39,48 +39,49 @@ class LLUICtrl;
class LLFloaterTopObjects : public LLFloater
{
+ friend class LLFloaterReg;
public:
// Opens the floater on screen.
- static void show();
+// static void show();
// Opens the floater if it's not on-screen.
// Juggles the UI based on method = "scripts" or "colliders"
static void handle_land_reply(LLMessageSystem* msg, void** data);
void handleReply(LLMessageSystem* msg, void** data);
- static void clearList();
+ void clearList();
void updateSelectionInfo();
virtual BOOL postBuild();
- static void onRefresh(void* data);
+ void onRefresh();
- static void setMode(U32 mode) { if (sInstance) sInstance->mCurrentMode = mode; }
+ static void setMode(U32 mode);
private:
- LLFloaterTopObjects();
+ LLFloaterTopObjects(const LLSD& key);
~LLFloaterTopObjects();
void initColumns(LLCtrlListInterface *list);
- static void onCommitObjectsList(LLUICtrl* ctrl, void* data);
+ void onCommitObjectsList();
static void onDoubleClickObjectsList(void* data);
- static void onClickShowBeacon(void* data);
+ void onClickShowBeacon();
void doToObjects(int action, bool all);
- static void onReturnAll(void* data);
- static void onReturnSelected(void* data);
- static void onDisableAll(void* data);
- static void onDisableSelected(void* data);
+ void onReturnAll();
+ void onReturnSelected();
+ void onDisableAll();
+ void onDisableSelected();
static bool callbackReturnAll(const LLSD& notification, const LLSD& response);
static bool callbackDisableAll(const LLSD& notification, const LLSD& response);
- static void onGetByOwnerName(LLUICtrl* ctrl, void* data);
- static void onGetByObjectName(LLUICtrl* ctrl, void* data);
+ void onGetByOwnerName();
+ void onGetByObjectName();
- static void onGetByOwnerNameClicked(void* data) { onGetByOwnerName(NULL, data); };
- static void onGetByObjectNameClicked(void* data) { onGetByObjectName(NULL, data); };
+// static void onGetByOwnerNameClicked(void* data) { onGetByOwnerName(NULL, data); };
+// static void onGetByObjectNameClicked(void* data) { onGetByObjectName(NULL, data); };
void showBeacon();
diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp
index 34db895b52..4870494b20 100644
--- a/indra/newview/llfloateruipreview.cpp
+++ b/indra/newview/llfloateruipreview.cpp
@@ -57,6 +57,7 @@
#include "lldraghandle.h"
#include "lllayoutstack.h"
#include "llviewermenu.h"
+#include "llrngwriter.h"
// Boost (for linux/unix command-line execv)
#include <boost/tokenizer.hpp>
@@ -77,10 +78,12 @@ std::string LLFloaterUIPreview::mSavedDiffPath = std::string("");
static const S32 PRIMARY_FLOATER = 1;
static const S32 SECONDARY_FLOATER = 2;
+static LLDefaultChildRegistry::Register<LLOverlapPanel> register_overlap_panel("overlap_panel");
+
static std::string get_xui_dir()
{
std::string delim = gDirUtilp->getDirDelimiter();
- return gDirUtilp->getAppRODataDir() + delim + std::string("skins") + delim + "default" + delim + "xui" + delim;
+ return gDirUtilp->getSkinBaseDir() + delim + "default" + delim + "xui" + delim;
}
// Localization reset forcer -- ensures that when localization is temporarily changed for previewed floater, it is reset
@@ -186,11 +189,6 @@ BOOL LLFadeEventTimer::tick()
return FALSE;
}
-void* create_overlap_panel(void* data)
-{
- return new LLOverlapPanel();
-}
-
// Constructor
LLFloaterUIPreview::LLFloaterUIPreview(const LLSD& key)
: LLFloater(key),
@@ -204,7 +202,6 @@ LLFloaterUIPreview::LLFloaterUIPreview(const LLSD& key)
{
sInstance = this;
- mFactoryMap["overlap_panel"] = LLCallbackMap(create_overlap_panel, NULL);
// called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_ui_preview.xml");
}
@@ -264,6 +261,8 @@ BOOL LLFloaterUIPreview::postBuild()
main_panel_tmp->getChild<LLButton>("save_floater")->setClickedCallback(onClickSaveFloater, (void*)&PRIMARY_FLOATER);
main_panel_tmp->getChild<LLButton>("save_all_floaters")->setClickedCallback(onClickSaveAll, (void*)&PRIMARY_FLOATER);
+ getChild<LLButton>("export_schema")->setClickedCallback(boost::bind(&LLFloaterUIPreview::onClickExportSchema, this));
+
// get pointers to text fields
mEditorPathTextBox = editor_panel_tmp->getChild<LLLineEditor>("executable_path_field");
mEditorArgsTextBox = editor_panel_tmp->getChild<LLLineEditor>("executable_args_field");
@@ -354,6 +353,37 @@ void LLFloaterUIPreview::onLanguageComboSelect(LLUICtrl* ctrl)
}
+void LLFloaterUIPreview::onClickExportSchema()
+{
+ gViewerWindow->setCursor(UI_CURSOR_WAIT);
+ std::string template_path = gDirUtilp->getExpandedFilename(LL_PATH_DEFAULT_SKIN, "xui", "schema");
+
+ typedef LLWidgetTypeRegistry::Registrar::registry_map_t::const_iterator registry_it;
+ registry_it end_it = LLWidgetTypeRegistry::defaultRegistrar().endItems();
+ for(registry_it it = LLWidgetTypeRegistry::defaultRegistrar().beginItems();
+ it != end_it;
+ ++it)
+ {
+ std::string widget_name = it->first;
+ const LLInitParam::BaseBlock& block =
+ (*LLDefaultParamBlockRegistry::instance().getValue(*LLWidgetTypeRegistry::instance().getValue(widget_name)))();
+ LLXMLNodePtr root_nodep = new LLXMLNode();
+ LLRNGWriter().writeRNG(widget_name, root_nodep, block, "http://www.lindenlab.com/xui");
+
+ std::string file_name(template_path + gDirUtilp->getDirDelimiter() + widget_name + ".rng");
+
+ LLFILE* rng_file = LLFile::fopen(file_name.c_str(), "w");
+ {
+ LLXMLNode::writeHeaderToFile(rng_file);
+ const bool use_type_decorations = false;
+ root_nodep->writeToFile(rng_file, std::string(), use_type_decorations);
+ }
+ fclose(rng_file);
+ }
+ gViewerWindow->setCursor(UI_CURSOR_ARROW);
+}
+
+
// Close click handler -- delete my displayed floater if it exists
void LLFloaterUIPreview::onClose(bool app_quitting)
{
@@ -599,7 +629,8 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save)
std::string full_filename = append_new_to_xml_filename(path);
LLFILE* floater_temp = LLFile::fopen(full_filename.c_str(), "w");
LLXMLNode::writeHeaderToFile(floater_temp);
- floater_write->writeToFile(floater_temp);
+ const bool use_type_decorations = false;
+ floater_write->writeToFile(floater_temp, std::string(), use_type_decorations);
fclose(floater_temp);
}
}
@@ -614,14 +645,15 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save)
if (save)
{
LLXMLNodePtr menu_write = new LLXMLNode();
- LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>(path, gMenuHolder, menu_write);
+ LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>(path, gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance(), menu_write);
if (!menu_write->isNull())
{
std::string full_filename = append_new_to_xml_filename(path);
LLFILE* menu_temp = LLFile::fopen(full_filename.c_str(), "w");
LLXMLNode::writeHeaderToFile(menu_temp);
- menu_write->writeToFile(menu_temp);
+ const bool use_type_decorations = false;
+ menu_write->writeToFile(menu_temp, std::string(), use_type_decorations);
fclose(menu_temp);
}
@@ -645,7 +677,8 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID, bool save)
std::string full_filename = append_new_to_xml_filename(path);
LLFILE* panel_temp = LLFile::fopen(full_filename.c_str(), "w");
LLXMLNode::writeHeaderToFile(panel_temp);
- panel_write->writeToFile(panel_temp);
+ const bool use_type_decorations = false;
+ panel_write->writeToFile(panel_temp, std::string(), use_type_decorations);
fclose(panel_temp);
}
}
@@ -779,6 +812,10 @@ void LLFloaterUIPreview::onClickEditFloater(void*)
{
exe_path_char = path_in_textfield.c_str();
}
+ else if (!LLUI::sSettingGroups["config"]->getString("XUIEditor").empty())
+ {
+ exe_path_char = LLUI::sSettingGroups["config"]->getString("XUIEditor").c_str();
+ }
else // otherwise use the path specified by the environment variable
{
exe_path_char = getenv("LL_XUI_EDITOR");
diff --git a/indra/newview/llfloateruipreview.h b/indra/newview/llfloateruipreview.h
index b0af841e11..eca8c0a141 100644
--- a/indra/newview/llfloateruipreview.h
+++ b/indra/newview/llfloateruipreview.h
@@ -49,6 +49,7 @@ class LLColor;
class LLScrollListCtrl;
class LLComboBox;
class LLButton;
+class LLLineEditor;
class LLXmlTreeNode;
class LLFloaterUIPreview;
class LLFadeEventTimer;
@@ -211,6 +212,7 @@ private:
static void onClickToggleOverlapping(void*);
static void onClickCloseDisplayedFloater(void*);
void onLanguageComboSelect(LLUICtrl* ctrl);
+ void onClickExportSchema();
};
#endif // LL_LLUIPREVIEW_H
diff --git a/indra/newview/llfloaterurldisplay.cpp b/indra/newview/llfloaterurldisplay.cpp
index 7f7d05e1d2..3b9321a876 100644
--- a/indra/newview/llfloaterurldisplay.cpp
+++ b/indra/newview/llfloaterurldisplay.cpp
@@ -45,11 +45,10 @@
LLFloaterURLDisplay::LLFloaterURLDisplay(const LLSD& sd)
- : LLFloater()
+ : LLFloater(sd)
{
mFactoryMap["place_details_panel"] = LLCallbackMap(LLFloaterURLDisplay::createPlaceDetail, this);
- LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_url.xml");
- this->setVisible(false);
+// LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_url.xml");
// If positioned at 0,0 the teleport button is behind the toolbar.
LLRect r = getRect();
diff --git a/indra/newview/llfloaterurldisplay.h b/indra/newview/llfloaterurldisplay.h
index 91c544ae86..22f5a95ad0 100644
--- a/indra/newview/llfloaterurldisplay.h
+++ b/indra/newview/llfloaterurldisplay.h
@@ -40,11 +40,10 @@ class LLPanelPlace;
class LLSD;
class LLUUID;
-class LLFloaterURLDisplay : public LLFloater, public LLFloaterSingleton<LLFloaterURLDisplay>
+class LLFloaterURLDisplay : public LLFloater
{
+ friend class LLFloaterReg;
public:
- LLFloaterURLDisplay(const LLSD& sd);
- virtual ~LLFloaterURLDisplay();
void displayParcelInfo(U64 region_handle, const LLVector3& pos);
void setSnapshotDisplay(const LLUUID& snapshot_id);
@@ -54,6 +53,9 @@ public:
static void* createPlaceDetail(void* userdata);
private:
+ LLFloaterURLDisplay(const LLSD& sd);
+ virtual ~LLFloaterURLDisplay();
+
LLVector3 mRegionPosition;
U64 mRegionHandle;
LLPanelPlace* mPlacePanel;
diff --git a/indra/newview/llfloatervoicedevicesettings.cpp b/indra/newview/llfloatervoicedevicesettings.cpp
index 12d12f37f2..0cbeaa591d 100644
--- a/indra/newview/llfloatervoicedevicesettings.cpp
+++ b/indra/newview/llfloatervoicedevicesettings.cpp
@@ -113,7 +113,7 @@ void LLPanelVoiceDeviceSettings::draw()
{
if (power_bar_idx < discrete_power)
{
- LLColor4 color = (power_bar_idx >= 3) ? gSavedSkinSettings.getColor4("OverdrivenColor") : gSavedSkinSettings.getColor4("SpeakingColor");
+ LLColor4 color = (power_bar_idx >= 3) ? LLUIColorTable::instance().getColor("OverdrivenColor") : LLUIColorTable::instance().getColor("SpeakingColor");
gl_rect_2d(bar_view->getRect(), color, TRUE);
}
gl_rect_2d(bar_view->getRect(), LLColor4::grey, FALSE);
@@ -284,7 +284,7 @@ void LLPanelVoiceDeviceSettings::onCommitOutputDevice(LLUICtrl* ctrl, void* user
//
LLFloaterVoiceDeviceSettings::LLFloaterVoiceDeviceSettings(const LLSD& seed)
- : LLFloater(),
+ : LLFloater(seed),
mDevicePanel(NULL)
{
mFactoryMap["device_settings"] = LLCallbackMap(createPanelVoiceDeviceSettings, this);
diff --git a/indra/newview/llfloatervoicedevicesettings.h b/indra/newview/llfloatervoicedevicesettings.h
index 47f41d6d7e..ed8840a9f9 100644
--- a/indra/newview/llfloatervoicedevicesettings.h
+++ b/indra/newview/llfloatervoicedevicesettings.h
@@ -62,17 +62,21 @@ protected:
BOOL mDevicesUpdated;
};
-class LLFloaterVoiceDeviceSettings : public LLFloater, public LLFloaterSingleton<LLFloaterVoiceDeviceSettings>
+class LLFloaterVoiceDeviceSettings : public LLFloater
{
+ friend class LLFloaterReg;
+
public:
- LLFloaterVoiceDeviceSettings(const LLSD& seed);
+
virtual BOOL postBuild();
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ void onClose(bool app_quitting);
/*virtual*/ void draw();
void apply();
void cancel();
-
+private:
+ LLFloaterVoiceDeviceSettings(const LLSD& seed);
+
protected:
static void* createPanelVoiceDeviceSettings(void* user_data);
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index 2fe817625a..cdc4cbc411 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -67,6 +67,7 @@
#include "llappviewer.h"
#include "llmapimagetype.h"
#include "llweb.h"
+#include "llslider.h"
#include "llglheaders.h"
#include "llwindow.h" // copyTextToClipboard()
@@ -161,6 +162,16 @@ LLFloaterWorldMap::LLFloaterWorldMap(const LLSD& key)
mFactoryMap["terrain_mapview"] = LLCallbackMap(createWorldMapView, NULL);
//Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_world_map.xml", FALSE);
+ mCommitCallbackRegistrar.add("WMap.Location", boost::bind(&LLFloaterWorldMap::onLocationCommit, this));
+ mCommitCallbackRegistrar.add("WMap.AvatarCombo", boost::bind(&LLFloaterWorldMap::onAvatarComboCommit, this));
+ mCommitCallbackRegistrar.add("WMap.SearchResult", boost::bind(&LLFloaterWorldMap::onCommitSearchResult, this));
+ mCommitCallbackRegistrar.add("WMap.CommitLocation", boost::bind(&LLFloaterWorldMap::onCommitLocation, this));
+ mCommitCallbackRegistrar.add("WMap.GoHome", boost::bind(&LLFloaterWorldMap::onGoHome, this));
+ mCommitCallbackRegistrar.add("WMap.Teleport", boost::bind(&LLFloaterWorldMap::onClickTeleportBtn, this));
+ mCommitCallbackRegistrar.add("WMap.ShowTarget", boost::bind(&LLFloaterWorldMap::onShowTargetBtn, this));
+ mCommitCallbackRegistrar.add("WMap.ShowAgent", boost::bind(&LLFloaterWorldMap::onShowAgentBtn, this));
+ mCommitCallbackRegistrar.add("WMap.Clear", boost::bind(&LLFloaterWorldMap::onClearBtn, this));
+ mCommitCallbackRegistrar.add("WMap.CopySLURL", boost::bind(&LLFloaterWorldMap::onCopySLURL, this));
}
// static
@@ -183,8 +194,6 @@ BOOL LLFloaterWorldMap::postBuild()
//
//onCommitBackground();
- childSetCommitCallback("friend combo", onAvatarComboCommit, this);
-
LLComboBox *avatar_combo = getChild<LLComboBox>("friend combo");
if (avatar_combo)
{
@@ -193,8 +202,6 @@ BOOL LLFloaterWorldMap::postBuild()
avatar_combo->setTextEntryCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) );
}
- childSetAction("DoSearch", onLocationCommit, this);
-
getChild<LLScrollListCtrl>("location")->setFocusChangedCallback(boost::bind(&LLFloaterWorldMap::onLocationFocusChanged, this, _1));
LLLineEditor *location_editor = getChild<LLLineEditor>("location");
@@ -203,13 +210,7 @@ BOOL LLFloaterWorldMap::postBuild()
location_editor->setKeystrokeCallback( boost::bind(&LLFloaterWorldMap::onSearchTextEntry, this, _1), NULL );
}
- childSetCommitCallback("search_results", onCommitSearchResult, this);
- getChild<LLScrollListCtrl>("search_results")->setDoubleClickCallback(onClickTeleportBtn, this);
- childSetCommitCallback("spin x", onCommitLocation, this);
- childSetCommitCallback("spin y", onCommitLocation, this);
- childSetCommitCallback("spin z", onCommitLocation, this);
-
- childSetCommitCallback("landmark combo", onLandmarkComboCommit, this);
+ getChild<LLScrollListCtrl>("search_results")->setDoubleClickCallback( boost::bind(&LLFloaterWorldMap::onClickTeleportBtn, this));
LLComboBox *landmark_combo = getChild<LLComboBox>( "landmark combo");
if (landmark_combo)
@@ -219,15 +220,6 @@ BOOL LLFloaterWorldMap::postBuild()
landmark_combo->setTextEntryCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) );
}
- childSetAction("Go Home", onGoHome, this);
-
- childSetAction("Teleport", onClickTeleportBtn, this);
-
- childSetAction("Show Destination", onShowTargetBtn, this);
- childSetAction("Show My Location", onShowAgentBtn, this);
- childSetAction("Clear", onClearBtn, this);
- childSetAction("copy_slurl", onCopySLURL, this);
-
mCurZoomVal = log(gMapScale)/log(2.f);
childSetValue("zoom slider", gMapScale);
@@ -265,16 +257,8 @@ void LLFloaterWorldMap::onClose(bool app_quitting)
{
// While we're not visible, discard the overlay images we're using
LLWorldMap::getInstance()->clearImageRefs();
-
-#if RELEASE_FOR_DOWNLOAD
+
setVisible(FALSE);
-#else
- // Don't call destroy(), we need to delete this immediately
- delete this; // sets gFloaterWorldMap = NULL;
- // need to reconstruct gFloaterWorldMap so that code that assumes it exists doesn't crash
- LLFloaterReg::getInstance("world_map"); // constructs a LLFloaterWorldMap and sets gFloaterWorldMap
- gFloaterWorldMap->setVisible(FALSE); // hide it
-#endif
}
// virtual
@@ -387,8 +371,8 @@ void LLFloaterWorldMap::reshape( S32 width, S32 height, BOOL called_from_parent
// virtual
void LLFloaterWorldMap::draw()
{
- static LLCachedControl<LLColor4> map_track_color(gSavedSkinSettings, "MapTrackColor", LLColor4::white);
- static LLCachedControl<LLColor4> map_track_disabled_color(gSavedSkinSettings, "MapTrackDisabledColor", LLColor4::white);
+ static LLUIColor map_track_color = LLUIColorTable::instance().getColor("MapTrackColor", LLColor4::white);
+ static LLUIColor map_track_disabled_color = LLUIColorTable::instance().getColor("MapTrackDisabledColor", LLColor4::white);
// Hide/Show Mature Events controls
childSetVisible("events_mature_icon", gAgent.canAccessMature());
@@ -863,7 +847,7 @@ void LLFloaterWorldMap::buildLandmarkIDLists()
LLInventoryModel::cat_array_t cats;
LLInventoryModel::item_array_t items;
LLIsType is_landmark(LLAssetType::AT_LANDMARK);
- gInventory.collectDescendentsIf(gAgent.getInventoryRootID(),
+ gInventory.collectDescendentsIf(gInventory.getRootFolderID(),
cats,
items,
LLInventoryModel::EXCLUDE_TRASH,
@@ -989,7 +973,8 @@ void LLFloaterWorldMap::adjustZoomSliderBounds()
pixels_per_region = llclamp(pixels_per_region, 1.f, ZOOM_MAX);
F32 min_power = log(pixels_per_region/256.f)/log(2.f);
- childSetMinValue("zoom slider", min_power);
+
+ getChild<LLSlider>("zoom slider")->setMinValue(min_power);
}
@@ -997,34 +982,10 @@ void LLFloaterWorldMap::adjustZoomSliderBounds()
// User interface widget callbacks
//-------------------------------------------------------------------------
-// static
-void LLFloaterWorldMap::onPanBtn( void* userdata )
-{
- if( !gFloaterWorldMap ) return;
-
- EPanDirection direction = (EPanDirection)(intptr_t)userdata;
-
- S32 pan_x = 0;
- S32 pan_y = 0;
- switch( direction )
- {
- case PAN_UP: pan_y = -1; break;
- case PAN_DOWN: pan_y = 1; break;
- case PAN_LEFT: pan_x = 1; break;
- case PAN_RIGHT: pan_x = -1; break;
- default: llassert(0); return;
- }
-
- LLWorldMapView* map_panel;
- map_panel = (LLWorldMapView*)gFloaterWorldMap->mTabs->getCurrentPanel();
- map_panel->translatePan( pan_x, pan_y );
-}
-
-// static
-void LLFloaterWorldMap::onGoHome(void*)
+void LLFloaterWorldMap::onGoHome()
{
gAgent.teleportHome();
- gFloaterWorldMap->closeFloater();
+ closeFloater();
}
@@ -1040,7 +1001,7 @@ void LLFloaterWorldMap::onLandmarkComboPrearrange( )
LLUUID current_choice = list->getCurrentID();
- gFloaterWorldMap->buildLandmarkIDLists();
+ buildLandmarkIDLists();
if( current_choice.isNull() || !list->setCurrentByID( current_choice ) )
{
@@ -1063,17 +1024,15 @@ void LLFloaterWorldMap::onSearchTextEntry( LLLineEditor* ctrl )
updateSearchEnabled();
}
-// static
-void LLFloaterWorldMap::onLandmarkComboCommit( LLUICtrl* ctrl, void* userdata )
-{
- LLFloaterWorldMap* self = gFloaterWorldMap;
- if( !self || self->mIsClosing )
+void LLFloaterWorldMap::onLandmarkComboCommit()
+{
+ if( mIsClosing )
{
return;
}
- LLCtrlListInterface *list = gFloaterWorldMap->childGetListInterface("landmark combo");
+ LLCtrlListInterface *list = childGetListInterface("landmark combo");
if (!list) return;
LLUUID asset_id;
@@ -1105,11 +1064,11 @@ void LLFloaterWorldMap::onLandmarkComboCommit( LLUICtrl* ctrl, void* userdata )
}
}
- self->trackLandmark( item_id);
- onShowTargetBtn(self);
+ trackLandmark( item_id);
+ onShowTargetBtn();
// Reset to user postion if nothing is tracked
- self->mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING );
+ mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING );
}
// static
@@ -1138,31 +1097,28 @@ void LLFloaterWorldMap::onAvatarComboPrearrange( )
}
}
-
-// static
-void LLFloaterWorldMap::onAvatarComboCommit( LLUICtrl* ctrl, void* userdata )
+void LLFloaterWorldMap::onAvatarComboCommit()
{
- LLFloaterWorldMap* self = gFloaterWorldMap;
- if( !self || self->mIsClosing )
+ if( mIsClosing )
{
return;
}
- LLCtrlListInterface *list = gFloaterWorldMap->childGetListInterface("friend combo");
+ LLCtrlListInterface *list = childGetListInterface("friend combo");
if (!list) return;
const LLUUID& new_avatar_id = list->getCurrentID();
if (new_avatar_id.notNull())
{
std::string name;
- LLComboBox* combo = gFloaterWorldMap->getChild<LLComboBox>("friend combo");
+ LLComboBox* combo = getChild<LLComboBox>("friend combo");
if (combo) name = combo->getSimple();
- self->trackAvatar(new_avatar_id, name);
- onShowTargetBtn(self);
+ trackAvatar(new_avatar_id, name);
+ onShowTargetBtn();
}
else
{ // Reset to user postion if nothing is tracked
- self->mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING );
+ mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING );
}
}
@@ -1184,33 +1140,31 @@ void LLFloaterWorldMap::updateSearchEnabled()
}
}
-// static
-void LLFloaterWorldMap::onLocationCommit( void* userdata )
+void LLFloaterWorldMap::onLocationCommit()
{
- LLFloaterWorldMap *self = gFloaterWorldMap;
- if( !self || self->mIsClosing )
+ if( mIsClosing )
{
return;
}
- self->clearLocationSelection(FALSE);
- self->mCompletingRegionName = "";
- self->mLastRegionName = "";
+ clearLocationSelection(FALSE);
+ mCompletingRegionName = "";
+ mLastRegionName = "";
- std::string str = self->childGetValue("location").asString();
+ std::string str = childGetValue("location").asString();
// Trim any leading and trailing spaces in the search target
std::string saved_str = str;
LLStringUtil::trim( str );
if ( str != saved_str )
{ // Set the value in the UI if any spaces were removed
- self->childSetValue("location", str);
+ childSetValue("location", str);
}
LLStringUtil::toLower(str);
- gFloaterWorldMap->mCompletingRegionName = str;
+ mCompletingRegionName = str;
LLWorldMap::getInstance()->mIsTrackingCommit = TRUE;
- self->mExactMatch = FALSE;
+ mExactMatch = FALSE;
if (str.length() >= 3)
{
LLWorldMap::getInstance()->sendNamedRegionRequest(str);
@@ -1222,67 +1176,42 @@ void LLFloaterWorldMap::onLocationCommit( void* userdata )
}
}
-
-// static
-void LLFloaterWorldMap::onClearBtn(void* data)
+void LLFloaterWorldMap::onClearBtn()
{
- LLFloaterWorldMap* self = (LLFloaterWorldMap*)data;
- self->mTrackedStatus = LLTracker::TRACKING_NOTHING;
+ mTrackedStatus = LLTracker::TRACKING_NOTHING;
LLTracker::stopTracking((void *)(intptr_t)TRUE);
LLWorldMap::getInstance()->mIsTrackingUnknownLocation = FALSE;
- self->mSLURL = ""; // Clear the SLURL since it's invalid
- self->mSetToUserPosition = TRUE; // Revert back to the current user position
+ mSLURL = ""; // Clear the SLURL since it's invalid
+ mSetToUserPosition = TRUE; // Revert back to the current user position
}
-// static
-void LLFloaterWorldMap::onFlyBtn(void* data)
+void LLFloaterWorldMap::onShowTargetBtn()
{
- LLFloaterWorldMap* self = (LLFloaterWorldMap*)data;
- self->fly();
+ centerOnTarget(TRUE);
}
-void LLFloaterWorldMap::onShowTargetBtn(void* data)
-{
- LLFloaterWorldMap* self = (LLFloaterWorldMap*)data;
- self->centerOnTarget(TRUE);
-}
-
-void LLFloaterWorldMap::onShowAgentBtn(void* data)
+void LLFloaterWorldMap::onShowAgentBtn()
{
LLWorldMapView::setPan( 0, 0, FALSE); // FALSE == animate
-
// Set flag so user's location will be displayed if not tracking anything else
- LLFloaterWorldMap* self = (LLFloaterWorldMap*)data;
- self->mSetToUserPosition = TRUE;
+ mSetToUserPosition = TRUE;
}
-// static
-void LLFloaterWorldMap::onClickTeleportBtn(void* data)
+void LLFloaterWorldMap::onClickTeleportBtn()
{
- LLFloaterWorldMap* self = (LLFloaterWorldMap*)data;
- self->teleport();
+ teleport();
}
-// static
-void LLFloaterWorldMap::onCopySLURL(void* data)
+void LLFloaterWorldMap::onCopySLURL()
{
- LLFloaterWorldMap* self = (LLFloaterWorldMap*)data;
- self->getWindow()->copyTextToClipboard(utf8str_to_wstring(self->mSLURL));
+ getWindow()->copyTextToClipboard(utf8str_to_wstring(mSLURL));
LLSD args;
- args["SLURL"] = self->mSLURL;
+ args["SLURL"] = mSLURL;
LLNotifications::instance().add("CopySLURL", args);
}
-void LLFloaterWorldMap::onCheckEvents(LLUICtrl*, void* data)
-{
- LLFloaterWorldMap* self = (LLFloaterWorldMap*)data;
- if(!self) return;
- self->childSetEnabled("event_mature_chk", self->childGetValue("event_chk"));
- self->childSetEnabled("event_adult_chk", self->childGetValue("event_chk"));
-}
-
// protected
void LLFloaterWorldMap::centerOnTarget(BOOL animate)
{
@@ -1402,24 +1331,6 @@ void LLFloaterWorldMap::teleport()
}
}
-// static
-void LLFloaterWorldMap::onGoToLandmarkDialog( S32 option, void* userdata )
-{
- LLFloaterWorldMap* self = (LLFloaterWorldMap*) userdata;
- switch( option )
- {
- case 0:
- self->teleportToLandmark();
- break;
- case 1:
- self->flyToLandmark();
- break;
- default:
- // nothing
- break;
- }
-}
-
void LLFloaterWorldMap::flyToLandmark()
{
LLVector3d destination_pos_global;
@@ -1553,13 +1464,13 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim)
{
mExactMatch = TRUE;
childSetFocus("search_results");
- onCommitSearchResult(NULL, this);
+ onCommitSearchResult();
}
else if (!mExactMatch && num_results > 0)
{
list->selectFirstItem(); // select first item by default
childSetFocus("search_results");
- onCommitSearchResult(NULL, this);
+ onCommitSearchResult();
}
else if (num_results == 0)
{
@@ -1568,30 +1479,25 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim)
}
}
-// static
-void LLFloaterWorldMap::onCommitLocation(LLUICtrl* ctrl, void* userdata)
+void LLFloaterWorldMap::onCommitLocation()
{
- LLFloaterWorldMap* self = (LLFloaterWorldMap*) userdata;
LLTracker::ETrackingStatus tracking_status = LLTracker::getTrackingStatus();
if ( LLTracker::TRACKING_LOCATION == tracking_status)
{
LLVector3d pos_global = LLTracker::getTrackedPositionGlobal();
- F64 local_x = self->childGetValue("spin x");
- F64 local_y = self->childGetValue("spin y");
- F64 local_z = self->childGetValue("spin z");
+ F64 local_x = childGetValue("spin x");
+ F64 local_y = childGetValue("spin y");
+ F64 local_z = childGetValue("spin z");
pos_global.mdV[VX] += -fmod(pos_global.mdV[VX], 256.0) + local_x;
pos_global.mdV[VY] += -fmod(pos_global.mdV[VY], 256.0) + local_y;
pos_global.mdV[VZ] = local_z;
- self->trackLocation(pos_global);
+ trackLocation(pos_global);
}
}
-// static
-void LLFloaterWorldMap::onCommitSearchResult(LLUICtrl*, void* userdata)
+void LLFloaterWorldMap::onCommitSearchResult()
{
- LLFloaterWorldMap* self = (LLFloaterWorldMap*) userdata;
-
- LLCtrlListInterface *list = self->childGetListInterface("search_results");
+ LLCtrlListInterface *list = childGetListInterface("search_results");
if (!list) return;
LLSD selected_value = list->getSelectedValue();
@@ -1612,19 +1518,19 @@ void LLFloaterWorldMap::onCommitSearchResult(LLUICtrl*, void* userdata)
if (sim_name == info_sim_name)
{
LLVector3d pos_global = from_region_handle( info->mHandle );
- F64 local_x = self->childGetValue("spin x");
- F64 local_y = self->childGetValue("spin y");
- F64 local_z = self->childGetValue("spin z");
+ F64 local_x = childGetValue("spin x");
+ F64 local_y = childGetValue("spin y");
+ F64 local_z = childGetValue("spin z");
pos_global.mdV[VX] += local_x;
pos_global.mdV[VY] += local_y;
pos_global.mdV[VZ] = local_z;
- self->childSetValue("location", sim_name);
- self->trackLocation(pos_global);
- self->setDefaultBtn("Teleport");
+ childSetValue("location", sim_name);
+ trackLocation(pos_global);
+ setDefaultBtn("Teleport");
break;
}
}
- onShowTargetBtn(self);
+ onShowTargetBtn();
}
diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h
index a7d7051b40..d52079fc06 100644
--- a/indra/newview/llfloaterworldmap.h
+++ b/indra/newview/llfloaterworldmap.h
@@ -49,6 +49,7 @@ class LLFriendObserver;
class LLInventoryModel;
class LLInventoryObserver;
class LLItemInfo;
+class LLLineEditor;
class LLTabContainer;
class LLFloaterWorldMap : public LLFloater
@@ -112,29 +113,24 @@ public:
void teleport();
protected:
- static void onPanBtn( void* userdata );
+ void onGoHome();
- static void onGoHome(void* data);
+ void onLandmarkComboPrearrange();
+ void onLandmarkComboCommit();
- void onLandmarkComboPrearrange( );
- static void onLandmarkComboCommit( LLUICtrl* ctrl, void* data );
-
- void onAvatarComboPrearrange( );
- static void onAvatarComboCommit( LLUICtrl* ctrl, void* data );
+ void onAvatarComboPrearrange();
+ void onAvatarComboCommit();
void onCommitBackground();
void onComboTextEntry( );
void onSearchTextEntry( LLLineEditor* ctrl );
- static void onClearBtn(void*);
- static void onFlyBtn(void*);
- static void onClickTeleportBtn(void*);
- static void onShowTargetBtn(void*);
- static void onShowAgentBtn(void*);
- static void onCopySLURL(void*);
-
- static void onCheckEvents(LLUICtrl* ctrl, void*);
+ void onClearBtn();
+ void onClickTeleportBtn();
+ void onShowTargetBtn();
+ void onShowAgentBtn();
+ void onCopySLURL();
void centerOnTarget(BOOL animate);
void updateLocation();
@@ -143,7 +139,6 @@ protected:
void fly();
void buildLandmarkIDLists();
- static void onGoToLandmarkDialog(S32 option,void* userdata);
void flyToLandmark();
void teleportToLandmark();
void setLandmarkVisited();
@@ -152,11 +147,11 @@ protected:
void flyToAvatar();
void teleportToAvatar();
- void updateSearchEnabled( );
+ void updateSearchEnabled();
void onLocationFocusChanged( LLFocusableElement* ctrl );
- static void onLocationCommit( void* userdata );
- static void onCommitLocation( LLUICtrl* ctrl, void* userdata );
- static void onCommitSearchResult( LLUICtrl* ctrl, void* userdata );
+ void onLocationCommit();
+ void onCommitLocation();
+ void onCommitSearchResult();
void cacheLandmarkPosition();
@@ -169,7 +164,6 @@ protected:
LLDynamicArray<LLUUID> mLandmarkAssetIDList;
LLDynamicArray<LLUUID> mLandmarkItemIDList;
- BOOL mHasLandmarkPosition;
static const LLUUID sHomeID;
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index fd8c22b8e5..c54eafb67a 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -34,20 +34,13 @@
#include "llfolderview.h"
-#include <algorithm>
-
-#include "llviewercontrol.h"
-#include "lldbstrings.h"
-#include "llfocusmgr.h"
-#include "llfontgl.h"
-#include "llgl.h"
-#include "llrender.h"
-#include "llinventory.h"
-
+#include "llagent.h"
#include "llcallbacklist.h"
#include "llinventorybridge.h"
#include "llinventoryclipboard.h" // *TODO: remove this once hack below gone.
-#include "llinventoryview.h"// hacked in for the bonus context menu items.
+#include "llinventoryfilter.h"
+#include "llfoldertype.h"
+#include "llfloaterinventory.h"// hacked in for the bonus context menu items.
#include "llkeyboard.h"
#include "lllineeditor.h"
#include "llmenugl.h"
@@ -56,39 +49,40 @@
#include "lltooldraganddrop.h"
#include "lltrans.h"
#include "llui.h"
-#include "llviewerimage.h"
-#include "llviewerimagelist.h"
+#include "llviewertexture.h"
+#include "llviewertexturelist.h"
#include "llviewerjointattachment.h"
#include "llviewermenu.h"
#include "lluictrlfactory.h"
+#include "llviewercontrol.h"
#include "llviewerwindow.h"
#include "llvoavatar.h"
#include "llfloaterproperties.h"
-// RN: HACK
-// We need these because some of the code below relies on things like
-// gAgent root folder. Remove them once the abstraction leak is fixed.
-#include "llagent.h"
-#include "llappviewer.h"
+// Linden library includes
+#include "lldbstrings.h"
+#include "llfocusmgr.h"
+#include "llfontgl.h"
+#include "llgl.h"
+#include "llrender.h"
+#include "llinventory.h"
+
+// Third-party library includes
+#include <algorithm>
///----------------------------------------------------------------------------
/// Local function declarations, constants, enums, and typedefs
///----------------------------------------------------------------------------
-const S32 LEFT_PAD = 5;
-const S32 LEFT_INDENTATION = 13;
-const S32 ICON_PAD = 2;
-const S32 ICON_WIDTH = 16;
-const S32 TEXT_PAD = 1;
-const S32 ARROW_SIZE = 12;
const S32 RENAME_WIDTH_PAD = 4;
const S32 RENAME_HEIGHT_PAD = 2;
const S32 AUTO_OPEN_STACK_DEPTH = 16;
-const S32 MIN_ITEM_WIDTH_VISIBLE = ICON_WIDTH + ICON_PAD + ARROW_SIZE + TEXT_PAD + /*first few characters*/ 40;
+const S32 MIN_ITEM_WIDTH_VISIBLE = LLFolderViewItem::ICON_WIDTH
+ + LLFolderViewItem::ICON_PAD
+ + LLFolderViewItem::ARROW_SIZE
+ + LLFolderViewItem::TEXT_PAD
+ + /*first few characters*/ 40;
const S32 MINIMUM_RENAMER_WIDTH = 80;
-const F32 FOLDER_CLOSE_TIME_CONSTANT = 0.02f;
-const F32 FOLDER_OPEN_TIME_CONSTANT = 0.03f;
-const S32 MAX_FOLDER_ITEM_OVERLAP = 2;
enum {
SIGNAL_NO_KEYBOARD_FOCUS = 1,
@@ -104,2332 +98,6 @@ void properties_selected_items(void* user_data);
void paste_items(void* user_data);
void renamer_focus_lost( LLFocusableElement* handler, void* user_data );
-///----------------------------------------------------------------------------
-/// Class LLFolderViewItem
-///----------------------------------------------------------------------------
-
-// statics
-const LLFontGL* LLFolderViewItem::sFont = NULL;
-const LLFontGL* LLFolderViewItem::sSmallFont = NULL;
-LLUIImagePtr LLFolderViewItem::sArrowImage;
-LLUIImagePtr LLFolderViewItem::sBoxImage;
-
-const LLColor4U DEFAULT_WHITE(255, 255, 255);
-
-//static
-void LLFolderViewItem::initClass()
-{
- sFont = LLFontGL::getFontSansSerifSmall();
- sSmallFont = LLFontGL::getFontMonospace();
- sArrowImage = LLUI::getUIImage("folder_arrow.tga");
- sBoxImage = LLUI::getUIImage("rounded_square.tga");
-}
-
-//static
-void LLFolderViewItem::cleanupClass()
-{
- sArrowImage = NULL;
- sBoxImage = NULL;
-}
-
-// NOTE: Optimize this, we call it a *lot* when opening a large inventory
-
-// Default constructor
-LLFolderViewItem::LLFolderViewItem(LLFolderViewItem::Params p)
-: LLView(p),
- mLabelWidth(0),
- mLabelWidthDirty(false),
- mParentFolder( NULL ),
- mIsSelected( FALSE ),
- mIsCurSelection( FALSE ),
- mSelectPending(FALSE),
- mLabelStyle( LLFontGL::NORMAL ),
- mHasVisibleChildren(FALSE),
- mIndentation(0),
- mNumDescendantsSelected(0),
- mFiltered(FALSE),
- mLastFilterGeneration(-1),
- mStringMatchOffset(std::string::npos),
- mControlLabelRotation(0.f),
- mDragAndDropTarget(FALSE),
- mIsLoading(FALSE),
- mLabel(p.name),
- mRoot(p.root),
- mCreationDate(p.creation_date),
- mListener(p.listener),
- mArrowImage(p.folder_arrow_image),
- mBoxImage(p.selection_image)
-{
- refresh();
-}
-
-// Destroys the object
-LLFolderViewItem::~LLFolderViewItem( void )
-{
- delete mListener;
- mListener = NULL;
-}
-
-LLFolderView* LLFolderViewItem::getRoot()
-{
- return mRoot;
-}
-
-// Returns true if this object is a child (or grandchild, etc.) of potential_ancestor.
-BOOL LLFolderViewItem::isDescendantOf( const LLFolderViewFolder* potential_ancestor )
-{
- LLFolderViewItem* root = this;
- while( root->mParentFolder )
- {
- if( root->mParentFolder == potential_ancestor )
- {
- return TRUE;
- }
- root = root->mParentFolder;
- }
- return FALSE;
-}
-
-LLFolderViewItem* LLFolderViewItem::getNextOpenNode(BOOL include_children)
-{
- if (!mParentFolder)
- {
- return NULL;
- }
-
- LLFolderViewItem* itemp = mParentFolder->getNextFromChild( this, include_children );
- while(itemp && !itemp->getVisible())
- {
- LLFolderViewItem* next_itemp = itemp->mParentFolder->getNextFromChild( itemp, include_children );
- if (itemp == next_itemp)
- {
- // hit last item
- return itemp->getVisible() ? itemp : this;
- }
- itemp = next_itemp;
- }
-
- return itemp;
-}
-
-LLFolderViewItem* LLFolderViewItem::getPreviousOpenNode(BOOL include_children)
-{
- if (!mParentFolder)
- {
- return NULL;
- }
-
- LLFolderViewItem* itemp = mParentFolder->getPreviousFromChild( this, include_children );
- while(itemp && !itemp->getVisible())
- {
- LLFolderViewItem* next_itemp = itemp->mParentFolder->getPreviousFromChild( itemp, include_children );
- if (itemp == next_itemp)
- {
- // hit first item
- return itemp->getVisible() ? itemp : this;
- }
- itemp = next_itemp;
- }
-
- return itemp;
-}
-
-// is this item something we think we should be showing?
-// for example, if we haven't gotten around to filtering it yet, then the answer is yes
-// until we find out otherwise
-BOOL LLFolderViewItem::potentiallyVisible()
-{
- // we haven't been checked against min required filter
- // or we have and we passed
- return getLastFilterGeneration() < getRoot()->getFilter()->getMinRequiredGeneration() || getFiltered();
-}
-
-BOOL LLFolderViewItem::getFiltered()
-{
- return mFiltered && mLastFilterGeneration >= getRoot()->getFilter()->getMinRequiredGeneration();
-}
-
-BOOL LLFolderViewItem::getFiltered(S32 filter_generation)
-{
- return mFiltered && mLastFilterGeneration >= filter_generation;
-}
-
-void LLFolderViewItem::setFiltered(BOOL filtered, S32 filter_generation)
-{
- mFiltered = filtered;
- mLastFilterGeneration = filter_generation;
-}
-
-void LLFolderViewItem::setIcon(LLUIImagePtr icon)
-{
- mIcon = icon;
-}
-
-// refresh information from the listener
-void LLFolderViewItem::refreshFromListener()
-{
- if(mListener)
- {
- mLabel = mListener->getDisplayName();
- LLAssetType::EType preferred_type = mListener->getPreferredType();
-
- // *TODO: to be removed when database supports multi language. This is a
- // temporary attempt to display the inventory folder in the user locale.
- if (preferred_type != LLAssetType::AT_NONE)
- {
- mLabel = LLTrans::getString("InvFolder " + mLabel);
- };
-
- setIcon(mListener->getIcon());
- time_t creation_date = mListener->getCreationDate();
- if (mCreationDate != creation_date)
- {
- mCreationDate = mListener->getCreationDate();
- dirtyFilter();
- }
- mLabelStyle = mListener->getLabelStyle();
- mLabelSuffix = mListener->getLabelSuffix();
- }
-}
-
-void LLFolderViewItem::refresh()
-{
- refreshFromListener();
-
- std::string searchable_label(mLabel);
- searchable_label.append(mLabelSuffix);
- LLStringUtil::toUpper(searchable_label);
-
- if (mSearchableLabel.compare(searchable_label))
- {
- mSearchableLabel.assign(searchable_label);
- dirtyFilter();
- // some part of label has changed, so overall width has potentially changed, and sort order too
- if (mParentFolder)
- {
- mParentFolder->requestSort();
- mParentFolder->requestArrange();
- }
- }
-
- mLabelWidthDirty = true;
-}
-
-void LLFolderViewItem::applyListenerFunctorRecursively(LLFolderViewListenerFunctor& functor)
-{
- functor(mListener);
-}
-
-// This function is called when items are added or view filters change. It's
-// implemented here but called by derived classes when folding the
-// views.
-void LLFolderViewItem::filterFromRoot( void )
-{
- LLFolderViewItem* root = getRoot();
-
- root->filter(*((LLFolderView*)root)->getFilter());
-}
-
-// This function is called when the folder view is dirty. It's
-// implemented here but called by derived classes when folding the
-// views.
-void LLFolderViewItem::arrangeFromRoot()
-{
- LLFolderViewItem* root = getRoot();
-
- S32 height = 0;
- S32 width = 0;
- root->arrange( &width, &height, 0 );
-}
-
-// This function clears the currently selected item, and records the
-// specified selected item appropriately for display and use in the
-// UI. If open is TRUE, then folders are opened up along the way to
-// the selection.
-void LLFolderViewItem::setSelectionFromRoot(LLFolderViewItem* selection,
- BOOL openitem,
- BOOL take_keyboard_focus)
-{
- getRoot()->setSelection(selection, openitem, take_keyboard_focus);
-}
-
-// helper function to change the selection from the root.
-void LLFolderViewItem::changeSelectionFromRoot(LLFolderViewItem* selection, BOOL selected)
-{
- getRoot()->changeSelection(selection, selected);
-}
-
-void LLFolderViewItem::extendSelectionFromRoot(LLFolderViewItem* selection)
-{
- LLDynamicArray<LLFolderViewItem*> selected_items;
-
- getRoot()->extendSelection(selection, NULL, selected_items);
-}
-
-EInventorySortGroup LLFolderViewItem::getSortGroup() const
-{
- return SG_ITEM;
-}
-
-// addToFolder() returns TRUE if it succeeds. FALSE otherwise
-BOOL LLFolderViewItem::addToFolder(LLFolderViewFolder* folder, LLFolderView* root)
-{
- if (!folder)
- {
- return FALSE;
- }
- mParentFolder = folder;
- root->addItemID(getListener()->getUUID(), this);
- return folder->addItem(this);
-}
-
-
-// Finds width and height of this object and it's children. Also
-// makes sure that this view and it's children are the right size.
-S32 LLFolderViewItem::arrange( S32* width, S32* height, S32 filter_generation)
-{
- mIndentation = mParentFolder ? mParentFolder->getIndentation() + LEFT_INDENTATION : 0;
- if (mLabelWidthDirty)
- {
- mLabelWidth = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + sFont->getWidth(mSearchableLabel);
- mLabelWidthDirty = false;
- }
-
- *width = llmax(*width, mLabelWidth + mIndentation);
- *height = getItemHeight();
- return *height;
-}
-
-S32 LLFolderViewItem::getItemHeight()
-{
- S32 icon_height = mIcon->getHeight();
- S32 label_height = llround(sFont->getLineHeight());
- return llmax( icon_height, label_height ) + ICON_PAD;
-}
-
-void LLFolderViewItem::filter( LLInventoryFilter& filter)
-{
- BOOL filtered = mListener && filter.check(this);
-
- // if our visibility will change as a result of this filter, then
- // we need to be rearranged in our parent folder
- if (getVisible() != filtered)
- {
- if (mParentFolder)
- {
- mParentFolder->requestArrange();
- }
- }
-
- setFiltered(filtered, filter.getCurrentGeneration());
- mStringMatchOffset = filter.getStringMatchOffset();
- filter.decrementFilterCount();
-
- if (getRoot()->getDebugFilters())
- {
- mStatusText = llformat("%d", mLastFilterGeneration);
- }
-}
-
-void LLFolderViewItem::dirtyFilter()
-{
- mLastFilterGeneration = -1;
- // bubble up dirty flag all the way to root
- if (getParentFolder())
- {
- getParentFolder()->setCompletedFilterGeneration(-1, TRUE);
- }
-}
-
-// *TODO: This can be optimized a lot by simply recording that it is
-// selected in the appropriate places, and assuming that set selection
-// means 'deselect' for a leaf item. Do this optimization after
-// multiple selection is implemented to make sure it all plays nice
-// together.
-BOOL LLFolderViewItem::setSelection(LLFolderViewItem* selection, BOOL openitem, BOOL take_keyboard_focus)
-{
- if( selection == this )
- {
- mIsSelected = TRUE;
- if(mListener)
- {
- mListener->selectItem();
- }
- }
- else
- {
- mIsSelected = FALSE;
- }
- return mIsSelected;
-}
-
-BOOL LLFolderViewItem::changeSelection(LLFolderViewItem* selection, BOOL selected)
-{
- if(selection == this && mIsSelected != selected)
- {
- mIsSelected = selected;
- if(mListener)
- {
- mListener->selectItem();
- }
- return TRUE;
- }
- return FALSE;
-}
-
-void LLFolderViewItem::recursiveDeselect(BOOL deselect_self)
-{
- if (mIsSelected && deselect_self)
- {
- mIsSelected = FALSE;
-
- // update ancestors' count of selected descendents
- LLFolderViewFolder* parent_folder = getParentFolder();
- while(parent_folder)
- {
- parent_folder->mNumDescendantsSelected--;
- parent_folder = parent_folder->getParentFolder();
- }
- }
-}
-
-
-BOOL LLFolderViewItem::isMovable()
-{
- if( mListener )
- {
- return mListener->isItemMovable();
- }
- else
- {
- return TRUE;
- }
-}
-
-BOOL LLFolderViewItem::isRemovable()
-{
- if( mListener )
- {
- return mListener->isItemRemovable();
- }
- else
- {
- return TRUE;
- }
-}
-
-void LLFolderViewItem::destroyView()
-{
- if (mParentFolder)
- {
- // removeView deletes me
- mParentFolder->removeView(this);
- }
-}
-
-// Call through to the viewed object and return true if it can be
-// removed.
-//BOOL LLFolderViewItem::removeRecursively(BOOL single_item)
-BOOL LLFolderViewItem::remove()
-{
- if(!isRemovable())
- {
- return FALSE;
- }
- if(mListener)
- {
- return mListener->removeItem();
- }
- return TRUE;
-}
-
-// Build an appropriate context menu for the item.
-void LLFolderViewItem::buildContextMenu(LLMenuGL& menu, U32 flags)
-{
- if(mListener)
- {
- mListener->buildContextMenu(menu, flags);
- }
-}
-
-void LLFolderViewItem::openItem( void )
-{
- if( mListener )
- {
- mListener->openItem();
- }
-}
-
-void LLFolderViewItem::preview( void )
-{
- if (mListener)
- {
- mListener->previewItem();
- }
-}
-
-void LLFolderViewItem::rename(const std::string& new_name)
-{
- if( !new_name.empty() )
- {
- if( mListener )
- {
- mListener->renameItem(new_name);
-
- if(mParentFolder)
- {
- mParentFolder->requestSort();
- }
- }
- }
-}
-
-const std::string& LLFolderViewItem::getSearchableLabel() const
-{
- return mSearchableLabel;
-}
-
-const std::string& LLFolderViewItem::getName( void ) const
-{
- if(mListener)
- {
- return mListener->getName();
- }
- return mLabel;
-}
-
-// LLView functionality
-BOOL LLFolderViewItem::handleRightMouseDown( S32 x, S32 y, MASK mask )
-{
- if(!mIsSelected)
- {
- setSelectionFromRoot(this, FALSE);
- }
- make_ui_sound("UISndClick");
- return TRUE;
-}
-
-BOOL LLFolderViewItem::handleMouseDown( S32 x, S32 y, MASK mask )
-{
- // No handler needed for focus lost since this class has no
- // state that depends on it.
- gFocusMgr.setMouseCapture( this );
-
- if (!mIsSelected)
- {
- if(mask & MASK_CONTROL)
- {
- changeSelectionFromRoot(this, !mIsSelected);
- }
- else if (mask & MASK_SHIFT)
- {
- extendSelectionFromRoot(this);
- }
- else
- {
- setSelectionFromRoot(this, FALSE);
- }
- make_ui_sound("UISndClick");
- }
- else
- {
- mSelectPending = TRUE;
- }
-
- if( isMovable() )
- {
- S32 screen_x;
- S32 screen_y;
- localPointToScreen(x, y, &screen_x, &screen_y );
- LLToolDragAndDrop::getInstance()->setDragStart( screen_x, screen_y );
- }
- return TRUE;
-}
-
-BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask )
-{
- if( hasMouseCapture() && isMovable() )
- {
- S32 screen_x;
- S32 screen_y;
- localPointToScreen(x, y, &screen_x, &screen_y );
- BOOL can_drag = TRUE;
- if( LLToolDragAndDrop::getInstance()->isOverThreshold( screen_x, screen_y ) )
- {
- LLFolderView* root = getRoot();
-
- if(root->getCurSelectedItem())
- {
- LLToolDragAndDrop::ESource src = LLToolDragAndDrop::SOURCE_WORLD;
-
- // *TODO: push this into listener and remove
- // dependency on llagent
- if(mListener && gInventory.isObjectDescendentOf(mListener->getUUID(), gAgent.getInventoryRootID()))
- {
- src = LLToolDragAndDrop::SOURCE_AGENT;
- }
- else if (mListener && gInventory.isObjectDescendentOf(mListener->getUUID(), gInventoryLibraryRoot))
- {
- src = LLToolDragAndDrop::SOURCE_LIBRARY;
- }
-
- can_drag = root->startDrag(src);
- if (can_drag)
- {
- // if (mListener) mListener->startDrag();
- // RN: when starting drag and drop, clear out last auto-open
- root->autoOpenTest(NULL);
- root->setShowSelectionContext(TRUE);
-
- // Release keyboard focus, so that if stuff is dropped into the
- // world, pressing the delete key won't blow away the inventory
- // item.
- gFocusMgr.setKeyboardFocus(NULL);
-
- return LLToolDragAndDrop::getInstance()->handleHover( x, y, mask );
- }
- }
- }
-
- if (can_drag)
- {
- gViewerWindow->setCursor(UI_CURSOR_ARROW);
- }
- else
- {
- gViewerWindow->setCursor(UI_CURSOR_NOLOCKED);
- }
- return TRUE;
- }
- else
- {
- getRoot()->setShowSelectionContext(FALSE);
- gViewerWindow->setCursor(UI_CURSOR_ARROW);
- // let parent handle this then...
- return FALSE;
- }
-}
-
-
-BOOL LLFolderViewItem::handleDoubleClick( S32 x, S32 y, MASK mask )
-{
- preview();
- return TRUE;
-}
-
-BOOL LLFolderViewItem::handleScrollWheel(S32 x, S32 y, S32 clicks)
-{
- if (getParent())
- {
- return getParent()->handleScrollWheel(x, y, clicks);
- }
- return FALSE;
-}
-
-BOOL LLFolderViewItem::handleMouseUp( S32 x, S32 y, MASK mask )
-{
- // if mouse hasn't moved since mouse down...
- if ( pointInView(x, y) && mSelectPending )
- {
- //...then select
- if(mask & MASK_CONTROL)
- {
- changeSelectionFromRoot(this, !mIsSelected);
- }
- else if (mask & MASK_SHIFT)
- {
- extendSelectionFromRoot(this);
- }
- else
- {
- setSelectionFromRoot(this, FALSE);
- }
- }
-
- mSelectPending = FALSE;
-
- if( hasMouseCapture() )
- {
- getRoot()->setShowSelectionContext(FALSE);
- gFocusMgr.setMouseCapture( NULL );
- }
- return TRUE;
-}
-
-BOOL LLFolderViewItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
- EDragAndDropType cargo_type,
- void* cargo_data,
- EAcceptance* accept,
- std::string& tooltip_msg)
-{
- BOOL accepted = FALSE;
- BOOL handled = FALSE;
- if(mListener)
- {
- accepted = mListener->dragOrDrop(mask,drop,cargo_type,cargo_data);
- handled = accepted;
- if (accepted)
- {
- mDragAndDropTarget = TRUE;
- *accept = ACCEPT_YES_MULTI;
- }
- else
- {
- *accept = ACCEPT_NO;
- }
- }
- if(mParentFolder && !handled)
- {
- handled = mParentFolder->handleDragAndDropFromChild(mask,drop,cargo_type,cargo_data,accept,tooltip_msg);
- }
- if (handled)
- {
- lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLFolderViewItem" << llendl;
- }
-
- return handled;
-}
-
-
-void LLFolderViewItem::draw()
-{
- static LLCachedControl<LLColor4> sFgColor(gSavedSkinSettings, "MenuItemEnabledColor", DEFAULT_WHITE);
- static LLCachedControl<LLColor4> sHighlightBgColor(gSavedSkinSettings, "MenuItemHighlightBgColor", DEFAULT_WHITE);
- static LLCachedControl<LLColor4> sHighlightFgColor(gSavedSkinSettings, "MenuItemHighlightFgColor", DEFAULT_WHITE);
- static LLCachedControl<LLColor4> sFilterBGColor(gSavedSkinSettings, "FilterBackgroundColor", DEFAULT_WHITE);
- static LLCachedControl<LLColor4> sFilterTextColor(gSavedSkinSettings, "FilterTextColor", DEFAULT_WHITE);
- static LLCachedControl<LLColor4> sSuffixColor(gSavedSkinSettings, "InventoryItemSuffixColor", DEFAULT_WHITE);
- static LLCachedControl<LLColor4> sSearchStatusColor(gSavedSkinSettings, "InventorySearchStatusColor", DEFAULT_WHITE);
-
- bool possibly_has_children = false;
- bool up_to_date = mListener && mListener->isUpToDate();
- if((up_to_date && hasVisibleChildren() ) || // we fetched our children and some of them have passed the filter...
- (!up_to_date && mListener && mListener->hasChildren())) // ...or we know we have children but haven't fetched them (doesn't obey filter)
- {
- possibly_has_children = true;
- }
- if(/*mControlLabel[0] != '\0' && */possibly_has_children)
- {
- if (sArrowImage)
- {
- gl_draw_scaled_rotated_image(mIndentation, getRect().getHeight() - ARROW_SIZE - TEXT_PAD,
- ARROW_SIZE, ARROW_SIZE, mControlLabelRotation, sArrowImage->getImage(), sFgColor);
- }
- }
-
- F32 text_left = (F32)(ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + mIndentation);
-
- // If we have keyboard focus, draw selection filled
- BOOL show_context = getRoot()->getShowSelectionContext();
- BOOL filled = show_context || (getRoot()->getParentPanel()->hasFocus());
-
- // always render "current" item, only render other selected items if
- // mShowSingleSelection is FALSE
- if( mIsSelected )
- {
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- LLColor4 bg_color = sHighlightBgColor;
- //const S32 TRAILING_PAD = 5; // It just looks better with this.
- if (!mIsCurSelection)
- {
- // do time-based fade of extra objects
- F32 fade_time = getRoot()->getSelectionFadeElapsedTime();
- if (getRoot()->getShowSingleSelection())
- {
- // fading out
- bg_color.mV[VALPHA] = clamp_rescale(fade_time, 0.f, 0.4f, bg_color.mV[VALPHA], 0.f);
- }
- else
- {
- // fading in
- bg_color.mV[VALPHA] = clamp_rescale(fade_time, 0.f, 0.4f, 0.f, bg_color.mV[VALPHA]);
- }
- }
-
- gl_rect_2d(
- 0,
- getRect().getHeight(),
- getRect().getWidth() - 2,
- llfloor(getRect().getHeight() - sFont->getLineHeight() - ICON_PAD),
- bg_color, filled);
- if (mIsCurSelection)
- {
- gl_rect_2d(
- 0,
- getRect().getHeight(),
- getRect().getWidth() - 2,
- llfloor(getRect().getHeight() - sFont->getLineHeight() - ICON_PAD),
- sHighlightFgColor, FALSE);
- }
- if (getRect().getHeight() > llround(sFont->getLineHeight()) + ICON_PAD + 2)
- {
- gl_rect_2d(
- 0,
- llfloor(getRect().getHeight() - sFont->getLineHeight() - ICON_PAD) - 2,
- getRect().getWidth() - 2,
- 2,
- sHighlightFgColor, FALSE);
- if (show_context)
- {
- gl_rect_2d(
- 0,
- llfloor(getRect().getHeight() - sFont->getLineHeight() - ICON_PAD) - 2,
- getRect().getWidth() - 2,
- 2,
- sHighlightBgColor, TRUE);
- }
- }
- }
- if (mDragAndDropTarget)
- {
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- gl_rect_2d(
- 0,
- getRect().getHeight(),
- getRect().getWidth() - 2,
- llfloor(getRect().getHeight() - sFont->getLineHeight() - ICON_PAD),
- sHighlightBgColor, FALSE);
-
- if (getRect().getHeight() > llround(sFont->getLineHeight()) + ICON_PAD + 2)
- {
- gl_rect_2d(
- 0,
- llfloor(getRect().getHeight() - sFont->getLineHeight() - ICON_PAD) - 2,
- getRect().getWidth() - 2,
- 2,
- sHighlightBgColor, FALSE);
- }
- mDragAndDropTarget = FALSE;
- }
-
-
- if(mIcon)
- {
- mIcon->draw(mIndentation + ARROW_SIZE + TEXT_PAD, getRect().getHeight() - mIcon->getHeight());
- }
-
- if (!mLabel.empty())
- {
- // highlight filtered text
- BOOL debug_filters = getRoot()->getDebugFilters();
- LLColor4 color = ( (mIsSelected && filled) ? sHighlightFgColor : sFgColor );
- F32 right_x;
- F32 y = (F32)getRect().getHeight() - sFont->getLineHeight() - (F32)TEXT_PAD;
-
- if (debug_filters)
- {
- if (!getFiltered() && !possibly_has_children)
- {
- color.mV[VALPHA] *= 0.5f;
- }
-
- LLColor4 filter_color = mLastFilterGeneration >= getRoot()->getFilter()->getCurrentGeneration() ? LLColor4(0.5f, 0.8f, 0.5f, 1.f) : LLColor4(0.8f, 0.5f, 0.5f, 1.f);
- sSmallFont->renderUTF8(mStatusText, 0, text_left, y, filter_color,
- LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
- S32_MAX, S32_MAX, &right_x, FALSE );
- text_left = right_x;
- }
-
-
- if ( mIsLoading && mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime") )
- {
- sFont->renderUTF8(LLTrans::getString("LoadingData"), 0, text_left, y, sSearchStatusColor,
- LLFontGL::LEFT, LLFontGL::BOTTOM, mLabelStyle, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, &right_x, FALSE);
- text_left = right_x;
- }
-
- sFont->renderUTF8( mLabel, 0, text_left, y, color,
- LLFontGL::LEFT, LLFontGL::BOTTOM, mLabelStyle, LLFontGL::NO_SHADOW,
- S32_MAX, S32_MAX, &right_x, FALSE );
- if (!mLabelSuffix.empty())
- {
- sFont->renderUTF8( mLabelSuffix, 0, right_x, y, sSuffixColor,
- LLFontGL::LEFT, LLFontGL::BOTTOM, mLabelStyle, LLFontGL::NO_SHADOW,
- S32_MAX, S32_MAX, &right_x, FALSE );
- }
-
- if (sBoxImage.notNull() && mStringMatchOffset != std::string::npos)
- {
- // don't draw backgrounds for zero-length strings
- S32 filter_string_length = getRoot()->getFilterSubString().size();
- if (filter_string_length > 0)
- {
- std::string combined_string = mLabel + mLabelSuffix;
- S32 left = llround(text_left) + sFont->getWidth(combined_string, 0, mStringMatchOffset) - 1;
- S32 right = left + sFont->getWidth(combined_string, mStringMatchOffset, filter_string_length) + 2;
- S32 bottom = llfloor(getRect().getHeight() - sFont->getLineHeight() - 3);
- S32 top = getRect().getHeight();
-
- LLRect box_rect(left, top, right, bottom);
- sBoxImage->draw(box_rect, sFilterBGColor);
- F32 match_string_left = text_left + sFont->getWidthF32(combined_string, 0, mStringMatchOffset);
- F32 y = (F32)getRect().getHeight() - sFont->getLineHeight() - (F32)TEXT_PAD;
- sFont->renderUTF8( combined_string, mStringMatchOffset, match_string_left, y,
- sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, mLabelStyle, LLFontGL::NO_SHADOW,
- filter_string_length, S32_MAX, &right_x, FALSE );
- }
- }
- }
-
- if( sDebugRects )
- {
- drawDebugRect();
- }
-
- //// *HACK: also draw debug rectangles around currently-being-edited LLView, and any elements that are being highlighted by GUI preview code (see LLFloaterUIPreview)
- //std::set<LLView*>::iterator iter = std::find(sPreviewHighlightedElements.begin(), sPreviewHighlightedElements.end(), this);
- //if ((sEditingUI && this == sEditingUIView) || (iter != sPreviewHighlightedElements.end() && sDrawPreviewHighlights))
- //{
- // drawDebugRect();
- //}
-}
-
-
-///----------------------------------------------------------------------------
-/// Class LLFolderViewFolder
-///----------------------------------------------------------------------------
-
-LLFolderViewFolder::LLFolderViewFolder( const LLFolderViewItem::Params& p ):
- LLFolderViewItem( p ), // 0 = no create time
- mIsOpen(FALSE),
- mExpanderHighlighted(FALSE),
- mCurHeight(0.f),
- mTargetHeight(0.f),
- mAutoOpenCountdown(0.f),
- mSubtreeCreationDate(0),
- mAmTrash(LLFolderViewFolder::UNKNOWN),
- mLastArrangeGeneration( -1 ),
- mLastCalculatedWidth(0),
- mCompletedFilterGeneration(-1),
- mMostFilteredDescendantGeneration(-1),
- mNeedsSort(false)
-{}
-
-// Destroys the object
-LLFolderViewFolder::~LLFolderViewFolder( void )
-{
- // The LLView base class takes care of object destruction. make sure that we
- // don't have mouse or keyboard focus
- gFocusMgr.releaseFocusIfNeeded( this ); // calls onCommit()
-}
-
-// addToFolder() returns TRUE if it succeeds. FALSE otherwise
-BOOL LLFolderViewFolder::addToFolder(LLFolderViewFolder* folder, LLFolderView* root)
-{
- if (!folder)
- {
- return FALSE;
- }
- mParentFolder = folder;
- root->addItemID(getListener()->getUUID(), this);
- return folder->addFolder(this);
-}
-
-// Finds width and height of this object and it's children. Also
-// makes sure that this view and it's children are the right size.
-S32 LLFolderViewFolder::arrange( S32* width, S32* height, S32 filter_generation)
-{
- // sort before laying out contents
- if (mNeedsSort)
- {
- mFolders.sort(mSortFunction);
- mItems.sort(mSortFunction);
- mNeedsSort = false;
- }
-
- mHasVisibleChildren = hasFilteredDescendants(filter_generation);
-
- LLInventoryFilter::EFolderShow show_folder_state = getRoot()->getShowFolderState();
-
- // calculate height as a single item (without any children), and reshapes rectangle to match
- LLFolderViewItem::arrange( width, height, filter_generation );
-
- // clamp existing animated height so as to never get smaller than a single item
- mCurHeight = llmax((F32)*height, mCurHeight);
-
- // initialize running height value as height of single item in case we have no children
- *height = getItemHeight();
- F32 running_height = (F32)*height;
- F32 target_height = (F32)*height;
-
- // are my children visible?
- if (needsArrange())
- {
- // set last arrange generation first, in case children are animating
- // and need to be arranged again
- mLastArrangeGeneration = getRoot()->getArrangeGeneration();
- if (mIsOpen)
- {
- // Add sizes of children
- S32 parent_item_height = getRect().getHeight();
-
- for(folders_t::iterator fit = mFolders.begin(); fit != mFolders.end(); ++fit)
- {
- LLFolderViewFolder* folderp = (*fit);
- if (getRoot()->getDebugFilters())
- {
- folderp->setVisible(TRUE);
- }
- else
- {
- folderp->setVisible(show_folder_state == LLInventoryFilter::SHOW_ALL_FOLDERS || // always show folders?
- (folderp->getFiltered(filter_generation) || folderp->hasFilteredDescendants(filter_generation))); // passed filter or has descendants that passed filter
- }
-
- if (folderp->getVisible())
- {
- S32 child_width = *width;
- S32 child_height = 0;
- S32 child_top = parent_item_height - llround(running_height);
-
- target_height += folderp->arrange( &child_width, &child_height, filter_generation );
-
- running_height += (F32)child_height;
- *width = llmax(*width, child_width);
- folderp->setOrigin( 0, child_top - folderp->getRect().getHeight() );
- }
- }
- for(items_t::iterator iit = mItems.begin();
- iit != mItems.end(); ++iit)
- {
- LLFolderViewItem* itemp = (*iit);
- if (getRoot()->getDebugFilters())
- {
- itemp->setVisible(TRUE);
- }
- else
- {
- itemp->setVisible(itemp->getFiltered(filter_generation));
- }
-
- if (itemp->getVisible())
- {
- S32 child_width = *width;
- S32 child_height = 0;
- S32 child_top = parent_item_height - llround(running_height);
-
- target_height += itemp->arrange( &child_width, &child_height, filter_generation );
- // don't change width, as this item is as wide as its parent folder by construction
- itemp->reshape( itemp->getRect().getWidth(), child_height);
-
- running_height += (F32)child_height;
- *width = llmax(*width, child_width);
- itemp->setOrigin( 0, child_top - itemp->getRect().getHeight() );
- }
- }
- }
-
- mTargetHeight = target_height;
- // cache this width so next time we can just return it
- mLastCalculatedWidth = *width;
- }
- else
- {
- // just use existing width
- *width = mLastCalculatedWidth;
- }
-
- // animate current height towards target height
- if (llabs(mCurHeight - mTargetHeight) > 1.f)
- {
- mCurHeight = lerp(mCurHeight, mTargetHeight, LLCriticalDamp::getInterpolant(mIsOpen ? FOLDER_OPEN_TIME_CONSTANT : FOLDER_CLOSE_TIME_CONSTANT));
-
- requestArrange();
-
- // hide child elements that fall out of current animated height
- for (folders_t::iterator iter = mFolders.begin();
- iter != mFolders.end();)
- {
- folders_t::iterator fit = iter++;
- // number of pixels that bottom of folder label is from top of parent folder
- if (getRect().getHeight() - (*fit)->getRect().mTop + (*fit)->getItemHeight()
- > llround(mCurHeight) + MAX_FOLDER_ITEM_OVERLAP)
- {
- // hide if beyond current folder height
- (*fit)->setVisible(FALSE);
- }
- }
-
- for (items_t::iterator iter = mItems.begin();
- iter != mItems.end();)
- {
- items_t::iterator iit = iter++;
- // number of pixels that bottom of item label is from top of parent folder
- if (getRect().getHeight() - (*iit)->getRect().mBottom
- > llround(mCurHeight) + MAX_FOLDER_ITEM_OVERLAP)
- {
- (*iit)->setVisible(FALSE);
- }
- }
- }
- else
- {
- mCurHeight = mTargetHeight;
- }
-
- // don't change width as this item is already as wide as its parent folder
- reshape(getRect().getWidth(),llround(mCurHeight));
-
- // pass current height value back to parent
- *height = llround(mCurHeight);
-
- return llround(mTargetHeight);
-}
-
-BOOL LLFolderViewFolder::needsArrange()
-{
- return mLastArrangeGeneration < getRoot()->getArrangeGeneration();
-}
-
-void LLFolderViewFolder::requestSort()
-{
- mNeedsSort = true;
- // whenever item order changes, we need to lay things out again
- requestArrange();
-}
-
-void LLFolderViewFolder::setCompletedFilterGeneration(S32 generation, BOOL recurse_up)
-{
- mMostFilteredDescendantGeneration = llmin(mMostFilteredDescendantGeneration, generation);
- mCompletedFilterGeneration = generation;
- // only aggregate up if we are a lower (older) value
- if (recurse_up && mParentFolder && generation < mParentFolder->getCompletedFilterGeneration())
- {
- mParentFolder->setCompletedFilterGeneration(generation, TRUE);
- }
-}
-
-void LLFolderViewFolder::filter( LLInventoryFilter& filter)
-{
- S32 filter_generation = filter.getCurrentGeneration();
- // if failed to pass filter newer than must_pass_generation
- // you will automatically fail this time, so we only
- // check against items that have passed the filter
- S32 must_pass_generation = filter.getMustPassGeneration();
-
- // if we have already been filtered against this generation, skip out
- if (getCompletedFilterGeneration() >= filter_generation)
- {
- return;
- }
-
- // filter folder itself
- if (getLastFilterGeneration() < filter_generation)
- {
- if (getLastFilterGeneration() >= must_pass_generation && // folder has been compared to a valid precursor filter
- !mFiltered) // and did not pass the filter
- {
- // go ahead and flag this folder as done
- mLastFilterGeneration = filter_generation;
- }
- else
- {
- // filter self only on first pass through
- LLFolderViewItem::filter( filter );
- }
- }
-
- if (getRoot()->getDebugFilters())
- {
- mStatusText = llformat("%d", mLastFilterGeneration);
- mStatusText += llformat("(%d)", mCompletedFilterGeneration);
- mStatusText += llformat("+%d", mMostFilteredDescendantGeneration);
- }
-
- // all descendants have been filtered later than must pass generation
- // but none passed
- if(getCompletedFilterGeneration() >= must_pass_generation && !hasFilteredDescendants(must_pass_generation))
- {
- // don't traverse children if we've already filtered them since must_pass_generation
- // and came back with nothing
- return;
- }
-
- // we entered here with at least one filter iteration left
- // check to see if we have any more before continuing on to children
- if (filter.getFilterCount() < 0)
- {
- return;
- }
-
- // when applying a filter, matching folders get their contents downloaded first
- if (filter.isNotDefault() && getFiltered(filter.getMinRequiredGeneration()) && (mListener && !gInventory.isCategoryComplete(mListener->getUUID())))
- {
- gInventory.startBackgroundFetch(mListener->getUUID());
- }
-
- // now query children
- for (folders_t::iterator iter = mFolders.begin();
- iter != mFolders.end();)
- {
- folders_t::iterator fit = iter++;
- // have we run out of iterations this frame?
- if (filter.getFilterCount() < 0)
- {
- break;
- }
-
- // mMostFilteredDescendantGeneration might have been reset
- // in which case we need to update it even for folders that
- // don't need to be filtered anymore
- if ((*fit)->getCompletedFilterGeneration() >= filter_generation)
- {
- // track latest generation to pass any child items
- if ((*fit)->getFiltered() || (*fit)->hasFilteredDescendants(filter.getMinRequiredGeneration()))
- {
- mMostFilteredDescendantGeneration = filter_generation;
- if (getRoot()->needsAutoSelect())
- {
- (*fit)->setOpenArrangeRecursively(TRUE);
- }
- }
- // just skip it, it has already been filtered
- continue;
- }
-
- // update this folders filter status (and children)
- (*fit)->filter( filter );
-
- // track latest generation to pass any child items
- if ((*fit)->getFiltered() || (*fit)->hasFilteredDescendants(filter_generation))
- {
- mMostFilteredDescendantGeneration = filter_generation;
- if (getRoot()->needsAutoSelect())
- {
- (*fit)->setOpenArrangeRecursively(TRUE);
- }
- }
- }
-
- for (items_t::iterator iter = mItems.begin();
- iter != mItems.end();)
- {
- items_t::iterator iit = iter++;
- if (filter.getFilterCount() < 0)
- {
- break;
- }
- if ((*iit)->getLastFilterGeneration() >= filter_generation)
- {
- if ((*iit)->getFiltered())
- {
- mMostFilteredDescendantGeneration = filter_generation;
- }
- continue;
- }
-
- if ((*iit)->getLastFilterGeneration() >= must_pass_generation &&
- !(*iit)->getFiltered(must_pass_generation))
- {
- // failed to pass an earlier filter that was a subset of the current one
- // go ahead and flag this item as done
- (*iit)->setFiltered(FALSE, filter_generation);
- continue;
- }
-
- (*iit)->filter( filter );
-
- if ((*iit)->getFiltered(filter.getMinRequiredGeneration()))
- {
- mMostFilteredDescendantGeneration = filter_generation;
- }
- }
-
- // if we didn't use all filter iterations
- // that means we filtered all of our descendants
- // instead of exhausting the filter count for this frame
- if (filter.getFilterCount() > 0)
- {
- // flag this folder as having completed filter pass for all descendants
- setCompletedFilterGeneration(filter_generation, FALSE/*dont recurse up to root*/);
- }
-}
-
-void LLFolderViewFolder::setFiltered(BOOL filtered, S32 filter_generation)
-{
- // if this folder is now filtered, but wasn't before
- // (it just passed)
- if (filtered && !mFiltered)
- {
- // reset current height, because last time we drew it
- // it might have had more visible items than now
- mCurHeight = 0.f;
- }
-
- LLFolderViewItem::setFiltered(filtered, filter_generation);
-}
-
-void LLFolderViewFolder::dirtyFilter()
-{
- // we're a folder, so invalidate our completed generation
- setCompletedFilterGeneration(-1, FALSE);
- LLFolderViewItem::dirtyFilter();
-}
-
-BOOL LLFolderViewFolder::hasFilteredDescendants()
-{
- return mMostFilteredDescendantGeneration >= getRoot()->getFilter()->getCurrentGeneration();
-}
-
-// Passes selection information on to children and record selection
-// information if necessary.
-BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem,
- BOOL take_keyboard_focus)
-{
- BOOL rv = FALSE;
- if( selection == this )
- {
- mIsSelected = TRUE;
- if(mListener)
- {
- mListener->selectItem();
- }
- rv = TRUE;
- }
- else
- {
- mIsSelected = FALSE;
- rv = FALSE;
- }
- BOOL child_selected = FALSE;
-
- for (folders_t::iterator iter = mFolders.begin();
- iter != mFolders.end();)
- {
- folders_t::iterator fit = iter++;
- if((*fit)->setSelection(selection, openitem, take_keyboard_focus))
- {
- rv = TRUE;
- child_selected = TRUE;
- mNumDescendantsSelected++;
- }
- }
- for (items_t::iterator iter = mItems.begin();
- iter != mItems.end();)
- {
- items_t::iterator iit = iter++;
- if((*iit)->setSelection(selection, openitem, take_keyboard_focus))
- {
- rv = TRUE;
- child_selected = TRUE;
- mNumDescendantsSelected++;
- }
- }
- if(openitem && child_selected)
- {
- setOpenArrangeRecursively(TRUE);
- }
- return rv;
-}
-
-// This method is used to change the selection of an item. If
-// selection is 'this', then note selection as true. Returns TRUE
-// if this or a child is now selected.
-BOOL LLFolderViewFolder::changeSelection(LLFolderViewItem* selection,
- BOOL selected)
-{
- BOOL rv = FALSE;
- if(selection == this)
- {
- mIsSelected = selected;
- if(mListener && selected)
- {
- mListener->selectItem();
- }
- rv = TRUE;
- }
-
- for (folders_t::iterator iter = mFolders.begin();
- iter != mFolders.end();)
- {
- folders_t::iterator fit = iter++;
- if((*fit)->changeSelection(selection, selected))
- {
- if (selected)
- {
- mNumDescendantsSelected++;
- }
- else
- {
- mNumDescendantsSelected--;
- }
- rv = TRUE;
- }
- }
- for (items_t::iterator iter = mItems.begin();
- iter != mItems.end();)
- {
- items_t::iterator iit = iter++;
- if((*iit)->changeSelection(selection, selected))
- {
- if (selected)
- {
- mNumDescendantsSelected++;
- }
- else
- {
- mNumDescendantsSelected--;
- }
- rv = TRUE;
- }
- }
- return rv;
-}
-
-S32 LLFolderViewFolder::extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& selected_items)
-{
- S32 num_selected = 0;
-
- // pass on to child folders first
- for (folders_t::iterator iter = mFolders.begin();
- iter != mFolders.end();)
- {
- folders_t::iterator fit = iter++;
- num_selected += (*fit)->extendSelection(selection, last_selected, selected_items);
- mNumDescendantsSelected += num_selected;
- }
-
- // handle selection of our immediate children...
- BOOL reverse_select = FALSE;
- BOOL found_last_selected = FALSE;
- BOOL found_selection = FALSE;
- LLDynamicArray<LLFolderViewItem*> items_to_select;
- LLFolderViewItem* item;
-
- //...folders first...
- for (folders_t::iterator iter = mFolders.begin();
- iter != mFolders.end();)
- {
- folders_t::iterator fit = iter++;
- item = (*fit);
- if(item == selection)
- {
- found_selection = TRUE;
- }
- else if (item == last_selected)
- {
- found_last_selected = TRUE;
- if (found_selection)
- {
- reverse_select = TRUE;
- }
- }
-
- if (found_selection || found_last_selected)
- {
- // deselect currently selected items so they can be pushed back on queue
- if (item->isSelected())
- {
- item->changeSelection(item, FALSE);
- }
- items_to_select.put(item);
- }
-
- if (found_selection && found_last_selected)
- {
- break;
- }
- }
-
- if (!(found_selection && found_last_selected))
- {
- //,,,then items
- for (items_t::iterator iter = mItems.begin();
- iter != mItems.end();)
- {
- items_t::iterator iit = iter++;
- item = (*iit);
- if(item == selection)
- {
- found_selection = TRUE;
- }
- else if (item == last_selected)
- {
- found_last_selected = TRUE;
- if (found_selection)
- {
- reverse_select = TRUE;
- }
- }
-
- if (found_selection || found_last_selected)
- {
- // deselect currently selected items so they can be pushed back on queue
- if (item->isSelected())
- {
- item->changeSelection(item, FALSE);
- }
- items_to_select.put(item);
- }
-
- if (found_selection && found_last_selected)
- {
- break;
- }
- }
- }
-
- if (found_last_selected && found_selection)
- {
- // we have a complete selection inside this folder
- for (S32 index = reverse_select ? items_to_select.getLength() - 1 : 0;
- reverse_select ? index >= 0 : index < items_to_select.getLength(); reverse_select ? index-- : index++)
- {
- LLFolderViewItem* item = items_to_select[index];
- if (item->changeSelection(item, TRUE))
- {
- selected_items.put(item);
- mNumDescendantsSelected++;
- num_selected++;
- }
- }
- }
- else if (found_selection)
- {
- // last selection was not in this folder....go ahead and select just the new item
- if (selection->changeSelection(selection, TRUE))
- {
- selected_items.put(selection);
- mNumDescendantsSelected++;
- num_selected++;
- }
- }
-
- return num_selected;
-}
-
-void LLFolderViewFolder::recursiveDeselect(BOOL deselect_self)
-{
- // make sure we don't have negative values
- llassert(mNumDescendantsSelected >= 0);
-
- if (mIsSelected && deselect_self)
- {
- mIsSelected = FALSE;
-
- // update ancestors' count of selected descendents
- LLFolderViewFolder* parent_folder = getParentFolder();
- while(parent_folder)
- {
- parent_folder->mNumDescendantsSelected--;
- parent_folder = parent_folder->getParentFolder();
- }
- }
-
- if (0 == mNumDescendantsSelected)
- {
- return;
- }
-
- for (items_t::iterator iter = mItems.begin();
- iter != mItems.end();)
- {
- items_t::iterator iit = iter++;
- LLFolderViewItem* item = (*iit);
- item->recursiveDeselect(TRUE);
- }
-
- for (folders_t::iterator iter = mFolders.begin();
- iter != mFolders.end();)
- {
- folders_t::iterator fit = iter++;
- LLFolderViewFolder* folder = (*fit);
- folder->recursiveDeselect(TRUE);
- }
-
-}
-
-void LLFolderViewFolder::destroyView()
-{
- for (items_t::iterator iter = mItems.begin();
- iter != mItems.end();)
- {
- items_t::iterator iit = iter++;
- LLFolderViewItem* item = (*iit);
- getRoot()->removeItemID(item->getListener()->getUUID());
- }
-
- std::for_each(mItems.begin(), mItems.end(), DeletePointer());
- mItems.clear();
-
- while (!mFolders.empty())
- {
- LLFolderViewFolder *folderp = mFolders.back();
- folderp->destroyView(); // removes entry from mFolders
- }
-
- deleteAllChildren();
-
- if (mParentFolder)
- {
- mParentFolder->removeView(this);
- }
-}
-
-// remove the specified item (and any children) if possible. Return
-// TRUE if the item was deleted.
-BOOL LLFolderViewFolder::removeItem(LLFolderViewItem* item)
-{
- if(item->remove())
- {
- //RN: this seem unneccessary as remove() moves to trash
- //removeView(item);
- return TRUE;
- }
- return FALSE;
-}
-
-// simply remove the view (and any children) Don't bother telling the
-// listeners.
-void LLFolderViewFolder::removeView(LLFolderViewItem* item)
-{
- if (!item || item->getParentFolder() != this)
- {
- return;
- }
- // deselect without traversing hierarchy
- item->recursiveDeselect(TRUE);
- getRoot()->removeFromSelectionList(item);
- extractItem(item);
- delete item;
-}
-
-// extractItem() removes the specified item from the folder, but
-// doesn't delete it.
-void LLFolderViewFolder::extractItem( LLFolderViewItem* item )
-{
- items_t::iterator it = std::find(mItems.begin(), mItems.end(), item);
- if(it == mItems.end())
- {
- // This is an evil downcast. However, it's only doing
- // pointer comparison to find if (which it should be ) the
- // item is in the container, so it's pretty safe.
- LLFolderViewFolder* f = reinterpret_cast<LLFolderViewFolder*>(item);
- folders_t::iterator ft;
- ft = std::find(mFolders.begin(), mFolders.end(), f);
- if(ft != mFolders.end())
- {
- mFolders.erase(ft);
- }
- }
- else
- {
- mItems.erase(it);
- }
- //item has been removed, need to update filter
- dirtyFilter();
- //because an item is going away regardless of filter status, force rearrange
- requestArrange();
- getRoot()->removeItemID(item->getListener()->getUUID());
- removeChild(item);
-}
-
-bool LLFolderViewFolder::isTrash() const
-{
- if (mAmTrash == LLFolderViewFolder::UNKNOWN)
- {
- mAmTrash = mListener->getUUID() == gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH, false) ? LLFolderViewFolder::TRASH : LLFolderViewFolder::NOT_TRASH;
- }
- return mAmTrash == LLFolderViewFolder::TRASH;
-}
-
-void LLFolderViewFolder::sortBy(U32 order)
-{
- if (!mSortFunction.updateSort(order))
- {
- // No changes.
- return;
- }
-
- // Propegate this change to sub folders
- for (folders_t::iterator iter = mFolders.begin();
- iter != mFolders.end();)
- {
- folders_t::iterator fit = iter++;
- (*fit)->sortBy(order);
- }
-
- mFolders.sort(mSortFunction);
- mItems.sort(mSortFunction);
-
- if (order & LLInventoryFilter::SO_DATE)
- {
- time_t latest = 0;
-
- if (!mItems.empty())
- {
- LLFolderViewItem* item = *(mItems.begin());
- latest = item->getCreationDate();
- }
-
- if (!mFolders.empty())
- {
- LLFolderViewFolder* folder = *(mFolders.begin());
- if (folder->getCreationDate() > latest)
- {
- latest = folder->getCreationDate();
- }
- }
- mSubtreeCreationDate = latest;
- }
-}
-
-void LLFolderViewFolder::setItemSortOrder(U32 ordering)
-{
- if (mSortFunction.updateSort(ordering))
- {
- for (folders_t::iterator iter = mFolders.begin();
- iter != mFolders.end();)
- {
- folders_t::iterator fit = iter++;
- (*fit)->setItemSortOrder(ordering);
- }
-
- mFolders.sort(mSortFunction);
- mItems.sort(mSortFunction);
- }
-}
-
-EInventorySortGroup LLFolderViewFolder::getSortGroup() const
-{
- if (isTrash())
- {
- return SG_TRASH_FOLDER;
- }
-
- // Folders that can't be moved are 'system' folders.
- if( mListener )
- {
- if( !(mListener->isItemMovable()) )
- {
- return SG_SYSTEM_FOLDER;
- }
- }
-
- return SG_NORMAL_FOLDER;
-}
-
-BOOL LLFolderViewFolder::isMovable()
-{
- if( mListener )
- {
- if( !(mListener->isItemMovable()) )
- {
- return FALSE;
- }
-
- for (items_t::iterator iter = mItems.begin();
- iter != mItems.end();)
- {
- items_t::iterator iit = iter++;
- if(!(*iit)->isMovable())
- {
- return FALSE;
- }
- }
-
- for (folders_t::iterator iter = mFolders.begin();
- iter != mFolders.end();)
- {
- folders_t::iterator fit = iter++;
- if(!(*fit)->isMovable())
- {
- return FALSE;
- }
- }
- }
- return TRUE;
-}
-
-
-BOOL LLFolderViewFolder::isRemovable()
-{
- if( mListener )
- {
- if( !(mListener->isItemRemovable()) )
- {
- return FALSE;
- }
-
- for (items_t::iterator iter = mItems.begin();
- iter != mItems.end();)
- {
- items_t::iterator iit = iter++;
- if(!(*iit)->isRemovable())
- {
- return FALSE;
- }
- }
-
- for (folders_t::iterator iter = mFolders.begin();
- iter != mFolders.end();)
- {
- folders_t::iterator fit = iter++;
- if(!(*fit)->isRemovable())
- {
- return FALSE;
- }
- }
- }
- return TRUE;
-}
-
-// this is an internal method used for adding items to folders.
-BOOL LLFolderViewFolder::addItem(LLFolderViewItem* item)
-{
- mItems.push_back(item);
- item->setRect(LLRect(0, 0, getRect().getWidth(), 0));
- item->setVisible(FALSE);
- addChild( item );
- item->dirtyFilter();
- requestArrange();
- requestSort();
- return TRUE;
-}
-
-// this is an internal method used for adding items to folders.
-BOOL LLFolderViewFolder::addFolder(LLFolderViewFolder* folder)
-{
- mFolders.push_back(folder);
- folder->setOrigin(0, 0);
- folder->reshape(getRect().getWidth(), 0);
- folder->setVisible(FALSE);
- addChild( folder );
- folder->dirtyFilter();
- // rearrange all descendants too, as our indentation level might have changed
- folder->requestArrange(TRUE);
- requestSort();
- return TRUE;
-}
-
-void LLFolderViewFolder::requestArrange(BOOL include_descendants)
-{
- mLastArrangeGeneration = -1;
- // flag all items up to root
- if (mParentFolder)
- {
- mParentFolder->requestArrange();
- }
-
- if (include_descendants)
- {
- for (folders_t::iterator iter = mFolders.begin();
- iter != mFolders.end();
- ++iter)
- {
- (*iter)->requestArrange(TRUE);
- }
- }
-}
-
-void LLFolderViewFolder::toggleOpen()
-{
- setOpen(!mIsOpen);
-}
-
-// Force a folder open or closed
-void LLFolderViewFolder::setOpen(BOOL openitem)
-{
- setOpenArrangeRecursively(openitem);
-}
-
-void LLFolderViewFolder::setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse)
-{
- BOOL was_open = mIsOpen;
- mIsOpen = openitem;
- if(!was_open && openitem)
- {
- if(mListener)
- {
- mListener->openItem();
- }
- }
-
- if (recurse == RECURSE_DOWN || recurse == RECURSE_UP_DOWN)
- {
- for (folders_t::iterator iter = mFolders.begin();
- iter != mFolders.end();)
- {
- folders_t::iterator fit = iter++;
- (*fit)->setOpenArrangeRecursively(openitem, RECURSE_DOWN); /* Flawfinder: ignore */
- }
- }
- if (mParentFolder && (recurse == RECURSE_UP || recurse == RECURSE_UP_DOWN))
- {
- mParentFolder->setOpenArrangeRecursively(openitem, RECURSE_UP);
- }
-
- if (was_open != mIsOpen)
- {
- requestArrange();
- }
-}
-
-BOOL LLFolderViewFolder::handleDragAndDropFromChild(MASK mask,
- BOOL drop,
- EDragAndDropType c_type,
- void* cargo_data,
- EAcceptance* accept,
- std::string& tooltip_msg)
-{
- BOOL accepted = mListener && mListener->dragOrDrop(mask,drop,c_type,cargo_data);
- if (accepted)
- {
- mDragAndDropTarget = TRUE;
- *accept = ACCEPT_YES_MULTI;
- }
- else
- {
- *accept = ACCEPT_NO;
- }
-
- // drag and drop to child item, so clear pending auto-opens
- getRoot()->autoOpenTest(NULL);
-
- return TRUE;
-}
-
-void LLFolderViewFolder::openItem( void )
-{
- toggleOpen();
-}
-
-void LLFolderViewFolder::applyFunctorRecursively(LLFolderViewFunctor& functor)
-{
- functor.doFolder(this);
-
- for (folders_t::iterator iter = mFolders.begin();
- iter != mFolders.end();)
- {
- folders_t::iterator fit = iter++;
- (*fit)->applyFunctorRecursively(functor);
- }
- for (items_t::iterator iter = mItems.begin();
- iter != mItems.end();)
- {
- items_t::iterator iit = iter++;
- functor.doItem((*iit));
- }
-}
-
-void LLFolderViewFolder::applyListenerFunctorRecursively(LLFolderViewListenerFunctor& functor)
-{
- functor(mListener);
- for (folders_t::iterator iter = mFolders.begin();
- iter != mFolders.end();)
- {
- folders_t::iterator fit = iter++;
- (*fit)->applyListenerFunctorRecursively(functor);
- }
- for (items_t::iterator iter = mItems.begin();
- iter != mItems.end();)
- {
- items_t::iterator iit = iter++;
- (*iit)->applyListenerFunctorRecursively(functor);
- }
-}
-
-// LLView functionality
-BOOL LLFolderViewFolder::handleDragAndDrop(S32 x, S32 y, MASK mask,
- BOOL drop,
- EDragAndDropType cargo_type,
- void* cargo_data,
- EAcceptance* accept,
- std::string& tooltip_msg)
-{
- LLFolderView* root_view = getRoot();
-
- BOOL handled = FALSE;
- if(mIsOpen)
- {
- handled = childrenHandleDragAndDrop(x, y, mask, drop, cargo_type,
- cargo_data, accept, tooltip_msg) != NULL;
- }
-
- if (!handled)
- {
- BOOL accepted = mListener && mListener->dragOrDrop(mask, drop,cargo_type,cargo_data);
-
- if (accepted)
- {
- mDragAndDropTarget = TRUE;
- *accept = ACCEPT_YES_MULTI;
- }
- else
- {
- *accept = ACCEPT_NO;
- }
-
- if (!drop && accepted)
- {
- root_view->autoOpenTest(this);
- }
-
- lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLFolderViewFolder" << llendl;
- }
-
- return TRUE;
-}
-
-
-BOOL LLFolderViewFolder::handleRightMouseDown( S32 x, S32 y, MASK mask )
-{
- BOOL handled = FALSE;
- // fetch contents of this folder, as context menu can depend on contents
- // still, user would have to open context menu again to see the changes
- gInventory.fetchDescendentsOf(mListener->getUUID());
-
- if( mIsOpen )
- {
- handled = childrenHandleRightMouseDown( x, y, mask ) != NULL;
- }
- if (!handled)
- {
- handled = LLFolderViewItem::handleRightMouseDown( x, y, mask );
- }
- return handled;
-}
-
-
-BOOL LLFolderViewFolder::handleHover(S32 x, S32 y, MASK mask)
-{
- BOOL handled = LLView::handleHover(x, y, mask);
-
- if (!handled)
- {
- // this doesn't do child processing
- handled = LLFolderViewItem::handleHover(x, y, mask);
- }
-
- //if(x < LEFT_INDENTATION + mIndentation && x > mIndentation - LEFT_PAD && y > getRect().getHeight() - )
- //{
- // gViewerWindow->setCursor(UI_CURSOR_ARROW);
- // mExpanderHighlighted = TRUE;
- // handled = TRUE;
- //}
- return handled;
-}
-
-BOOL LLFolderViewFolder::handleMouseDown( S32 x, S32 y, MASK mask )
-{
- BOOL handled = FALSE;
- if( mIsOpen )
- {
- handled = childrenHandleMouseDown(x,y,mask) != NULL;
- }
- if( !handled )
- {
- if(x < LEFT_INDENTATION + mIndentation && x > mIndentation - LEFT_PAD)
- {
- toggleOpen();
- handled = TRUE;
- }
- else
- {
- // do normal selection logic
- handled = LLFolderViewItem::handleMouseDown(x, y, mask);
- }
- }
-
- return handled;
-}
-
-BOOL LLFolderViewFolder::handleDoubleClick( S32 x, S32 y, MASK mask )
-{
- BOOL handled = FALSE;
- if( mIsOpen )
- {
- handled = childrenHandleDoubleClick( x, y, mask ) != NULL;
- }
- if( !handled )
- {
- if(x < LEFT_INDENTATION + mIndentation && x > mIndentation - LEFT_PAD)
- {
- // don't select when user double-clicks plus sign
- // so as not to contradict single-click behavior
- toggleOpen();
- }
- else
- {
- setSelectionFromRoot(this, FALSE);
- toggleOpen();
- }
- handled = TRUE;
- }
- return handled;
-}
-
-void LLFolderViewFolder::draw()
-{
- if (mAutoOpenCountdown != 0.f)
- {
- mControlLabelRotation = mAutoOpenCountdown * -90.f;
- }
- else if (mIsOpen)
- {
- mControlLabelRotation = lerp(mControlLabelRotation, -90.f, LLCriticalDamp::getInterpolant(0.04f));
- }
- else
- {
- mControlLabelRotation = lerp(mControlLabelRotation, 0.f, LLCriticalDamp::getInterpolant(0.025f));
- }
-
- bool possibly_has_children = false;
- bool up_to_date = mListener && mListener->isUpToDate();
- if(!up_to_date && mListener && mListener->hasChildren()) // we know we have children but haven't fetched them (doesn't obey filter)
- {
- possibly_has_children = true;
- }
-
-
- BOOL loading = ( mIsOpen && possibly_has_children && !up_to_date );
-
- if ( loading && !mIsLoading )
- {
- // Measure how long we've been in the loading state
- mTimeSinceRequestStart.reset();
- }
-
- mIsLoading = loading;
-
- LLFolderViewItem::draw();
-
- // draw children if root folder, or any other folder that is open or animating to closed state
- if( getRoot() == this || (mIsOpen || mCurHeight != mTargetHeight ))
- {
- LLView::draw();
- }
-
- mExpanderHighlighted = FALSE;
-}
-
-time_t LLFolderViewFolder::getCreationDate() const
-{
- return llmax<time_t>(mCreationDate, mSubtreeCreationDate);
-}
-
-
-BOOL LLFolderViewFolder::potentiallyVisible()
-{
- // folder should be visible by it's own filter status
- return LLFolderViewItem::potentiallyVisible()
- // or one or more of its descendants have passed the minimum filter requirement
- || hasFilteredDescendants(getRoot()->getFilter()->getMinRequiredGeneration())
- // or not all of its descendants have been checked against minimum filter requirement
- || getCompletedFilterGeneration() < getRoot()->getFilter()->getMinRequiredGeneration();
-}
-
-// this does prefix traversal, as folders are listed above their contents
-LLFolderViewItem* LLFolderViewFolder::getNextFromChild( LLFolderViewItem* item, BOOL include_children )
-{
- BOOL found_item = FALSE;
-
- LLFolderViewItem* result = NULL;
- // when not starting from a given item, start at beginning
- if(item == NULL)
- {
- found_item = TRUE;
- }
-
- // find current item among children
- folders_t::iterator fit = mFolders.begin();
- folders_t::iterator fend = mFolders.end();
-
- items_t::iterator iit = mItems.begin();
- items_t::iterator iend = mItems.end();
-
- // if not trivially starting at the beginning, we have to find the current item
- if (!found_item)
- {
- // first, look among folders, since they are always above items
- for(; fit != fend; ++fit)
- {
- if(item == (*fit))
- {
- found_item = TRUE;
- // if we are on downwards traversal
- if (include_children && (*fit)->isOpen())
- {
- // look for first descendant
- return (*fit)->getNextFromChild(NULL, TRUE);
- }
- // otherwise advance to next folder
- ++fit;
- include_children = TRUE;
- break;
- }
- }
-
- // didn't find in folders? Check items...
- if (!found_item)
- {
- for(; iit != iend; ++iit)
- {
- if(item == (*iit))
- {
- found_item = TRUE;
- // point to next item
- ++iit;
- break;
- }
- }
- }
- }
-
- if (!found_item)
- {
- // you should never call this method with an item that isn't a child
- // so we should always find something
- llassert(FALSE);
- return NULL;
- }
-
- // at this point, either iit or fit point to a candidate "next" item
- // if both are out of range, we need to punt up to our parent
-
- // now, starting from found folder, continue through folders
- // searching for next visible folder
- while(fit != fend && !(*fit)->getVisible())
- {
- // turn on downwards traversal for next folder
- ++fit;
- }
-
- if (fit != fend)
- {
- result = (*fit);
- }
- else
- {
- // otherwise, scan for next visible item
- while(iit != iend && !(*iit)->getVisible())
- {
- ++iit;
- }
-
- // check to see if we have a valid item
- if (iit != iend)
- {
- result = (*iit);
- }
- }
-
- if( !result && mParentFolder )
- {
- // If there are no siblings or children to go to, recurse up one level in the tree
- // and skip children for this folder, as we've already discounted them
- result = mParentFolder->getNextFromChild(this, FALSE);
- }
-
- return result;
-}
-
-// this does postfix traversal, as folders are listed above their contents
-LLFolderViewItem* LLFolderViewFolder::getPreviousFromChild( LLFolderViewItem* item, BOOL include_children )
-{
- BOOL found_item = FALSE;
-
- LLFolderViewItem* result = NULL;
- // when not starting from a given item, start at end
- if(item == NULL)
- {
- found_item = TRUE;
- }
-
- // find current item among children
- folders_t::reverse_iterator fit = mFolders.rbegin();
- folders_t::reverse_iterator fend = mFolders.rend();
-
- items_t::reverse_iterator iit = mItems.rbegin();
- items_t::reverse_iterator iend = mItems.rend();
-
- // if not trivially starting at the end, we have to find the current item
- if (!found_item)
- {
- // first, look among items, since they are always below the folders
- for(; iit != iend; ++iit)
- {
- if(item == (*iit))
- {
- found_item = TRUE;
- // point to next item
- ++iit;
- break;
- }
- }
-
- // didn't find in items? Check folders...
- if (!found_item)
- {
- for(; fit != fend; ++fit)
- {
- if(item == (*fit))
- {
- found_item = TRUE;
- // point to next folder
- ++fit;
- break;
- }
- }
- }
- }
-
- if (!found_item)
- {
- // you should never call this method with an item that isn't a child
- // so we should always find something
- llassert(FALSE);
- return NULL;
- }
-
- // at this point, either iit or fit point to a candidate "next" item
- // if both are out of range, we need to punt up to our parent
-
- // now, starting from found item, continue through items
- // searching for next visible item
- while(iit != iend && !(*iit)->getVisible())
- {
- ++iit;
- }
-
- if (iit != iend)
- {
- // we found an appropriate item
- result = (*iit);
- }
- else
- {
- // otherwise, scan for next visible folder
- while(fit != fend && !(*fit)->getVisible())
- {
- ++fit;
- }
-
- // check to see if we have a valid folder
- if (fit != fend)
- {
- // try selecting child element of this folder
- if ((*fit)->isOpen())
- {
- result = (*fit)->getPreviousFromChild(NULL);
- }
- else
- {
- result = (*fit);
- }
- }
- }
-
- if( !result )
- {
- // If there are no siblings or children to go to, recurse up one level in the tree
- // which gets back to this folder, which will only be visited if it is a valid, visible item
- result = this;
- }
-
- return result;
-}
-
//---------------------------------------------------------------------------
@@ -2514,7 +182,7 @@ LLFolderView::LLFolderView(const Params& p)
mNeedsAutoRename(FALSE),
mDebugFilters(FALSE),
mSortOrder(LLInventoryFilter::SO_FOLDERS_BY_NAME), // This gets overridden by a pref immediately
- mFilter(p.name),
+ mFilter( new LLInventoryFilter(p.name) ),
mShowSelectionContext(FALSE),
mShowSingleSelection(FALSE),
mArrangeGeneration(0),
@@ -2557,12 +225,12 @@ LLFolderView::LLFolderView(const Params& p)
addChild(mRenamer);
// make the popup menu available
- LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_inventory.xml", gMenuHolder);
+ LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_inventory.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
if (!menu)
{
menu = LLUICtrlFactory::getDefaultWidget<LLMenuGL>("inventory_menu");
}
- menu->setBackgroundColor(gSavedSkinSettings.getColor("MenuPopupBgColor"));
+ menu->setBackgroundColor(LLUIColorTable::instance().getColor("MenuPopupBgColor"));
mPopupMenuHandle = menu->getHandle();
}
@@ -2600,6 +268,9 @@ LLFolderView::~LLFolderView( void )
mFolders.clear();
mItemMap.clear();
+
+ delete mFilter;
+ mFilter = NULL;
}
BOOL LLFolderView::canFocusChildren() const
@@ -2646,7 +317,7 @@ U32 LLFolderView::getSortOrder() const
BOOL LLFolderView::addFolder( LLFolderViewFolder* folder)
{
// enforce sort order of My Inventory followed by Library
- if (folder->getListener()->getUUID() == gInventoryLibraryRoot)
+ if (folder->getListener()->getUUID() == gInventory.getLibraryRootFolderID())
{
mFolders.push_back(folder);
}
@@ -2693,14 +364,15 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_gen
{
LLFastTimer t2(LLFastTimer::FTM_ARRANGE);
- filter_generation = mFilter.getMinRequiredGeneration();
+ filter_generation = mFilter->getMinRequiredGeneration();
mMinWidth = 0;
mHasVisibleChildren = hasFilteredDescendants(filter_generation);
// arrange always finishes, so optimistically set the arrange generation to the most current
mLastArrangeGeneration = getRoot()->getArrangeGeneration();
- LLInventoryFilter::EFolderShow show_folder_state = getRoot()->getShowFolderState();
+ LLInventoryFilter::EFolderShow show_folder_state =
+ getRoot()->getFilter()->getShowFolderState();
S32 total_width = LEFT_PAD;
S32 running_height = mDebugFilters ? llceil(sSmallFont->getLineHeight()) : 0;
@@ -2781,7 +453,7 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_gen
const std::string LLFolderView::getFilterSubString(BOOL trim)
{
- return mFilter.getFilterSubString(trim);
+ return mFilter->getFilterSubString(trim);
}
void LLFolderView::filter( LLInventoryFilter& filter )
@@ -2904,7 +576,7 @@ void LLFolderView::setSelectionByID(const LLUUID& obj_id, BOOL take_keyboard_foc
LLFolderViewItem* itemp = getItemByID(obj_id);
if(itemp && itemp->getListener())
{
- itemp->getListener()->arrangeAndSet(itemp, TRUE, take_keyboard_focus);
+ itemp->arrangeAndSet(TRUE, take_keyboard_focus);
mSelectThisID.setNull();
return;
}
@@ -2997,7 +669,7 @@ void LLFolderView::sanitizeSelection()
LLFolderViewItem* original_selected_item = getCurSelectedItem();
// Cache "Show all folders" filter setting
- BOOL show_all_folders = (getRoot()->getShowFolderState() == LLInventoryFilter::SHOW_ALL_FOLDERS);
+ BOOL show_all_folders = (getRoot()->getFilter()->getShowFolderState() == LLInventoryFilter::SHOW_ALL_FOLDERS);
std::vector<LLFolderViewItem*> items_to_remove;
selected_items_t::iterator item_iter;
@@ -3087,7 +759,7 @@ void LLFolderView::sanitizeSelection()
else
{
// nothing selected to start with, so pick "My Inventory" as best guess
- new_selection = getItemByID(gAgent.getInventoryRootID());
+ new_selection = getItemByID(gInventory.getRootFolderID());
}
if (new_selection)
@@ -3148,11 +820,11 @@ void LLFolderView::commitRename( const LLSD& data )
void LLFolderView::draw()
{
- static LLCachedControl<LLColor4> sSearchStatusColor(gSavedSkinSettings, "InventorySearchStatusColor", DEFAULT_WHITE);
+ static LLUIColor sSearchStatusColor = LLUIColorTable::instance().getColor("InventorySearchStatusColor", LLColor4::white);
if (mDebugFilters)
{
std::string current_filter_string = llformat("Current Filter: %d, Least Filter: %d, Auto-accept Filter: %d",
- mFilter.getCurrentGeneration(), mFilter.getMinRequiredGeneration(), mFilter.getMustPassGeneration());
+ mFilter->getCurrentGeneration(), mFilter->getMinRequiredGeneration(), mFilter->getMustPassGeneration());
sSmallFont->renderUTF8(current_filter_string, 0, 2,
getRect().getHeight() - sSmallFont->getLineHeight(), LLColor4(0.5f, 0.5f, 0.8f, 1.f),
LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE );
@@ -3189,13 +861,14 @@ void LLFolderView::draw()
mSearchString.clear();
}
- if (hasVisibleChildren() || getShowFolderState() == LLInventoryFilter::SHOW_ALL_FOLDERS)
+ if (hasVisibleChildren()
+ || mFilter->getShowFolderState() == LLInventoryFilter::SHOW_ALL_FOLDERS)
{
mStatusText.clear();
}
else
{
- if (gInventory.backgroundFetchActive() || mCompletedFilterGeneration < mFilter.getMinRequiredGeneration())
+ if (gInventory.backgroundFetchActive() || mCompletedFilterGeneration < mFilter->getMinRequiredGeneration())
{
mStatusText = LLTrans::getString("Searching");
sFont->renderUTF8(mStatusText, 0, 2, 1, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE );
@@ -3423,6 +1096,35 @@ void LLFolderView::propertiesSelectedItems( void )
}
}
+void LLFolderView::changeType(LLInventoryModel *model, LLAssetType::EType new_folder_type)
+{
+ LLFolderBridge *folder_bridge = LLFolderBridge::sSelf;
+
+ if (!folder_bridge) return;
+ LLViewerInventoryCategory *cat = folder_bridge->getCategory();
+ if (!cat) return;
+
+ const LLUUID &folder_id = cat->getUUID();
+ const LLUUID &parent_id = cat->getParentUUID();
+ const std::string &name = cat->getName();
+
+ LLMessageSystem* msg = gMessageSystem;
+ msg->newMessageFast(_PREHASH_UpdateInventoryFolder);
+ msg->nextBlockFast(_PREHASH_AgentData);
+ msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+ msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+ msg->nextBlockFast(_PREHASH_FolderData);
+ msg->addUUIDFast(_PREHASH_FolderID, folder_id);
+ msg->addUUIDFast(_PREHASH_ParentID, parent_id);
+ msg->addS8Fast(_PREHASH_Type, new_folder_type);
+ msg->addStringFast(_PREHASH_Name, name);
+ gAgent.sendReliableMessage();
+
+ cat->setPreferredType(new_folder_type);
+ gInventory.addChangedMask(LLInventoryObserver::LABEL, folder_id);
+ gInventory.updateLinkedObjects(folder_id);
+}
+
void LLFolderView::autoOpenItem( LLFolderViewFolder* item )
{
if (mAutoOpenItems.check() == item || mAutoOpenItems.getDepth() >= (U32)AUTO_OPEN_STACK_DEPTH)
@@ -4233,6 +1935,16 @@ bool LLFolderView::doToSelected(LLInventoryModel* model, const LLSD& userdata)
LLInventoryClipboard::instance().reset();
}
+ static const std::string change_folder_string = "change_folder_type_";
+ if (action.length() > change_folder_string.length() &&
+ (action.compare(0,change_folder_string.length(),"change_folder_type_") == 0))
+ {
+ LLAssetType::EType new_folder_type = LLFolderType::lookupTypeFromXUIName(action.substr(change_folder_string.length()));
+ changeType(model, new_folder_type);
+ return true;
+ }
+
+
std::set<LLUUID> selected_items;
getSelectionList(selected_items);
@@ -4292,9 +2004,9 @@ void LLFolderView::doIdle()
arrangeAll();
}
- mFilter.clearModified();
- BOOL filter_modified_and_active = mCompletedFilterGeneration < mFilter.getCurrentGeneration() &&
- mFilter.isNotDefault();
+ mFilter->clearModified();
+ BOOL filter_modified_and_active = mCompletedFilterGeneration < mFilter->getCurrentGeneration() &&
+ mFilter->isNotDefault();
mNeedsAutoSelect = filter_modified_and_active &&
!(gFocusMgr.childHasKeyboardFocus(this) || gFocusMgr.getMouseCapture());
@@ -4335,7 +2047,7 @@ void LLFolderView::doIdle()
{
scrollToShowItem(mSelectedItems.back());
// continue scrolling until animated layout change is done
- if (getCompletedFilterGeneration() >= mFilter.getMinRequiredGeneration() &&
+ if (getCompletedFilterGeneration() >= mFilter->getMinRequiredGeneration() &&
(!needsArrange() || !is_visible))
{
mNeedsScroll = FALSE;
@@ -4402,82 +2114,51 @@ void LLFolderView::updateRenamerPosition()
///----------------------------------------------------------------------------
/// Local function definitions
///----------------------------------------------------------------------------
-bool LLInventorySort::updateSort(U32 order)
+
+//static
+void LLFolderView::onRenamerLost( LLFocusableElement* renamer, void* user_data)
{
- if (order != mSortOrder)
+ LLUICtrl* uictrl = dynamic_cast<LLUICtrl*>(renamer);
+ if (uictrl)
{
- mSortOrder = order;
- mByDate = (order & LLInventoryFilter::SO_DATE);
- mSystemToTop = (order & LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP);
- mFoldersByName = (order & LLInventoryFilter::SO_FOLDERS_BY_NAME);
- return true;
+ uictrl->setVisible(FALSE);
}
- return false;
}
-bool LLInventorySort::operator()(const LLFolderViewItem* const& a, const LLFolderViewItem* const& b)
+LLInventoryFilter* LLFolderView::getFilter()
{
- // We sort by name if we aren't sorting by date
- // OR if these are folders and we are sorting folders by name.
- bool by_name = (!mByDate
- || (mFoldersByName
- && (a->getSortGroup() != SG_ITEM)));
-
- if (a->getSortGroup() != b->getSortGroup())
- {
- if (mSystemToTop)
- {
- // Group order is System Folders, Trash, Normal Folders, Items
- return (a->getSortGroup() < b->getSortGroup());
- }
- else if (mByDate)
- {
- // Trash needs to go to the bottom if we are sorting by date
- if ( (a->getSortGroup() == SG_TRASH_FOLDER)
- || (b->getSortGroup() == SG_TRASH_FOLDER))
- {
- return (b->getSortGroup() == SG_TRASH_FOLDER);
- }
- }
- }
+ return mFilter;
+}
- if (by_name)
- {
- S32 compare = LLStringUtil::compareDict(a->getLabel(), b->getLabel());
- if (0 == compare)
- {
- return (a->getCreationDate() > b->getCreationDate());
- }
- else
- {
- return (compare < 0);
- }
- }
- else
- {
- // BUG: This is very very slow. The getCreationDate() is log n in number
- // of inventory items.
- time_t first_create = a->getCreationDate();
- time_t second_create = b->getCreationDate();
- if (first_create == second_create)
- {
- return (LLStringUtil::compareDict(a->getLabel(), b->getLabel()) < 0);
- }
- else
- {
- return (first_create > second_create);
- }
- }
+void LLFolderView::setFilterPermMask( PermissionMask filter_perm_mask )
+{
+ mFilter->setFilterPermissions(filter_perm_mask);
}
-//static
-void LLFolderView::onRenamerLost( LLFocusableElement* renamer, void* user_data)
+U32 LLFolderView::getFilterTypes() const
{
- LLUICtrl* uictrl = dynamic_cast<LLUICtrl*>(renamer);
- if (uictrl)
- {
- uictrl->setVisible(FALSE);
- }
+ return mFilter->getFilterTypes();
+}
+
+PermissionMask LLFolderView::getFilterPermissions() const
+{
+ return mFilter->getFilterPermissions();
+}
+
+// JAMESDEBUG
+//LLInventoryFilter::EFolderShow LLFolderView::getShowFolderState()
+//{
+// return mFilter->getShowFolderState();
+//}
+
+BOOL LLFolderView::isFilterModified()
+{
+ return mFilter->isNotDefault();
+}
+
+BOOL LLFolderView::getAllowMultiSelect()
+{
+ return mAllowMultiSelect;
}
void delete_selected_item(void* user_data)
@@ -4524,610 +2205,3 @@ void properties_selected_items(void* user_data)
fv->propertiesSelectedItems();
}
}
-
-///----------------------------------------------------------------------------
-/// Class LLFolderViewEventListener
-///----------------------------------------------------------------------------
-
-void LLFolderViewEventListener::arrangeAndSet(LLFolderViewItem* focus,
- BOOL set_selection,
- BOOL take_keyboard_focus)
-{
- if(!focus) return;
- LLFolderView* root = focus->getRoot();
- focus->getParentFolder()->requestArrange();
- if(set_selection)
- {
- focus->setSelectionFromRoot(focus, TRUE, take_keyboard_focus);
- if(root)
- {
- root->scrollToShowSelection();
- }
- }
-}
-
-
-///----------------------------------------------------------------------------
-/// Class LLInventoryFilter
-///----------------------------------------------------------------------------
-LLInventoryFilter::LLInventoryFilter(const std::string& name) :
- mName(name),
- mModified(FALSE),
- mNeedTextRebuild(TRUE)
-{
- mFilterOps.mFilterTypes = 0xffffffff;
- mFilterOps.mMinDate = time_min();
- mFilterOps.mMaxDate = time_max();
- mFilterOps.mHoursAgo = 0;
- mFilterOps.mShowFolderState = SHOW_NON_EMPTY_FOLDERS;
- mFilterOps.mPermissions = PERM_NONE;
-
- mOrder = SO_FOLDERS_BY_NAME; // This gets overridden by a pref immediately
-
- mSubStringMatchOffset = 0;
- mFilterSubString.clear();
- mFilterGeneration = 0;
- mMustPassGeneration = S32_MAX;
- mMinRequiredGeneration = 0;
- mFilterCount = 0;
- mNextFilterGeneration = mFilterGeneration + 1;
-
- mLastLogoff = gSavedPerAccountSettings.getU32("LastLogoff");
- mFilterBehavior = FILTER_NONE;
-
- // copy mFilterOps into mDefaultFilterOps
- markDefault();
-}
-
-LLInventoryFilter::~LLInventoryFilter()
-{
-}
-
-BOOL LLInventoryFilter::check(LLFolderViewItem* item)
-{
- time_t earliest;
-
- earliest = time_corrected() - mFilterOps.mHoursAgo * 3600;
- if (mFilterOps.mMinDate > time_min() && mFilterOps.mMinDate < earliest)
- {
- earliest = mFilterOps.mMinDate;
- }
- else if (!mFilterOps.mHoursAgo)
- {
- earliest = 0;
- }
- LLFolderViewEventListener* listener = item->getListener();
- mSubStringMatchOffset = mFilterSubString.size() ? item->getSearchableLabel().find(mFilterSubString) : std::string::npos;
- BOOL passed = (0x1 << listener->getInventoryType() & mFilterOps.mFilterTypes || listener->getInventoryType() == LLInventoryType::IT_NONE)
- && (mFilterSubString.size() == 0 || mSubStringMatchOffset != std::string::npos)
- && ((listener->getPermissionMask() & mFilterOps.mPermissions) == mFilterOps.mPermissions)
- && (listener->getCreationDate() >= earliest && listener->getCreationDate() <= mFilterOps.mMaxDate);
- return passed;
-}
-
-const std::string LLInventoryFilter::getFilterSubString(BOOL trim)
-{
- return mFilterSubString;
-}
-
-std::string::size_type LLInventoryFilter::getStringMatchOffset() const
-{
- return mSubStringMatchOffset;
-}
-
-// has user modified default filter params?
-BOOL LLInventoryFilter::isNotDefault()
-{
- return mFilterOps.mFilterTypes != mDefaultFilterOps.mFilterTypes
- || mFilterSubString.size()
- || mFilterOps.mPermissions != mDefaultFilterOps.mPermissions
- || mFilterOps.mMinDate != mDefaultFilterOps.mMinDate
- || mFilterOps.mMaxDate != mDefaultFilterOps.mMaxDate
- || mFilterOps.mHoursAgo != mDefaultFilterOps.mHoursAgo;
-}
-
-BOOL LLInventoryFilter::isActive()
-{
- return mFilterOps.mFilterTypes != 0xffffffff
- || mFilterSubString.size()
- || mFilterOps.mPermissions != PERM_NONE
- || mFilterOps.mMinDate != time_min()
- || mFilterOps.mMaxDate != time_max()
- || mFilterOps.mHoursAgo != 0;
-}
-
-BOOL LLInventoryFilter::isModified()
-{
- return mModified;
-}
-
-BOOL LLInventoryFilter::isModifiedAndClear()
-{
- BOOL ret = mModified;
- mModified = FALSE;
- return ret;
-}
-
-void LLInventoryFilter::setFilterTypes(U32 types)
-{
- if (mFilterOps.mFilterTypes != types)
- {
- // keep current items only if no type bits getting turned off
- BOOL fewer_bits_set = (mFilterOps.mFilterTypes & ~types);
- BOOL more_bits_set = (~mFilterOps.mFilterTypes & types);
-
- mFilterOps.mFilterTypes = types;
- if (more_bits_set && fewer_bits_set)
- {
- // neither less or more restrive, both simultaneously
- // so we need to filter from scratch
- setModified(FILTER_RESTART);
- }
- else if (more_bits_set)
- {
- // target is only one of all requested types so more type bits == less restrictive
- setModified(FILTER_LESS_RESTRICTIVE);
- }
- else if (fewer_bits_set)
- {
- setModified(FILTER_MORE_RESTRICTIVE);
- }
-
- }
-}
-
-void LLInventoryFilter::setFilterSubString(const std::string& string)
-{
- if (mFilterSubString != string)
- {
- // hitting BACKSPACE, for example
- BOOL less_restrictive = mFilterSubString.size() >= string.size() && !mFilterSubString.substr(0, string.size()).compare(string);
- // appending new characters
- BOOL more_restrictive = mFilterSubString.size() < string.size() && !string.substr(0, mFilterSubString.size()).compare(mFilterSubString);
- mFilterSubString = string;
- LLStringUtil::toUpper(mFilterSubString);
- LLStringUtil::trimHead(mFilterSubString);
-
- if (less_restrictive)
- {
- setModified(FILTER_LESS_RESTRICTIVE);
- }
- else if (more_restrictive)
- {
- setModified(FILTER_MORE_RESTRICTIVE);
- }
- else
- {
- setModified(FILTER_RESTART);
- }
- }
-}
-
-void LLInventoryFilter::setFilterPermissions(PermissionMask perms)
-{
- if (mFilterOps.mPermissions != perms)
- {
- // keep current items only if no perm bits getting turned off
- BOOL fewer_bits_set = (mFilterOps.mPermissions & ~perms);
- BOOL more_bits_set = (~mFilterOps.mPermissions & perms);
- mFilterOps.mPermissions = perms;
-
- if (more_bits_set && fewer_bits_set)
- {
- setModified(FILTER_RESTART);
- }
- else if (more_bits_set)
- {
- // target must have all requested permission bits, so more bits == more restrictive
- setModified(FILTER_MORE_RESTRICTIVE);
- }
- else if (fewer_bits_set)
- {
- setModified(FILTER_LESS_RESTRICTIVE);
- }
- }
-}
-
-void LLInventoryFilter::setDateRange(time_t min_date, time_t max_date)
-{
- mFilterOps.mHoursAgo = 0;
- if (mFilterOps.mMinDate != min_date)
- {
- mFilterOps.mMinDate = min_date;
- setModified();
- }
- if (mFilterOps.mMaxDate != llmax(mFilterOps.mMinDate, max_date))
- {
- mFilterOps.mMaxDate = llmax(mFilterOps.mMinDate, max_date);
- setModified();
- }
-}
-
-void LLInventoryFilter::setDateRangeLastLogoff(BOOL sl)
-{
- if (sl && !isSinceLogoff())
- {
- setDateRange(mLastLogoff, time_max());
- setModified();
- }
- if (!sl && isSinceLogoff())
- {
- setDateRange(0, time_max());
- setModified();
- }
-}
-
-BOOL LLInventoryFilter::isSinceLogoff()
-{
- return (mFilterOps.mMinDate == (time_t)mLastLogoff) &&
- (mFilterOps.mMaxDate == time_max());
-}
-
-void LLInventoryFilter::setHoursAgo(U32 hours)
-{
- if (mFilterOps.mHoursAgo != hours)
- {
- // *NOTE: need to cache last filter time, in case filter goes stale
- BOOL less_restrictive = (mFilterOps.mMinDate == time_min() && mFilterOps.mMaxDate == time_max() && hours > mFilterOps.mHoursAgo);
- BOOL more_restrictive = (mFilterOps.mMinDate == time_min() && mFilterOps.mMaxDate == time_max() && hours <= mFilterOps.mHoursAgo);
- mFilterOps.mHoursAgo = hours;
- mFilterOps.mMinDate = time_min();
- mFilterOps.mMaxDate = time_max();
- if (less_restrictive)
- {
- setModified(FILTER_LESS_RESTRICTIVE);
- }
- else if (more_restrictive)
- {
- setModified(FILTER_MORE_RESTRICTIVE);
- }
- else
- {
- setModified(FILTER_RESTART);
- }
- }
-}
-void LLInventoryFilter::setShowFolderState(EFolderShow state)
-{
- if (mFilterOps.mShowFolderState != state)
- {
- mFilterOps.mShowFolderState = state;
- if (state == SHOW_NON_EMPTY_FOLDERS)
- {
- // showing fewer folders than before
- setModified(FILTER_MORE_RESTRICTIVE);
- }
- else if (state == SHOW_ALL_FOLDERS)
- {
- // showing same folders as before and then some
- setModified(FILTER_LESS_RESTRICTIVE);
- }
- else
- {
- setModified();
- }
- }
-}
-
-void LLInventoryFilter::setSortOrder(U32 order)
-{
- if (mOrder != order)
- {
- mOrder = order;
- setModified();
- }
-}
-
-void LLInventoryFilter::markDefault()
-{
- mDefaultFilterOps = mFilterOps;
-}
-
-void LLInventoryFilter::resetDefault()
-{
- mFilterOps = mDefaultFilterOps;
- setModified();
-}
-
-void LLInventoryFilter::setModified(EFilterBehavior behavior)
-{
- mModified = TRUE;
- mNeedTextRebuild = TRUE;
- mFilterGeneration = mNextFilterGeneration++;
-
- if (mFilterBehavior == FILTER_NONE)
- {
- mFilterBehavior = behavior;
- }
- else if (mFilterBehavior != behavior)
- {
- // trying to do both less restrictive and more restrictive filter
- // basically means restart from scratch
- mFilterBehavior = FILTER_RESTART;
- }
-
- if (isNotDefault())
- {
- // if not keeping current filter results, update last valid as well
- switch(mFilterBehavior)
- {
- case FILTER_RESTART:
- mMustPassGeneration = mFilterGeneration;
- mMinRequiredGeneration = mFilterGeneration;
- break;
- case FILTER_LESS_RESTRICTIVE:
- mMustPassGeneration = mFilterGeneration;
- break;
- case FILTER_MORE_RESTRICTIVE:
- mMinRequiredGeneration = mFilterGeneration;
- // must have passed either current filter generation (meaningless, as it hasn't been run yet)
- // or some older generation, so keep the value
- mMustPassGeneration = llmin(mMustPassGeneration, mFilterGeneration);
- break;
- default:
- llerrs << "Bad filter behavior specified" << llendl;
- }
- }
- else
- {
- // shortcut disabled filters to show everything immediately
- mMinRequiredGeneration = 0;
- mMustPassGeneration = S32_MAX;
- }
-}
-
-BOOL LLInventoryFilter::isFilterWith(LLInventoryType::EType t)
-{
- return mFilterOps.mFilterTypes & (0x01 << t);
-}
-
-std::string LLInventoryFilter::getFilterText()
-{
- if (!mNeedTextRebuild)
- {
- return mFilterText;
- }
-
- mNeedTextRebuild = FALSE;
- std::string filtered_types;
- std::string not_filtered_types;
- BOOL filtered_by_type = FALSE;
- BOOL filtered_by_all_types = TRUE;
- S32 num_filter_types = 0;
- mFilterText.clear();
-
- if (isFilterWith(LLInventoryType::IT_ANIMATION))
- {
- //filtered_types += " Animations,";
- filtered_types += LLTrans::getString("Animations");
- filtered_by_type = TRUE;
- num_filter_types++;
- }
- else
- {
- //not_filtered_types += " Animations,";
- not_filtered_types += LLTrans::getString("Animations");
-
- filtered_by_all_types = FALSE;
- }
-
- if (isFilterWith(LLInventoryType::IT_CALLINGCARD))
- {
- //filtered_types += " Calling Cards,";
- filtered_types += LLTrans::getString("Calling Cards");
- filtered_by_type = TRUE;
- num_filter_types++;
- }
- else
- {
- //not_filtered_types += " Calling Cards,";
- not_filtered_types += LLTrans::getString("Calling Cards");
- filtered_by_all_types = FALSE;
- }
-
- if (isFilterWith(LLInventoryType::IT_WEARABLE))
- {
- //filtered_types += " Clothing,";
- filtered_types += LLTrans::getString("Clothing");
- filtered_by_type = TRUE;
- num_filter_types++;
- }
- else
- {
- //not_filtered_types += " Clothing,";
- not_filtered_types += LLTrans::getString("Clothing");
- filtered_by_all_types = FALSE;
- }
-
- if (isFilterWith(LLInventoryType::IT_GESTURE))
- {
- //filtered_types += " Gestures,";
- filtered_types += LLTrans::getString("Gestures");
- filtered_by_type = TRUE;
- num_filter_types++;
- }
- else
- {
- //not_filtered_types += " Gestures,";
- not_filtered_types += LLTrans::getString("Gestures");
- filtered_by_all_types = FALSE;
- }
-
- if (isFilterWith(LLInventoryType::IT_LANDMARK))
- {
- //filtered_types += " Landmarks,";
- filtered_types += LLTrans::getString("Landmarks");
- filtered_by_type = TRUE;
- num_filter_types++;
- }
- else
- {
- //not_filtered_types += " Landmarks,";
- not_filtered_types += LLTrans::getString("Landmarks");
- filtered_by_all_types = FALSE;
- }
-
- if (isFilterWith(LLInventoryType::IT_NOTECARD))
- {
- //filtered_types += " Notecards,";
- filtered_types += LLTrans::getString("Notecards");
- filtered_by_type = TRUE;
- num_filter_types++;
- }
- else
- {
- //not_filtered_types += " Notecards,";
- not_filtered_types += LLTrans::getString("Notecards");
- filtered_by_all_types = FALSE;
- }
-
- if (isFilterWith(LLInventoryType::IT_OBJECT) && isFilterWith(LLInventoryType::IT_ATTACHMENT))
- {
- //filtered_types += " Objects,";
- filtered_types += LLTrans::getString("Objects");
- filtered_by_type = TRUE;
- num_filter_types++;
- }
- else
- {
- //not_filtered_types += " Objects,";
- not_filtered_types += LLTrans::getString("Objects");
- filtered_by_all_types = FALSE;
- }
-
- if (isFilterWith(LLInventoryType::IT_LSL))
- {
- //filtered_types += " Scripts,";
- filtered_types += LLTrans::getString("Scripts");
- filtered_by_type = TRUE;
- num_filter_types++;
- }
- else
- {
- //not_filtered_types += " Scripts,";
- not_filtered_types += LLTrans::getString("Scripts");
- filtered_by_all_types = FALSE;
- }
-
- if (isFilterWith(LLInventoryType::IT_SOUND))
- {
- //filtered_types += " Sounds,";
- filtered_types += LLTrans::getString("Sounds");
- filtered_by_type = TRUE;
- num_filter_types++;
- }
- else
- {
- //not_filtered_types += " Sounds,";
- not_filtered_types += LLTrans::getString("Sounds");
- filtered_by_all_types = FALSE;
- }
-
- if (isFilterWith(LLInventoryType::IT_TEXTURE))
- {
- //filtered_types += " Textures,";
- filtered_types += LLTrans::getString("Textures");
- filtered_by_type = TRUE;
- num_filter_types++;
- }
- else
- {
- //not_filtered_types += " Textures,";
- not_filtered_types += LLTrans::getString("Textures");
- filtered_by_all_types = FALSE;
- }
-
- if (isFilterWith(LLInventoryType::IT_SNAPSHOT))
- {
- //filtered_types += " Snapshots,";
- filtered_types += LLTrans::getString("Snapshots");
- filtered_by_type = TRUE;
- num_filter_types++;
- }
- else
- {
- //not_filtered_types += " Snapshots,";
- not_filtered_types += LLTrans::getString("Snapshots");
- filtered_by_all_types = FALSE;
- }
-
- if (!gInventory.backgroundFetchActive() && filtered_by_type && !filtered_by_all_types)
- {
- mFilterText += " - ";
- if (num_filter_types < 5)
- {
- mFilterText += filtered_types;
- }
- else
- {
- //mFilterText += "No ";
- mFilterText += LLTrans::getString("No Filters");
- mFilterText += not_filtered_types;
- }
- // remove the ',' at the end
- mFilterText.erase(mFilterText.size() - 1, 1);
- }
-
- if (isSinceLogoff())
- {
- //mFilterText += " - Since Logoff";
- mFilterText += LLTrans::getString("Since Logoff");
- }
- return mFilterText;
-}
-
-void LLInventoryFilter::toLLSD(LLSD& data)
-{
- data["filter_types"] = (LLSD::Integer)getFilterTypes();
- data["min_date"] = (LLSD::Integer)getMinDate();
- data["max_date"] = (LLSD::Integer)getMaxDate();
- data["hours_ago"] = (LLSD::Integer)getHoursAgo();
- data["show_folder_state"] = (LLSD::Integer)getShowFolderState();
- data["permissions"] = (LLSD::Integer)getFilterPermissions();
- data["substring"] = (LLSD::String)getFilterSubString();
- data["sort_order"] = (LLSD::Integer)getSortOrder();
- data["since_logoff"] = (LLSD::Boolean)isSinceLogoff();
-}
-
-void LLInventoryFilter::fromLLSD(LLSD& data)
-{
- if(data.has("filter_types"))
- {
- setFilterTypes((U32)data["filter_types"].asInteger());
- }
-
- if(data.has("min_date") && data.has("max_date"))
- {
- setDateRange(data["min_date"].asInteger(), data["max_date"].asInteger());
- }
-
- if(data.has("hours_ago"))
- {
- setHoursAgo((U32)data["hours_ago"].asInteger());
- }
-
- if(data.has("show_folder_state"))
- {
- setShowFolderState((EFolderShow)data["show_folder_state"].asInteger());
- }
-
- if(data.has("permissions"))
- {
- setFilterPermissions((PermissionMask)data["permissions"].asInteger());
- }
-
- if(data.has("substring"))
- {
- setFilterSubString(std::string(data["substring"].asString()));
- }
-
- if(data.has("sort_order"))
- {
- setSortOrder((U32)data["sort_order"].asInteger());
- }
-
- if(data.has("since_logoff"))
- {
- setDateRangeLastLogoff((bool)data["since_logoff"].asBoolean());
- }
-}
diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h
index 3386a7fb0e..8d9d52cd17 100644
--- a/indra/newview/llfolderview.h
+++ b/indra/newview/llfolderview.h
@@ -41,6 +41,7 @@
#ifndef LL_LLFOLDERVIEW_H
#define LL_LLFOLDERVIEW_H
+// JAMESDEBUG - trim this list
#include <vector>
#include <map>
#include <deque>
@@ -54,99 +55,11 @@
#include "stdenums.h"
#include "llfontgl.h"
#include "lleditmenuhandler.h"
-#include "llviewerimage.h"
+#include "llviewertexture.h"
#include "lldepthstack.h"
#include "lltooldraganddrop.h"
-
-class LLMenuGL;
-
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// Class LLFolderViewEventListener
-//
-// This is an abstract base class that users of the folderview classes
-// would use to catch the useful events emitted from the folder
-// views.
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
-class LLFolderViewItem;
-class LLFolderView;
-class LLInventoryModel;
-class LLScrollContainer;
-
-class LLFolderViewEventListener
-{
-public:
- virtual ~LLFolderViewEventListener( void ) {}
- virtual const std::string& getName() const = 0;
- virtual const std::string& getDisplayName() const = 0;
- virtual const LLUUID& getUUID() const = 0;
- virtual time_t getCreationDate() const = 0; // UTC seconds
- virtual PermissionMask getPermissionMask() const = 0;
- virtual LLAssetType::EType getPreferredType() const {return LLAssetType::AT_NONE;};
- virtual LLUIImagePtr getIcon() const = 0;
- virtual LLFontGL::StyleFlags getLabelStyle() const = 0;
- virtual std::string getLabelSuffix() const = 0;
- virtual void openItem( void ) = 0;
- virtual void previewItem( void ) = 0;
- virtual void selectItem(void) = 0;
- virtual void showProperties(void) = 0;
- virtual BOOL isItemRenameable() const = 0;
- virtual BOOL renameItem(const std::string& new_name) = 0;
- virtual BOOL isItemMovable( void ) = 0; // Can be moved to another folder
- virtual BOOL isItemRemovable( void ) = 0; // Can be destroyed
- virtual BOOL removeItem() = 0;
- virtual void removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batch) = 0;
- virtual void move( LLFolderViewEventListener* parent_listener ) = 0;
- virtual BOOL isItemCopyable() const = 0;
- virtual BOOL copyToClipboard() const = 0;
- virtual void cutToClipboard() = 0;
- virtual BOOL isClipboardPasteable() const = 0;
- virtual void pasteFromClipboard() = 0;
- virtual void pasteLinkFromClipboard() = 0;
- virtual void buildContextMenu(LLMenuGL& menu, U32 flags) = 0;
- virtual BOOL isUpToDate() const = 0;
- virtual BOOL hasChildren() const = 0;
- virtual LLInventoryType::EType getInventoryType() const = 0;
- virtual void performAction(LLFolderView* folder, LLInventoryModel* model, std::string action) {}
-
- // This method should be called when a drag begins. returns TRUE
- // if the drag can begin, otherwise FALSE.
- virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const = 0;
-
- // This method will be called to determine if a drop can be
- // performed, and will set drop to TRUE if a drop is
- // requested. Returns TRUE if a drop is possible/happened,
- // otherwise FALSE.
- virtual BOOL dragOrDrop(MASK mask, BOOL drop,
- EDragAndDropType cargo_type,
- void* cargo_data) = 0;
-
- // This method is called when the object being referenced by the
- // bridge is actually dropped. This allows for cleanup of the old
- // view, reference counting, etc.
-// virtual void dropped() = 0;
-
- // this method accesses the parent and arranges and sets it as
- // specified.
- void arrangeAndSet(LLFolderViewItem* focus, BOOL set_selection,
- BOOL take_keyboard_focus = TRUE);
-};
-
-
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// Class LLFolderViewListenerFunctor
-//
-// This simple abstract base class can be used to applied to all
-// listeners in a hierarchy.
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-class LLFolderViewListenerFunctor
-{
-public:
- virtual ~LLFolderViewListenerFunctor() {}
- virtual void operator()(LLFolderViewEventListener* listener) = 0;
-};
+// JAMESDEBUG - move this up
+#include "llfolderviewitem.h" // because LLFolderView is-a LLFolderViewFolder
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLFolderViewFunctor
@@ -168,571 +81,6 @@ public:
virtual void doItem(LLFolderViewItem* item) = 0;
};
-class LLInventoryFilter
-{
-public:
- typedef enum e_folder_show
- {
- SHOW_ALL_FOLDERS,
- SHOW_NON_EMPTY_FOLDERS,
- SHOW_NO_FOLDERS
- } EFolderShow;
-
- typedef enum e_filter_behavior
- {
- FILTER_NONE, // nothing to do, already filtered
- FILTER_RESTART, // restart filtering from scratch
- FILTER_LESS_RESTRICTIVE, // existing filtered items will certainly pass this filter
- FILTER_MORE_RESTRICTIVE // if you didn't pass the previous filter, you definitely won't pass this one
- } EFilterBehavior;
-
- static const U32 SO_DATE = 1;
- static const U32 SO_FOLDERS_BY_NAME = 2;
- static const U32 SO_SYSTEM_FOLDERS_TO_TOP = 4;
-
- LLInventoryFilter(const std::string& name);
- virtual ~LLInventoryFilter();
-
- void setFilterTypes(U32 types);
- U32 getFilterTypes() const { return mFilterOps.mFilterTypes; }
-
- void setFilterSubString(const std::string& string);
- const std::string getFilterSubString(BOOL trim = FALSE);
-
- void setFilterPermissions(PermissionMask perms);
- PermissionMask getFilterPermissions() const { return mFilterOps.mPermissions; }
-
- void setDateRange(time_t min_date, time_t max_date);
- void setDateRangeLastLogoff(BOOL sl);
- time_t getMinDate() const { return mFilterOps.mMinDate; }
- time_t getMaxDate() const { return mFilterOps.mMaxDate; }
-
- void setHoursAgo(U32 hours);
- U32 getHoursAgo() const { return mFilterOps.mHoursAgo; }
-
- void setShowFolderState( EFolderShow state);
- EFolderShow getShowFolderState() { return mFilterOps.mShowFolderState; }
-
- void setSortOrder(U32 order);
- U32 getSortOrder() { return mOrder; }
-
- BOOL check(LLFolderViewItem* item);
- std::string::size_type getStringMatchOffset() const;
- BOOL isActive();
- BOOL isNotDefault();
- BOOL isModified();
- BOOL isModifiedAndClear();
- BOOL isSinceLogoff();
- void clearModified() { mModified = FALSE; mFilterBehavior = FILTER_NONE; }
- const std::string getName() const { return mName; }
- std::string getFilterText();
-
- void setFilterCount(S32 count) { mFilterCount = count; }
- S32 getFilterCount() { return mFilterCount; }
- void decrementFilterCount() { mFilterCount--; }
-
- void markDefault();
- void resetDefault();
-
- BOOL isFilterWith(LLInventoryType::EType t);
-
- S32 getCurrentGeneration() const { return mFilterGeneration; }
- S32 getMinRequiredGeneration() const { return mMinRequiredGeneration; }
- S32 getMustPassGeneration() const { return mMustPassGeneration; }
-
- //RN: this is public to allow system to externally force a global refilter
- void setModified(EFilterBehavior behavior = FILTER_RESTART);
-
- void toLLSD(LLSD& data);
- void fromLLSD(LLSD& data);
-
-protected:
- struct filter_ops
- {
- U32 mFilterTypes;
- time_t mMinDate;
- time_t mMaxDate;
- U32 mHoursAgo;
- EFolderShow mShowFolderState;
- PermissionMask mPermissions;
- };
- filter_ops mFilterOps;
- filter_ops mDefaultFilterOps;
- std::string::size_type mSubStringMatchOffset;
- std::string mFilterSubString;
- U32 mOrder;
- const std::string mName;
- S32 mFilterGeneration;
- S32 mMustPassGeneration;
- S32 mMinRequiredGeneration;
- S32 mFilterCount;
- S32 mNextFilterGeneration;
- EFilterBehavior mFilterBehavior;
-
-private:
- U32 mLastLogoff;
- BOOL mModified;
- BOOL mNeedTextRebuild;
- std::string mFilterText;
-};
-
-// These are grouping of inventory types.
-// Order matters when sorting system folders to the top.
-enum EInventorySortGroup
-{
- SG_SYSTEM_FOLDER,
- SG_TRASH_FOLDER,
- SG_NORMAL_FOLDER,
- SG_ITEM
-};
-
-class LLInventorySort
-{
-public:
- LLInventorySort()
- : mSortOrder(0),
- mByDate(false),
- mSystemToTop(false),
- mFoldersByName(false) { }
-
- // Returns true if order has changed
- bool updateSort(U32 order);
- U32 getSort() { return mSortOrder; }
-
- bool operator()(const LLFolderViewItem* const& a, const LLFolderViewItem* const& b);
-private:
- U32 mSortOrder;
- bool mByDate;
- bool mSystemToTop;
- bool mFoldersByName;
-};
-
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// Class LLFolderViewItem
-//
-// An instance of this class represents a single item in a folder view
-// such as an inventory item or a file.
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-class LLFontGL;
-class LLFolderViewFolder;
-class LLFolderView;
-
-class LLFolderViewItem : public LLView
-{
-public:
- static void initClass();
- static void cleanupClass();
- struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
- {
- Optional<LLUIImage*> icon;
- Optional<LLFolderView*> root;
- Optional<LLFolderViewEventListener*> listener;
-
- Optional<LLUIImage*> folder_arrow_image;
- Optional<LLUIImage*> selection_image;
-
- Optional<S32> creation_date; //UTC seconds
- Params()
- : folder_arrow_image("", LLUI::getUIImage("folder_arrow.tga")),
- selection_image("", LLUI::getUIImage("rounded_square.tga"))
- {
- mouse_opaque(true);
- follows.flags(FOLLOWS_LEFT|FOLLOWS_TOP|FOLLOWS_RIGHT);
- tab_stop(false);
- }
- };
-
-protected:
- friend class LLUICtrlFactory;
- friend class LLFolderViewEventListener;
-
- LLFolderViewItem(Params = LLFolderViewItem::Params());
-
- static const LLFontGL* sFont;
- static const LLFontGL* sSmallFont;
- static LLUIImagePtr sArrowImage;
- static LLUIImagePtr sBoxImage;
- std::string mLabel;
- std::string mSearchableLabel;
- S32 mLabelWidth;
- bool mLabelWidthDirty;
- time_t mCreationDate;
- LLFolderViewFolder* mParentFolder;
- LLFolderViewEventListener* mListener;
- BOOL mIsSelected;
- BOOL mIsCurSelection;
- BOOL mSelectPending;
- LLFontGL::StyleFlags mLabelStyle;
- std::string mLabelSuffix;
- LLUIImagePtr mIcon;
- std::string mStatusText;
- BOOL mHasVisibleChildren;
- S32 mIndentation;
- S32 mNumDescendantsSelected;
- BOOL mFiltered;
- S32 mLastFilterGeneration;
- std::string::size_type mStringMatchOffset;
- F32 mControlLabelRotation;
- LLFolderView* mRoot;
- BOOL mDragAndDropTarget;
- LLUIImagePtr mArrowImage;
- LLUIImagePtr mBoxImage;
- BOOL mIsLoading;
- LLTimer mTimeSinceRequestStart;
-
- // This function clears the currently selected item, and records
- // the specified selected item appropriately for display and use
- // in the UI. If open is TRUE, then folders are opened up along
- // the way to the selection.
- void setSelectionFromRoot(LLFolderViewItem* selection, BOOL openitem,
- BOOL take_keyboard_focus = TRUE);
-
- // helper function to change the selection from the root.
- void changeSelectionFromRoot(LLFolderViewItem* selection, BOOL selected);
-
- // helper function to change the selection from the root.
- void extendSelectionFromRoot(LLFolderViewItem* selection);
-
- // this is an internal method used for adding items to folders. A
- // no-op at this leve, but reimplemented in derived classes.
- virtual BOOL addItem(LLFolderViewItem*) { return FALSE; }
- virtual BOOL addFolder(LLFolderViewFolder*) { return FALSE; }
-
-public:
- // This function is called when the folder view is dirty. It's
- // implemented here but called by derived classes when folding the
- // views.
- void arrangeFromRoot();
- void filterFromRoot( void );
-
- virtual ~LLFolderViewItem( void );
-
- // addToFolder() returns TRUE if it succeeds. FALSE otherwise
- enum { ARRANGE = TRUE, DO_NOT_ARRANGE = FALSE };
- virtual BOOL addToFolder(LLFolderViewFolder* folder, LLFolderView* root);
-
- virtual EInventorySortGroup getSortGroup() const;
-
- // Finds width and height of this object and it's children. Also
- // makes sure that this view and it's children are the right size.
- virtual S32 arrange( S32* width, S32* height, S32 filter_generation );
- virtual S32 getItemHeight();
-
- // applies filters to control visibility of inventory items
- virtual void filter( LLInventoryFilter& filter);
-
- // updates filter serial number and optionally propagated value up to root
- S32 getLastFilterGeneration() { return mLastFilterGeneration; }
-
- virtual void dirtyFilter();
-
- // If the selection is 'this' then note that otherwise
- // ignore. Returns TRUE if this object was affected. If open is
- // TRUE, then folders are opened up along the way to the
- // selection.
- virtual BOOL setSelection(LLFolderViewItem* selection, BOOL openitem,
- BOOL take_keyboard_focus);
-
- // This method is used to toggle the selection of an item. If
- // selection is 'this', then note selection, and return TRUE.
- virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected);
-
- // this method is used to group select items
- virtual S32 extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items){ return FALSE; }
-
- // this method is used to group select items
- virtual void recursiveDeselect(BOOL deselect_self);
-
- // gets multiple-element selection
- virtual BOOL getSelectionList(std::set<LLUUID> &selection){return TRUE;}
-
- // Returns true is this object and all of its children can be removed (deleted by user)
- virtual BOOL isRemovable();
-
- // Returns true is this object and all of its children can be moved
- virtual BOOL isMovable();
-
- // destroys this item recursively
- virtual void destroyView();
-
- S32 getNumSelectedDescendants() { return mNumDescendantsSelected; }
-
- BOOL isSelected() { return mIsSelected; }
-
- void setIsCurSelection(BOOL select) { mIsCurSelection = select; }
-
- BOOL getIsCurSelection() { return mIsCurSelection; }
-
- BOOL hasVisibleChildren() { return mHasVisibleChildren; }
-
- // Call through to the viewed object and return true if it can be
- // removed. Returns true if it's removed.
- //virtual BOOL removeRecursively(BOOL single_item);
- BOOL remove();
-
- // Build an appropriate context menu for the item. Flags unused.
- void buildContextMenu(LLMenuGL& menu, U32 flags);
-
- // This method returns the actual name of the thing being
- // viewed. This method will ask the viewed object itself.
- const std::string& getName( void ) const;
-
- const std::string& getSearchableLabel( void ) const;
-
- // This method returns the label displayed on the view. This
- // method was primarily added to allow sorting on the folder
- // contents possible before the entire view has been constructed.
- const std::string& getLabel() const { return mLabel; }
-
- // Used for sorting, like getLabel() above.
- virtual time_t getCreationDate() const { return mCreationDate; }
-
- LLFolderViewFolder* getParentFolder( void ) { return mParentFolder; }
- const LLFolderViewFolder* getParentFolder( void ) const { return mParentFolder; }
-
- LLFolderViewItem* getNextOpenNode( BOOL include_children = TRUE );
- LLFolderViewItem* getPreviousOpenNode( BOOL include_children = TRUE );
-
- const LLFolderViewEventListener* getListener( void ) const { return mListener; }
- LLFolderViewEventListener* getListener( void ) { return mListener; }
-
- // just rename the object.
- void rename(const std::string& new_name);
-
- // open
- virtual void openItem( void );
- virtual void preview(void);
-
- // Show children (unfortunate that this is called "open")
- virtual void setOpen(BOOL open = TRUE) {};
-
- virtual BOOL isOpen() { return FALSE; }
-
- virtual LLFolderView* getRoot();
- BOOL isDescendantOf( const LLFolderViewFolder* potential_ancestor );
- S32 getIndentation() { return mIndentation; }
-
- virtual BOOL potentiallyVisible(); // do we know for a fact that this item has been filtered out?
-
- virtual BOOL getFiltered();
- virtual BOOL getFiltered(S32 filter_generation);
- virtual void setFiltered(BOOL filtered, S32 filter_generation);
-
- // change the icon
- void setIcon(LLUIImagePtr icon);
-
- // refresh information from the object being viewed.
- void refreshFromListener();
- virtual void refresh();
-
- virtual void applyListenerFunctorRecursively(LLFolderViewListenerFunctor& functor);
-
- // LLView functionality
- virtual BOOL handleRightMouseDown( S32 x, S32 y, MASK mask );
- virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask );
- virtual BOOL handleHover( S32 x, S32 y, MASK mask );
- virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask );
- virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask );
- virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
-
- // virtual void handleDropped();
- virtual void draw();
- virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
- EDragAndDropType cargo_type,
- void* cargo_data,
- EAcceptance* accept,
- std::string& tooltip_msg);
-};
-
-
-// function used for sorting.
-typedef bool (*sort_order_f)(LLFolderViewItem* a, LLFolderViewItem* b);
-
-
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// Class LLFolderViewFolder
-//
-// An instance of an LLFolderViewFolder represents a collection of
-// more folders and items. This is used to build the hierarchy of
-// items found in the folder view. :)
-//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-class LLFolderViewFolder : public LLFolderViewItem
-{
-protected:
- LLFolderViewFolder( const LLFolderViewItem::Params& );
- friend class LLUICtrlFactory;
-
-public:
- typedef enum e_trash
- {
- UNKNOWN, TRASH, NOT_TRASH
- } ETrash;
-
-protected:
- typedef std::list<LLFolderViewItem*> items_t;
- typedef std::list<LLFolderViewFolder*> folders_t;
- items_t mItems;
- folders_t mFolders;
- LLInventorySort mSortFunction;
-
- BOOL mIsOpen;
- BOOL mExpanderHighlighted;
- F32 mCurHeight;
- F32 mTargetHeight;
- F32 mAutoOpenCountdown;
- time_t mSubtreeCreationDate;
- mutable ETrash mAmTrash;
- S32 mLastArrangeGeneration;
- S32 mLastCalculatedWidth;
- S32 mCompletedFilterGeneration;
- S32 mMostFilteredDescendantGeneration;
- bool mNeedsSort;
-public:
- typedef enum e_recurse_type
- {
- RECURSE_NO,
- RECURSE_UP,
- RECURSE_DOWN,
- RECURSE_UP_DOWN
- } ERecurseType;
-
-
- virtual ~LLFolderViewFolder( void );
-
- virtual BOOL potentiallyVisible();
-
- LLFolderViewItem* getNextFromChild( LLFolderViewItem*, BOOL include_children = TRUE );
- LLFolderViewItem* getPreviousFromChild( LLFolderViewItem*, BOOL include_children = TRUE );
-
- // addToFolder() returns TRUE if it succeeds. FALSE otherwise
- virtual BOOL addToFolder(LLFolderViewFolder* folder, LLFolderView* root);
-
- // Finds width and height of this object and it's children. Also
- // makes sure that this view and it's children are the right size.
- virtual S32 arrange( S32* width, S32* height, S32 filter_generation );
-
- BOOL needsArrange();
- void requestSort();
-
- // Returns the sort group (system, trash, folder) for this folder.
- virtual EInventorySortGroup getSortGroup() const;
-
- virtual void setCompletedFilterGeneration(S32 generation, BOOL recurse_up);
- virtual S32 getCompletedFilterGeneration() { return mCompletedFilterGeneration; }
-
- BOOL hasFilteredDescendants(S32 filter_generation) { return mMostFilteredDescendantGeneration >= filter_generation; }
- BOOL hasFilteredDescendants();
-
- // applies filters to control visibility of inventory items
- virtual void filter( LLInventoryFilter& filter);
- virtual void setFiltered(BOOL filtered, S32 filter_generation);
- virtual void dirtyFilter();
-
- // Passes selection information on to children and record
- // selection information if necessary. Returns TRUE if this object
- // (or a child) was affected.
- virtual BOOL setSelection(LLFolderViewItem* selection, BOOL openitem,
- BOOL take_keyboard_focus);
-
- // This method is used to change the selection of an item. If
- // selection is 'this', then note selection as true. Returns TRUE
- // if this or a child is now selected.
- virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected);
-
- // this method is used to group select items
- virtual S32 extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items);
-
- virtual void recursiveDeselect(BOOL deselect_self);
-
- // Returns true is this object and all of its children can be removed.
- virtual BOOL isRemovable();
-
- // Returns true is this object and all of its children can be moved
- virtual BOOL isMovable();
-
- // destroys this folder, and all children
- virtual void destroyView();
-
- // If this folder can be removed, remove all children that can be
- // removed, return TRUE if this is empty after the operation and
- // it's viewed folder object can be removed.
- //virtual BOOL removeRecursively(BOOL single_item);
- //virtual BOOL remove();
-
- // remove the specified item (and any children) if
- // possible. Return TRUE if the item was deleted.
- BOOL removeItem(LLFolderViewItem* item);
-
- // simply remove the view (and any children) Don't bother telling
- // the listeners.
- void removeView(LLFolderViewItem* item);
-
- // extractItem() removes the specified item from the folder, but
- // doesn't delete it.
- void extractItem( LLFolderViewItem* item );
-
- // This function is called by a child that needs to be resorted.
- void resort(LLFolderViewItem* item);
-
- void setItemSortOrder(U32 ordering);
- void sortBy(U32);
- //BOOL (*func)(LLFolderViewItem* a, LLFolderViewItem* b));
-
- void setAutoOpenCountdown(F32 countdown) { mAutoOpenCountdown = countdown; }
-
- // folders can be opened. This will usually be called by internal
- // methods.
- virtual void toggleOpen();
-
- // Force a folder open or closed
- virtual void setOpen(BOOL openitem = TRUE);
-
- // Called when a child is refreshed.
- // don't rearrange child folder contents unless explicitly requested
- virtual void requestArrange(BOOL include_descendants = FALSE);
-
- // internal method which doesn't update the entire view. This
- // method was written because the list iterators destroy the state
- // of other iterations, thus, we can't arrange while iterating
- // through the children (such as when setting which is selected.
- virtual void setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse = RECURSE_NO);
-
- // Get the current state of the folder.
- virtual BOOL isOpen() { return mIsOpen; }
-
- // special case if an object is dropped on the child.
- BOOL handleDragAndDropFromChild(MASK mask,
- BOOL drop,
- EDragAndDropType cargo_type,
- void* cargo_data,
- EAcceptance* accept,
- std::string& tooltip_msg);
-
- void applyFunctorRecursively(LLFolderViewFunctor& functor);
- virtual void applyListenerFunctorRecursively(LLFolderViewListenerFunctor& functor);
-
- virtual void openItem( void );
- virtual BOOL addItem(LLFolderViewItem* item);
- virtual BOOL addFolder( LLFolderViewFolder* folder);
-
- // LLView functionality
- virtual BOOL handleHover(S32 x, S32 y, MASK mask);
- virtual BOOL handleRightMouseDown( S32 x, S32 y, MASK mask );
- virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask );
- virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask );
- virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
- EDragAndDropType cargo_type,
- void* cargo_data,
- EAcceptance* accept,
- std::string& tooltip_msg);
- virtual void draw();
-
- time_t getCreationDate() const;
- bool isTrash() const;
-};
-
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLFolderView
@@ -741,8 +89,12 @@ public:
// manages the screen region of the folder view.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-class LLUICtrl;
+class LLFolderViewEventListener;
+class LLInventoryModel;
class LLLineEditor;
+class LLMenuGL;
+class LLScrollContainer;
+class LLUICtrl;
class LLFolderView : public LLFolderViewFolder, public LLEditMenuHandler
{
@@ -765,21 +117,23 @@ public:
// and resort the items if necessary.
void setSortOrder(U32 order);
void checkTreeResortForModelChanged();
- void setFilterPermMask(PermissionMask filter_perm_mask) { mFilter.setFilterPermissions(filter_perm_mask); }
+ void setFilterPermMask(PermissionMask filter_perm_mask);
void setAllowMultiSelect(BOOL allow) { mAllowMultiSelect = allow; }
typedef boost::signals2::signal<void (const std::deque<LLFolderViewItem*>& items, BOOL user_action)> signal_t;
void setSelectCallback(const signal_t::slot_type& cb) { mSelectSignal.connect(cb); }
void setReshapeCallback(const signal_t::slot_type& cb) { mReshapeSignal.connect(cb); }
- LLInventoryFilter* getFilter() { return &mFilter; }
+ // filter is never null
+ LLInventoryFilter* getFilter();
const std::string getFilterSubString(BOOL trim = FALSE);
- U32 getFilterTypes() const { return mFilter.getFilterTypes(); }
- PermissionMask getFilterPermissions() const { return mFilter.getFilterPermissions(); }
- LLInventoryFilter::EFolderShow getShowFolderState() { return mFilter.getShowFolderState(); }
+ U32 getFilterTypes() const;
+ PermissionMask getFilterPermissions() const;
+ // JAMESDEBUG use getFilter()->getShowFolderState();
+ //LLInventoryFilter::EFolderShow getShowFolderState();
U32 getSortOrder() const;
- BOOL isFilterModified() { return mFilter.isNotDefault(); }
- BOOL getAllowMultiSelect() { return mAllowMultiSelect; }
+ BOOL isFilterModified();
+ BOOL getAllowMultiSelect();
// Close all folders in the view
void closeAllFolders();
@@ -836,6 +190,9 @@ public:
void openSelectedItems( void );
void propertiesSelectedItems( void );
+ // change the folder type
+ void changeType(LLInventoryModel *model, LLAssetType::EType new_folder_type);
+
void autoOpenItem(LLFolderViewFolder* item);
void closeAutoOpenedFolders();
BOOL autoOpenTest(LLFolderViewFolder* item);
@@ -914,7 +271,7 @@ public:
LLPanel* getParentPanel() { return mParentPanel; }
// DEBUG only
void dumpSelectionInformation();
-
+
private:
void updateRenamerPosition();
@@ -955,7 +312,7 @@ protected:
LLFrameTimer mAutoOpenTimer;
LLFrameTimer mSearchTimer;
std::string mSearchString;
- LLInventoryFilter mFilter;
+ LLInventoryFilter* mFilter;
BOOL mShowSelectionContext;
BOOL mShowSingleSelection;
LLFrameTimer mMultiSelectionFadeTimer;
diff --git a/indra/newview/llfoldervieweventlistener.h b/indra/newview/llfoldervieweventlistener.h
new file mode 100644
index 0000000000..eb06123b46
--- /dev/null
+++ b/indra/newview/llfoldervieweventlistener.h
@@ -0,0 +1,100 @@
+/**
+ * @file llfoldervieweventlistener.h
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ *
+ * Copyright (c) 2001-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 LLFOLDERVIEWEVENTLISTENER_H
+#define LLFOLDERVIEWEVENTLISTENER_H
+
+#include "lldarray.h" // JAMESDEBUG convert to std::vector
+#include "llfontgl.h" // just for StyleFlags enum
+#include "llpointer.h"
+
+
+class LLFolderViewItem;
+class LLFolderView;
+class LLFontGL;
+class LLInventoryModel;
+class LLMenuGL;
+class LLScrollContainer;
+class LLUIImage;
+class LLUUID;
+
+// This is an abstract base class that users of the folderview classes
+// would use to catch the useful events emitted from the folder
+// views.
+class LLFolderViewEventListener
+{
+public:
+ virtual ~LLFolderViewEventListener( void ) {}
+ virtual const std::string& getName() const = 0;
+ virtual const std::string& getDisplayName() const = 0;
+ virtual const LLUUID& getUUID() const = 0;
+ virtual time_t getCreationDate() const = 0; // UTC seconds
+ virtual PermissionMask getPermissionMask() const = 0;
+ virtual LLAssetType::EType getPreferredType() const = 0;
+ virtual LLPointer<LLUIImage> getIcon() const = 0;
+ virtual LLFontGL::StyleFlags getLabelStyle() const = 0;
+ virtual std::string getLabelSuffix() const = 0;
+ virtual void openItem( void ) = 0;
+ virtual void previewItem( void ) = 0;
+ virtual void selectItem(void) = 0;
+ virtual void showProperties(void) = 0;
+ virtual BOOL isItemRenameable() const = 0;
+ virtual BOOL renameItem(const std::string& new_name) = 0;
+ virtual BOOL isItemMovable( void ) = 0; // Can be moved to another folder
+ virtual BOOL isItemRemovable( void ) = 0; // Can be destroyed
+ virtual BOOL removeItem() = 0;
+ virtual void removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batch) = 0;
+ virtual void move( LLFolderViewEventListener* parent_listener ) = 0;
+ virtual BOOL isItemCopyable() const = 0;
+ virtual BOOL copyToClipboard() const = 0;
+ virtual void cutToClipboard() = 0;
+ virtual BOOL isClipboardPasteable() const = 0;
+ virtual void pasteFromClipboard() = 0;
+ virtual void pasteLinkFromClipboard() = 0;
+ virtual void buildContextMenu(LLMenuGL& menu, U32 flags) = 0;
+ virtual BOOL isUpToDate() const = 0;
+ virtual BOOL hasChildren() const = 0;
+ virtual LLInventoryType::EType getInventoryType() const = 0;
+ virtual void performAction(LLFolderView* folder, LLInventoryModel* model, std::string action) = 0;
+
+ // This method should be called when a drag begins. returns TRUE
+ // if the drag can begin, otherwise FALSE.
+ virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const = 0;
+
+ // This method will be called to determine if a drop can be
+ // performed, and will set drop to TRUE if a drop is
+ // requested. Returns TRUE if a drop is possible/happened,
+ // otherwise FALSE.
+ virtual BOOL dragOrDrop(MASK mask, BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data) = 0;
+};
+
+#endif
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp
new file mode 100644
index 0000000000..a6a8da2a76
--- /dev/null
+++ b/indra/newview/llfolderviewitem.cpp
@@ -0,0 +1,2475 @@
+/**
+* @file llfolderviewitem.cpp
+* @brief Items and folders that can appear in a hierarchical folder view
+*
+* $LicenseInfo:firstyear=2001&license=viewergpl$
+*
+* Copyright (c) 2001-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h"
+
+#include "llfolderviewitem.h"
+
+// viewer includes
+#include "llfolderview.h" // Items depend extensively on LLFolderViews
+#include "llfoldervieweventlistener.h"
+#include "llinventoryfilter.h"
+#include "llinventorymodel.h" // *TODO: make it take a pointer to an inventory-model interface
+#include "llviewercontrol.h" // gSavedSettings
+#include "llviewerwindow.h" // Argh, only for setCursor()
+
+// linden library includes
+#include "llfocusmgr.h" // gFocusMgr
+#include "llpanel.h" // panel->hasFocus()
+#include "lltrans.h"
+
+///----------------------------------------------------------------------------
+/// Class LLFolderViewItem
+///----------------------------------------------------------------------------
+
+// statics
+const LLFontGL* LLFolderViewItem::sFont = NULL;
+const LLFontGL* LLFolderViewItem::sSmallFont = NULL;
+LLUIImagePtr LLFolderViewItem::sArrowImage;
+LLUIImagePtr LLFolderViewItem::sBoxImage;
+
+// only integers can be initialized in header
+const F32 LLFolderViewItem::FOLDER_CLOSE_TIME_CONSTANT = 0.02f;
+const F32 LLFolderViewItem::FOLDER_OPEN_TIME_CONSTANT = 0.03f;
+
+const LLColor4U DEFAULT_WHITE(255, 255, 255);
+
+//static
+void LLFolderViewItem::initClass()
+{
+ sFont = LLFontGL::getFontSansSerifSmall();
+ sSmallFont = LLFontGL::getFontMonospace();
+ sArrowImage = LLUI::getUIImage("folder_arrow.tga");
+ sBoxImage = LLUI::getUIImage("rounded_square.tga");
+}
+
+//static
+void LLFolderViewItem::cleanupClass()
+{
+ sArrowImage = NULL;
+ sBoxImage = NULL;
+}
+
+
+// NOTE: Optimize this, we call it a *lot* when opening a large inventory
+LLFolderViewItem::Params::Params()
+: icon("icon"),
+ folder_arrow_image("folder_arrow_image", LLUI::getUIImage("folder_arrow.tga")),
+ selection_image("selection_image", LLUI::getUIImage("rounded_square.tga"))
+{
+ mouse_opaque(true);
+ follows.flags(FOLLOWS_LEFT|FOLLOWS_TOP|FOLLOWS_RIGHT);
+ // JAMESDEBUG tab_stop(false);
+}
+
+// Default constructor
+LLFolderViewItem::LLFolderViewItem(LLFolderViewItem::Params p)
+: LLView(p),
+ mLabelWidth(0),
+ mLabelWidthDirty(false),
+ mParentFolder( NULL ),
+ mIsSelected( FALSE ),
+ mIsCurSelection( FALSE ),
+ mSelectPending(FALSE),
+ mLabelStyle( LLFontGL::NORMAL ),
+ mHasVisibleChildren(FALSE),
+ mIndentation(0),
+ mNumDescendantsSelected(0),
+ mFiltered(FALSE),
+ mLastFilterGeneration(-1),
+ mStringMatchOffset(std::string::npos),
+ mControlLabelRotation(0.f),
+ mDragAndDropTarget(FALSE),
+ mIsLoading(FALSE),
+ mLabel(p.name),
+ mRoot(p.root),
+ mCreationDate(p.creation_date),
+ mListener(p.listener),
+ mArrowImage(p.folder_arrow_image),
+ mBoxImage(p.selection_image)
+{
+ refresh();
+}
+
+// Destroys the object
+LLFolderViewItem::~LLFolderViewItem( void )
+{
+ delete mListener;
+ mListener = NULL;
+}
+
+LLFolderView* LLFolderViewItem::getRoot()
+{
+ return mRoot;
+}
+
+// Returns true if this object is a child (or grandchild, etc.) of potential_ancestor.
+BOOL LLFolderViewItem::isDescendantOf( const LLFolderViewFolder* potential_ancestor )
+{
+ LLFolderViewItem* root = this;
+ while( root->mParentFolder )
+ {
+ if( root->mParentFolder == potential_ancestor )
+ {
+ return TRUE;
+ }
+ root = root->mParentFolder;
+ }
+ return FALSE;
+}
+
+LLFolderViewItem* LLFolderViewItem::getNextOpenNode(BOOL include_children)
+{
+ if (!mParentFolder)
+ {
+ return NULL;
+ }
+
+ LLFolderViewItem* itemp = mParentFolder->getNextFromChild( this, include_children );
+ while(itemp && !itemp->getVisible())
+ {
+ LLFolderViewItem* next_itemp = itemp->mParentFolder->getNextFromChild( itemp, include_children );
+ if (itemp == next_itemp)
+ {
+ // hit last item
+ return itemp->getVisible() ? itemp : this;
+ }
+ itemp = next_itemp;
+ }
+
+ return itemp;
+}
+
+LLFolderViewItem* LLFolderViewItem::getPreviousOpenNode(BOOL include_children)
+{
+ if (!mParentFolder)
+ {
+ return NULL;
+ }
+
+ LLFolderViewItem* itemp = mParentFolder->getPreviousFromChild( this, include_children );
+ while(itemp && !itemp->getVisible())
+ {
+ LLFolderViewItem* next_itemp = itemp->mParentFolder->getPreviousFromChild( itemp, include_children );
+ if (itemp == next_itemp)
+ {
+ // hit first item
+ return itemp->getVisible() ? itemp : this;
+ }
+ itemp = next_itemp;
+ }
+
+ return itemp;
+}
+
+// is this item something we think we should be showing?
+// for example, if we haven't gotten around to filtering it yet, then the answer is yes
+// until we find out otherwise
+BOOL LLFolderViewItem::potentiallyVisible()
+{
+ // we haven't been checked against min required filter
+ // or we have and we passed
+ return getLastFilterGeneration() < getRoot()->getFilter()->getMinRequiredGeneration() || getFiltered();
+}
+
+BOOL LLFolderViewItem::getFiltered()
+{
+ return mFiltered && mLastFilterGeneration >= getRoot()->getFilter()->getMinRequiredGeneration();
+}
+
+BOOL LLFolderViewItem::getFiltered(S32 filter_generation)
+{
+ return mFiltered && mLastFilterGeneration >= filter_generation;
+}
+
+void LLFolderViewItem::setFiltered(BOOL filtered, S32 filter_generation)
+{
+ mFiltered = filtered;
+ mLastFilterGeneration = filter_generation;
+}
+
+void LLFolderViewItem::setIcon(LLUIImagePtr icon)
+{
+ mIcon = icon;
+}
+
+// refresh information from the listener
+void LLFolderViewItem::refreshFromListener()
+{
+ if(mListener)
+ {
+ mLabel = mListener->getDisplayName();
+ LLAssetType::EType preferred_type = mListener->getPreferredType();
+
+ // *TODO: to be removed when database supports multi language. This is a
+ // temporary attempt to display the inventory folder in the user locale.
+ if (LLAssetType::lookupIsProtectedCategoryType(preferred_type))
+ {
+ mLabel = LLTrans::getString("InvFolder " + mLabel);
+ };
+
+ setIcon(mListener->getIcon());
+ time_t creation_date = mListener->getCreationDate();
+ if (mCreationDate != creation_date)
+ {
+ mCreationDate = mListener->getCreationDate();
+ dirtyFilter();
+ }
+ mLabelStyle = mListener->getLabelStyle();
+ mLabelSuffix = mListener->getLabelSuffix();
+ }
+}
+
+void LLFolderViewItem::refresh()
+{
+ refreshFromListener();
+
+ std::string searchable_label(mLabel);
+ searchable_label.append(mLabelSuffix);
+ LLStringUtil::toUpper(searchable_label);
+
+ if (mSearchableLabel.compare(searchable_label))
+ {
+ mSearchableLabel.assign(searchable_label);
+ dirtyFilter();
+ // some part of label has changed, so overall width has potentially changed, and sort order too
+ if (mParentFolder)
+ {
+ mParentFolder->requestSort();
+ mParentFolder->requestArrange();
+ }
+ }
+
+ mLabelWidthDirty = true;
+}
+
+void LLFolderViewItem::applyListenerFunctorRecursively(LLFolderViewListenerFunctor& functor)
+{
+ functor(mListener);
+}
+
+// This function is called when items are added or view filters change. It's
+// implemented here but called by derived classes when folding the
+// views.
+void LLFolderViewItem::filterFromRoot( void )
+{
+ LLFolderViewItem* root = getRoot();
+
+ root->filter(*((LLFolderView*)root)->getFilter());
+}
+
+// This function is called when the folder view is dirty. It's
+// implemented here but called by derived classes when folding the
+// views.
+void LLFolderViewItem::arrangeFromRoot()
+{
+ LLFolderViewItem* root = getRoot();
+
+ S32 height = 0;
+ S32 width = 0;
+ root->arrange( &width, &height, 0 );
+}
+
+// Utility function for LLFolderView
+void LLFolderViewItem::arrangeAndSet(BOOL set_selection,
+ BOOL take_keyboard_focus)
+{
+ LLFolderView* root = getRoot();
+ getParentFolder()->requestArrange();
+ if(set_selection)
+ {
+ setSelectionFromRoot(this, TRUE, take_keyboard_focus);
+ if(root)
+ {
+ root->scrollToShowSelection();
+ }
+ }
+}
+
+// This function clears the currently selected item, and records the
+// specified selected item appropriately for display and use in the
+// UI. If open is TRUE, then folders are opened up along the way to
+// the selection.
+void LLFolderViewItem::setSelectionFromRoot(LLFolderViewItem* selection,
+ BOOL openitem,
+ BOOL take_keyboard_focus)
+{
+ getRoot()->setSelection(selection, openitem, take_keyboard_focus);
+}
+
+// helper function to change the selection from the root.
+void LLFolderViewItem::changeSelectionFromRoot(LLFolderViewItem* selection, BOOL selected)
+{
+ getRoot()->changeSelection(selection, selected);
+}
+
+void LLFolderViewItem::extendSelectionFromRoot(LLFolderViewItem* selection)
+{
+ LLDynamicArray<LLFolderViewItem*> selected_items;
+
+ getRoot()->extendSelection(selection, NULL, selected_items);
+}
+
+EInventorySortGroup LLFolderViewItem::getSortGroup() const
+{
+ return SG_ITEM;
+}
+
+// addToFolder() returns TRUE if it succeeds. FALSE otherwise
+BOOL LLFolderViewItem::addToFolder(LLFolderViewFolder* folder, LLFolderView* root)
+{
+ if (!folder)
+ {
+ return FALSE;
+ }
+ mParentFolder = folder;
+ root->addItemID(getListener()->getUUID(), this);
+ return folder->addItem(this);
+}
+
+
+// Finds width and height of this object and it's children. Also
+// makes sure that this view and it's children are the right size.
+S32 LLFolderViewItem::arrange( S32* width, S32* height, S32 filter_generation)
+{
+ mIndentation = mParentFolder ? mParentFolder->getIndentation() + LEFT_INDENTATION : 0;
+ if (mLabelWidthDirty)
+ {
+ mLabelWidth = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + sFont->getWidth(mSearchableLabel);
+ mLabelWidthDirty = false;
+ }
+
+ *width = llmax(*width, mLabelWidth + mIndentation);
+ *height = getItemHeight();
+ return *height;
+}
+
+S32 LLFolderViewItem::getItemHeight()
+{
+ S32 icon_height = mIcon->getHeight();
+ S32 label_height = llround(sFont->getLineHeight());
+ return llmax( icon_height, label_height ) + ICON_PAD;
+}
+
+void LLFolderViewItem::filter( LLInventoryFilter& filter)
+{
+ BOOL filtered = mListener && filter.check(this);
+
+ // if our visibility will change as a result of this filter, then
+ // we need to be rearranged in our parent folder
+ if (getVisible() != filtered)
+ {
+ if (mParentFolder)
+ {
+ mParentFolder->requestArrange();
+ }
+ }
+
+ setFiltered(filtered, filter.getCurrentGeneration());
+ mStringMatchOffset = filter.getStringMatchOffset();
+ filter.decrementFilterCount();
+
+ if (getRoot()->getDebugFilters())
+ {
+ mStatusText = llformat("%d", mLastFilterGeneration);
+ }
+}
+
+void LLFolderViewItem::dirtyFilter()
+{
+ mLastFilterGeneration = -1;
+ // bubble up dirty flag all the way to root
+ if (getParentFolder())
+ {
+ getParentFolder()->setCompletedFilterGeneration(-1, TRUE);
+ }
+}
+
+// *TODO: This can be optimized a lot by simply recording that it is
+// selected in the appropriate places, and assuming that set selection
+// means 'deselect' for a leaf item. Do this optimization after
+// multiple selection is implemented to make sure it all plays nice
+// together.
+BOOL LLFolderViewItem::setSelection(LLFolderViewItem* selection, BOOL openitem, BOOL take_keyboard_focus)
+{
+ if( selection == this )
+ {
+ mIsSelected = TRUE;
+ if(mListener)
+ {
+ mListener->selectItem();
+ }
+ }
+ else
+ {
+ mIsSelected = FALSE;
+ }
+ return mIsSelected;
+}
+
+BOOL LLFolderViewItem::changeSelection(LLFolderViewItem* selection, BOOL selected)
+{
+ if(selection == this && mIsSelected != selected)
+ {
+ mIsSelected = selected;
+ if(mListener)
+ {
+ mListener->selectItem();
+ }
+ return TRUE;
+ }
+ return FALSE;
+}
+
+void LLFolderViewItem::recursiveDeselect(BOOL deselect_self)
+{
+ if (mIsSelected && deselect_self)
+ {
+ mIsSelected = FALSE;
+
+ // update ancestors' count of selected descendents
+ LLFolderViewFolder* parent_folder = getParentFolder();
+ while(parent_folder)
+ {
+ parent_folder->mNumDescendantsSelected--;
+ parent_folder = parent_folder->getParentFolder();
+ }
+ }
+}
+
+
+BOOL LLFolderViewItem::isMovable()
+{
+ if( mListener )
+ {
+ return mListener->isItemMovable();
+ }
+ else
+ {
+ return TRUE;
+ }
+}
+
+BOOL LLFolderViewItem::isRemovable()
+{
+ if( mListener )
+ {
+ return mListener->isItemRemovable();
+ }
+ else
+ {
+ return TRUE;
+ }
+}
+
+void LLFolderViewItem::destroyView()
+{
+ if (mParentFolder)
+ {
+ // removeView deletes me
+ mParentFolder->removeView(this);
+ }
+}
+
+// Call through to the viewed object and return true if it can be
+// removed.
+//BOOL LLFolderViewItem::removeRecursively(BOOL single_item)
+BOOL LLFolderViewItem::remove()
+{
+ if(!isRemovable())
+ {
+ return FALSE;
+ }
+ if(mListener)
+ {
+ return mListener->removeItem();
+ }
+ return TRUE;
+}
+
+// Build an appropriate context menu for the item.
+void LLFolderViewItem::buildContextMenu(LLMenuGL& menu, U32 flags)
+{
+ if(mListener)
+ {
+ mListener->buildContextMenu(menu, flags);
+ }
+}
+
+void LLFolderViewItem::openItem( void )
+{
+ if( mListener )
+ {
+ mListener->openItem();
+ }
+}
+
+void LLFolderViewItem::preview( void )
+{
+ if (mListener)
+ {
+ mListener->previewItem();
+ }
+}
+
+void LLFolderViewItem::rename(const std::string& new_name)
+{
+ if( !new_name.empty() )
+ {
+ if( mListener )
+ {
+ mListener->renameItem(new_name);
+
+ if(mParentFolder)
+ {
+ mParentFolder->requestSort();
+ }
+ }
+ }
+}
+
+const std::string& LLFolderViewItem::getSearchableLabel() const
+{
+ return mSearchableLabel;
+}
+
+const std::string& LLFolderViewItem::getName( void ) const
+{
+ if(mListener)
+ {
+ return mListener->getName();
+ }
+ return mLabel;
+}
+
+// LLView functionality
+BOOL LLFolderViewItem::handleRightMouseDown( S32 x, S32 y, MASK mask )
+{
+ if(!mIsSelected)
+ {
+ setSelectionFromRoot(this, FALSE);
+ }
+ make_ui_sound("UISndClick");
+ return TRUE;
+}
+
+BOOL LLFolderViewItem::handleMouseDown( S32 x, S32 y, MASK mask )
+{
+ // No handler needed for focus lost since this class has no
+ // state that depends on it.
+ gFocusMgr.setMouseCapture( this );
+
+ if (!mIsSelected)
+ {
+ if(mask & MASK_CONTROL)
+ {
+ changeSelectionFromRoot(this, !mIsSelected);
+ }
+ else if (mask & MASK_SHIFT)
+ {
+ extendSelectionFromRoot(this);
+ }
+ else
+ {
+ setSelectionFromRoot(this, FALSE);
+ }
+ make_ui_sound("UISndClick");
+ }
+ else
+ {
+ mSelectPending = TRUE;
+ }
+
+ if( isMovable() )
+ {
+ S32 screen_x;
+ S32 screen_y;
+ localPointToScreen(x, y, &screen_x, &screen_y );
+ LLToolDragAndDrop::getInstance()->setDragStart( screen_x, screen_y );
+ }
+ return TRUE;
+}
+
+BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask )
+{
+ if( hasMouseCapture() && isMovable() )
+ {
+ S32 screen_x;
+ S32 screen_y;
+ localPointToScreen(x, y, &screen_x, &screen_y );
+ BOOL can_drag = TRUE;
+ if( LLToolDragAndDrop::getInstance()->isOverThreshold( screen_x, screen_y ) )
+ {
+ LLFolderView* root = getRoot();
+
+ if(root->getCurSelectedItem())
+ {
+ LLToolDragAndDrop::ESource src = LLToolDragAndDrop::SOURCE_WORLD;
+
+ // *TODO: push this into listener and remove
+ // dependency on llagent
+ if (mListener
+ && gInventory.isObjectDescendentOf(mListener->getUUID(), gInventory.getRootFolderID()))
+ {
+ src = LLToolDragAndDrop::SOURCE_AGENT;
+ }
+ else if (mListener
+ && gInventory.isObjectDescendentOf(mListener->getUUID(), gInventory.getLibraryRootFolderID()))
+ {
+ src = LLToolDragAndDrop::SOURCE_LIBRARY;
+ }
+
+ can_drag = root->startDrag(src);
+ if (can_drag)
+ {
+ // if (mListener) mListener->startDrag();
+ // RN: when starting drag and drop, clear out last auto-open
+ root->autoOpenTest(NULL);
+ root->setShowSelectionContext(TRUE);
+
+ // Release keyboard focus, so that if stuff is dropped into the
+ // world, pressing the delete key won't blow away the inventory
+ // item.
+ gFocusMgr.setKeyboardFocus(NULL);
+
+ return LLToolDragAndDrop::getInstance()->handleHover( x, y, mask );
+ }
+ }
+ }
+
+ if (can_drag)
+ {
+ gViewerWindow->setCursor(UI_CURSOR_ARROW);
+ }
+ else
+ {
+ gViewerWindow->setCursor(UI_CURSOR_NOLOCKED);
+ }
+ return TRUE;
+ }
+ else
+ {
+ getRoot()->setShowSelectionContext(FALSE);
+ gViewerWindow->setCursor(UI_CURSOR_ARROW);
+ // let parent handle this then...
+ return FALSE;
+ }
+}
+
+
+BOOL LLFolderViewItem::handleDoubleClick( S32 x, S32 y, MASK mask )
+{
+ preview();
+ return TRUE;
+}
+
+BOOL LLFolderViewItem::handleScrollWheel(S32 x, S32 y, S32 clicks)
+{
+ if (getParent())
+ {
+ return getParent()->handleScrollWheel(x, y, clicks);
+ }
+ return FALSE;
+}
+
+BOOL LLFolderViewItem::handleMouseUp( S32 x, S32 y, MASK mask )
+{
+ // if mouse hasn't moved since mouse down...
+ if ( pointInView(x, y) && mSelectPending )
+ {
+ //...then select
+ if(mask & MASK_CONTROL)
+ {
+ changeSelectionFromRoot(this, !mIsSelected);
+ }
+ else if (mask & MASK_SHIFT)
+ {
+ extendSelectionFromRoot(this);
+ }
+ else
+ {
+ setSelectionFromRoot(this, FALSE);
+ }
+ }
+
+ mSelectPending = FALSE;
+
+ if( hasMouseCapture() )
+ {
+ getRoot()->setShowSelectionContext(FALSE);
+ gFocusMgr.setMouseCapture( NULL );
+ }
+ return TRUE;
+}
+
+BOOL LLFolderViewItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg)
+{
+ BOOL accepted = FALSE;
+ BOOL handled = FALSE;
+ if(mListener)
+ {
+ accepted = mListener->dragOrDrop(mask,drop,cargo_type,cargo_data);
+ handled = accepted;
+ if (accepted)
+ {
+ mDragAndDropTarget = TRUE;
+ *accept = ACCEPT_YES_MULTI;
+ }
+ else
+ {
+ *accept = ACCEPT_NO;
+ }
+ }
+ if(mParentFolder && !handled)
+ {
+ handled = mParentFolder->handleDragAndDropFromChild(mask,drop,cargo_type,cargo_data,accept,tooltip_msg);
+ }
+ if (handled)
+ {
+ lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLFolderViewItem" << llendl;
+ }
+
+ return handled;
+}
+
+
+void LLFolderViewItem::draw()
+{
+ static LLUIColor sFgColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE);
+ static LLUIColor sHighlightBgColor = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", DEFAULT_WHITE);
+ static LLUIColor sHighlightFgColor = LLUIColorTable::instance().getColor("MenuItemHighlightFgColor", DEFAULT_WHITE);
+ static LLUIColor sFilterBGColor = LLUIColorTable::instance().getColor("FilterBackgroundColor", DEFAULT_WHITE);
+ static LLUIColor sFilterTextColor = LLUIColorTable::instance().getColor("FilterTextColor", DEFAULT_WHITE);
+ static LLUIColor sSuffixColor = LLUIColorTable::instance().getColor("InventoryItemSuffixColor", DEFAULT_WHITE);
+ static LLUIColor sSearchStatusColor = LLUIColorTable::instance().getColor("InventorySearchStatusColor", DEFAULT_WHITE);
+
+ bool possibly_has_children = false;
+ bool up_to_date = mListener && mListener->isUpToDate();
+ if((up_to_date && hasVisibleChildren() ) || // we fetched our children and some of them have passed the filter...
+ (!up_to_date && mListener && mListener->hasChildren())) // ...or we know we have children but haven't fetched them (doesn't obey filter)
+ {
+ possibly_has_children = true;
+ }
+ if(/*mControlLabel[0] != '\0' && */possibly_has_children)
+ {
+ if (sArrowImage)
+ {
+ gl_draw_scaled_rotated_image(mIndentation, getRect().getHeight() - ARROW_SIZE - TEXT_PAD,
+ ARROW_SIZE, ARROW_SIZE, mControlLabelRotation, sArrowImage->getImage(), sFgColor);
+ }
+ }
+
+ F32 text_left = (F32)(ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + mIndentation);
+
+ // If we have keyboard focus, draw selection filled
+ BOOL show_context = getRoot()->getShowSelectionContext();
+ BOOL filled = show_context || (getRoot()->getParentPanel()->hasFocus());
+
+ // always render "current" item, only render other selected items if
+ // mShowSingleSelection is FALSE
+ if( mIsSelected )
+ {
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+ LLColor4 bg_color = sHighlightBgColor;
+ //const S32 TRAILING_PAD = 5; // It just looks better with this.
+ if (!mIsCurSelection)
+ {
+ // do time-based fade of extra objects
+ F32 fade_time = getRoot()->getSelectionFadeElapsedTime();
+ if (getRoot()->getShowSingleSelection())
+ {
+ // fading out
+ bg_color.mV[VALPHA] = clamp_rescale(fade_time, 0.f, 0.4f, bg_color.mV[VALPHA], 0.f);
+ }
+ else
+ {
+ // fading in
+ bg_color.mV[VALPHA] = clamp_rescale(fade_time, 0.f, 0.4f, 0.f, bg_color.mV[VALPHA]);
+ }
+ }
+
+ gl_rect_2d(
+ 0,
+ getRect().getHeight(),
+ getRect().getWidth() - 2,
+ llfloor(getRect().getHeight() - sFont->getLineHeight() - ICON_PAD),
+ bg_color, filled);
+ if (mIsCurSelection)
+ {
+ gl_rect_2d(
+ 0,
+ getRect().getHeight(),
+ getRect().getWidth() - 2,
+ llfloor(getRect().getHeight() - sFont->getLineHeight() - ICON_PAD),
+ sHighlightFgColor, FALSE);
+ }
+ if (getRect().getHeight() > llround(sFont->getLineHeight()) + ICON_PAD + 2)
+ {
+ gl_rect_2d(
+ 0,
+ llfloor(getRect().getHeight() - sFont->getLineHeight() - ICON_PAD) - 2,
+ getRect().getWidth() - 2,
+ 2,
+ sHighlightFgColor, FALSE);
+ if (show_context)
+ {
+ gl_rect_2d(
+ 0,
+ llfloor(getRect().getHeight() - sFont->getLineHeight() - ICON_PAD) - 2,
+ getRect().getWidth() - 2,
+ 2,
+ sHighlightBgColor, TRUE);
+ }
+ }
+ }
+ if (mDragAndDropTarget)
+ {
+ gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+ gl_rect_2d(
+ 0,
+ getRect().getHeight(),
+ getRect().getWidth() - 2,
+ llfloor(getRect().getHeight() - sFont->getLineHeight() - ICON_PAD),
+ sHighlightBgColor, FALSE);
+
+ if (getRect().getHeight() > llround(sFont->getLineHeight()) + ICON_PAD + 2)
+ {
+ gl_rect_2d(
+ 0,
+ llfloor(getRect().getHeight() - sFont->getLineHeight() - ICON_PAD) - 2,
+ getRect().getWidth() - 2,
+ 2,
+ sHighlightBgColor, FALSE);
+ }
+ mDragAndDropTarget = FALSE;
+ }
+
+
+ if(mIcon)
+ {
+ mIcon->draw(mIndentation + ARROW_SIZE + TEXT_PAD, getRect().getHeight() - mIcon->getHeight());
+ }
+
+ if (!mLabel.empty())
+ {
+ // highlight filtered text
+ BOOL debug_filters = getRoot()->getDebugFilters();
+ LLColor4 color = ( (mIsSelected && filled) ? sHighlightFgColor : sFgColor );
+ F32 right_x;
+ F32 y = (F32)getRect().getHeight() - sFont->getLineHeight() - (F32)TEXT_PAD;
+
+ if (debug_filters)
+ {
+ if (!getFiltered() && !possibly_has_children)
+ {
+ color.mV[VALPHA] *= 0.5f;
+ }
+
+ LLColor4 filter_color = mLastFilterGeneration >= getRoot()->getFilter()->getCurrentGeneration() ? LLColor4(0.5f, 0.8f, 0.5f, 1.f) : LLColor4(0.8f, 0.5f, 0.5f, 1.f);
+ sSmallFont->renderUTF8(mStatusText, 0, text_left, y, filter_color,
+ LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
+ S32_MAX, S32_MAX, &right_x, FALSE );
+ text_left = right_x;
+ }
+
+
+ if ( mIsLoading
+ && mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime") )
+ {
+ sFont->renderUTF8(LLTrans::getString("LoadingData"), 0, text_left, y, sSearchStatusColor,
+ LLFontGL::LEFT, LLFontGL::BOTTOM, mLabelStyle, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, &right_x, FALSE);
+ text_left = right_x;
+ }
+
+ sFont->renderUTF8( mLabel, 0, text_left, y, color,
+ LLFontGL::LEFT, LLFontGL::BOTTOM, mLabelStyle, LLFontGL::NO_SHADOW,
+ S32_MAX, S32_MAX, &right_x, FALSE );
+ if (!mLabelSuffix.empty())
+ {
+ sFont->renderUTF8( mLabelSuffix, 0, right_x, y, sSuffixColor,
+ LLFontGL::LEFT, LLFontGL::BOTTOM, mLabelStyle, LLFontGL::NO_SHADOW,
+ S32_MAX, S32_MAX, &right_x, FALSE );
+ }
+
+ if (sBoxImage.notNull() && mStringMatchOffset != std::string::npos)
+ {
+ // don't draw backgrounds for zero-length strings
+ S32 filter_string_length = getRoot()->getFilterSubString().size();
+ if (filter_string_length > 0)
+ {
+ std::string combined_string = mLabel + mLabelSuffix;
+ S32 left = llround(text_left) + sFont->getWidth(combined_string, 0, mStringMatchOffset) - 1;
+ S32 right = left + sFont->getWidth(combined_string, mStringMatchOffset, filter_string_length) + 2;
+ S32 bottom = llfloor(getRect().getHeight() - sFont->getLineHeight() - 3);
+ S32 top = getRect().getHeight();
+
+ LLRect box_rect(left, top, right, bottom);
+ sBoxImage->draw(box_rect, sFilterBGColor);
+ F32 match_string_left = text_left + sFont->getWidthF32(combined_string, 0, mStringMatchOffset);
+ F32 y = (F32)getRect().getHeight() - sFont->getLineHeight() - (F32)TEXT_PAD;
+ sFont->renderUTF8( combined_string, mStringMatchOffset, match_string_left, y,
+ sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, mLabelStyle, LLFontGL::NO_SHADOW,
+ filter_string_length, S32_MAX, &right_x, FALSE );
+ }
+ }
+ }
+
+ if( sDebugRects )
+ {
+ drawDebugRect();
+ }
+
+ //// *HACK: also draw debug rectangles around currently-being-edited LLView, and any elements that are being highlighted by GUI preview code (see LLFloaterUIPreview)
+ //std::set<LLView*>::iterator iter = std::find(sPreviewHighlightedElements.begin(), sPreviewHighlightedElements.end(), this);
+ //if ((sEditingUI && this == sEditingUIView) || (iter != sPreviewHighlightedElements.end() && sDrawPreviewHighlights))
+ //{
+ // drawDebugRect();
+ //}
+}
+
+
+///----------------------------------------------------------------------------
+/// Class LLFolderViewFolder
+///----------------------------------------------------------------------------
+
+LLFolderViewFolder::LLFolderViewFolder( const LLFolderViewItem::Params& p ):
+LLFolderViewItem( p ), // 0 = no create time
+mIsOpen(FALSE),
+mExpanderHighlighted(FALSE),
+mCurHeight(0.f),
+mTargetHeight(0.f),
+mAutoOpenCountdown(0.f),
+mSubtreeCreationDate(0),
+mAmTrash(LLFolderViewFolder::UNKNOWN),
+mLastArrangeGeneration( -1 ),
+mLastCalculatedWidth(0),
+mCompletedFilterGeneration(-1),
+mMostFilteredDescendantGeneration(-1),
+mNeedsSort(false)
+{}
+
+// Destroys the object
+LLFolderViewFolder::~LLFolderViewFolder( void )
+{
+ // The LLView base class takes care of object destruction. make sure that we
+ // don't have mouse or keyboard focus
+ gFocusMgr.releaseFocusIfNeeded( this ); // calls onCommit()
+}
+
+// addToFolder() returns TRUE if it succeeds. FALSE otherwise
+BOOL LLFolderViewFolder::addToFolder(LLFolderViewFolder* folder, LLFolderView* root)
+{
+ if (!folder)
+ {
+ return FALSE;
+ }
+ mParentFolder = folder;
+ root->addItemID(getListener()->getUUID(), this);
+ return folder->addFolder(this);
+}
+
+// Finds width and height of this object and it's children. Also
+// makes sure that this view and it's children are the right size.
+S32 LLFolderViewFolder::arrange( S32* width, S32* height, S32 filter_generation)
+{
+ // sort before laying out contents
+ if (mNeedsSort)
+ {
+ mFolders.sort(mSortFunction);
+ mItems.sort(mSortFunction);
+ mNeedsSort = false;
+ }
+
+ mHasVisibleChildren = hasFilteredDescendants(filter_generation);
+
+ LLInventoryFilter::EFolderShow show_folder_state = getRoot()->getFilter()->getShowFolderState();
+
+ // calculate height as a single item (without any children), and reshapes rectangle to match
+ LLFolderViewItem::arrange( width, height, filter_generation );
+
+ // clamp existing animated height so as to never get smaller than a single item
+ mCurHeight = llmax((F32)*height, mCurHeight);
+
+ // initialize running height value as height of single item in case we have no children
+ *height = getItemHeight();
+ F32 running_height = (F32)*height;
+ F32 target_height = (F32)*height;
+
+ // are my children visible?
+ if (needsArrange())
+ {
+ // set last arrange generation first, in case children are animating
+ // and need to be arranged again
+ mLastArrangeGeneration = getRoot()->getArrangeGeneration();
+ if (mIsOpen)
+ {
+ // Add sizes of children
+ S32 parent_item_height = getRect().getHeight();
+
+ for(folders_t::iterator fit = mFolders.begin(); fit != mFolders.end(); ++fit)
+ {
+ LLFolderViewFolder* folderp = (*fit);
+ if (getRoot()->getDebugFilters())
+ {
+ folderp->setVisible(TRUE);
+ }
+ else
+ {
+ folderp->setVisible(show_folder_state == LLInventoryFilter::SHOW_ALL_FOLDERS || // always show folders?
+ (folderp->getFiltered(filter_generation) || folderp->hasFilteredDescendants(filter_generation))); // passed filter or has descendants that passed filter
+ }
+
+ if (folderp->getVisible())
+ {
+ S32 child_width = *width;
+ S32 child_height = 0;
+ S32 child_top = parent_item_height - llround(running_height);
+
+ target_height += folderp->arrange( &child_width, &child_height, filter_generation );
+
+ running_height += (F32)child_height;
+ *width = llmax(*width, child_width);
+ folderp->setOrigin( 0, child_top - folderp->getRect().getHeight() );
+ }
+ }
+ for(items_t::iterator iit = mItems.begin();
+ iit != mItems.end(); ++iit)
+ {
+ LLFolderViewItem* itemp = (*iit);
+ if (getRoot()->getDebugFilters())
+ {
+ itemp->setVisible(TRUE);
+ }
+ else
+ {
+ itemp->setVisible(itemp->getFiltered(filter_generation));
+ }
+
+ if (itemp->getVisible())
+ {
+ S32 child_width = *width;
+ S32 child_height = 0;
+ S32 child_top = parent_item_height - llround(running_height);
+
+ target_height += itemp->arrange( &child_width, &child_height, filter_generation );
+ // don't change width, as this item is as wide as its parent folder by construction
+ itemp->reshape( itemp->getRect().getWidth(), child_height);
+
+ running_height += (F32)child_height;
+ *width = llmax(*width, child_width);
+ itemp->setOrigin( 0, child_top - itemp->getRect().getHeight() );
+ }
+ }
+ }
+
+ mTargetHeight = target_height;
+ // cache this width so next time we can just return it
+ mLastCalculatedWidth = *width;
+ }
+ else
+ {
+ // just use existing width
+ *width = mLastCalculatedWidth;
+ }
+
+ // animate current height towards target height
+ if (llabs(mCurHeight - mTargetHeight) > 1.f)
+ {
+ mCurHeight = lerp(mCurHeight, mTargetHeight, LLCriticalDamp::getInterpolant(mIsOpen ? FOLDER_OPEN_TIME_CONSTANT : FOLDER_CLOSE_TIME_CONSTANT));
+
+ requestArrange();
+
+ // hide child elements that fall out of current animated height
+ for (folders_t::iterator iter = mFolders.begin();
+ iter != mFolders.end();)
+ {
+ folders_t::iterator fit = iter++;
+ // number of pixels that bottom of folder label is from top of parent folder
+ if (getRect().getHeight() - (*fit)->getRect().mTop + (*fit)->getItemHeight()
+ > llround(mCurHeight) + MAX_FOLDER_ITEM_OVERLAP)
+ {
+ // hide if beyond current folder height
+ (*fit)->setVisible(FALSE);
+ }
+ }
+
+ for (items_t::iterator iter = mItems.begin();
+ iter != mItems.end();)
+ {
+ items_t::iterator iit = iter++;
+ // number of pixels that bottom of item label is from top of parent folder
+ if (getRect().getHeight() - (*iit)->getRect().mBottom
+ > llround(mCurHeight) + MAX_FOLDER_ITEM_OVERLAP)
+ {
+ (*iit)->setVisible(FALSE);
+ }
+ }
+ }
+ else
+ {
+ mCurHeight = mTargetHeight;
+ }
+
+ // don't change width as this item is already as wide as its parent folder
+ reshape(getRect().getWidth(),llround(mCurHeight));
+
+ // pass current height value back to parent
+ *height = llround(mCurHeight);
+
+ return llround(mTargetHeight);
+}
+
+BOOL LLFolderViewFolder::needsArrange()
+{
+ return mLastArrangeGeneration < getRoot()->getArrangeGeneration();
+}
+
+void LLFolderViewFolder::requestSort()
+{
+ mNeedsSort = true;
+ // whenever item order changes, we need to lay things out again
+ requestArrange();
+}
+
+void LLFolderViewFolder::setCompletedFilterGeneration(S32 generation, BOOL recurse_up)
+{
+ mMostFilteredDescendantGeneration = llmin(mMostFilteredDescendantGeneration, generation);
+ mCompletedFilterGeneration = generation;
+ // only aggregate up if we are a lower (older) value
+ if (recurse_up && mParentFolder && generation < mParentFolder->getCompletedFilterGeneration())
+ {
+ mParentFolder->setCompletedFilterGeneration(generation, TRUE);
+ }
+}
+
+void LLFolderViewFolder::filter( LLInventoryFilter& filter)
+{
+ S32 filter_generation = filter.getCurrentGeneration();
+ // if failed to pass filter newer than must_pass_generation
+ // you will automatically fail this time, so we only
+ // check against items that have passed the filter
+ S32 must_pass_generation = filter.getMustPassGeneration();
+
+ // if we have already been filtered against this generation, skip out
+ if (getCompletedFilterGeneration() >= filter_generation)
+ {
+ return;
+ }
+
+ // filter folder itself
+ if (getLastFilterGeneration() < filter_generation)
+ {
+ if (getLastFilterGeneration() >= must_pass_generation && // folder has been compared to a valid precursor filter
+ !mFiltered) // and did not pass the filter
+ {
+ // go ahead and flag this folder as done
+ mLastFilterGeneration = filter_generation;
+ }
+ else
+ {
+ // filter self only on first pass through
+ LLFolderViewItem::filter( filter );
+ }
+ }
+
+ if (getRoot()->getDebugFilters())
+ {
+ mStatusText = llformat("%d", mLastFilterGeneration);
+ mStatusText += llformat("(%d)", mCompletedFilterGeneration);
+ mStatusText += llformat("+%d", mMostFilteredDescendantGeneration);
+ }
+
+ // all descendants have been filtered later than must pass generation
+ // but none passed
+ if(getCompletedFilterGeneration() >= must_pass_generation && !hasFilteredDescendants(must_pass_generation))
+ {
+ // don't traverse children if we've already filtered them since must_pass_generation
+ // and came back with nothing
+ return;
+ }
+
+ // we entered here with at least one filter iteration left
+ // check to see if we have any more before continuing on to children
+ if (filter.getFilterCount() < 0)
+ {
+ return;
+ }
+
+ // when applying a filter, matching folders get their contents downloaded first
+ if (filter.isNotDefault() && getFiltered(filter.getMinRequiredGeneration()) && (mListener && !gInventory.isCategoryComplete(mListener->getUUID())))
+ {
+ gInventory.startBackgroundFetch(mListener->getUUID());
+ }
+
+ // now query children
+ for (folders_t::iterator iter = mFolders.begin();
+ iter != mFolders.end();)
+ {
+ folders_t::iterator fit = iter++;
+ // have we run out of iterations this frame?
+ if (filter.getFilterCount() < 0)
+ {
+ break;
+ }
+
+ // mMostFilteredDescendantGeneration might have been reset
+ // in which case we need to update it even for folders that
+ // don't need to be filtered anymore
+ if ((*fit)->getCompletedFilterGeneration() >= filter_generation)
+ {
+ // track latest generation to pass any child items
+ if ((*fit)->getFiltered() || (*fit)->hasFilteredDescendants(filter.getMinRequiredGeneration()))
+ {
+ mMostFilteredDescendantGeneration = filter_generation;
+ if (getRoot()->needsAutoSelect())
+ {
+ (*fit)->setOpenArrangeRecursively(TRUE);
+ }
+ }
+ // just skip it, it has already been filtered
+ continue;
+ }
+
+ // update this folders filter status (and children)
+ (*fit)->filter( filter );
+
+ // track latest generation to pass any child items
+ if ((*fit)->getFiltered() || (*fit)->hasFilteredDescendants(filter_generation))
+ {
+ mMostFilteredDescendantGeneration = filter_generation;
+ if (getRoot()->needsAutoSelect())
+ {
+ (*fit)->setOpenArrangeRecursively(TRUE);
+ }
+ }
+ }
+
+ for (items_t::iterator iter = mItems.begin();
+ iter != mItems.end();)
+ {
+ items_t::iterator iit = iter++;
+ if (filter.getFilterCount() < 0)
+ {
+ break;
+ }
+ if ((*iit)->getLastFilterGeneration() >= filter_generation)
+ {
+ if ((*iit)->getFiltered())
+ {
+ mMostFilteredDescendantGeneration = filter_generation;
+ }
+ continue;
+ }
+
+ if ((*iit)->getLastFilterGeneration() >= must_pass_generation &&
+ !(*iit)->getFiltered(must_pass_generation))
+ {
+ // failed to pass an earlier filter that was a subset of the current one
+ // go ahead and flag this item as done
+ (*iit)->setFiltered(FALSE, filter_generation);
+ continue;
+ }
+
+ (*iit)->filter( filter );
+
+ if ((*iit)->getFiltered(filter.getMinRequiredGeneration()))
+ {
+ mMostFilteredDescendantGeneration = filter_generation;
+ }
+ }
+
+ // if we didn't use all filter iterations
+ // that means we filtered all of our descendants
+ // instead of exhausting the filter count for this frame
+ if (filter.getFilterCount() > 0)
+ {
+ // flag this folder as having completed filter pass for all descendants
+ setCompletedFilterGeneration(filter_generation, FALSE/*dont recurse up to root*/);
+ }
+}
+
+void LLFolderViewFolder::setFiltered(BOOL filtered, S32 filter_generation)
+{
+ // if this folder is now filtered, but wasn't before
+ // (it just passed)
+ if (filtered && !mFiltered)
+ {
+ // reset current height, because last time we drew it
+ // it might have had more visible items than now
+ mCurHeight = 0.f;
+ }
+
+ LLFolderViewItem::setFiltered(filtered, filter_generation);
+}
+
+void LLFolderViewFolder::dirtyFilter()
+{
+ // we're a folder, so invalidate our completed generation
+ setCompletedFilterGeneration(-1, FALSE);
+ LLFolderViewItem::dirtyFilter();
+}
+
+BOOL LLFolderViewFolder::hasFilteredDescendants()
+{
+ return mMostFilteredDescendantGeneration >= getRoot()->getFilter()->getCurrentGeneration();
+}
+
+// Passes selection information on to children and record selection
+// information if necessary.
+BOOL LLFolderViewFolder::setSelection(LLFolderViewItem* selection, BOOL openitem,
+ BOOL take_keyboard_focus)
+{
+ BOOL rv = FALSE;
+ if( selection == this )
+ {
+ mIsSelected = TRUE;
+ if(mListener)
+ {
+ mListener->selectItem();
+ }
+ rv = TRUE;
+ }
+ else
+ {
+ mIsSelected = FALSE;
+ rv = FALSE;
+ }
+ BOOL child_selected = FALSE;
+
+ for (folders_t::iterator iter = mFolders.begin();
+ iter != mFolders.end();)
+ {
+ folders_t::iterator fit = iter++;
+ if((*fit)->setSelection(selection, openitem, take_keyboard_focus))
+ {
+ rv = TRUE;
+ child_selected = TRUE;
+ mNumDescendantsSelected++;
+ }
+ }
+ for (items_t::iterator iter = mItems.begin();
+ iter != mItems.end();)
+ {
+ items_t::iterator iit = iter++;
+ if((*iit)->setSelection(selection, openitem, take_keyboard_focus))
+ {
+ rv = TRUE;
+ child_selected = TRUE;
+ mNumDescendantsSelected++;
+ }
+ }
+ if(openitem && child_selected)
+ {
+ setOpenArrangeRecursively(TRUE);
+ }
+ return rv;
+}
+
+// This method is used to change the selection of an item. If
+// selection is 'this', then note selection as true. Returns TRUE
+// if this or a child is now selected.
+BOOL LLFolderViewFolder::changeSelection(LLFolderViewItem* selection,
+ BOOL selected)
+{
+ BOOL rv = FALSE;
+ if(selection == this)
+ {
+ mIsSelected = selected;
+ if(mListener && selected)
+ {
+ mListener->selectItem();
+ }
+ rv = TRUE;
+ }
+
+ for (folders_t::iterator iter = mFolders.begin();
+ iter != mFolders.end();)
+ {
+ folders_t::iterator fit = iter++;
+ if((*fit)->changeSelection(selection, selected))
+ {
+ if (selected)
+ {
+ mNumDescendantsSelected++;
+ }
+ else
+ {
+ mNumDescendantsSelected--;
+ }
+ rv = TRUE;
+ }
+ }
+ for (items_t::iterator iter = mItems.begin();
+ iter != mItems.end();)
+ {
+ items_t::iterator iit = iter++;
+ if((*iit)->changeSelection(selection, selected))
+ {
+ if (selected)
+ {
+ mNumDescendantsSelected++;
+ }
+ else
+ {
+ mNumDescendantsSelected--;
+ }
+ rv = TRUE;
+ }
+ }
+ return rv;
+}
+
+S32 LLFolderViewFolder::extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& selected_items)
+{
+ S32 num_selected = 0;
+
+ // pass on to child folders first
+ for (folders_t::iterator iter = mFolders.begin();
+ iter != mFolders.end();)
+ {
+ folders_t::iterator fit = iter++;
+ num_selected += (*fit)->extendSelection(selection, last_selected, selected_items);
+ mNumDescendantsSelected += num_selected;
+ }
+
+ // handle selection of our immediate children...
+ BOOL reverse_select = FALSE;
+ BOOL found_last_selected = FALSE;
+ BOOL found_selection = FALSE;
+ LLDynamicArray<LLFolderViewItem*> items_to_select;
+ LLFolderViewItem* item;
+
+ //...folders first...
+ for (folders_t::iterator iter = mFolders.begin();
+ iter != mFolders.end();)
+ {
+ folders_t::iterator fit = iter++;
+ item = (*fit);
+ if(item == selection)
+ {
+ found_selection = TRUE;
+ }
+ else if (item == last_selected)
+ {
+ found_last_selected = TRUE;
+ if (found_selection)
+ {
+ reverse_select = TRUE;
+ }
+ }
+
+ if (found_selection || found_last_selected)
+ {
+ // deselect currently selected items so they can be pushed back on queue
+ if (item->isSelected())
+ {
+ item->changeSelection(item, FALSE);
+ }
+ items_to_select.put(item);
+ }
+
+ if (found_selection && found_last_selected)
+ {
+ break;
+ }
+ }
+
+ if (!(found_selection && found_last_selected))
+ {
+ //,,,then items
+ for (items_t::iterator iter = mItems.begin();
+ iter != mItems.end();)
+ {
+ items_t::iterator iit = iter++;
+ item = (*iit);
+ if(item == selection)
+ {
+ found_selection = TRUE;
+ }
+ else if (item == last_selected)
+ {
+ found_last_selected = TRUE;
+ if (found_selection)
+ {
+ reverse_select = TRUE;
+ }
+ }
+
+ if (found_selection || found_last_selected)
+ {
+ // deselect currently selected items so they can be pushed back on queue
+ if (item->isSelected())
+ {
+ item->changeSelection(item, FALSE);
+ }
+ items_to_select.put(item);
+ }
+
+ if (found_selection && found_last_selected)
+ {
+ break;
+ }
+ }
+ }
+
+ if (found_last_selected && found_selection)
+ {
+ // we have a complete selection inside this folder
+ for (S32 index = reverse_select ? items_to_select.getLength() - 1 : 0;
+ reverse_select ? index >= 0 : index < items_to_select.getLength(); reverse_select ? index-- : index++)
+ {
+ LLFolderViewItem* item = items_to_select[index];
+ if (item->changeSelection(item, TRUE))
+ {
+ selected_items.put(item);
+ mNumDescendantsSelected++;
+ num_selected++;
+ }
+ }
+ }
+ else if (found_selection)
+ {
+ // last selection was not in this folder....go ahead and select just the new item
+ if (selection->changeSelection(selection, TRUE))
+ {
+ selected_items.put(selection);
+ mNumDescendantsSelected++;
+ num_selected++;
+ }
+ }
+
+ return num_selected;
+}
+
+void LLFolderViewFolder::recursiveDeselect(BOOL deselect_self)
+{
+ // make sure we don't have negative values
+ llassert(mNumDescendantsSelected >= 0);
+
+ if (mIsSelected && deselect_self)
+ {
+ mIsSelected = FALSE;
+
+ // update ancestors' count of selected descendents
+ LLFolderViewFolder* parent_folder = getParentFolder();
+ while(parent_folder)
+ {
+ parent_folder->mNumDescendantsSelected--;
+ parent_folder = parent_folder->getParentFolder();
+ }
+ }
+
+ if (0 == mNumDescendantsSelected)
+ {
+ return;
+ }
+
+ for (items_t::iterator iter = mItems.begin();
+ iter != mItems.end();)
+ {
+ items_t::iterator iit = iter++;
+ LLFolderViewItem* item = (*iit);
+ item->recursiveDeselect(TRUE);
+ }
+
+ for (folders_t::iterator iter = mFolders.begin();
+ iter != mFolders.end();)
+ {
+ folders_t::iterator fit = iter++;
+ LLFolderViewFolder* folder = (*fit);
+ folder->recursiveDeselect(TRUE);
+ }
+
+}
+
+void LLFolderViewFolder::destroyView()
+{
+ for (items_t::iterator iter = mItems.begin();
+ iter != mItems.end();)
+ {
+ items_t::iterator iit = iter++;
+ LLFolderViewItem* item = (*iit);
+ getRoot()->removeItemID(item->getListener()->getUUID());
+ }
+
+ std::for_each(mItems.begin(), mItems.end(), DeletePointer());
+ mItems.clear();
+
+ while (!mFolders.empty())
+ {
+ LLFolderViewFolder *folderp = mFolders.back();
+ folderp->destroyView(); // removes entry from mFolders
+ }
+
+ deleteAllChildren();
+
+ if (mParentFolder)
+ {
+ mParentFolder->removeView(this);
+ }
+}
+
+// remove the specified item (and any children) if possible. Return
+// TRUE if the item was deleted.
+BOOL LLFolderViewFolder::removeItem(LLFolderViewItem* item)
+{
+ if(item->remove())
+ {
+ //RN: this seem unneccessary as remove() moves to trash
+ //removeView(item);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+// simply remove the view (and any children) Don't bother telling the
+// listeners.
+void LLFolderViewFolder::removeView(LLFolderViewItem* item)
+{
+ if (!item || item->getParentFolder() != this)
+ {
+ return;
+ }
+ // deselect without traversing hierarchy
+ item->recursiveDeselect(TRUE);
+ getRoot()->removeFromSelectionList(item);
+ extractItem(item);
+ delete item;
+}
+
+// extractItem() removes the specified item from the folder, but
+// doesn't delete it.
+void LLFolderViewFolder::extractItem( LLFolderViewItem* item )
+{
+ items_t::iterator it = std::find(mItems.begin(), mItems.end(), item);
+ if(it == mItems.end())
+ {
+ // This is an evil downcast. However, it's only doing
+ // pointer comparison to find if (which it should be ) the
+ // item is in the container, so it's pretty safe.
+ LLFolderViewFolder* f = reinterpret_cast<LLFolderViewFolder*>(item);
+ folders_t::iterator ft;
+ ft = std::find(mFolders.begin(), mFolders.end(), f);
+ if(ft != mFolders.end())
+ {
+ mFolders.erase(ft);
+ }
+ }
+ else
+ {
+ mItems.erase(it);
+ }
+ //item has been removed, need to update filter
+ dirtyFilter();
+ //because an item is going away regardless of filter status, force rearrange
+ requestArrange();
+ getRoot()->removeItemID(item->getListener()->getUUID());
+ removeChild(item);
+}
+
+bool LLFolderViewFolder::isTrash() const
+{
+ if (mAmTrash == LLFolderViewFolder::UNKNOWN)
+ {
+ mAmTrash = mListener->getUUID() == gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH, false) ? LLFolderViewFolder::TRASH : LLFolderViewFolder::NOT_TRASH;
+ }
+ return mAmTrash == LLFolderViewFolder::TRASH;
+}
+
+void LLFolderViewFolder::sortBy(U32 order)
+{
+ if (!mSortFunction.updateSort(order))
+ {
+ // No changes.
+ return;
+ }
+
+ // Propegate this change to sub folders
+ for (folders_t::iterator iter = mFolders.begin();
+ iter != mFolders.end();)
+ {
+ folders_t::iterator fit = iter++;
+ (*fit)->sortBy(order);
+ }
+
+ mFolders.sort(mSortFunction);
+ mItems.sort(mSortFunction);
+
+ if (order & LLInventoryFilter::SO_DATE)
+ {
+ time_t latest = 0;
+
+ if (!mItems.empty())
+ {
+ LLFolderViewItem* item = *(mItems.begin());
+ latest = item->getCreationDate();
+ }
+
+ if (!mFolders.empty())
+ {
+ LLFolderViewFolder* folder = *(mFolders.begin());
+ if (folder->getCreationDate() > latest)
+ {
+ latest = folder->getCreationDate();
+ }
+ }
+ mSubtreeCreationDate = latest;
+ }
+}
+
+void LLFolderViewFolder::setItemSortOrder(U32 ordering)
+{
+ if (mSortFunction.updateSort(ordering))
+ {
+ for (folders_t::iterator iter = mFolders.begin();
+ iter != mFolders.end();)
+ {
+ folders_t::iterator fit = iter++;
+ (*fit)->setItemSortOrder(ordering);
+ }
+
+ mFolders.sort(mSortFunction);
+ mItems.sort(mSortFunction);
+ }
+}
+
+EInventorySortGroup LLFolderViewFolder::getSortGroup() const
+{
+ if (isTrash())
+ {
+ return SG_TRASH_FOLDER;
+ }
+
+ // Folders that can't be moved are 'system' folders.
+ if( mListener )
+ {
+ if( !(mListener->isItemMovable()) )
+ {
+ return SG_SYSTEM_FOLDER;
+ }
+ }
+
+ return SG_NORMAL_FOLDER;
+}
+
+BOOL LLFolderViewFolder::isMovable()
+{
+ if( mListener )
+ {
+ if( !(mListener->isItemMovable()) )
+ {
+ return FALSE;
+ }
+
+ for (items_t::iterator iter = mItems.begin();
+ iter != mItems.end();)
+ {
+ items_t::iterator iit = iter++;
+ if(!(*iit)->isMovable())
+ {
+ return FALSE;
+ }
+ }
+
+ for (folders_t::iterator iter = mFolders.begin();
+ iter != mFolders.end();)
+ {
+ folders_t::iterator fit = iter++;
+ if(!(*fit)->isMovable())
+ {
+ return FALSE;
+ }
+ }
+ }
+ return TRUE;
+}
+
+
+BOOL LLFolderViewFolder::isRemovable()
+{
+ if( mListener )
+ {
+ if( !(mListener->isItemRemovable()) )
+ {
+ return FALSE;
+ }
+
+ for (items_t::iterator iter = mItems.begin();
+ iter != mItems.end();)
+ {
+ items_t::iterator iit = iter++;
+ if(!(*iit)->isRemovable())
+ {
+ return FALSE;
+ }
+ }
+
+ for (folders_t::iterator iter = mFolders.begin();
+ iter != mFolders.end();)
+ {
+ folders_t::iterator fit = iter++;
+ if(!(*fit)->isRemovable())
+ {
+ return FALSE;
+ }
+ }
+ }
+ return TRUE;
+}
+
+// this is an internal method used for adding items to folders.
+BOOL LLFolderViewFolder::addItem(LLFolderViewItem* item)
+{
+ mItems.push_back(item);
+ item->setRect(LLRect(0, 0, getRect().getWidth(), 0));
+ item->setVisible(FALSE);
+ addChild( item );
+ item->dirtyFilter();
+ requestArrange();
+ requestSort();
+ return TRUE;
+}
+
+// this is an internal method used for adding items to folders.
+BOOL LLFolderViewFolder::addFolder(LLFolderViewFolder* folder)
+{
+ mFolders.push_back(folder);
+ folder->setOrigin(0, 0);
+ folder->reshape(getRect().getWidth(), 0);
+ folder->setVisible(FALSE);
+ addChild( folder );
+ folder->dirtyFilter();
+ // rearrange all descendants too, as our indentation level might have changed
+ folder->requestArrange(TRUE);
+ requestSort();
+ return TRUE;
+}
+
+void LLFolderViewFolder::requestArrange(BOOL include_descendants)
+{
+ mLastArrangeGeneration = -1;
+ // flag all items up to root
+ if (mParentFolder)
+ {
+ mParentFolder->requestArrange();
+ }
+
+ if (include_descendants)
+ {
+ for (folders_t::iterator iter = mFolders.begin();
+ iter != mFolders.end();
+ ++iter)
+ {
+ (*iter)->requestArrange(TRUE);
+ }
+ }
+}
+
+void LLFolderViewFolder::toggleOpen()
+{
+ setOpen(!mIsOpen);
+}
+
+// Force a folder open or closed
+void LLFolderViewFolder::setOpen(BOOL openitem)
+{
+ setOpenArrangeRecursively(openitem);
+}
+
+void LLFolderViewFolder::setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse)
+{
+ BOOL was_open = mIsOpen;
+ mIsOpen = openitem;
+ if(!was_open && openitem)
+ {
+ if(mListener)
+ {
+ mListener->openItem();
+ }
+ }
+
+ if (recurse == RECURSE_DOWN || recurse == RECURSE_UP_DOWN)
+ {
+ for (folders_t::iterator iter = mFolders.begin();
+ iter != mFolders.end();)
+ {
+ folders_t::iterator fit = iter++;
+ (*fit)->setOpenArrangeRecursively(openitem, RECURSE_DOWN); /* Flawfinder: ignore */
+ }
+ }
+ if (mParentFolder && (recurse == RECURSE_UP || recurse == RECURSE_UP_DOWN))
+ {
+ mParentFolder->setOpenArrangeRecursively(openitem, RECURSE_UP);
+ }
+
+ if (was_open != mIsOpen)
+ {
+ requestArrange();
+ }
+}
+
+BOOL LLFolderViewFolder::handleDragAndDropFromChild(MASK mask,
+ BOOL drop,
+ EDragAndDropType c_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg)
+{
+ BOOL accepted = mListener && mListener->dragOrDrop(mask,drop,c_type,cargo_data);
+ if (accepted)
+ {
+ mDragAndDropTarget = TRUE;
+ *accept = ACCEPT_YES_MULTI;
+ }
+ else
+ {
+ *accept = ACCEPT_NO;
+ }
+
+ // drag and drop to child item, so clear pending auto-opens
+ getRoot()->autoOpenTest(NULL);
+
+ return TRUE;
+}
+
+void LLFolderViewFolder::openItem( void )
+{
+ toggleOpen();
+}
+
+void LLFolderViewFolder::applyFunctorRecursively(LLFolderViewFunctor& functor)
+{
+ functor.doFolder(this);
+
+ for (folders_t::iterator iter = mFolders.begin();
+ iter != mFolders.end();)
+ {
+ folders_t::iterator fit = iter++;
+ (*fit)->applyFunctorRecursively(functor);
+ }
+ for (items_t::iterator iter = mItems.begin();
+ iter != mItems.end();)
+ {
+ items_t::iterator iit = iter++;
+ functor.doItem((*iit));
+ }
+}
+
+void LLFolderViewFolder::applyListenerFunctorRecursively(LLFolderViewListenerFunctor& functor)
+{
+ functor(mListener);
+ for (folders_t::iterator iter = mFolders.begin();
+ iter != mFolders.end();)
+ {
+ folders_t::iterator fit = iter++;
+ (*fit)->applyListenerFunctorRecursively(functor);
+ }
+ for (items_t::iterator iter = mItems.begin();
+ iter != mItems.end();)
+ {
+ items_t::iterator iit = iter++;
+ (*iit)->applyListenerFunctorRecursively(functor);
+ }
+}
+
+// LLView functionality
+BOOL LLFolderViewFolder::handleDragAndDrop(S32 x, S32 y, MASK mask,
+ BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg)
+{
+ LLFolderView* root_view = getRoot();
+
+ BOOL handled = FALSE;
+ if(mIsOpen)
+ {
+ handled = childrenHandleDragAndDrop(x, y, mask, drop, cargo_type,
+ cargo_data, accept, tooltip_msg) != NULL;
+ }
+
+ if (!handled)
+ {
+ BOOL accepted = mListener && mListener->dragOrDrop(mask, drop,cargo_type,cargo_data);
+
+ if (accepted)
+ {
+ mDragAndDropTarget = TRUE;
+ *accept = ACCEPT_YES_MULTI;
+ }
+ else
+ {
+ *accept = ACCEPT_NO;
+ }
+
+ if (!drop && accepted)
+ {
+ root_view->autoOpenTest(this);
+ }
+
+ lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLFolderViewFolder" << llendl;
+ }
+
+ return TRUE;
+}
+
+
+BOOL LLFolderViewFolder::handleRightMouseDown( S32 x, S32 y, MASK mask )
+{
+ BOOL handled = FALSE;
+ // fetch contents of this folder, as context menu can depend on contents
+ // still, user would have to open context menu again to see the changes
+ gInventory.fetchDescendentsOf(mListener->getUUID());
+
+ if( mIsOpen )
+ {
+ handled = childrenHandleRightMouseDown( x, y, mask ) != NULL;
+ }
+ if (!handled)
+ {
+ handled = LLFolderViewItem::handleRightMouseDown( x, y, mask );
+ }
+ return handled;
+}
+
+
+BOOL LLFolderViewFolder::handleHover(S32 x, S32 y, MASK mask)
+{
+ BOOL handled = LLView::handleHover(x, y, mask);
+
+ if (!handled)
+ {
+ // this doesn't do child processing
+ handled = LLFolderViewItem::handleHover(x, y, mask);
+ }
+
+ //if(x < LEFT_INDENTATION + mIndentation && x > mIndentation - LEFT_PAD && y > getRect().getHeight() - )
+ //{
+ // gViewerWindow->setCursor(UI_CURSOR_ARROW);
+ // mExpanderHighlighted = TRUE;
+ // handled = TRUE;
+ //}
+ return handled;
+}
+
+BOOL LLFolderViewFolder::handleMouseDown( S32 x, S32 y, MASK mask )
+{
+ BOOL handled = FALSE;
+ if( mIsOpen )
+ {
+ handled = childrenHandleMouseDown(x,y,mask) != NULL;
+ }
+ if( !handled )
+ {
+ if(x < LEFT_INDENTATION + mIndentation && x > mIndentation - LEFT_PAD)
+ {
+ toggleOpen();
+ handled = TRUE;
+ }
+ else
+ {
+ // do normal selection logic
+ handled = LLFolderViewItem::handleMouseDown(x, y, mask);
+ }
+ }
+
+ return handled;
+}
+
+BOOL LLFolderViewFolder::handleDoubleClick( S32 x, S32 y, MASK mask )
+{
+ BOOL handled = FALSE;
+ if( mIsOpen )
+ {
+ handled = childrenHandleDoubleClick( x, y, mask ) != NULL;
+ }
+ if( !handled )
+ {
+ if(x < LEFT_INDENTATION + mIndentation && x > mIndentation - LEFT_PAD)
+ {
+ // don't select when user double-clicks plus sign
+ // so as not to contradict single-click behavior
+ toggleOpen();
+ }
+ else
+ {
+ setSelectionFromRoot(this, FALSE);
+ toggleOpen();
+ }
+ handled = TRUE;
+ }
+ return handled;
+}
+
+void LLFolderViewFolder::draw()
+{
+ if (mAutoOpenCountdown != 0.f)
+ {
+ mControlLabelRotation = mAutoOpenCountdown * -90.f;
+ }
+ else if (mIsOpen)
+ {
+ mControlLabelRotation = lerp(mControlLabelRotation, -90.f, LLCriticalDamp::getInterpolant(0.04f));
+ }
+ else
+ {
+ mControlLabelRotation = lerp(mControlLabelRotation, 0.f, LLCriticalDamp::getInterpolant(0.025f));
+ }
+
+ bool possibly_has_children = false;
+ bool up_to_date = mListener && mListener->isUpToDate();
+ if(!up_to_date && mListener && mListener->hasChildren()) // we know we have children but haven't fetched them (doesn't obey filter)
+ {
+ possibly_has_children = true;
+ }
+
+
+ BOOL loading = ( mIsOpen && possibly_has_children && !up_to_date );
+
+ if ( loading && !mIsLoading )
+ {
+ // Measure how long we've been in the loading state
+ mTimeSinceRequestStart.reset();
+ }
+
+ mIsLoading = loading;
+
+ LLFolderViewItem::draw();
+
+ // draw children if root folder, or any other folder that is open or animating to closed state
+ if( getRoot() == this || (mIsOpen || mCurHeight != mTargetHeight ))
+ {
+ LLView::draw();
+ }
+
+ mExpanderHighlighted = FALSE;
+}
+
+time_t LLFolderViewFolder::getCreationDate() const
+{
+ return llmax<time_t>(mCreationDate, mSubtreeCreationDate);
+}
+
+
+BOOL LLFolderViewFolder::potentiallyVisible()
+{
+ // folder should be visible by it's own filter status
+ return LLFolderViewItem::potentiallyVisible()
+ // or one or more of its descendants have passed the minimum filter requirement
+ || hasFilteredDescendants(getRoot()->getFilter()->getMinRequiredGeneration())
+ // or not all of its descendants have been checked against minimum filter requirement
+ || getCompletedFilterGeneration() < getRoot()->getFilter()->getMinRequiredGeneration();
+}
+
+// this does prefix traversal, as folders are listed above their contents
+LLFolderViewItem* LLFolderViewFolder::getNextFromChild( LLFolderViewItem* item, BOOL include_children )
+{
+ BOOL found_item = FALSE;
+
+ LLFolderViewItem* result = NULL;
+ // when not starting from a given item, start at beginning
+ if(item == NULL)
+ {
+ found_item = TRUE;
+ }
+
+ // find current item among children
+ folders_t::iterator fit = mFolders.begin();
+ folders_t::iterator fend = mFolders.end();
+
+ items_t::iterator iit = mItems.begin();
+ items_t::iterator iend = mItems.end();
+
+ // if not trivially starting at the beginning, we have to find the current item
+ if (!found_item)
+ {
+ // first, look among folders, since they are always above items
+ for(; fit != fend; ++fit)
+ {
+ if(item == (*fit))
+ {
+ found_item = TRUE;
+ // if we are on downwards traversal
+ if (include_children && (*fit)->isOpen())
+ {
+ // look for first descendant
+ return (*fit)->getNextFromChild(NULL, TRUE);
+ }
+ // otherwise advance to next folder
+ ++fit;
+ include_children = TRUE;
+ break;
+ }
+ }
+
+ // didn't find in folders? Check items...
+ if (!found_item)
+ {
+ for(; iit != iend; ++iit)
+ {
+ if(item == (*iit))
+ {
+ found_item = TRUE;
+ // point to next item
+ ++iit;
+ break;
+ }
+ }
+ }
+ }
+
+ if (!found_item)
+ {
+ // you should never call this method with an item that isn't a child
+ // so we should always find something
+ llassert(FALSE);
+ return NULL;
+ }
+
+ // at this point, either iit or fit point to a candidate "next" item
+ // if both are out of range, we need to punt up to our parent
+
+ // now, starting from found folder, continue through folders
+ // searching for next visible folder
+ while(fit != fend && !(*fit)->getVisible())
+ {
+ // turn on downwards traversal for next folder
+ ++fit;
+ }
+
+ if (fit != fend)
+ {
+ result = (*fit);
+ }
+ else
+ {
+ // otherwise, scan for next visible item
+ while(iit != iend && !(*iit)->getVisible())
+ {
+ ++iit;
+ }
+
+ // check to see if we have a valid item
+ if (iit != iend)
+ {
+ result = (*iit);
+ }
+ }
+
+ if( !result && mParentFolder )
+ {
+ // If there are no siblings or children to go to, recurse up one level in the tree
+ // and skip children for this folder, as we've already discounted them
+ result = mParentFolder->getNextFromChild(this, FALSE);
+ }
+
+ return result;
+}
+
+// this does postfix traversal, as folders are listed above their contents
+LLFolderViewItem* LLFolderViewFolder::getPreviousFromChild( LLFolderViewItem* item, BOOL include_children )
+{
+ BOOL found_item = FALSE;
+
+ LLFolderViewItem* result = NULL;
+ // when not starting from a given item, start at end
+ if(item == NULL)
+ {
+ found_item = TRUE;
+ }
+
+ // find current item among children
+ folders_t::reverse_iterator fit = mFolders.rbegin();
+ folders_t::reverse_iterator fend = mFolders.rend();
+
+ items_t::reverse_iterator iit = mItems.rbegin();
+ items_t::reverse_iterator iend = mItems.rend();
+
+ // if not trivially starting at the end, we have to find the current item
+ if (!found_item)
+ {
+ // first, look among items, since they are always below the folders
+ for(; iit != iend; ++iit)
+ {
+ if(item == (*iit))
+ {
+ found_item = TRUE;
+ // point to next item
+ ++iit;
+ break;
+ }
+ }
+
+ // didn't find in items? Check folders...
+ if (!found_item)
+ {
+ for(; fit != fend; ++fit)
+ {
+ if(item == (*fit))
+ {
+ found_item = TRUE;
+ // point to next folder
+ ++fit;
+ break;
+ }
+ }
+ }
+ }
+
+ if (!found_item)
+ {
+ // you should never call this method with an item that isn't a child
+ // so we should always find something
+ llassert(FALSE);
+ return NULL;
+ }
+
+ // at this point, either iit or fit point to a candidate "next" item
+ // if both are out of range, we need to punt up to our parent
+
+ // now, starting from found item, continue through items
+ // searching for next visible item
+ while(iit != iend && !(*iit)->getVisible())
+ {
+ ++iit;
+ }
+
+ if (iit != iend)
+ {
+ // we found an appropriate item
+ result = (*iit);
+ }
+ else
+ {
+ // otherwise, scan for next visible folder
+ while(fit != fend && !(*fit)->getVisible())
+ {
+ ++fit;
+ }
+
+ // check to see if we have a valid folder
+ if (fit != fend)
+ {
+ // try selecting child element of this folder
+ if ((*fit)->isOpen())
+ {
+ result = (*fit)->getPreviousFromChild(NULL);
+ }
+ else
+ {
+ result = (*fit);
+ }
+ }
+ }
+
+ if( !result )
+ {
+ // If there are no siblings or children to go to, recurse up one level in the tree
+ // which gets back to this folder, which will only be visited if it is a valid, visible item
+ result = this;
+ }
+
+ return result;
+}
+
+
+bool LLInventorySort::updateSort(U32 order)
+{
+ if (order != mSortOrder)
+ {
+ mSortOrder = order;
+ mByDate = (order & LLInventoryFilter::SO_DATE);
+ mSystemToTop = (order & LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP);
+ mFoldersByName = (order & LLInventoryFilter::SO_FOLDERS_BY_NAME);
+ return true;
+ }
+ return false;
+}
+
+bool LLInventorySort::operator()(const LLFolderViewItem* const& a, const LLFolderViewItem* const& b)
+{
+ // We sort by name if we aren't sorting by date
+ // OR if these are folders and we are sorting folders by name.
+ bool by_name = (!mByDate
+ || (mFoldersByName
+ && (a->getSortGroup() != SG_ITEM)));
+
+ if (a->getSortGroup() != b->getSortGroup())
+ {
+ if (mSystemToTop)
+ {
+ // Group order is System Folders, Trash, Normal Folders, Items
+ return (a->getSortGroup() < b->getSortGroup());
+ }
+ else if (mByDate)
+ {
+ // Trash needs to go to the bottom if we are sorting by date
+ if ( (a->getSortGroup() == SG_TRASH_FOLDER)
+ || (b->getSortGroup() == SG_TRASH_FOLDER))
+ {
+ return (b->getSortGroup() == SG_TRASH_FOLDER);
+ }
+ }
+ }
+
+ if (by_name)
+ {
+ S32 compare = LLStringUtil::compareDict(a->getLabel(), b->getLabel());
+ if (0 == compare)
+ {
+ return (a->getCreationDate() > b->getCreationDate());
+ }
+ else
+ {
+ return (compare < 0);
+ }
+ }
+ else
+ {
+ // BUG: This is very very slow. The getCreationDate() is log n in number
+ // of inventory items.
+ time_t first_create = a->getCreationDate();
+ time_t second_create = b->getCreationDate();
+ if (first_create == second_create)
+ {
+ return (LLStringUtil::compareDict(a->getLabel(), b->getLabel()) < 0);
+ }
+ else
+ {
+ return (first_create > second_create);
+ }
+ }
+}
diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h
new file mode 100644
index 0000000000..31866c83c8
--- /dev/null
+++ b/indra/newview/llfolderviewitem.h
@@ -0,0 +1,528 @@
+/**
+* @file llfolderviewitem.h
+* @brief Items and folders that can appear in a hierarchical folder view
+*
+* $LicenseInfo:firstyear=2001&license=viewergpl$
+*
+* Copyright (c) 2001-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 LLFOLDERVIEWITEM_H
+#define LLFOLDERVIEWITEM_H
+
+#include "llview.h"
+
+class LLFontGL;
+class LLFolderView;
+class LLFolderViewEventListener;
+class LLFolderViewFolder;
+class LLFolderViewFunctor;
+class LLFolderViewItem;
+class LLFolderViewListenerFunctor;
+class LLInventoryFilter;
+class LLMenuGL;
+class LLUIImage;
+
+// These are grouping of inventory types.
+// Order matters when sorting system folders to the top.
+enum EInventorySortGroup
+{
+ SG_SYSTEM_FOLDER,
+ SG_TRASH_FOLDER,
+ SG_NORMAL_FOLDER,
+ SG_ITEM
+};
+
+// JAMESDEBUG *TODO: do we really need one sort object per folder?
+// can we just have one of these per LLFolderView ?
+class LLInventorySort
+{
+public:
+ LLInventorySort()
+ : mSortOrder(0),
+ mByDate(false),
+ mSystemToTop(false),
+ mFoldersByName(false) { }
+
+ // Returns true if order has changed
+ bool updateSort(U32 order);
+ U32 getSort() { return mSortOrder; }
+
+ bool operator()(const LLFolderViewItem* const& a, const LLFolderViewItem* const& b);
+private:
+ U32 mSortOrder;
+ bool mByDate;
+ bool mSystemToTop;
+ bool mFoldersByName;
+};
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Class LLFolderViewItem
+//
+// An instance of this class represents a single item in a folder view
+// such as an inventory item or a file.
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+class LLFolderViewItem : public LLView
+{
+public:
+ static void initClass();
+ static void cleanupClass();
+
+ // jamesdebug was LLUICtrl::Params
+ struct Params : public LLInitParam::Block<Params, LLView::Params>
+ {
+ Optional<LLUIImage*> icon;
+ Optional<LLFolderView*> root;
+ Optional<LLFolderViewEventListener*> listener;
+
+ Optional<LLUIImage*> folder_arrow_image;
+ Optional<LLUIImage*> selection_image;
+
+ Optional<S32> creation_date; //UTC seconds
+
+ Params();
+ };
+
+ // layout constants
+ static const S32 LEFT_PAD = 5;
+ static const S32 LEFT_INDENTATION = 13;
+ static const S32 ICON_PAD = 2;
+ static const S32 ICON_WIDTH = 16;
+ static const S32 TEXT_PAD = 1;
+ static const S32 ARROW_SIZE = 12;
+ static const S32 MAX_FOLDER_ITEM_OVERLAP = 2;
+ // animation parameters
+ static const F32 FOLDER_CLOSE_TIME_CONSTANT;
+ static const F32 FOLDER_OPEN_TIME_CONSTANT;
+
+protected:
+ friend class LLUICtrlFactory;
+ friend class LLFolderViewEventListener;
+
+ LLFolderViewItem(Params p = LLFolderViewItem::Params());
+
+ static const LLFontGL* sFont;
+ static const LLFontGL* sSmallFont;
+ static LLUIImagePtr sArrowImage;
+ static LLUIImagePtr sBoxImage;
+
+ std::string mLabel;
+ std::string mSearchableLabel;
+ S32 mLabelWidth;
+ bool mLabelWidthDirty;
+ time_t mCreationDate;
+ LLFolderViewFolder* mParentFolder;
+ LLFolderViewEventListener* mListener;
+ BOOL mIsSelected;
+ BOOL mIsCurSelection;
+ BOOL mSelectPending;
+ LLFontGL::StyleFlags mLabelStyle;
+ std::string mLabelSuffix;
+ LLUIImagePtr mIcon;
+ std::string mStatusText;
+ BOOL mHasVisibleChildren;
+ S32 mIndentation;
+ S32 mNumDescendantsSelected;
+ BOOL mFiltered;
+ S32 mLastFilterGeneration;
+ std::string::size_type mStringMatchOffset;
+ F32 mControlLabelRotation;
+ LLFolderView* mRoot;
+ BOOL mDragAndDropTarget;
+ LLUIImagePtr mArrowImage;
+ LLUIImagePtr mBoxImage;
+ BOOL mIsLoading;
+ LLTimer mTimeSinceRequestStart;
+
+ // helper function to change the selection from the root.
+ void changeSelectionFromRoot(LLFolderViewItem* selection, BOOL selected);
+
+ // helper function to change the selection from the root.
+ void extendSelectionFromRoot(LLFolderViewItem* selection);
+
+ // this is an internal method used for adding items to folders. A
+ // no-op at this leve, but reimplemented in derived classes.
+ virtual BOOL addItem(LLFolderViewItem*) { return FALSE; }
+ virtual BOOL addFolder(LLFolderViewFolder*) { return FALSE; }
+
+public:
+ // This function clears the currently selected item, and records
+ // the specified selected item appropriately for display and use
+ // in the UI. If open is TRUE, then folders are opened up along
+ // the way to the selection.
+ void setSelectionFromRoot(LLFolderViewItem* selection, BOOL openitem,
+ BOOL take_keyboard_focus = TRUE);
+
+ // This function is called when the folder view is dirty. It's
+ // implemented here but called by derived classes when folding the
+ // views.
+ void arrangeFromRoot();
+ void filterFromRoot( void );
+
+ void arrangeAndSet(BOOL set_selection, BOOL take_keyboard_focus);
+
+ virtual ~LLFolderViewItem( void );
+
+ // addToFolder() returns TRUE if it succeeds. FALSE otherwise
+ enum { ARRANGE = TRUE, DO_NOT_ARRANGE = FALSE };
+ virtual BOOL addToFolder(LLFolderViewFolder* folder, LLFolderView* root);
+
+ virtual EInventorySortGroup getSortGroup() const;
+
+ // Finds width and height of this object and it's children. Also
+ // makes sure that this view and it's children are the right size.
+ virtual S32 arrange( S32* width, S32* height, S32 filter_generation );
+ virtual S32 getItemHeight();
+
+ // applies filters to control visibility of inventory items
+ virtual void filter( LLInventoryFilter& filter);
+
+ // updates filter serial number and optionally propagated value up to root
+ S32 getLastFilterGeneration() { return mLastFilterGeneration; }
+
+ virtual void dirtyFilter();
+
+ // If the selection is 'this' then note that otherwise
+ // ignore. Returns TRUE if this object was affected. If open is
+ // TRUE, then folders are opened up along the way to the
+ // selection.
+ virtual BOOL setSelection(LLFolderViewItem* selection, BOOL openitem,
+ BOOL take_keyboard_focus);
+
+ // This method is used to toggle the selection of an item. If
+ // selection is 'this', then note selection, and return TRUE.
+ virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected);
+
+ // this method is used to group select items
+ virtual S32 extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items){ return FALSE; }
+
+ // this method is used to group select items
+ virtual void recursiveDeselect(BOOL deselect_self);
+
+ // gets multiple-element selection
+ virtual BOOL getSelectionList(std::set<LLUUID> &selection){return TRUE;}
+
+ // Returns true is this object and all of its children can be removed (deleted by user)
+ virtual BOOL isRemovable();
+
+ // Returns true is this object and all of its children can be moved
+ virtual BOOL isMovable();
+
+ // destroys this item recursively
+ virtual void destroyView();
+
+ S32 getNumSelectedDescendants() { return mNumDescendantsSelected; }
+
+ BOOL isSelected() { return mIsSelected; }
+
+ void setIsCurSelection(BOOL select) { mIsCurSelection = select; }
+
+ BOOL getIsCurSelection() { return mIsCurSelection; }
+
+ BOOL hasVisibleChildren() { return mHasVisibleChildren; }
+
+ // Call through to the viewed object and return true if it can be
+ // removed. Returns true if it's removed.
+ //virtual BOOL removeRecursively(BOOL single_item);
+ BOOL remove();
+
+ // Build an appropriate context menu for the item. Flags unused.
+ void buildContextMenu(LLMenuGL& menu, U32 flags);
+
+ // This method returns the actual name of the thing being
+ // viewed. This method will ask the viewed object itself.
+ const std::string& getName( void ) const;
+
+ const std::string& getSearchableLabel( void ) const;
+
+ // This method returns the label displayed on the view. This
+ // method was primarily added to allow sorting on the folder
+ // contents possible before the entire view has been constructed.
+ const std::string& getLabel() const { return mLabel; }
+
+ // Used for sorting, like getLabel() above.
+ virtual time_t getCreationDate() const { return mCreationDate; }
+
+ LLFolderViewFolder* getParentFolder( void ) { return mParentFolder; }
+ const LLFolderViewFolder* getParentFolder( void ) const { return mParentFolder; }
+
+ LLFolderViewItem* getNextOpenNode( BOOL include_children = TRUE );
+ LLFolderViewItem* getPreviousOpenNode( BOOL include_children = TRUE );
+
+ const LLFolderViewEventListener* getListener( void ) const { return mListener; }
+ LLFolderViewEventListener* getListener( void ) { return mListener; }
+
+ // just rename the object.
+ void rename(const std::string& new_name);
+
+ // open
+ virtual void openItem( void );
+ virtual void preview(void);
+
+ // Show children (unfortunate that this is called "open")
+ virtual void setOpen(BOOL open = TRUE) {};
+
+ virtual BOOL isOpen() { return FALSE; }
+
+ virtual LLFolderView* getRoot();
+ BOOL isDescendantOf( const LLFolderViewFolder* potential_ancestor );
+ S32 getIndentation() { return mIndentation; }
+
+ virtual BOOL potentiallyVisible(); // do we know for a fact that this item has been filtered out?
+
+ virtual BOOL getFiltered();
+ virtual BOOL getFiltered(S32 filter_generation);
+ virtual void setFiltered(BOOL filtered, S32 filter_generation);
+
+ // change the icon
+ void setIcon(LLUIImagePtr icon);
+
+ // refresh information from the object being viewed.
+ void refreshFromListener();
+ virtual void refresh();
+
+ virtual void applyListenerFunctorRecursively(LLFolderViewListenerFunctor& functor);
+
+ // LLView functionality
+ virtual BOOL handleRightMouseDown( S32 x, S32 y, MASK mask );
+ virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask );
+ virtual BOOL handleHover( S32 x, S32 y, MASK mask );
+ virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask );
+ virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask );
+ virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
+
+ // virtual void handleDropped();
+ virtual void draw();
+ virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg);
+};
+
+
+// function used for sorting.
+typedef bool (*sort_order_f)(LLFolderViewItem* a, LLFolderViewItem* b);
+
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Class LLFolderViewFolder
+//
+// An instance of an LLFolderViewFolder represents a collection of
+// more folders and items. This is used to build the hierarchy of
+// items found in the folder view. :)
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+class LLFolderViewFolder : public LLFolderViewItem
+{
+protected:
+ LLFolderViewFolder( const LLFolderViewItem::Params& );
+ friend class LLUICtrlFactory;
+
+public:
+ typedef enum e_trash
+ {
+ UNKNOWN, TRASH, NOT_TRASH
+ } ETrash;
+
+protected:
+ typedef std::list<LLFolderViewItem*> items_t;
+ typedef std::list<LLFolderViewFolder*> folders_t;
+ items_t mItems;
+ folders_t mFolders;
+ LLInventorySort mSortFunction;
+
+ BOOL mIsOpen;
+ BOOL mExpanderHighlighted;
+ F32 mCurHeight;
+ F32 mTargetHeight;
+ F32 mAutoOpenCountdown;
+ time_t mSubtreeCreationDate;
+ mutable ETrash mAmTrash;
+ S32 mLastArrangeGeneration;
+ S32 mLastCalculatedWidth;
+ S32 mCompletedFilterGeneration;
+ S32 mMostFilteredDescendantGeneration;
+ bool mNeedsSort;
+public:
+ typedef enum e_recurse_type
+ {
+ RECURSE_NO,
+ RECURSE_UP,
+ RECURSE_DOWN,
+ RECURSE_UP_DOWN
+ } ERecurseType;
+
+
+ virtual ~LLFolderViewFolder( void );
+
+ virtual BOOL potentiallyVisible();
+
+ LLFolderViewItem* getNextFromChild( LLFolderViewItem*, BOOL include_children = TRUE );
+ LLFolderViewItem* getPreviousFromChild( LLFolderViewItem*, BOOL include_children = TRUE );
+
+ // addToFolder() returns TRUE if it succeeds. FALSE otherwise
+ virtual BOOL addToFolder(LLFolderViewFolder* folder, LLFolderView* root);
+
+ // Finds width and height of this object and it's children. Also
+ // makes sure that this view and it's children are the right size.
+ virtual S32 arrange( S32* width, S32* height, S32 filter_generation );
+
+ BOOL needsArrange();
+ void requestSort();
+
+ // Returns the sort group (system, trash, folder) for this folder.
+ virtual EInventorySortGroup getSortGroup() const;
+
+ virtual void setCompletedFilterGeneration(S32 generation, BOOL recurse_up);
+ virtual S32 getCompletedFilterGeneration() { return mCompletedFilterGeneration; }
+
+ BOOL hasFilteredDescendants(S32 filter_generation) { return mMostFilteredDescendantGeneration >= filter_generation; }
+ BOOL hasFilteredDescendants();
+
+ // applies filters to control visibility of inventory items
+ virtual void filter( LLInventoryFilter& filter);
+ virtual void setFiltered(BOOL filtered, S32 filter_generation);
+ virtual void dirtyFilter();
+
+ // Passes selection information on to children and record
+ // selection information if necessary. Returns TRUE if this object
+ // (or a child) was affected.
+ virtual BOOL setSelection(LLFolderViewItem* selection, BOOL openitem,
+ BOOL take_keyboard_focus);
+
+ // This method is used to change the selection of an item. If
+ // selection is 'this', then note selection as true. Returns TRUE
+ // if this or a child is now selected.
+ virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected);
+
+ // this method is used to group select items
+ virtual S32 extendSelection(LLFolderViewItem* selection, LLFolderViewItem* last_selected, LLDynamicArray<LLFolderViewItem*>& items);
+
+ virtual void recursiveDeselect(BOOL deselect_self);
+
+ // Returns true is this object and all of its children can be removed.
+ virtual BOOL isRemovable();
+
+ // Returns true is this object and all of its children can be moved
+ virtual BOOL isMovable();
+
+ // destroys this folder, and all children
+ virtual void destroyView();
+
+ // If this folder can be removed, remove all children that can be
+ // removed, return TRUE if this is empty after the operation and
+ // it's viewed folder object can be removed.
+ //virtual BOOL removeRecursively(BOOL single_item);
+ //virtual BOOL remove();
+
+ // remove the specified item (and any children) if
+ // possible. Return TRUE if the item was deleted.
+ BOOL removeItem(LLFolderViewItem* item);
+
+ // simply remove the view (and any children) Don't bother telling
+ // the listeners.
+ void removeView(LLFolderViewItem* item);
+
+ // extractItem() removes the specified item from the folder, but
+ // doesn't delete it.
+ void extractItem( LLFolderViewItem* item );
+
+ // This function is called by a child that needs to be resorted.
+ void resort(LLFolderViewItem* item);
+
+ void setItemSortOrder(U32 ordering);
+ void sortBy(U32);
+ //BOOL (*func)(LLFolderViewItem* a, LLFolderViewItem* b));
+
+ void setAutoOpenCountdown(F32 countdown) { mAutoOpenCountdown = countdown; }
+
+ // folders can be opened. This will usually be called by internal
+ // methods.
+ virtual void toggleOpen();
+
+ // Force a folder open or closed
+ virtual void setOpen(BOOL openitem = TRUE);
+
+ // Called when a child is refreshed.
+ // don't rearrange child folder contents unless explicitly requested
+ virtual void requestArrange(BOOL include_descendants = FALSE);
+
+ // internal method which doesn't update the entire view. This
+ // method was written because the list iterators destroy the state
+ // of other iterations, thus, we can't arrange while iterating
+ // through the children (such as when setting which is selected.
+ virtual void setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse = RECURSE_NO);
+
+ // Get the current state of the folder.
+ virtual BOOL isOpen() { return mIsOpen; }
+
+ // special case if an object is dropped on the child.
+ BOOL handleDragAndDropFromChild(MASK mask,
+ BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg);
+
+ void applyFunctorRecursively(LLFolderViewFunctor& functor);
+ virtual void applyListenerFunctorRecursively(LLFolderViewListenerFunctor& functor);
+
+ virtual void openItem( void );
+ virtual BOOL addItem(LLFolderViewItem* item);
+ virtual BOOL addFolder( LLFolderViewFolder* folder);
+
+ // LLView functionality
+ virtual BOOL handleHover(S32 x, S32 y, MASK mask);
+ virtual BOOL handleRightMouseDown( S32 x, S32 y, MASK mask );
+ virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask );
+ virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask );
+ virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg);
+ virtual void draw();
+
+ time_t getCreationDate() const;
+ bool isTrash() const;
+};
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Class LLFolderViewListenerFunctor
+//
+// This simple abstract base class can be used to applied to all
+// listeners in a hierarchy.
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+class LLFolderViewListenerFunctor
+{
+public:
+ virtual ~LLFolderViewListenerFunctor() {}
+ virtual void operator()(LLFolderViewEventListener* listener) = 0;
+};
+
+#endif // LLFOLDERVIEWITEM_H
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index 0f2951d9df..eb2c6768f3 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -50,14 +50,13 @@
// newview
#include "llagent.h"
-#include "llchatbar.h"
#include "lldelayedgestureerror.h"
#include "llinventorymodel.h"
#include "llnotify.h"
#include "llviewermessage.h"
#include "llvoavatarself.h"
#include "llviewerstats.h"
-#include "llbottomtray.h"
+#include "llnearbychatbar.h"
LLGestureManager gGestureManager;
@@ -872,7 +871,7 @@ void LLGestureManager::runStep(LLMultiGesture* gesture, LLGestureStep* step)
const BOOL animate = FALSE;
- LLBottomTray::getInstance()->sendChatFromViewer(chat_text, CHAT_TYPE_NORMAL, animate);
+ LLNearbyChatBar::getInstance()->sendChatFromViewer(chat_text, CHAT_TYPE_NORMAL, animate);
gesture->mCurrentStep++;
break;
diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp
index 5d0bcab07a..278fd5b9f6 100644
--- a/indra/newview/llgrouplist.cpp
+++ b/indra/newview/llgrouplist.cpp
@@ -34,17 +34,32 @@
#include "llgrouplist.h"
+// libs
+#include "lltrans.h"
+
// newview
#include "llagent.h"
-static LLDefaultWidgetRegistry::Register<LLGroupList> r("group_list");
+static LLDefaultChildRegistry::Register<LLGroupList> r("group_list");
+
+LLGroupList::Params::Params()
+{
+ // Prevent the active group from being always first in the list.
+ online_go_first = false;
+}
LLGroupList::LLGroupList(const Params& p)
: LLAvatarList(p)
{
}
-BOOL LLGroupList::updateList()
+static bool findInsensitive(std::string haystack, const std::string& needle_upper)
+{
+ LLStringUtil::toUpper(haystack);
+ return haystack.find(needle_upper) != std::string::npos;
+}
+
+BOOL LLGroupList::update(const std::string& name_filter)
{
LLCtrlListInterface *group_list = getListInterface();
const LLUUID& highlight_id = gAgent.getGroupID();
@@ -58,12 +73,17 @@ BOOL LLGroupList::updateList()
// *TODO: check powers mask?
id = gAgent.mGroups.get(i).mID;
const LLGroupData& group_data = gAgent.mGroups.get(i);
+ if (name_filter != LLStringUtil::null && !findInsensitive(group_data.mName, name_filter))
+ continue;
addItem(id, group_data.mName, highlight_id == id, ADD_BOTTOM);
}
// add "none" to list at top
- //name = LLTrans::getString("GroupsNone")
- addItem(LLUUID::null, std::string("none"), highlight_id.isNull(), ADD_TOP); // *TODO: localize
+ {
+ std::string loc_none = LLTrans::getString("GroupsNone");
+ if (name_filter == LLStringUtil::null || findInsensitive(loc_none, name_filter))
+ addItem(LLUUID::null, loc_none, highlight_id.isNull(), ADD_TOP);
+ }
group_list->selectByValue(highlight_id);
return TRUE;
diff --git a/indra/newview/llgrouplist.h b/indra/newview/llgrouplist.h
index ce26977fdb..e893313f4b 100644
--- a/indra/newview/llgrouplist.h
+++ b/indra/newview/llgrouplist.h
@@ -44,10 +44,11 @@ class LLGroupList: public LLAvatarList
public:
struct Params : public LLInitParam::Block<Params, LLAvatarList::Params>
{
+ Params();
};
LLGroupList(const Params&);
- BOOL updateList();
+ BOOL update(const std::string& name_filter = LLStringUtil::null);
};
#endif // LL_LLGROUPLIST_H
diff --git a/indra/newview/llhomelocationresponder.cpp b/indra/newview/llhomelocationresponder.cpp
index 3ef58e7561..df478a0a04 100644
--- a/indra/newview/llhomelocationresponder.cpp
+++ b/indra/newview/llhomelocationresponder.cpp
@@ -103,7 +103,7 @@ void LLHomeLocationResponder::result( const LLSD& content )
}
}
-void LLHomeLocationResponder::error( const LLSD& content )
+void LLHomeLocationResponder::error( U32 status, const std::string& reason )
{
- llinfos << "received error(" << ll_pretty_print_sd( content ) << ")" << llendl;
+ llinfos << "received error(" << reason << ")" << llendl;
}
diff --git a/indra/newview/llhomelocationresponder.h b/indra/newview/llhomelocationresponder.h
index 1e222cd5b2..3a1d8ebfed 100644
--- a/indra/newview/llhomelocationresponder.h
+++ b/indra/newview/llhomelocationresponder.h
@@ -42,7 +42,7 @@
class LLHomeLocationResponder : public LLHTTPClient::Responder
{
virtual void result( const LLSD& content );
- virtual void error( const LLSD& content );
+ virtual void error( U32 status, const std::string& reason );
};
#endif
diff --git a/indra/newview/llhudeffect.cpp b/indra/newview/llhudeffect.cpp
index c1d46f98d4..bfd62805a1 100644
--- a/indra/newview/llhudeffect.cpp
+++ b/indra/newview/llhudeffect.cpp
@@ -38,7 +38,6 @@
#include "llgl.h"
#include "llagent.h"
#include "llrendersphere.h"
-#include "llimagegl.h"
#include "llviewerobjectlist.h"
#include "lldrawable.h"
diff --git a/indra/newview/llhudeffectbeam.cpp b/indra/newview/llhudeffectbeam.cpp
index 6cb3bef751..43a8dd1d81 100644
--- a/indra/newview/llhudeffectbeam.cpp
+++ b/indra/newview/llhudeffectbeam.cpp
@@ -43,7 +43,6 @@
#include "llgl.h"
#include "llglheaders.h"
#include "llhudrender.h"
-#include "llimagegl.h"
#include "llrendersphere.h"
#include "llviewercamera.h"
#include "llvoavatar.h"
diff --git a/indra/newview/llhudeffecttrail.cpp b/indra/newview/llhudeffecttrail.cpp
index 0ade6810ba..786491211d 100644
--- a/indra/newview/llhudeffecttrail.cpp
+++ b/indra/newview/llhudeffecttrail.cpp
@@ -35,14 +35,13 @@
#include "llhudeffecttrail.h"
#include "llviewercontrol.h"
-#include "llimagegl.h"
#include "message.h"
#include "llagent.h"
#include "llbox.h"
#include "lldrawable.h"
#include "llhudrender.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerobjectlist.h"
#include "llviewerpartsim.h"
#include "llviewerpartsource.h"
diff --git a/indra/newview/llhudicon.cpp b/indra/newview/llhudicon.cpp
index 3535fe185c..eda1d3fc55 100644
--- a/indra/newview/llhudicon.cpp
+++ b/indra/newview/llhudicon.cpp
@@ -40,7 +40,7 @@
#include "llviewerobject.h"
#include "lldrawable.h"
#include "llviewercamera.h"
-#include "llviewerimage.h"
+#include "llviewertexture.h"
#include "llviewerwindow.h"
//-----------------------------------------------------------------------------
@@ -144,7 +144,7 @@ void LLHUDIcon::renderIcon(BOOL for_select)
alpha_factor *= clamp_rescale(time_elapsed, MAX_VISIBLE_TIME - FADE_OUT_TIME, MAX_VISIBLE_TIME, 1.f, 0.f);
}
- F32 image_aspect = (F32)mImagep->mFullWidth / (F32)mImagep->mFullHeight;
+ F32 image_aspect = (F32)mImagep->getFullWidth() / (F32)mImagep->getFullHeight() ;
LLVector3 x_scale = image_aspect * (F32)gViewerWindow->getWindowHeight() * mScale * scale_factor * x_pixel_vec;
LLVector3 y_scale = (F32)gViewerWindow->getWindowHeight() * mScale * scale_factor * y_pixel_vec;
@@ -164,7 +164,7 @@ void LLHUDIcon::renderIcon(BOOL for_select)
LLColor4 icon_color = LLColor4::white;
icon_color.mV[VALPHA] = alpha_factor;
gGL.color4fv(icon_color.mV);
- gGL.getTexUnit(0)->bind(mImagep.get());
+ gGL.getTexUnit(0)->bind(mImagep);
}
gGL.begin(LLRender::QUADS);
@@ -181,7 +181,7 @@ void LLHUDIcon::renderIcon(BOOL for_select)
gGL.end();
}
-void LLHUDIcon::setImage(LLViewerImage* imagep)
+void LLHUDIcon::setImage(LLViewerTexture* imagep)
{
mImagep = imagep;
mImagep->setAddressMode(LLTexUnit::TAM_CLAMP);
@@ -260,7 +260,7 @@ BOOL LLHUDIcon::lineSegmentIntersect(const LLVector3& start, const LLVector3& en
return FALSE;
}
- F32 image_aspect = (F32)mImagep->mFullWidth / (F32)mImagep->mFullHeight;
+ F32 image_aspect = (F32)mImagep->getFullWidth() / (F32)mImagep->getFullHeight() ;
LLVector3 x_scale = image_aspect * (F32)gViewerWindow->getWindowHeight() * mScale * scale_factor * x_pixel_vec;
LLVector3 y_scale = (F32)gViewerWindow->getWindowHeight() * mScale * scale_factor * y_pixel_vec;
diff --git a/indra/newview/llhudicon.h b/indra/newview/llhudicon.h
index 2c1c549521..770e3bbcd0 100644
--- a/indra/newview/llhudicon.h
+++ b/indra/newview/llhudicon.h
@@ -61,7 +61,7 @@ public:
/*virtual*/ void markDead();
/*virtual*/ F32 getDistance() const { return mDistance; }
- void setImage(LLViewerImage* imagep);
+ void setImage(LLViewerTexture* imagep);
void setScale(F32 fraction_of_fov);
void restartLifeTimer() { mLifeTimer.reset(); }
@@ -88,7 +88,7 @@ protected:
void renderIcon(BOOL for_select); // common render code
private:
- LLPointer<LLViewerImage> mImagep;
+ LLPointer<LLViewerTexture> mImagep;
LLFrameTimer mAnimTimer;
LLFrameTimer mLifeTimer;
F32 mDistance;
diff --git a/indra/newview/llhudmanager.cpp b/indra/newview/llhudmanager.cpp
index e1e9d9c51e..8588de0fa0 100644
--- a/indra/newview/llhudmanager.cpp
+++ b/indra/newview/llhudmanager.cpp
@@ -40,6 +40,7 @@
#include "llagent.h"
#include "llhudeffect.h"
#include "pipeline.h"
+#include "llui.h"
#include "llviewercontrol.h"
#include "llviewerobjectlist.h"
@@ -52,9 +53,9 @@ LLColor4 LLHUDManager::sChildColor;
LLHUDManager::LLHUDManager()
{
- LLHUDManager::sParentColor = gSavedSkinSettings.getColor("FocusColor");
+ LLHUDManager::sParentColor = LLUIColorTable::instance().getColor("FocusColor");
// rdw commented out since it's not used. Also removed from colors_base.xml
- //LLHUDManager::sChildColor =gSavedSkinSettings.getColor("FocusSecondaryColor");
+ //LLHUDManager::sChildColor =LLUIColorTable::instance().getColor("FocusSecondaryColor");
}
LLHUDManager::~LLHUDManager()
diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp
index fe65a12c47..4c8c1b5f7f 100644
--- a/indra/newview/llhudrender.cpp
+++ b/indra/newview/llhudrender.cpp
@@ -40,7 +40,6 @@
#include "v3math.h"
#include "llquaternion.h"
#include "llfontgl.h"
-#include "llimagegl.h"
#include "llglheaders.h"
#include "llviewerwindow.h"
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp
index efeac9c197..c71262c311 100644
--- a/indra/newview/llhudtext.cpp
+++ b/indra/newview/llhudtext.cpp
@@ -39,16 +39,14 @@
#include "llagent.h"
#include "llviewercontrol.h"
-#include "llchatbar.h"
#include "llcriticaldamp.h"
#include "lldrawable.h"
#include "llfontgl.h"
#include "llglheaders.h"
#include "llhudrender.h"
-#include "llimagegl.h"
#include "llui.h"
#include "llviewercamera.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerobject.h"
#include "llvovolume.h"
#include "llviewerwindow.h"
@@ -292,7 +290,7 @@ void LLHUDText::renderText(BOOL for_select)
LLUIImagePtr imagep = LLUI::getUIImage("rounded_square.tga");
// *TODO: make this a per-text setting
- LLColor4 bg_color = gSavedSkinSettings.getColor4("BackgroundChatColor");
+ LLColor4 bg_color = LLUIColorTable::instance().getColor("BackgroundChatColor");
bg_color.setAlpha(gSavedSettings.getF32("ChatBubbleOpacity") * alpha_factor);
const S32 border_height = 16;
@@ -804,10 +802,6 @@ LLVector2 LLHUDText::updateScreenPos(LLVector2 &offset)
LLRect world_rect = gViewerWindow->getVirtualWorldViewRect();
S32 bottom = world_rect.mBottom + STATUS_BAR_HEIGHT;
- if (gChatBar && gChatBar->getVisible())
- {
- bottom += CHAT_BAR_HEIGHT;
- }
LLVector2 screen_center;
screen_center.mV[VX] = llclamp((F32)screen_pos_vec.mV[VX], (F32)world_rect.mLeft + mWidth * 0.5f, (F32)world_rect.mRight - mWidth * 0.5f);
diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp
index 6acd174fc3..248a8dbc4c 100644
--- a/indra/newview/llimpanel.cpp
+++ b/indra/newview/llimpanel.cpp
@@ -45,22 +45,26 @@
#include "llagent.h"
#include "llbutton.h"
+#include "llbottomtray.h"
#include "llcallingcard.h"
#include "llchat.h"
+#include "llchiclet.h"
#include "llconsole.h"
#include "llfloater.h"
#include "llfloatercall.h"
#include "llfloatergroupinfo.h"
-#include "llfriendactions.h"
+#include "llavataractions.h"
#include "llimview.h"
#include "llinventory.h"
#include "llinventorymodel.h"
-#include "llinventoryview.h"
-#include "llfloateractivespeakers.h"
+#include "llfloaterinventory.h"
#include "llfloaterchat.h"
+#include "lliconctrl.h"
+#include "llimview.h" // for LLIMModel to get other avatar id in chat
#include "llkeyboard.h"
#include "lllineeditor.h"
#include "llnotify.h"
+#include "llpanelimcontrolpanel.h"
#include "llrecentpeople.h"
#include "llresmgr.h"
#include "lltrans.h"
@@ -101,190 +105,7 @@ LLVoiceChannel* LLVoiceChannel::sSuspendedVoiceChannel = NULL;
BOOL LLVoiceChannel::sSuspended = FALSE;
-void session_starter_helper(
- const LLUUID& temp_session_id,
- const LLUUID& other_participant_id,
- EInstantMessage im_type)
-{
- LLMessageSystem *msg = gMessageSystem;
-
- msg->newMessageFast(_PREHASH_ImprovedInstantMessage);
- msg->nextBlockFast(_PREHASH_AgentData);
- msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
-
- msg->nextBlockFast(_PREHASH_MessageBlock);
- msg->addBOOLFast(_PREHASH_FromGroup, FALSE);
- msg->addUUIDFast(_PREHASH_ToAgentID, other_participant_id);
- msg->addU8Fast(_PREHASH_Offline, IM_ONLINE);
- msg->addU8Fast(_PREHASH_Dialog, im_type);
- msg->addUUIDFast(_PREHASH_ID, temp_session_id);
- msg->addU32Fast(_PREHASH_Timestamp, NO_TIMESTAMP); // no timestamp necessary
-
- std::string name;
- gAgent.buildFullname(name);
-
- msg->addStringFast(_PREHASH_FromAgentName, name);
- msg->addStringFast(_PREHASH_Message, LLStringUtil::null);
- msg->addU32Fast(_PREHASH_ParentEstateID, 0);
- msg->addUUIDFast(_PREHASH_RegionID, LLUUID::null);
- msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent());
-}
-
-void start_deprecated_conference_chat(
- const LLUUID& temp_session_id,
- const LLUUID& creator_id,
- const LLUUID& other_participant_id,
- const LLSD& agents_to_invite)
-{
- U8* bucket;
- U8* pos;
- S32 count;
- S32 bucket_size;
-
- // *FIX: this could suffer from endian issues
- count = agents_to_invite.size();
- bucket_size = UUID_BYTES * count;
- bucket = new U8[bucket_size];
- pos = bucket;
-
- for(S32 i = 0; i < count; ++i)
- {
- LLUUID agent_id = agents_to_invite[i].asUUID();
-
- memcpy(pos, &agent_id, UUID_BYTES);
- pos += UUID_BYTES;
- }
-
- session_starter_helper(
- temp_session_id,
- other_participant_id,
- IM_SESSION_CONFERENCE_START);
-
- gMessageSystem->addBinaryDataFast(
- _PREHASH_BinaryBucket,
- bucket,
- bucket_size);
-
- gAgent.sendReliableMessage();
-
- delete[] bucket;
-}
-
-class LLStartConferenceChatResponder : public LLHTTPClient::Responder
-{
-public:
- LLStartConferenceChatResponder(
- const LLUUID& temp_session_id,
- const LLUUID& creator_id,
- const LLUUID& other_participant_id,
- const LLSD& agents_to_invite)
- {
- mTempSessionID = temp_session_id;
- mCreatorID = creator_id;
- mOtherParticipantID = other_participant_id;
- mAgents = agents_to_invite;
- }
-
- virtual void error(U32 statusNum, const std::string& reason)
- {
- //try an "old school" way.
- if ( statusNum == 400 )
- {
- start_deprecated_conference_chat(
- mTempSessionID,
- mCreatorID,
- mOtherParticipantID,
- mAgents);
- }
-
- //else throw an error back to the client?
- //in theory we should have just have these error strings
- //etc. set up in this file as opposed to the IMMgr,
- //but the error string were unneeded here previously
- //and it is not worth the effort switching over all
- //the possible different language translations
- }
-
-private:
- LLUUID mTempSessionID;
- LLUUID mCreatorID;
- LLUUID mOtherParticipantID;
- LLSD mAgents;
-};
-
-// Returns true if any messages were sent, false otherwise.
-// Is sort of equivalent to "does the server need to do anything?"
-bool send_start_session_messages(
- const LLUUID& temp_session_id,
- const LLUUID& other_participant_id,
- const std::vector<LLUUID>& ids,
- EInstantMessage dialog)
-{
- if ( dialog == IM_SESSION_GROUP_START )
- {
- session_starter_helper(
- temp_session_id,
- other_participant_id,
- dialog);
-
- switch(dialog)
- {
- case IM_SESSION_GROUP_START:
- gMessageSystem->addBinaryDataFast(
- _PREHASH_BinaryBucket,
- EMPTY_BINARY_BUCKET,
- EMPTY_BINARY_BUCKET_SIZE);
- break;
- default:
- break;
- }
- gAgent.sendReliableMessage();
-
- return true;
- }
- else if ( dialog == IM_SESSION_CONFERENCE_START )
- {
- LLSD agents;
- for (int i = 0; i < (S32) ids.size(); i++)
- {
- agents.append(ids[i]);
- }
-
- //we have a new way of starting conference calls now
- LLViewerRegion* region = gAgent.getRegion();
- if (region)
- {
- std::string url = region->getCapability(
- "ChatSessionRequest");
- LLSD data;
- data["method"] = "start conference";
- data["session-id"] = temp_session_id;
-
- data["params"] = agents;
-
- LLHTTPClient::post(
- url,
- data,
- new LLStartConferenceChatResponder(
- temp_session_id,
- gAgent.getID(),
- other_participant_id,
- data["params"]));
- }
- else
- {
- start_deprecated_conference_chat(
- temp_session_id,
- gAgent.getID(),
- other_participant_id,
- agents);
- }
- }
-
- return false;
-}
class LLVoiceCallCapResponder : public LLHTTPClient::Responder
{
@@ -1200,7 +1021,7 @@ LLFloaterIMPanel::LLFloaterIMPanel(const std::string& session_label,
if ( !mSessionInitialized )
{
- if ( !send_start_session_messages(
+ if ( !LLIMModel::instance().sendStartSession(
mSessionUUID,
mOtherParticipantUUID,
mSessionInitialTargetIDs,
@@ -1222,7 +1043,7 @@ LLFloaterIMPanel::LLFloaterIMPanel(const std::string& session_label,
addHistoryLine(
session_start,
- gSavedSkinSettings.getColor4("SystemChatColor"),
+ LLUIColorTable::instance().getColor("SystemChatColor"),
false);
}
}
@@ -1542,34 +1363,42 @@ void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, const LLColor4
prepend_newline = false;
}
+ std::string separator_string(": ");
+
// 'name' is a sender name that we want to hotlink so that clicking on it opens a profile.
if (!name.empty()) // If name exists, then add it to the front of the message.
{
// Don't hotlink any messages from the system (e.g. "Second Life:"), so just add those in plain text.
if (name == SYSTEM_FROM)
{
- mHistoryEditor->appendColoredText(name,false,prepend_newline,color);
+ mHistoryEditor->appendColoredText(name + separator_string, false, prepend_newline, color);
}
else
{
// Convert the name to a hotlink and add to message.
const LLStyleSP &source_style = LLStyleMap::instance().lookupAgent(source);
- mHistoryEditor->appendStyledText(name,false,prepend_newline,source_style);
+ mHistoryEditor->appendStyledText(name + separator_string, false, prepend_newline, source_style);
}
prepend_newline = false;
}
mHistoryEditor->appendColoredText(utf8msg, false, prepend_newline, color);
-
- if (log_to_file
- && gSavedPerAccountSettings.getBOOL("LogInstantMessages") )
+ S32 im_log_option = gSavedPerAccountSettings.getS32("IMLogOptions");
+ if (log_to_file && (im_log_option!=LOG_CHAT))
{
std::string histstr;
- if (gSavedPerAccountSettings.getBOOL("IMLogTimestamp"))
- histstr = LLLogChat::timestamp(gSavedPerAccountSettings.getBOOL("LogTimestampDate")) + name + utf8msg;
+ if (gSavedPerAccountSettings.getBOOL("LogTimestamp"))
+ histstr = LLLogChat::timestamp(gSavedPerAccountSettings.getBOOL("LogTimestampDate")) + name + separator_string + utf8msg;
else
- histstr = name + utf8msg;
+ histstr = name + separator_string + utf8msg;
- LLLogChat::saveHistory(getTitle(),histstr);
+ if(im_log_option==LOG_BOTH_TOGETHER)
+ {
+ LLLogChat::saveHistory(std::string("chat"),histstr);
+ }
+ else
+ {
+ LLLogChat::saveHistory(getTitle(),histstr);
+ }
}
if (!isInVisibleChain())
@@ -1620,7 +1449,6 @@ void LLFloaterIMPanel::selectNone()
mInputEditor->deselect();
}
-
BOOL LLFloaterIMPanel::handleKeyHere( KEY key, MASK mask )
{
BOOL handled = FALSE;
@@ -1752,7 +1580,7 @@ void LLFloaterIMPanel::onClickProfile( void* userdata )
if (self->getOtherParticipantID().notNull())
{
- LLFriendActions::showProfile(self->getOtherParticipantID());
+ LLAvatarActions::showProfile(self->getOtherParticipantID());
}
}
@@ -1847,23 +1675,8 @@ void LLFloaterIMPanel::onClose(bool app_quitting)
{
setTyping(FALSE);
- if(mSessionUUID.notNull())
- {
- std::string name;
- gAgent.buildFullname(name);
- pack_instant_message(
- gMessageSystem,
- gAgent.getID(),
- FALSE,
- gAgent.getSessionID(),
- mOtherParticipantUUID,
- name,
- LLStringUtil::null,
- IM_ONLINE,
- IM_SESSION_LEAVE,
- mSessionUUID);
- gAgent.sendReliableMessage();
- }
+ LLIMModel::instance().sendLeaveSession(mSessionUUID, mOtherParticipantUUID);
+
gIMMgr->removeSession(mSessionUUID);
// *HACK hide the voice floater
@@ -1884,79 +1697,6 @@ void LLFloaterIMPanel::onVisibilityChange(BOOL new_visibility)
mSessionUUID);
}
-void deliver_message(const std::string& utf8_text,
- const LLUUID& im_session_id,
- const LLUUID& other_participant_id,
- EInstantMessage dialog)
-{
- std::string name;
- bool sent = false;
- gAgent.buildFullname(name);
-
- const LLRelationship* info = NULL;
- info = LLAvatarTracker::instance().getBuddyInfo(other_participant_id);
-
- U8 offline = (!info || info->isOnline()) ? IM_ONLINE : IM_OFFLINE;
-
- if((offline == IM_OFFLINE) && (LLVoiceClient::getInstance()->isOnlineSIP(other_participant_id)))
- {
- // User is online through the OOW connector, but not with a regular viewer. Try to send the message via SLVoice.
- sent = gVoiceClient->sendTextMessage(other_participant_id, utf8_text);
- }
-
- if(!sent)
- {
- // Send message normally.
-
- // default to IM_SESSION_SEND unless it's nothing special - in
- // which case it's probably an IM to everyone.
- U8 new_dialog = dialog;
-
- if ( dialog != IM_NOTHING_SPECIAL )
- {
- new_dialog = IM_SESSION_SEND;
- }
- pack_instant_message(
- gMessageSystem,
- gAgent.getID(),
- FALSE,
- gAgent.getSessionID(),
- other_participant_id,
- name.c_str(),
- utf8_text.c_str(),
- offline,
- (EInstantMessage)new_dialog,
- im_session_id);
- gAgent.sendReliableMessage();
- }
-
- // If there is a mute list and this is not a group chat...
- if ( LLMuteList::getInstance() )
- {
- // ... the target should not be in our mute list for some message types.
- // Auto-remove them if present.
- switch( dialog )
- {
- case IM_NOTHING_SPECIAL:
- case IM_GROUP_INVITATION:
- case IM_INVENTORY_OFFERED:
- case IM_SESSION_INVITE:
- case IM_SESSION_P2P_INVITE:
- case IM_SESSION_CONFERENCE_START:
- case IM_SESSION_SEND: // This one is marginal - erring on the side of hearing.
- case IM_LURE_USER:
- case IM_GODLIKE_LURE_USER:
- case IM_FRIENDSHIP_OFFERED:
- LLMuteList::getInstance()->autoRemove(other_participant_id, LLMuteList::AR_IM);
- break;
- default: ; // do nothing
- }
- }
-
- // Add the recipient to the recent people list.
- LLRecentPeople::instance().add(other_participant_id);
-}
-
void LLFloaterIMPanel::sendMsg()
{
if (!gAgent.isGodlike()
@@ -1978,7 +1718,7 @@ void LLFloaterIMPanel::sendMsg()
if ( mSessionInitialized )
{
- deliver_message(utf8_text,
+ LLIMModel::sendMessage(utf8_text,
mSessionUUID,
mOtherParticipantUUID,
mDialog);
@@ -2004,7 +1744,7 @@ void LLFloaterIMPanel::sendMsg()
BOOL other_was_typing = mOtherTyping;
- addHistoryLine(history_echo, gSavedSkinSettings.getColor("IMChatColor"), true, gAgent.getID());
+ addHistoryLine(history_echo, LLUIColorTable::instance().getColor("IMChatColor"), true, gAgent.getID());
if (other_was_typing)
{
@@ -2084,7 +1824,7 @@ void LLFloaterIMPanel::sessionInitReplyReceived(const LLUUID& session_id)
iter != mQueuedMsgsForInit.endArray();
++iter)
{
- deliver_message(
+ LLIMModel::sendMessage(
iter->asString(),
mSessionUUID,
mOtherParticipantUUID,
@@ -2135,23 +1875,10 @@ void LLFloaterIMPanel::sendTypingState(BOOL typing)
// much network traffic. Only send in person-to-person IMs.
if (mDialog != IM_NOTHING_SPECIAL) return;
- std::string name;
- gAgent.buildFullname(name);
-
- pack_instant_message(
- gMessageSystem,
- gAgent.getID(),
- FALSE,
- gAgent.getSessionID(),
- mOtherParticipantUUID,
- name,
- std::string("typing"),
- IM_ONLINE,
- (typing ? IM_TYPING_START : IM_TYPING_STOP),
- mSessionUUID);
- gAgent.sendReliableMessage();
+ LLIMModel::instance().sendTypingState(mSessionUUID, mOtherParticipantUUID, typing);
}
+
void LLFloaterIMPanel::processIMTyping(const LLIMInfo* im_info, BOOL typing)
{
if (typing)
@@ -2175,7 +1902,7 @@ void LLFloaterIMPanel::addTypingIndicator(const std::string &name)
mTypingLineStartIndex = mHistoryEditor->getWText().length();
LLUIString typing_start = sTypingStartString;
typing_start.setArg("[NAME]", name);
- addHistoryLine(typing_start, gSavedSkinSettings.getColor4("SystemChatColor"), false);
+ addHistoryLine(typing_start, LLUIColorTable::instance().getColor("SystemChatColor"), false);
mOtherTypingName = name;
mOtherTyping = TRUE;
}
@@ -2206,19 +1933,19 @@ void LLFloaterIMPanel::chatFromLogFile(LLLogChat::ELogLineType type, std::string
{
LLFloaterIMPanel* self = (LLFloaterIMPanel*)userdata;
std::string message = line;
-
+ S32 im_log_option = gSavedPerAccountSettings.getS32("IMLogOptions");
switch (type)
{
case LLLogChat::LOG_EMPTY:
// add warning log enabled message
- if (gSavedPerAccountSettings.getBOOL("LogInstantMessages"))
+ if (im_log_option!=LOG_CHAT)
{
message = LLTrans::getString("IM_logging_string");
}
break;
case LLLogChat::LOG_END:
// add log end message
- if (gSavedPerAccountSettings.getBOOL("LogInstantMessages"))
+ if (im_log_option!=LOG_CHAT)
{
message = LLTrans::getString("IM_logging_string");
}
@@ -2232,7 +1959,7 @@ void LLFloaterIMPanel::chatFromLogFile(LLLogChat::ELogLineType type, std::string
}
//self->addHistoryLine(line, LLColor4::grey, FALSE);
- self->mHistoryEditor->appendColoredText(message, false, true, gSavedSkinSettings.getColor4("ChatHistoryTextColor"));
+ self->mHistoryEditor->appendColoredText(message, false, true, LLUIColorTable::instance().getColor("ChatHistoryTextColor"));
}
void LLFloaterIMPanel::showSessionStartError(
@@ -2318,5 +2045,274 @@ bool LLFloaterIMPanel::onConfirmForceCloseError(const LLSD& notification, const
}
return false;
}
+
+
+std::map<LLUUID, LLIMFloater*> LLIMFloater::sIMFloaterMap;
+
+LLIMFloater::LLIMFloater(const LLUUID& session_id,
+ const std::string title,
+ EInstantMessage dialog)
+: mSessionID(session_id),
+ mLastMessageIndex(-1),
+ mDialog(dialog)
+{
+ LLUICtrlFactory::getInstance()->buildFloater(this, "floater_im_session.xml");
+ sIMFloaterMap[mSessionID] = this;
+
+ LLPanelIMControlPanel* im_control_panel = getChild<LLPanelIMControlPanel>("panel_im_control_panel");
+
+ LLIMModel::LLIMSession* session = get_if_there(LLIMModel::instance().sSessionsMap, session_id, (LLIMModel::LLIMSession*)NULL);
+ if(session)
+ {
+ mOtherParticipantUUID = session->mOtherParticipantID;
+ im_control_panel->setAvatarId(session->mOtherParticipantID);
+ }
+
+ LLButton* slide_left = getChild<LLButton>("slide_left_btn");
+ slide_left->setVisible(im_control_panel->getVisible());
+ slide_left->setClickedCallback(boost::bind(&LLIMFloater::onSlide, this));
+
+ LLButton* slide_right = getChild<LLButton>("slide_right_btn");
+ slide_right->setVisible(!im_control_panel->getVisible());
+ slide_right->setClickedCallback(boost::bind(&LLIMFloater::onSlide, this));
+
+ setTitle(title);
+ setDocked(true);
+
+ mInputEditor = getChild<LLLineEditor>("chat_editor");
+
+
+ mInputEditor->setMaxTextLength(1023);
+ // enable line history support for instant message bar
+ mInputEditor->setEnableLineHistory(TRUE);
+
+ mInputEditor->setFocusReceivedCallback( onInputEditorFocusReceived, this );
+ mInputEditor->setFocusLostCallback( onInputEditorFocusLost, this );
+ mInputEditor->setKeystrokeCallback( onInputEditorKeystroke, this );
+ mInputEditor->setCommitOnFocusLost( FALSE );
+ mInputEditor->setRevertOnEsc( FALSE );
+ mInputEditor->setReplaceNewlinesWithSpaces( FALSE );
+
+ childSetCommitCallback("chat_editor", onSendMsg, this);
+}
+
+/* static */
+void LLIMFloater::newIMCallback(const LLSD& data){
+
+ if (data["num_unread"].asInteger() > 0)
+ {
+ LLUUID session_id = data["session_id"].asUUID();
+
+ LLIMFloater* floater = get_if_there(sIMFloaterMap, session_id, (LLIMFloater*)NULL);
+
+ if (floater == NULL)
+ {
+ llwarns << "new_im_callback for non-existent session_id " << session_id << llendl;
+ return;
+ }
+
+ // update if visible, otherwise will be updated when opened
+ if (floater->getVisible())
+ {
+ floater->updateMessages();
+ }
+ }
+}
+
+void LLIMFloater::onSendMsg( LLUICtrl* ctrl, void* userdata )
+{
+ LLIMFloater* self = (LLIMFloater*) userdata;
+ self->sendMsg();
+}
+
+void LLIMFloater::sendMsg()
+{
+ if (!gAgent.isGodlike()
+ && (mDialog == IM_NOTHING_SPECIAL)
+ && mOtherParticipantUUID.isNull())
+ {
+ llinfos << "Cannot send IM to everyone unless you're a god." << llendl;
+ return;
+ }
+
+ if (mInputEditor)
+ {
+ LLWString text = mInputEditor->getConvertedText();
+ if(!text.empty())
+ {
+ // Truncate and convert to UTF8 for transport
+ std::string utf8_text = wstring_to_utf8str(text);
+ utf8_text = utf8str_truncate(utf8_text, MAX_MSG_BUF_SIZE - 1);
+
+ LLIMModel::sendMessage(utf8_text,
+ mSessionID,
+ mOtherParticipantUUID,
+ mDialog);
+
+ mInputEditor->setText(LLStringUtil::null);
+
+ updateMessages();
+ }
+ }
+}
+
+
+
+LLIMFloater::~LLIMFloater()
+{
+ sIMFloaterMap.erase(mSessionID);
+}
+
+//virtual
+BOOL LLIMFloater::postBuild()
+{
+ mHistoryEditor = getChild<LLViewerTextEditor>("im_text", true, false);
+ mChiclet = LLBottomTray::getInstance()->getChicletPanel()->findChiclet<LLIMChiclet>(mSessionID);
+
+ if (!mChiclet)
+ {
+ llwarns << "No chiclet found for the IMFloter" << llendl;
+ }
+ setDocked(false);
+ return TRUE;
+}
+
+const U32 UNDOCK_LEAP_HEIGHT = 12;
+const U32 DOCK_ICON_HEIGHT = 6;
+
+//virtual
+void LLIMFloater::onFocusLost()
+{
+ // spec says close if docked to bottom tray and user has clicked away
+ // (hence we are no longer focused)
+ if (isDocked())
+ {
+ // app not quitting
+ closeFloater(false);
+ }
+}
+
+
+//virtual
+void LLIMFloater::setDocked(bool docked, bool pop_on_undock)
+{
+ LLFloater::setDocked(docked);
+ mChiclet->setDockTongueVisible(docked);
+ if (docked)
+ {
+ S32 x, y;
+ mChiclet->localPointToScreen((mChiclet->getRect().getWidth())/2, 0, &x, &y);
+ translate(x - getRect().getCenterX(), DOCK_ICON_HEIGHT - getRect().mBottom);
+ }
+ else if (pop_on_undock)
+ {
+ // visually pop up a little bit to emphasize the undocking
+ translate(0, UNDOCK_LEAP_HEIGHT);
+ }
+}
+
+
+void LLIMFloater::onClose(bool app_quitting)
+{
+ mChiclet->setDockTongueVisible(false);
+ LLFloater::onClose(app_quitting);
+}
+
+void LLIMFloater::onSlide()
+{
+ LLPanel* im_control_panel = getChild<LLPanel>("panel_im_control_panel");
+ im_control_panel->setVisible(!im_control_panel->getVisible());
+
+ getChild<LLButton>("slide_left_btn")->setVisible(im_control_panel->getVisible());
+ getChild<LLButton>("slide_right_btn")->setVisible(!im_control_panel->getVisible());
+}
+
+//static
+LLIMFloater* LLIMFloater::show(const LLUUID& session_id)
+{
+ LLIMFloater* floater = get_if_there(sIMFloaterMap, session_id, (LLIMFloater*)NULL);
+
+ if (floater == NULL)
+ {
+ floater = new LLIMFloater(session_id, LLIMModel::instance().getName(session_id), IM_NOTHING_SPECIAL);
+ }
+
+ //hide all
+ for (std::map<LLUUID, LLIMFloater*>::iterator iter = sIMFloaterMap.begin();
+ iter != sIMFloaterMap.end(); ++iter)
+ {
+ LLIMFloater* floater = (*iter).second;
+ floater->setVisible(false);
+ floater->mChiclet->setDockTongueVisible(false);
+
+ }
+
+ floater->setVisibleAndFrontmost(true);
+
+ if (floater->isDocked())
+ {
+ floater->mChiclet->setDockTongueVisible(true);
+ }
+
+ floater->updateMessages();
+ return floater;
+}
+
+void LLIMFloater::updateMessages()
+{
+
+ std::list<LLSD> messages = LLIMModel::instance().getMessages(mSessionID, mLastMessageIndex+1);
+
+ if (messages.size())
+ {
+ std::ostringstream message;
+ std::list<LLSD>::const_reverse_iterator iter = messages.rbegin();
+ std::list<LLSD>::const_reverse_iterator iter_end = messages.rend();
+ for (; iter != iter_end; ++iter)
+ {
+ LLSD msg = *iter;
+
+ message << msg["from"].asString() << " : " << msg["time"].asString() << "\n " << msg["message"].asString() << "\n";
+
+ mLastMessageIndex = msg["index"].asInteger();
+ }
+
+ mHistoryEditor->appendText(message.str(), false, false);
+ mHistoryEditor->setCursorAndScrollToEnd();
+ }
+
+}
+// static
+void LLIMFloater::onInputEditorFocusReceived( LLFocusableElement* caller, void* userdata )
+{
+ LLIMFloater* self= (LLIMFloater*) userdata;
+ self->mHistoryEditor->setCursorAndScrollToEnd();
+}
+
+// static
+void LLIMFloater::onInputEditorFocusLost(LLFocusableElement* caller, void* userdata)
+{
+ LLIMFloater* self = (LLIMFloater*) userdata;
+ self->setTyping(FALSE);
+}
+// static
+void LLIMFloater::onInputEditorKeystroke(LLLineEditor* caller, void* userdata)
+{
+ LLIMFloater* self = (LLIMFloater*)userdata;
+ std::string text = self->mInputEditor->getText();
+ if (!text.empty())
+ {
+ self->setTyping(TRUE);
+ }
+ else
+ {
+ // Deleting all text counts as stopping typing.
+ self->setTyping(FALSE);
+ }
+}
+//just a stub for now
+void LLIMFloater::setTyping(BOOL typing)
+{
+}
diff --git a/indra/newview/llimpanel.h b/indra/newview/llimpanel.h
index 7cd19d4872..e6bde5c93a 100644
--- a/indra/newview/llimpanel.h
+++ b/indra/newview/llimpanel.h
@@ -47,6 +47,7 @@ class LLInventoryItem;
class LLInventoryCategory;
class LLIMSpeakerMgr;
class LLPanelActiveSpeakers;
+class LLIMChiclet;
class LLVoiceChannel : public LLVoiceClientStatusObserver
{
@@ -356,10 +357,65 @@ private:
LLFrameTimer mLastKeystrokeTimer;
void disableWhileSessionStarting();
+};
+
+
+// Individual IM window that appears at the bottom of the screen,
+// optionally "docked" to the bottom tray.
+class LLIMFloater : public LLFloater
+{
+public:
+ LLIMFloater(const LLUUID& session_id,
+ const std::string title,
+ EInstantMessage dialog);
+
+ virtual ~LLIMFloater();
+
+ // LLView overrides
+ /*virtual*/ BOOL postBuild();
+
+ // Floater should close when user clicks away to other UI area,
+ // hence causing focus loss.
+ /*virtual*/ void onFocusLost();
+
+ // LLFloater overrides
+ /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true);
+
+ static LLIMFloater* show(const LLUUID& session_id);
+ void onClose(bool app_quitting);
+
+ // get new messages from LLIMModel
+ void updateMessages();
+ static void onSendMsg( LLUICtrl*, void*);
+ void sendMsg();
+
+ // callback for LLIMModel on new messages
+ // route to specific floater if it is visible
+ static void newIMCallback(const LLSD& data);
+
+ static std::map<LLUUID, LLIMFloater*> sIMFloaterMap;
+
+
+private:
+
+ static void onInputEditorFocusReceived( LLFocusableElement* caller, void* userdata );
+ static void onInputEditorFocusLost(LLFocusableElement* caller, void* userdata);
+ static void onInputEditorKeystroke(LLLineEditor* caller, void* userdata);
+ void setTyping(BOOL typing);
+
+ void onSlide();
+
+ LLUUID mSessionID;
+ S32 mLastMessageIndex;
+ EInstantMessage mDialog;
+ LLIMChiclet* mChiclet;
+ LLUUID mOtherParticipantUUID;
+ LLViewerTextEditor* mHistoryEditor;
+ LLLineEditor* mInputEditor;
- typedef std::map<LLUUID, LLStyleSP> styleMap;
- static styleMap mStyleMap;
};
+
+
#endif // LL_IMPANEL_H
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index cb67fd34e5..b45a6a5f29 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -51,6 +51,7 @@
#include "llresmgr.h"
#include "llfloaterchat.h"
#include "llfloaterchatterbox.h"
+#include "llavataractions.h"
#include "llhttpnode.h"
#include "llimpanel.h"
#include "llresizebar.h"
@@ -91,16 +92,496 @@ std::map<std::string,std::string> LLFloaterIM::sEventStringsMap;
std::map<std::string,std::string> LLFloaterIM::sErrorStringsMap;
std::map<std::string,std::string> LLFloaterIM::sForceCloseSessionMap;
+std::map<LLUUID, LLIMModel::LLIMSession*> LLIMModel::sSessionsMap;
+
+
+
+void toast_callback(const LLSD& msg){
+
+ //we send notifications to reset counter also
+ if (msg["num_unread"].asInteger())
+ {
+ LLSD args;
+ args["MESSAGE"] = msg["message"];
+ args["TIME"] = msg["time"];
+ args["FROM"] = msg["from"];
+
+ LLNotifications::instance().add("IMToast", args, LLSD(), boost::bind(&LLFloaterChatterBox::onOpen, LLFloaterChatterBox::getInstance(), msg["session_id"].asUUID()));
+ }
+}
+
+LLIMModel::LLIMModel()
+{
+ addChangedCallback(toast_callback);
+ addChangedCallback(LLIMFloater::newIMCallback);
+}
+
+
+void LLIMModel::testMessages()
+{
+ LLUUID bot1_id("d0426ec6-6535-4c11-a5d9-526bb0c654d9");
+ LLUUID bot1_session_id;
+ std::string from = "IM Tester";
+
+ bot1_session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, bot1_id);
+ newSession(bot1_session_id, from, IM_NOTHING_SPECIAL, bot1_id);
+ addMessage(bot1_session_id, from, "Test Message: Hi from testerbot land!");
+
+ LLUUID bot2_id;
+ std::string firstname[] = {"Roflcopter", "Joe"};
+ std::string lastname[] = {"Linden", "Tester", "Resident", "Schmoe"};
+
+ S32 rand1 = ll_rand(sizeof firstname)/(sizeof firstname[0]);
+ S32 rand2 = ll_rand(sizeof lastname)/(sizeof lastname[0]);
+
+ from = firstname[rand1] + " " + lastname[rand2];
+ bot2_id.generate(from);
+ LLUUID bot2_session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, bot2_id);
+ newSession(bot2_session_id, from, IM_NOTHING_SPECIAL, bot2_id);
+ addMessage(bot2_session_id, from, "Test Message: Can I haz bear? ");
+ addMessage(bot2_session_id, from, "Test Message: OMGWTFBBQ.");
+}
+
+
+bool LLIMModel::newSession(LLUUID session_id, std::string name, EInstantMessage type, LLUUID other_participant_id)
+{
+ if (is_in_map(sSessionsMap, session_id))
+ {
+ llwarns << "IM Session " << session_id << " already exists" << llendl;
+ return false;
+ }
+
+ LLIMSession* session = new LLIMSession(name, type, other_participant_id);
+ sSessionsMap[session_id] = session;
+
+ LLIMMgr::getInstance()->notifyObserverSessionAdded(session_id, name, other_participant_id);
+
+ return true;
+
+}
+
+std::list<LLSD> LLIMModel::getMessages(LLUUID session_id, int start_index)
+{
+ std::list<LLSD> return_list;
+
+ LLIMSession* session = get_if_there(sSessionsMap, session_id, (LLIMSession*)NULL);
+
+ if (!session)
+ {
+ llwarns << "session " << session_id << "does not exist " << llendl;
+ return return_list;
+ }
+
+ int i = session->mMsgs.size() - start_index;
+
+ for (std::list<LLSD>::iterator iter = session->mMsgs.begin();
+ iter != session->mMsgs.end() && i > 0;
+ iter++)
+ {
+ LLSD msg;
+ msg = *iter;
+ return_list.push_back(*iter);
+ i--;
+ }
+
+ session->mNumUnread = 0;
+
+ LLSD arg;
+ arg["session_id"] = session_id;
+ arg["num_unread"] = 0;
+ mChangedSignal(arg);
+
+ // TODO: in the future is there a more efficient way to return these
+ return return_list;
+
+}
+
+bool LLIMModel::addToHistory(LLUUID session_id, std::string from, std::string utf8_text) {
+
+ LLIMSession* session = get_if_there(sSessionsMap, session_id, (LLIMSession*)NULL);
+
+ if (!session)
+ {
+ llwarns << "session " << session_id << "does not exist " << llendl;
+ return false;
+ }
+
+ LLSD message;
+ message["from"] = from;
+ message["message"] = utf8_text;
+ message["time"] = LLLogChat::timestamp(false); //might want to add date separately
+ message["index"] = (LLSD::Integer)session->mMsgs.size();
+
+ session->mMsgs.push_front(message);
+
+ return true;
+
+}
+
+
+bool LLIMModel::addMessage(LLUUID session_id, std::string from, std::string utf8_text) {
+
+ LLIMSession* session = get_if_there(sSessionsMap, session_id, (LLIMSession*)NULL);
+
+ if (!session)
+ {
+ llwarns << "session " << session_id << "does not exist " << llendl;
+ return false;
+ }
+
+ addToHistory(session_id, from, utf8_text);
+
+ std::string agent_name;
+ gAgent.buildFullname(agent_name);
+
+ session->mNumUnread++;
+
+ // notify listeners
+ LLSD arg;
+ arg["session_id"] = session_id;
+ arg["num_unread"] = session->mNumUnread;
+ arg["message"] = utf8_text;
+ mChangedSignal(arg);
+
+ return true;
+}
+
+
+const std::string& LLIMModel::getName(LLUUID session_id)
+{
+ LLIMSession* session = get_if_there(sSessionsMap, session_id, (LLIMSession*)NULL);
+
+ if (!session)
+ {
+ llwarns << "session " << session_id << "does not exist " << llendl;
+ return LLStringUtil::null;
+ }
+
+ return session->mName;
+}
+
+
+// TODO get rid of other participant ID
+void LLIMModel::sendTypingState(LLUUID session_id, LLUUID other_participant_id, BOOL typing)
+{
+ std::string name;
+ gAgent.buildFullname(name);
+
+ pack_instant_message(
+ gMessageSystem,
+ gAgent.getID(),
+ FALSE,
+ gAgent.getSessionID(),
+ other_participant_id,
+ name,
+ std::string("typing"),
+ IM_ONLINE,
+ (typing ? IM_TYPING_START : IM_TYPING_STOP),
+ session_id);
+ gAgent.sendReliableMessage();
+}
+
+void LLIMModel::sendLeaveSession(LLUUID session_id, LLUUID other_participant_id)
+{
+ if(session_id.notNull())
+ {
+ std::string name;
+ gAgent.buildFullname(name);
+ pack_instant_message(
+ gMessageSystem,
+ gAgent.getID(),
+ FALSE,
+ gAgent.getSessionID(),
+ other_participant_id,
+ name,
+ LLStringUtil::null,
+ IM_ONLINE,
+ IM_SESSION_LEAVE,
+ session_id);
+ gAgent.sendReliableMessage();
+ }
+}
+
+
+
+void LLIMModel::sendMessage(const std::string& utf8_text,
+ const LLUUID& im_session_id,
+ const LLUUID& other_participant_id,
+ EInstantMessage dialog)
+{
+ std::string name;
+ bool sent = false;
+ gAgent.buildFullname(name);
+
+ const LLRelationship* info = NULL;
+ info = LLAvatarTracker::instance().getBuddyInfo(other_participant_id);
+
+ U8 offline = (!info || info->isOnline()) ? IM_ONLINE : IM_OFFLINE;
+
+ if((offline == IM_OFFLINE) && (LLVoiceClient::getInstance()->isOnlineSIP(other_participant_id)))
+ {
+ // User is online through the OOW connector, but not with a regular viewer. Try to send the message via SLVoice.
+ sent = gVoiceClient->sendTextMessage(other_participant_id, utf8_text);
+ }
+
+ if(!sent)
+ {
+ // Send message normally.
+
+ // default to IM_SESSION_SEND unless it's nothing special - in
+ // which case it's probably an IM to everyone.
+ U8 new_dialog = dialog;
+
+ if ( dialog != IM_NOTHING_SPECIAL )
+ {
+ new_dialog = IM_SESSION_SEND;
+ }
+ pack_instant_message(
+ gMessageSystem,
+ gAgent.getID(),
+ FALSE,
+ gAgent.getSessionID(),
+ other_participant_id,
+ name.c_str(),
+ utf8_text.c_str(),
+ offline,
+ (EInstantMessage)new_dialog,
+ im_session_id);
+ gAgent.sendReliableMessage();
+ }
+
+ // If there is a mute list and this is not a group chat...
+ if ( LLMuteList::getInstance() )
+ {
+ // ... the target should not be in our mute list for some message types.
+ // Auto-remove them if present.
+ switch( dialog )
+ {
+ case IM_NOTHING_SPECIAL:
+ case IM_GROUP_INVITATION:
+ case IM_INVENTORY_OFFERED:
+ case IM_SESSION_INVITE:
+ case IM_SESSION_P2P_INVITE:
+ case IM_SESSION_CONFERENCE_START:
+ case IM_SESSION_SEND: // This one is marginal - erring on the side of hearing.
+ case IM_LURE_USER:
+ case IM_GODLIKE_LURE_USER:
+ case IM_FRIENDSHIP_OFFERED:
+ LLMuteList::getInstance()->autoRemove(other_participant_id, LLMuteList::AR_IM);
+ break;
+ default: ; // do nothing
+ }
+ }
+
+ if((dialog == IM_NOTHING_SPECIAL) &&
+ (other_participant_id.notNull()))
+ {
+ // Do we have to replace the /me's here?
+ std::string from;
+ gAgent.buildFullname(from);
+ LLIMModel::instance().addToHistory(im_session_id, from, utf8_text);
+ }
+
+ // Add the recipient to the recent people list.
+ LLRecentPeople::instance().add(other_participant_id);
+}
+
+boost::signals2::connection LLIMModel::addChangedCallback( boost::function<void (const LLSD& data)> cb )
+{
+ return mChangedSignal.connect(cb);
+}
+
+void session_starter_helper(
+ const LLUUID& temp_session_id,
+ const LLUUID& other_participant_id,
+ EInstantMessage im_type)
+{
+ LLMessageSystem *msg = gMessageSystem;
+
+ msg->newMessageFast(_PREHASH_ImprovedInstantMessage);
+ msg->nextBlockFast(_PREHASH_AgentData);
+ msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+ msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+
+ msg->nextBlockFast(_PREHASH_MessageBlock);
+ msg->addBOOLFast(_PREHASH_FromGroup, FALSE);
+ msg->addUUIDFast(_PREHASH_ToAgentID, other_participant_id);
+ msg->addU8Fast(_PREHASH_Offline, IM_ONLINE);
+ msg->addU8Fast(_PREHASH_Dialog, im_type);
+ msg->addUUIDFast(_PREHASH_ID, temp_session_id);
+ msg->addU32Fast(_PREHASH_Timestamp, NO_TIMESTAMP); // no timestamp necessary
+
+ std::string name;
+ gAgent.buildFullname(name);
+
+ msg->addStringFast(_PREHASH_FromAgentName, name);
+ msg->addStringFast(_PREHASH_Message, LLStringUtil::null);
+ msg->addU32Fast(_PREHASH_ParentEstateID, 0);
+ msg->addUUIDFast(_PREHASH_RegionID, LLUUID::null);
+ msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent());
+}
+
+void start_deprecated_conference_chat(
+ const LLUUID& temp_session_id,
+ const LLUUID& creator_id,
+ const LLUUID& other_participant_id,
+ const LLSD& agents_to_invite)
+{
+ U8* bucket;
+ U8* pos;
+ S32 count;
+ S32 bucket_size;
+
+ // *FIX: this could suffer from endian issues
+ count = agents_to_invite.size();
+ bucket_size = UUID_BYTES * count;
+ bucket = new U8[bucket_size];
+ pos = bucket;
+
+ for(S32 i = 0; i < count; ++i)
+ {
+ LLUUID agent_id = agents_to_invite[i].asUUID();
+
+ memcpy(pos, &agent_id, UUID_BYTES);
+ pos += UUID_BYTES;
+ }
+
+ session_starter_helper(
+ temp_session_id,
+ other_participant_id,
+ IM_SESSION_CONFERENCE_START);
+
+ gMessageSystem->addBinaryDataFast(
+ _PREHASH_BinaryBucket,
+ bucket,
+ bucket_size);
+
+ gAgent.sendReliableMessage();
+
+ delete[] bucket;
+}
+
+class LLStartConferenceChatResponder : public LLHTTPClient::Responder
+{
+public:
+ LLStartConferenceChatResponder(
+ const LLUUID& temp_session_id,
+ const LLUUID& creator_id,
+ const LLUUID& other_participant_id,
+ const LLSD& agents_to_invite)
+ {
+ mTempSessionID = temp_session_id;
+ mCreatorID = creator_id;
+ mOtherParticipantID = other_participant_id;
+ mAgents = agents_to_invite;
+ }
+
+ virtual void error(U32 statusNum, const std::string& reason)
+ {
+ //try an "old school" way.
+ if ( statusNum == 400 )
+ {
+ start_deprecated_conference_chat(
+ mTempSessionID,
+ mCreatorID,
+ mOtherParticipantID,
+ mAgents);
+ }
+
+ //else throw an error back to the client?
+ //in theory we should have just have these error strings
+ //etc. set up in this file as opposed to the IMMgr,
+ //but the error string were unneeded here previously
+ //and it is not worth the effort switching over all
+ //the possible different language translations
+ }
+
+private:
+ LLUUID mTempSessionID;
+ LLUUID mCreatorID;
+ LLUUID mOtherParticipantID;
+
+ LLSD mAgents;
+};
+
+// Returns true if any messages were sent, false otherwise.
+// Is sort of equivalent to "does the server need to do anything?"
+bool LLIMModel::sendStartSession(
+ const LLUUID& temp_session_id,
+ const LLUUID& other_participant_id,
+ const std::vector<LLUUID>& ids,
+ EInstantMessage dialog)
+{
+ if ( dialog == IM_SESSION_GROUP_START )
+ {
+ session_starter_helper(
+ temp_session_id,
+ other_participant_id,
+ dialog);
+
+ switch(dialog)
+ {
+ case IM_SESSION_GROUP_START:
+ gMessageSystem->addBinaryDataFast(
+ _PREHASH_BinaryBucket,
+ EMPTY_BINARY_BUCKET,
+ EMPTY_BINARY_BUCKET_SIZE);
+ break;
+ default:
+ break;
+ }
+ gAgent.sendReliableMessage();
+
+ return true;
+ }
+ else if ( dialog == IM_SESSION_CONFERENCE_START )
+ {
+ LLSD agents;
+ for (int i = 0; i < (S32) ids.size(); i++)
+ {
+ agents.append(ids[i]);
+ }
+
+ //we have a new way of starting conference calls now
+ LLViewerRegion* region = gAgent.getRegion();
+ if (region)
+ {
+ std::string url = region->getCapability(
+ "ChatSessionRequest");
+ LLSD data;
+ data["method"] = "start conference";
+ data["session-id"] = temp_session_id;
+
+ data["params"] = agents;
+
+ LLHTTPClient::post(
+ url,
+ data,
+ new LLStartConferenceChatResponder(
+ temp_session_id,
+ gAgent.getID(),
+ other_participant_id,
+ data["params"]));
+ }
+ else
+ {
+ start_deprecated_conference_chat(
+ temp_session_id,
+ gAgent.getID(),
+ other_participant_id,
+ agents);
+ }
+ }
+
+ return false;
+}
+
+
+
//
// Helper Functions
//
-// returns true if a should appear before b
-//static BOOL group_dictionary_sort( LLGroupData* a, LLGroupData* b )
-//{
-// return (LLStringUtil::compareDict( a->mName, b->mName ) < 0);
-//}
-
class LLViewerChatterBoxInvitationAcceptResponder :
public LLHTTPClient::Responder
{
@@ -614,26 +1095,6 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response)
}
//
-// Public Static Member Functions
-//
-
-// This is a helper function to determine what kind of im session
-// should be used for the given agent.
-// static
-EInstantMessage LLIMMgr::defaultIMTypeForAgent(const LLUUID& agent_id)
-{
- EInstantMessage type = IM_NOTHING_SPECIAL;
- if(is_agent_friend(agent_id))
- {
- if(LLAvatarTracker::instance().isBuddyOnline(agent_id))
- {
- type = IM_SESSION_CONFERENCE_START;
- }
- }
- return type;
-}
-
-//
// Member Functions
//
@@ -725,7 +1186,9 @@ void LLIMMgr::addMessage(
dialog,
FALSE);
- notifyObserverSessionAdded(floater->getSessionID(), name, other_participant_id);
+
+ LLIMModel::instance().newSession(new_session_id, name, dialog, other_participant_id);
+
// When we get a new IM, and if you are a god, display a bit
// of information about the source. This is to help liaisons
@@ -745,7 +1208,8 @@ void LLIMMgr::addMessage(
//<< "*** region_id: " << region_id << std::endl
//<< "*** position: " << position << std::endl;
- floater->addHistoryLine(bonus_info.str(), gSavedSkinSettings.getColor4("SystemChatColor"));
+ floater->addHistoryLine(bonus_info.str(), LLUIColorTable::instance().getColor("SystemChatColor"));
+ LLIMModel::instance().addMessage(new_session_id, from, bonus_info.str());
}
make_ui_sound("UISndNewIncomingIMSession");
@@ -754,8 +1218,8 @@ void LLIMMgr::addMessage(
// now add message to floater
bool is_from_system = target_id.isNull() || (from == SYSTEM_FROM);
const LLColor4& color = ( is_from_system ?
- gSavedSkinSettings.getColor4("SystemChatColor") :
- gSavedSkinSettings.getColor("IMChatColor"));
+ LLUIColorTable::instance().getColor("SystemChatColor") :
+ LLUIColorTable::instance().getColor("IMChatColor"));
if ( !link_name )
{
floater->addHistoryLine(msg,color); // No name to prepend, so just add the message normally
@@ -765,6 +1229,8 @@ void LLIMMgr::addMessage(
floater->addHistoryLine(msg, color, true, other_participant_id, from); // Insert linked name to front of message
}
+ LLIMModel::instance().addMessage(new_session_id, from, msg);
+
if( !LLFloaterReg::instanceVisible("communicate") && !floater->getVisible())
{
LLFloaterChatterBox* chat_floater = LLFloaterChatterBox::getInstance();
@@ -1332,7 +1798,7 @@ void LLIMMgr::noteOfflineUsers(
S32 count = ids.count();
if(count == 0)
{
- floater->addHistoryLine(sOnlyUserMessage, gSavedSkinSettings.getColor4("SystemChatColor"));
+ floater->addHistoryLine(sOnlyUserMessage, LLUIColorTable::instance().getColor("SystemChatColor"));
}
else
{
@@ -1348,7 +1814,7 @@ void LLIMMgr::noteOfflineUsers(
LLUIString offline = sOfflineMessage;
offline.setArg("[FIRST]", first);
offline.setArg("[LAST]", last);
- floater->addHistoryLine(offline, gSavedSkinSettings.getColor4("SystemChatColor"));
+ floater->addHistoryLine(offline, LLUIColorTable::instance().getColor("SystemChatColor"));
}
}
}
@@ -1652,7 +2118,7 @@ public:
{
saved = llformat("(Saved %s) ", formatted_time(timestamp).c_str());
}
- std::string buffer = separator_string + saved + message.substr(message_offset);
+ std::string buffer = saved + message.substr(message_offset);
BOOL is_this_agent = FALSE;
if(from_id == gAgentID)
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index 37dcd1593f..b3b821f2ac 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -38,6 +38,7 @@
#include "llinstantmessage.h"
#include "lluuid.h"
#include "llmultifloater.h"
+#include "llrecentpeople.h"
class LLFloaterChatterBox;
class LLUUID;
@@ -45,6 +46,47 @@ class LLFloaterIMPanel;
class LLFriendObserver;
class LLFloaterIM;
+class LLIMModel : public LLSingleton<LLIMModel>
+{
+public:
+
+ struct LLIMSession
+ {
+ LLIMSession(std::string name, EInstantMessage type, LLUUID other_participant_id)
+ :mName(name), mType(type), mNumUnread(0), mOtherParticipantID(other_participant_id) {}
+
+ std::string mName;
+ EInstantMessage mType;
+ LLUUID mOtherParticipantID;
+ S32 mNumUnread;
+ std::list<LLSD> mMsgs;
+ };
+
+
+ LLIMModel();
+
+ static std::map<LLUUID, LLIMSession*> sSessionsMap; //mapping session_id to session
+ boost::signals2::signal<void(const LLSD&)> mChangedSignal;
+ boost::signals2::connection addChangedCallback( boost::function<void (const LLSD& data)> cb );
+
+ bool newSession(LLUUID session_id, std::string name, EInstantMessage type, LLUUID other_participant_id);
+ std::list<LLSD> getMessages(LLUUID session_id, int start_index = 0);
+ bool addMessage(LLUUID session_id, std::string from, std::string utf8_text);
+ bool addToHistory(LLUUID session_id, std::string from, std::string utf8_text);
+ //used to get the name of the session, for use as the title
+ //currently just the other avatar name
+ const std::string& getName(LLUUID session_id);
+
+ static void sendLeaveSession(LLUUID session_id, LLUUID other_participant_id);
+ static bool sendStartSession(const LLUUID& temp_session_id, const LLUUID& other_participant_id,
+ const std::vector<LLUUID>& ids, EInstantMessage dialog);
+ static void sendTypingState(LLUUID session_id, LLUUID other_participant_id, BOOL typing);
+ static void sendMessage(const std::string& utf8_text, const LLUUID& im_session_id,
+ const LLUUID& other_participant_id, EInstantMessage dialog);
+
+ void testMessages();
+};
+
class LLIMSessionObserver
{
public:
@@ -53,8 +95,11 @@ public:
virtual void sessionRemoved(const LLUUID& session_id) = 0;
};
+
class LLIMMgr : public LLSingleton<LLIMMgr>
{
+ friend class LLIMModel;
+
public:
enum EInvitationType
{
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index af653238d3..a0cd0debf4 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -34,7 +34,7 @@
#include <utility> // for std::pair<>
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
#include "llinventorybridge.h"
#include "message.h"
@@ -51,13 +51,14 @@
#include "llviewercontrol.h"
#include "llfirstuse.h"
+#include "llfoldertype.h"
#include "llfloaterchat.h"
#include "llfloatercustomize.h"
#include "llfloaterproperties.h"
#include "llfloaterworldmap.h"
#include "llfocusmgr.h"
#include "llfolderview.h"
-#include "llfriendactions.h"
+#include "llavataractions.h"
#include "llgesturemgr.h"
#include "lliconctrl.h"
#include "llinventorymodel.h"
@@ -75,7 +76,7 @@
#include "llscrollcontainer.h"
#include "llimview.h"
#include "lltooldraganddrop.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerinventory.h"
#include "llviewerobjectlist.h"
#include "llviewerwindow.h"
@@ -88,6 +89,7 @@
#include "lltabcontainer.h"
#include "lluictrlfactory.h"
#include "llselectmgr.h"
+#include "llsidetray.h"
#include "llfloateropenobject.h"
#include "lltrans.h"
@@ -184,6 +186,13 @@ PermissionMask LLInvFVBridge::getPermissionMask() const
return PERM_ALL;
}
+// virtual
+LLAssetType::EType LLInvFVBridge::getPreferredType() const
+{
+ return LLAssetType::AT_NONE;
+}
+
+
// Folders don't have creation dates.
time_t LLInvFVBridge::getCreationDate() const
{
@@ -195,7 +204,7 @@ BOOL LLInvFVBridge::isItemRemovable()
{
LLInventoryModel* model = getInventoryModel();
if(!model) return FALSE;
- if(model->isObjectDescendentOf(mUUID, gAgent.getInventoryRootID()))
+ if(model->isObjectDescendentOf(mUUID, gInventory.getRootFolderID()))
{
return TRUE;
}
@@ -596,7 +605,7 @@ BOOL LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const
if(obj)
{
- *type = LLAssetType::lookupDragAndDropType(obj->getType());
+ *type = LLAssetType::lookupDragAndDropType(obj->getActualType());
if(*type == DAD_NONE)
{
return FALSE;
@@ -645,11 +654,11 @@ BOOL LLInvFVBridge::isLinkedObjectInTrash() const
{
if (isInTrash()) return TRUE;
- LLInventoryModel* model = getInventoryModel();
- if(!model) return FALSE;
- LLInventoryObject *obj = model->getObject(mUUID);
+ LLInventoryObject *obj = getInventoryObject();
if (obj && LLAssetType::lookupIsLinkType(obj->getActualType()))
{
+ LLInventoryModel* model = getInventoryModel();
+ if(!model) return FALSE;
const LLUUID& trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH);
return model->isObjectDescendentOf(obj->getLinkedUUID(), trash_id);
}
@@ -660,8 +669,8 @@ BOOL LLInvFVBridge::isAgentInventory() const
{
LLInventoryModel* model = getInventoryModel();
if(!model) return FALSE;
- if(gAgent.getInventoryRootID() == mUUID) return TRUE;
- return model->isObjectDescendentOf(mUUID, gAgent.getInventoryRootID());
+ if(gInventory.getRootFolderID() == mUUID) return TRUE;
+ return model->isObjectDescendentOf(mUUID, gInventory.getRootFolderID());
}
BOOL LLInvFVBridge::isItemPermissive() const
@@ -727,6 +736,7 @@ const std::string safe_inv_type_lookup(LLInventoryType::EType inv_type)
}
LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type,
+ LLAssetType::EType actual_asset_type,
LLInventoryType::EType inv_type,
LLInventoryPanel* inventory,
const LLUUID& uuid,
@@ -825,12 +835,22 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type,
break;
case LLAssetType::AT_CATEGORY:
case LLAssetType::AT_ROOT_CATEGORY:
+ if (actual_asset_type == LLAssetType::AT_LINK_FOLDER)
+ {
+ // Create a link folder handler instead.
+ new_listener = new LLLinkFolderBridge(inventory, uuid);
+ break;
+ }
new_listener = new LLFolderBridge(inventory, uuid);
break;
case LLAssetType::AT_LINK:
// Only should happen for broken links.
new_listener = new LLLinkItemBridge(inventory, uuid);
break;
+ case LLAssetType::AT_LINK_FOLDER:
+ // Only should happen for broken links.
+ new_listener = new LLLinkItemBridge(inventory, uuid);
+ break;
default:
llinfos << "Unhandled asset type (llassetstorage.h): "
<< (S32)asset_type << llendl;
@@ -867,6 +887,10 @@ void LLInvFVBridge::purgeItem(LLInventoryModel *model, const LLUUID &uuid)
void LLItemBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action)
{
+ if ("goto" == action)
+ {
+ gotoItem(folder);
+ }
if ("open" == action)
{
openItem();
@@ -997,6 +1021,19 @@ void LLItemBridge::restoreToWorld()
}
}
+void LLItemBridge::gotoItem(LLFolderView *folder)
+{
+ LLInventoryObject *obj = getInventoryObject();
+ if (obj && LLAssetType::lookupIsLinkType(obj->getActualType()))
+ {
+ LLInventoryPanel* active_panel = LLFloaterInventory::getActiveInventory()->getPanel();
+ if (active_panel)
+ {
+ active_panel->setSelection(obj->getLinkedUUID(), TAKE_FOCUS_NO);
+ }
+ }
+}
+
LLUIImagePtr LLItemBridge::getIcon() const
{
return LLUI::getUIImage(ICON_NAME[OBJECT_ICON_NAME]);
@@ -1020,7 +1057,7 @@ PermissionMask LLItemBridge::getPermissionMask() const
}
return perm_mask;
}
-
+
const std::string& LLItemBridge::getDisplayName() const
{
if(mDisplayName.empty())
@@ -1062,11 +1099,13 @@ LLFontGL::StyleFlags LLItemBridge::getLabelStyle() const
std::string LLItemBridge::getLabelSuffix() const
{
- // assume that this won't be called before string table is loaded
- static const char* NO_COPY =LLTrans::getString("NO_COPY").c_str();
- static const char* NO_MOD = LLTrans::getString("NO_MOD").c_str();
- static const char* NO_XFER = LLTrans::getString("NO_XFER").c_str();
-
+ // String table is loaded before login screen and inventory items are
+ // loaded after login, so LLTrans should be ready.
+ static std::string NO_COPY =LLTrans::getString("no_copy");
+ static std::string NO_MOD = LLTrans::getString("no_modify");
+ static std::string NO_XFER = LLTrans::getString("no_transfer");
+ static std::string LINK = LLTrans::getString("link");
+ static std::string BROKEN_LINK = LLTrans::getString("broken_link");
std::string suffix;
LLInventoryItem* item = getItem();
if(item)
@@ -1075,26 +1114,28 @@ std::string LLItemBridge::getLabelSuffix() const
if(LLAssetType::AT_CALLINGCARD != item->getType()
&& item->getPermissions().getOwner() == gAgent.getID())
{
+ BOOL broken_link = LLAssetType::lookupIsLinkType(item->getType());
+ if (broken_link) return BROKEN_LINK;
+
+ BOOL link = LLAssetType::lookupIsLinkType(item->getActualType());
+ if (link) return LINK;
+
BOOL copy = item->getPermissions().allowCopyBy(gAgent.getID());
+ if (!copy)
+ {
+ suffix += NO_COPY;
+ }
BOOL mod = item->getPermissions().allowModifyBy(gAgent.getID());
+ if (!mod)
+ {
+ suffix += NO_MOD;
+ }
BOOL xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER,
gAgent.getID());
- BOOL link = (item->getActualType() == LLAssetType::AT_LINK);
-
- const char* EMPTY = "";
- const char* LINK = " (link)"; // *TODO: Seraph translate
- if (link) return LINK;
-
- const char* scopy;
- if(copy) scopy = EMPTY;
- else scopy = NO_COPY;
- const char* smod;
- if(mod) smod = EMPTY;
- else smod = NO_MOD;
- const char* sxfer;
- if(xfer) sxfer = EMPTY;
- else sxfer = NO_XFER;
- suffix = llformat("%s%s%s",scopy,smod,sxfer);
+ if (!xfer)
+ {
+ suffix += NO_XFER;
+ }
}
}
return suffix;
@@ -1116,6 +1157,12 @@ BOOL LLItemBridge::isItemRenameable() const
LLViewerInventoryItem* item = getItem();
if(item)
{
+ // (For now) Don't allow calling card rename since that may confuse users as to
+ // what the calling card points to.
+ if (item->getInventoryType() == LLInventoryType::IT_CALLINGCARD)
+ {
+ return FALSE;
+ }
return (item->getPermissions().allowModifyBy(gAgent.getID()));
}
return FALSE;
@@ -1137,7 +1184,7 @@ BOOL LLItemBridge::renameItem(const std::string& new_name)
buildDisplayName(new_item, mDisplayName);
new_item->updateServer(FALSE);
model->updateItem(new_item);
- renameLinkedItems(item->getUUID(),new_name);
+ model->updateLinkedObjects(item->getUUID());
model->notifyObservers();
}
@@ -1195,7 +1242,7 @@ BOOL LLItemBridge::isItemCopyable() const
// All items can be copied, not all can be pasted.
// The only time an item can't be copied is if it's a link
// return (item->getPermissions().allowCopyBy(gAgent.getID()));
- if (item->getActualType() == LLAssetType::AT_LINK)
+ if (LLAssetType::lookupIsLinkType(item->getActualType()))
{
return FALSE;
}
@@ -1250,7 +1297,7 @@ BOOL LLFolderBridge::isItemMovable()
LLInventoryObject* obj = getInventoryObject();
if(obj)
{
- return (LLAssetType::AT_NONE == ((LLInventoryCategory*)obj)->getPreferredType());
+ return (!LLAssetType::lookupIsProtectedCategoryType(((LLInventoryCategory*)obj)->getPreferredType()));
}
return FALSE;
}
@@ -1269,7 +1316,7 @@ BOOL LLFolderBridge::isItemRemovable()
return FALSE;
}
- if(!model->isObjectDescendentOf(mUUID, gAgent.getInventoryRootID()))
+ if(!model->isObjectDescendentOf(mUUID, gInventory.getRootFolderID()))
{
return FALSE;
}
@@ -1286,7 +1333,7 @@ BOOL LLFolderBridge::isItemRemovable()
return FALSE;
}
- if( LLAssetType::AT_NONE != category->getPreferredType() )
+ if(LLAssetType::lookupIsProtectedCategoryType(category->getPreferredType()))
{
return FALSE;
}
@@ -1299,7 +1346,7 @@ BOOL LLFolderBridge::isItemRemovable()
for( i = 0; i < descendent_categories.count(); i++ )
{
LLInventoryCategory* category = descendent_categories[i];
- if( LLAssetType::AT_NONE != category->getPreferredType() )
+ if(LLAssetType::lookupIsProtectedCategoryType(category->getPreferredType()))
{
return FALSE;
}
@@ -1394,7 +1441,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
trash_id = model->findCategoryUUIDForType(LLAssetType::AT_TRASH);
BOOL move_is_into_trash = (mUUID == trash_id)
|| model->isObjectDescendentOf(mUUID, trash_id);
- BOOL is_movable = (LLAssetType::AT_NONE == inv_cat->getPreferredType());
+ BOOL is_movable = (!LLAssetType::lookupIsProtectedCategoryType(inv_cat->getPreferredType()));
if( is_movable )
{
gInventory.collectDescendents( cat_id, descendent_categories, descendent_items, FALSE );
@@ -1402,7 +1449,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
for( i = 0; i < descendent_categories.count(); i++ )
{
LLInventoryCategory* category = descendent_categories[i];
- if( LLAssetType::AT_NONE != category->getPreferredType() )
+ if(LLAssetType::lookupIsProtectedCategoryType(category->getPreferredType()))
{
// ...can't move "special folders" like Textures
is_movable = FALSE;
@@ -1859,7 +1906,7 @@ void LLFolderBridge::openItem()
BOOL LLFolderBridge::isItemRenameable() const
{
LLViewerInventoryCategory* cat = (LLViewerInventoryCategory*)getCategory();
- if(cat && (cat->getPreferredType() == LLAssetType::AT_NONE)
+ if(cat && !LLAssetType::lookupIsProtectedCategoryType(cat->getPreferredType())
&& (cat->getOwnerID() == gAgent.getID()))
{
return TRUE;
@@ -1895,13 +1942,26 @@ LLAssetType::EType LLFolderBridge::getPreferredType() const
// Icons for folders are based on the preferred type
LLUIImagePtr LLFolderBridge::getIcon() const
{
- const char* control = NULL;
LLAssetType::EType preferred_type = LLAssetType::AT_NONE;
LLViewerInventoryCategory* cat = getCategory();
if(cat)
{
preferred_type = cat->getPreferredType();
}
+ return getIcon(preferred_type);
+}
+
+LLUIImagePtr LLFolderBridge::getIcon(LLAssetType::EType preferred_type)
+{
+ if (preferred_type >= LLAssetType::AT_FOLDER_ENSEMBLE_START &&
+ preferred_type <= LLAssetType::AT_FOLDER_ENSEMBLE_END)
+ {
+ LLUIImage* icon = LLUI::getUIImage(LLFolderType::lookupIconName(preferred_type));
+ if (icon)
+ return icon;
+ }
+
+ const char* control = NULL;
switch(preferred_type)
{
case LLAssetType::AT_TEXTURE:
@@ -1975,7 +2035,7 @@ BOOL LLFolderBridge::renameItem(const std::string& new_name)
new_cat->rename(new_name);
new_cat->updateServer(FALSE);
model->updateCategory(new_cat);
- renameLinkedItems(cat->getUUID(),new_name);
+ model->updateLinkedObjects(cat->getUUID());
model->notifyObservers();
}
@@ -2057,15 +2117,24 @@ void LLFolderBridge::pasteLinkFromClipboard()
LLInventoryModel* model = getInventoryModel();
if(model)
{
- LLInventoryItem* item = NULL;
LLDynamicArray<LLUUID> objects;
LLInventoryClipboard::instance().retrieve(objects);
S32 count = objects.count();
LLUUID parent_id(mUUID);
for(S32 i = 0; i < count; i++)
{
- item = model->getItem(objects.get(i));
- if (item)
+ const LLUUID &object_id = objects.get(i);
+ if (LLInventoryCategory *cat = model->getCategory(object_id))
+ {
+ link_inventory_item(
+ gAgent.getID(),
+ cat->getUUID(),
+ parent_id,
+ cat->getName(),
+ LLAssetType::AT_LINK_FOLDER,
+ LLPointer<LLInventoryCallback>(NULL));
+ }
+ else if (LLInventoryItem *item = model->getItem(object_id))
{
link_inventory_item(
gAgent.getID(),
@@ -2094,7 +2163,7 @@ void LLFolderBridge::folderOptionsMenu()
const LLInventoryCategory* category = model->getCategory(mUUID);
bool is_default_folder = category &&
- (LLAssetType::AT_NONE != category->getPreferredType());
+ (LLAssetType::lookupIsProtectedCategoryType(category->getPreferredType()));
// calling card related functionality for folders.
@@ -2190,7 +2259,14 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
mItems.push_back(std::string("New Gesture"));
mItems.push_back(std::string("New Clothes"));
mItems.push_back(std::string("New Body Parts"));
+ mItems.push_back(std::string("Change Type"));
+ LLViewerInventoryCategory *cat = getCategory();
+ if (cat && LLAssetType::lookupIsProtectedCategoryType(cat->getPreferredType()))
+ {
+ mDisabledItems.push_back(std::string("Change Type"));
+ }
+
getClipboardEntries(false, mItems, mDisabledItems, flags);
//Added by spatters to force inventory pull on right-click to display folder options correctly. 07-17-06
@@ -2259,26 +2335,27 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop,
BOOL accept = FALSE;
switch(cargo_type)
{
- case DAD_TEXTURE:
- case DAD_SOUND:
- case DAD_CALLINGCARD:
- case DAD_LANDMARK:
- case DAD_SCRIPT:
- case DAD_OBJECT:
- case DAD_NOTECARD:
- case DAD_CLOTHING:
- case DAD_BODYPART:
- case DAD_ANIMATION:
- case DAD_GESTURE:
- accept = dragItemIntoFolder((LLInventoryItem*)cargo_data,
- drop);
- break;
- case DAD_CATEGORY:
- accept = dragCategoryIntoFolder((LLInventoryCategory*)cargo_data,
+ case DAD_TEXTURE:
+ case DAD_SOUND:
+ case DAD_CALLINGCARD:
+ case DAD_LANDMARK:
+ case DAD_SCRIPT:
+ case DAD_OBJECT:
+ case DAD_NOTECARD:
+ case DAD_CLOTHING:
+ case DAD_BODYPART:
+ case DAD_ANIMATION:
+ case DAD_GESTURE:
+ case DAD_LINK:
+ accept = dragItemIntoFolder((LLInventoryItem*)cargo_data,
drop);
- break;
- default:
- break;
+ break;
+ case DAD_CATEGORY:
+ accept = dragCategoryIntoFolder((LLInventoryCategory*)cargo_data,
+ drop);
+ break;
+ default:
+ break;
}
return accept;
}
@@ -2481,14 +2558,14 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
{
BOOL is_movable = TRUE;
- switch( inv_item->getType() )
+ switch( inv_item->getActualType() )
{
case LLAssetType::AT_ROOT_CATEGORY:
is_movable = FALSE;
break;
case LLAssetType::AT_CATEGORY:
- is_movable = ( LLAssetType::AT_NONE == ((LLInventoryCategory*)inv_item)->getPreferredType() );
+ is_movable = !LLAssetType::lookupIsProtectedCategoryType(((LLInventoryCategory*)inv_item)->getPreferredType());
break;
default:
break;
@@ -2502,11 +2579,11 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
{
case LLAssetType::AT_CLOTHING:
case LLAssetType::AT_BODYPART:
- is_movable = !gAgentWearables.isWearingItem(inv_item->getUUID());
+ is_movable = !gAgentWearables.isWearingItem(inv_item->getUUID(), TRUE);
break;
case LLAssetType::AT_OBJECT:
- is_movable = !avatar->isWearingAttachment(inv_item->getUUID());
+ is_movable = !avatar->isWearingAttachment(inv_item->getUUID(), TRUE);
break;
default:
break;
@@ -2525,9 +2602,9 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
// everything in the active window so that we don't follow
// the selection to its new location (which is very
// annoying).
- if (LLInventoryView::getActiveInventory())
+ if (LLFloaterInventory::getActiveInventory())
{
- LLInventoryPanel* active_panel = LLInventoryView::getActiveInventory()->getPanel();
+ LLInventoryPanel* active_panel = LLFloaterInventory::getActiveInventory()->getPanel();
LLInventoryPanel* panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
if (active_panel && (panel != active_panel))
{
@@ -2817,7 +2894,15 @@ void LLLandmarkBridge::performAction(LLFolderView* folder, LLInventoryModel* mod
LLViewerInventoryItem* item = getItem();
if(item)
{
- LLFloaterReg::showInstance("preview_landmark", LLSD(item->getUUID()), TAKE_FOCUS_YES);
+ LLSD key;
+ key["type"] = "landmark";
+ key["id"] = item->getUUID();
+
+ LLSideTray::getInstance()->showPanel("panel_places", key);
+
+ // Floater preview_landmark disabled,
+ // its functionality moved to Side Tray Places Panel
+ //LLFloaterReg::showInstance("preview_landmark", LLSD(item->getUUID()), TAKE_FOCUS_YES);
}
}
else
@@ -2908,7 +2993,9 @@ void LLCallingCardBridge::performAction(LLFolderView* folder, LLInventoryModel*
if (item && (item->getCreatorUUID() != gAgent.getID()) &&
(!item->getCreatorUUID().isNull()))
{
- gIMMgr->addSession(item->getName(), IM_NOTHING_SPECIAL, item->getCreatorUUID());
+ std::string callingcard_name;
+ gCacheName->getFullName(item->getCreatorUUID(), callingcard_name);
+ gIMMgr->addSession(callingcard_name, IM_NOTHING_SPECIAL, item->getCreatorUUID());
}
}
else if ("lure" == action)
@@ -2917,7 +3004,7 @@ void LLCallingCardBridge::performAction(LLFolderView* folder, LLInventoryModel*
if (item && (item->getCreatorUUID() != gAgent.getID()) &&
(!item->getCreatorUUID().isNull()))
{
- LLFriendActions::offerTeleport(item->getCreatorUUID());
+ LLAvatarActions::offerTeleport(item->getCreatorUUID());
}
}
else LLItemBridge::performAction(folder, model, action);
@@ -2959,7 +3046,7 @@ void LLCallingCardBridge::openItem()
LLViewerInventoryItem* item = getItem();
if(item && !item->getCreatorUUID().isNull())
{
- LLFriendActions::showProfile(item->getCreatorUUID());
+ LLAvatarActions::showProfile(item->getCreatorUUID());
}
*/
}
@@ -3348,7 +3435,7 @@ void LLObjectBridge::performAction(LLFolderView* folder, LLInventoryModel* model
LLUUID object_id = mUUID;
LLViewerInventoryItem* item;
item = (LLViewerInventoryItem*)gInventory.getItem(object_id);
- if(item && gInventory.isObjectDescendentOf(object_id, gAgent.getInventoryRootID()))
+ if(item && gInventory.isObjectDescendentOf(object_id, gInventory.getRootFolderID()))
{
rez_attachment(item, NULL);
}
@@ -3418,7 +3505,7 @@ LLFontGL::StyleFlags LLObjectBridge::getLabelStyle() const
}
LLInventoryItem* item = getItem();
- if (item->getActualType() == LLAssetType::AT_LINK)
+ if (LLAssetType::lookupIsLinkType(item->getActualType()))
{
font |= LLFontGL::ITALIC;
}
@@ -3516,13 +3603,18 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
}
else
{
+ LLInventoryItem* item = getItem();
+ if (item && LLAssetType::lookupIsLinkType(item->getActualType()))
+ {
+ items.push_back(std::string("Goto Link"));
+ }
+
items.push_back(std::string("Properties"));
getClipboardEntries(true, items, disabled_items, flags);
LLObjectBridge::sContextMenuItemID = mUUID;
- LLInventoryItem* item = getItem();
if(item)
{
LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
@@ -3602,7 +3694,7 @@ BOOL LLObjectBridge::renameItem(const std::string& new_name)
buildDisplayName(new_item, mDisplayName);
new_item->updateServer(FALSE);
model->updateItem(new_item);
- renameLinkedItems(item->getUUID(),new_name);
+ model->updateLinkedObjects(item->getUUID());
model->notifyObservers();
@@ -3815,7 +3907,7 @@ void LLOutfitObserver::done()
}
if(pid.isNull())
{
- pid = gAgent.getInventoryRootID();
+ pid = gInventory.getRootFolderID();
}
LLUUID cat_id = gInventory.createNewCategory(
@@ -3922,7 +4014,7 @@ void wear_outfit_by_name(const std::string& name)
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t item_array;
LLNameCategoryCollector has_name(name);
- gInventory.collectDescendentsIf(gAgent.getInventoryRootID(),
+ gInventory.collectDescendentsIf(gInventory.getRootFolderID(),
cat_array,
item_array,
LLInventoryModel::EXCLUDE_TRASH,
@@ -4184,7 +4276,7 @@ void wear_inventory_category_on_avatar_loop(LLWearable* wearable, void* data)
iter != holder->mFoundList.end(); ++iter)
{
LLFoundData* data = *iter;
- if(wearable->getID() == data->mAssetID)
+ if(wearable->getAssetID() == data->mAssetID)
{
data->mWearable = wearable;
break;
@@ -4217,7 +4309,7 @@ void wear_inventory_category_on_avatar_step3(LLWearableHoldingPattern* holder, B
{
LLViewerInventoryItem* item;
item = (LLViewerInventoryItem*)gInventory.getItem(data->mItemID);
- if( item && (item->getAssetUUID() == wearable->getID()) )
+ if( item && (item->getAssetUUID() == wearable->getAssetID()) )
{
items.put(item);
wearables.put(wearable);
@@ -4496,6 +4588,11 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
items.push_back(std::string("Open"));
}
+ if (item && LLAssetType::lookupIsLinkType(item->getActualType()))
+ {
+ items.push_back(std::string("Goto Link"));
+ }
+
items.push_back(std::string("Properties"));
getClipboardEntries(true, items, disabled_items, flags);
@@ -4621,9 +4718,9 @@ void LLWearableBridge::onWearOnAvatarArrived( LLWearable* wearable, void* userda
item = (LLViewerInventoryItem*)gInventory.getItem(*item_id);
if(item)
{
- if(item->getAssetUUID() == wearable->getID())
+ if(item->getAssetUUID() == wearable->getAssetID())
{
- gAgentWearables.setWearable(item, wearable);
+ gAgentWearables.setWearableItem(item, wearable);
gInventory.notifyObservers();
//self->getFolderItem()->refreshFromRoot();
}
@@ -4646,10 +4743,10 @@ void LLWearableBridge::onWearAddOnAvatarArrived( LLWearable* wearable, void* use
item = (LLViewerInventoryItem*)gInventory.getItem(*item_id);
if(item)
{
- if(item->getAssetUUID() == wearable->getID())
+ if(item->getAssetUUID() == wearable->getAssetID())
{
bool do_append = true;
- gAgentWearables.setWearable(item, wearable, do_append);
+ gAgentWearables.setWearableItem(item, wearable, do_append);
gInventory.notifyObservers();
//self->getFolderItem()->refreshFromRoot();
}
@@ -4683,7 +4780,7 @@ void LLWearableBridge::onEditOnAvatar(void* user_data)
void LLWearableBridge::editOnAvatar()
{
- LLWearable* wearable = gAgentWearables.getWearableFromWearableItem(mUUID);
+ const LLWearable* wearable = gAgentWearables.getWearableFromWearableItem(mUUID);
if( wearable )
{
// Set the tab to the right wearable.
@@ -4883,7 +4980,7 @@ void LLCallingCardBridgeAction::doIt()
LLViewerInventoryItem* item = getItem();
if(item && item->getCreatorUUID().notNull())
{
- LLFriendActions::showProfile(item->getCreatorUUID());
+ LLAvatarActions::showProfile(item->getCreatorUUID());
}
LLInvFVBridgeAction::doIt();
@@ -4960,8 +5057,8 @@ BOOL LLWearableBridgeAction::isInTrash() const
BOOL LLWearableBridgeAction::isAgentInventory() const
{
if(!mModel) return FALSE;
- if(gAgent.getInventoryRootID() == mUUID) return TRUE;
- return mModel->isObjectDescendentOf(mUUID, gAgent.getInventoryRootID());
+ if(gInventory.getRootFolderID() == mUUID) return TRUE;
+ return mModel->isObjectDescendentOf(mUUID, gInventory.getRootFolderID());
}
void LLWearableBridgeAction::wearOnAvatar()
@@ -5076,3 +5173,94 @@ void LLLinkItemBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
}
hideContextEntries(menu, items, disabled_items);
}
+
+
+// +=================================================+
+// | LLLinkBridge |
+// +=================================================+
+// For broken links.
+
+std::string LLLinkFolderBridge::sPrefix("Link: ");
+
+
+LLUIImagePtr LLLinkFolderBridge::getIcon() const
+{
+ LLAssetType::EType preferred_type = LLAssetType::AT_NONE;
+ if (LLViewerInventoryItem *item = getItem())
+ {
+ if (const LLViewerInventoryCategory* cat = item->getLinkedCategory())
+ {
+ preferred_type = cat->getPreferredType();
+ }
+ }
+ return LLFolderBridge::getIcon(preferred_type);
+}
+
+void LLLinkFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
+{
+ // *TODO: Translate
+ lldebugs << "LLLink::buildContextMenu()" << llendl;
+ std::vector<std::string> items;
+ std::vector<std::string> disabled_items;
+
+ if(isInTrash())
+ {
+ items.push_back(std::string("Purge Item"));
+ if (!isItemRemovable())
+ {
+ disabled_items.push_back(std::string("Purge Item"));
+ }
+
+ items.push_back(std::string("Restore Item"));
+ }
+ else
+ {
+ items.push_back(std::string("Goto Link"));
+ items.push_back(std::string("Delete"));
+ if (!isItemRemovable())
+ {
+ disabled_items.push_back(std::string("Delete"));
+ }
+ }
+ hideContextEntries(menu, items, disabled_items);
+}
+
+void LLLinkFolderBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action)
+{
+ if ("goto" == action)
+ {
+ gotoItem(folder);
+ return;
+ }
+ LLItemBridge::performAction(folder,model,action);
+}
+
+void LLLinkFolderBridge::gotoItem(LLFolderView *folder)
+{
+ const LLUUID &cat_uuid = getFolderID();
+ if (!cat_uuid.isNull())
+ {
+ if (LLFolderViewItem *base_folder = folder->getItemByID(cat_uuid))
+ {
+ if (LLInventoryModel* model = getInventoryModel())
+ {
+ model->fetchDescendentsOf(cat_uuid);
+ }
+ base_folder->setOpen(TRUE);
+ folder->setSelectionFromRoot(base_folder,TRUE);
+ }
+ }
+}
+
+const LLUUID &LLLinkFolderBridge::getFolderID() const
+{
+ if (LLViewerInventoryItem *link_item = getItem())
+ {
+ if (const LLViewerInventoryCategory *cat = link_item->getLinkedCategory())
+ {
+ const LLUUID& cat_uuid = cat->getUUID();
+ return cat_uuid;
+ }
+ }
+ return LLUUID::null;
+}
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index 016eb701d6..915dfec629 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -38,7 +38,8 @@
#include "llviewercontrol.h"
#include "llcallingcard.h"
#include "llinventorymodel.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
+#include "llfoldervieweventlistener.h"
enum EInventoryIcon
{
@@ -132,6 +133,7 @@ public:
// This method is a convenience function which creates the correct
// type of bridge based on some basic information
static LLInvFVBridge* createBridge(LLAssetType::EType asset_type,
+ LLAssetType::EType actual_asset_type,
LLInventoryType::EType inv_type,
LLInventoryPanel* inventory,
const LLUUID& uuid,
@@ -147,6 +149,7 @@ public:
virtual const std::string& getName() const;
virtual const std::string& getDisplayName() const;
virtual PermissionMask getPermissionMask() const;
+ virtual LLAssetType::EType getPreferredType() const;
virtual time_t getCreationDate() const;
virtual LLFontGL::StyleFlags getLabelStyle() const
{
@@ -154,6 +157,7 @@ public:
}
virtual std::string getLabelSuffix() const { return LLStringUtil::null; }
virtual void openItem() {}
+ virtual void gotoItem(LLFolderView *folder) {} // for links
virtual void previewItem() {openItem();}
virtual void showProperties();
virtual BOOL isItemRenameable() const { return TRUE; }
@@ -229,6 +233,7 @@ public:
virtual void selectItem();
virtual void restoreItem();
virtual void restoreToWorld();
+ virtual void gotoItem(LLFolderView *folder);
virtual LLUIImagePtr getIcon() const;
virtual const std::string& getDisplayName() const;
@@ -272,6 +277,8 @@ public:
virtual LLAssetType::EType getPreferredType() const;
virtual LLUIImagePtr getIcon() const;
+ static LLUIImagePtr getIcon(LLAssetType::EType asset_type);
+
virtual BOOL renameItem(const std::string& new_name);
virtual BOOL removeItem();
virtual void pasteFromClipboard();
@@ -589,6 +596,27 @@ protected:
static std::string sPrefix;
};
+
+class LLLinkFolderBridge : public LLItemBridge
+{
+ friend class LLInvFVBridge;
+public:
+ virtual const std::string& getPrefix() { return sPrefix; }
+
+ virtual LLUIImagePtr getIcon() const;
+ virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
+ virtual void performAction(LLFolderView* folder, LLInventoryModel* model, std::string action);
+ virtual void gotoItem(LLFolderView *folder);
+
+protected:
+ LLLinkFolderBridge(LLInventoryPanel* inventory, const LLUUID& uuid) :
+ LLItemBridge(inventory, uuid) {}
+ const LLUUID &getFolderID() const;
+
+protected:
+ static std::string sPrefix;
+};
+
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLInvFVBridgeAction (& its derived classes)
//
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
new file mode 100644
index 0000000000..9cbe11f5c9
--- /dev/null
+++ b/indra/newview/llinventoryfilter.cpp
@@ -0,0 +1,631 @@
+/**
+* @file llinventoryfilter.cpp
+* @brief Support for filtering your inventory to only display a subset of the
+* available items.
+*
+* $LicenseInfo:firstyear=2005&license=viewergpl$
+*
+* Copyright (c) 2005-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h"
+
+#include "llinventoryfilter.h"
+
+// viewer includes
+#include "llfoldervieweventlistener.h"
+#include "llfolderviewitem.h"
+#include "llinventorymodel.h" // gInventory.backgroundFetchActive()
+#include "llviewercontrol.h"
+
+// linden library includes
+#include "lltrans.h"
+
+///----------------------------------------------------------------------------
+/// Class LLInventoryFilter
+///----------------------------------------------------------------------------
+LLInventoryFilter::LLInventoryFilter(const std::string& name)
+: mName(name),
+ mModified(FALSE),
+ mNeedTextRebuild(TRUE)
+{
+ mFilterOps.mFilterTypes = 0xffffffff;
+ mFilterOps.mMinDate = time_min();
+ mFilterOps.mMaxDate = time_max();
+ mFilterOps.mHoursAgo = 0;
+ mFilterOps.mShowFolderState = SHOW_NON_EMPTY_FOLDERS;
+ mFilterOps.mPermissions = PERM_NONE;
+
+ mOrder = SO_FOLDERS_BY_NAME; // This gets overridden by a pref immediately
+
+ mSubStringMatchOffset = 0;
+ mFilterSubString.clear();
+ mFilterGeneration = 0;
+ mMustPassGeneration = S32_MAX;
+ mMinRequiredGeneration = 0;
+ mFilterCount = 0;
+ mNextFilterGeneration = mFilterGeneration + 1;
+
+ mLastLogoff = gSavedPerAccountSettings.getU32("LastLogoff");
+ mFilterBehavior = FILTER_NONE;
+
+ // copy mFilterOps into mDefaultFilterOps
+ markDefault();
+}
+
+LLInventoryFilter::~LLInventoryFilter()
+{
+}
+
+BOOL LLInventoryFilter::check(LLFolderViewItem* item)
+{
+ time_t earliest;
+
+ earliest = time_corrected() - mFilterOps.mHoursAgo * 3600;
+ if (mFilterOps.mMinDate > time_min() && mFilterOps.mMinDate < earliest)
+ {
+ earliest = mFilterOps.mMinDate;
+ }
+ else if (!mFilterOps.mHoursAgo)
+ {
+ earliest = 0;
+ }
+ LLFolderViewEventListener* listener = item->getListener();
+ mSubStringMatchOffset = mFilterSubString.size() ? item->getSearchableLabel().find(mFilterSubString) : std::string::npos;
+ BOOL passed = (0x1 << listener->getInventoryType() & mFilterOps.mFilterTypes || listener->getInventoryType() == LLInventoryType::IT_NONE)
+ && (mFilterSubString.size() == 0 || mSubStringMatchOffset != std::string::npos)
+ && ((listener->getPermissionMask() & mFilterOps.mPermissions) == mFilterOps.mPermissions)
+ && (listener->getCreationDate() >= earliest && listener->getCreationDate() <= mFilterOps.mMaxDate);
+ return passed;
+}
+
+const std::string LLInventoryFilter::getFilterSubString(BOOL trim)
+{
+ return mFilterSubString;
+}
+
+std::string::size_type LLInventoryFilter::getStringMatchOffset() const
+{
+ return mSubStringMatchOffset;
+}
+
+// has user modified default filter params?
+BOOL LLInventoryFilter::isNotDefault()
+{
+ return mFilterOps.mFilterTypes != mDefaultFilterOps.mFilterTypes
+ || mFilterSubString.size()
+ || mFilterOps.mPermissions != mDefaultFilterOps.mPermissions
+ || mFilterOps.mMinDate != mDefaultFilterOps.mMinDate
+ || mFilterOps.mMaxDate != mDefaultFilterOps.mMaxDate
+ || mFilterOps.mHoursAgo != mDefaultFilterOps.mHoursAgo;
+}
+
+BOOL LLInventoryFilter::isActive()
+{
+ return mFilterOps.mFilterTypes != 0xffffffff
+ || mFilterSubString.size()
+ || mFilterOps.mPermissions != PERM_NONE
+ || mFilterOps.mMinDate != time_min()
+ || mFilterOps.mMaxDate != time_max()
+ || mFilterOps.mHoursAgo != 0;
+}
+
+BOOL LLInventoryFilter::isModified()
+{
+ return mModified;
+}
+
+BOOL LLInventoryFilter::isModifiedAndClear()
+{
+ BOOL ret = mModified;
+ mModified = FALSE;
+ return ret;
+}
+
+void LLInventoryFilter::setFilterTypes(U32 types)
+{
+ if (mFilterOps.mFilterTypes != types)
+ {
+ // keep current items only if no type bits getting turned off
+ BOOL fewer_bits_set = (mFilterOps.mFilterTypes & ~types);
+ BOOL more_bits_set = (~mFilterOps.mFilterTypes & types);
+
+ mFilterOps.mFilterTypes = types;
+ if (more_bits_set && fewer_bits_set)
+ {
+ // neither less or more restrive, both simultaneously
+ // so we need to filter from scratch
+ setModified(FILTER_RESTART);
+ }
+ else if (more_bits_set)
+ {
+ // target is only one of all requested types so more type bits == less restrictive
+ setModified(FILTER_LESS_RESTRICTIVE);
+ }
+ else if (fewer_bits_set)
+ {
+ setModified(FILTER_MORE_RESTRICTIVE);
+ }
+
+ }
+}
+
+void LLInventoryFilter::setFilterSubString(const std::string& string)
+{
+ if (mFilterSubString != string)
+ {
+ // hitting BACKSPACE, for example
+ BOOL less_restrictive = mFilterSubString.size() >= string.size() && !mFilterSubString.substr(0, string.size()).compare(string);
+ // appending new characters
+ BOOL more_restrictive = mFilterSubString.size() < string.size() && !string.substr(0, mFilterSubString.size()).compare(mFilterSubString);
+ mFilterSubString = string;
+ LLStringUtil::toUpper(mFilterSubString);
+ LLStringUtil::trimHead(mFilterSubString);
+
+ if (less_restrictive)
+ {
+ setModified(FILTER_LESS_RESTRICTIVE);
+ }
+ else if (more_restrictive)
+ {
+ setModified(FILTER_MORE_RESTRICTIVE);
+ }
+ else
+ {
+ setModified(FILTER_RESTART);
+ }
+ }
+}
+
+void LLInventoryFilter::setFilterPermissions(PermissionMask perms)
+{
+ if (mFilterOps.mPermissions != perms)
+ {
+ // keep current items only if no perm bits getting turned off
+ BOOL fewer_bits_set = (mFilterOps.mPermissions & ~perms);
+ BOOL more_bits_set = (~mFilterOps.mPermissions & perms);
+ mFilterOps.mPermissions = perms;
+
+ if (more_bits_set && fewer_bits_set)
+ {
+ setModified(FILTER_RESTART);
+ }
+ else if (more_bits_set)
+ {
+ // target must have all requested permission bits, so more bits == more restrictive
+ setModified(FILTER_MORE_RESTRICTIVE);
+ }
+ else if (fewer_bits_set)
+ {
+ setModified(FILTER_LESS_RESTRICTIVE);
+ }
+ }
+}
+
+void LLInventoryFilter::setDateRange(time_t min_date, time_t max_date)
+{
+ mFilterOps.mHoursAgo = 0;
+ if (mFilterOps.mMinDate != min_date)
+ {
+ mFilterOps.mMinDate = min_date;
+ setModified();
+ }
+ if (mFilterOps.mMaxDate != llmax(mFilterOps.mMinDate, max_date))
+ {
+ mFilterOps.mMaxDate = llmax(mFilterOps.mMinDate, max_date);
+ setModified();
+ }
+}
+
+void LLInventoryFilter::setDateRangeLastLogoff(BOOL sl)
+{
+ if (sl && !isSinceLogoff())
+ {
+ setDateRange(mLastLogoff, time_max());
+ setModified();
+ }
+ if (!sl && isSinceLogoff())
+ {
+ setDateRange(0, time_max());
+ setModified();
+ }
+}
+
+BOOL LLInventoryFilter::isSinceLogoff()
+{
+ return (mFilterOps.mMinDate == (time_t)mLastLogoff) &&
+ (mFilterOps.mMaxDate == time_max());
+}
+
+void LLInventoryFilter::setHoursAgo(U32 hours)
+{
+ if (mFilterOps.mHoursAgo != hours)
+ {
+ // *NOTE: need to cache last filter time, in case filter goes stale
+ BOOL less_restrictive = (mFilterOps.mMinDate == time_min() && mFilterOps.mMaxDate == time_max() && hours > mFilterOps.mHoursAgo);
+ BOOL more_restrictive = (mFilterOps.mMinDate == time_min() && mFilterOps.mMaxDate == time_max() && hours <= mFilterOps.mHoursAgo);
+ mFilterOps.mHoursAgo = hours;
+ mFilterOps.mMinDate = time_min();
+ mFilterOps.mMaxDate = time_max();
+ if (less_restrictive)
+ {
+ setModified(FILTER_LESS_RESTRICTIVE);
+ }
+ else if (more_restrictive)
+ {
+ setModified(FILTER_MORE_RESTRICTIVE);
+ }
+ else
+ {
+ setModified(FILTER_RESTART);
+ }
+ }
+}
+void LLInventoryFilter::setShowFolderState(EFolderShow state)
+{
+ if (mFilterOps.mShowFolderState != state)
+ {
+ mFilterOps.mShowFolderState = state;
+ if (state == SHOW_NON_EMPTY_FOLDERS)
+ {
+ // showing fewer folders than before
+ setModified(FILTER_MORE_RESTRICTIVE);
+ }
+ else if (state == SHOW_ALL_FOLDERS)
+ {
+ // showing same folders as before and then some
+ setModified(FILTER_LESS_RESTRICTIVE);
+ }
+ else
+ {
+ setModified();
+ }
+ }
+}
+
+void LLInventoryFilter::setSortOrder(U32 order)
+{
+ if (mOrder != order)
+ {
+ mOrder = order;
+ setModified();
+ }
+}
+
+void LLInventoryFilter::markDefault()
+{
+ mDefaultFilterOps = mFilterOps;
+}
+
+void LLInventoryFilter::resetDefault()
+{
+ mFilterOps = mDefaultFilterOps;
+ setModified();
+}
+
+void LLInventoryFilter::setModified(EFilterBehavior behavior)
+{
+ mModified = TRUE;
+ mNeedTextRebuild = TRUE;
+ mFilterGeneration = mNextFilterGeneration++;
+
+ if (mFilterBehavior == FILTER_NONE)
+ {
+ mFilterBehavior = behavior;
+ }
+ else if (mFilterBehavior != behavior)
+ {
+ // trying to do both less restrictive and more restrictive filter
+ // basically means restart from scratch
+ mFilterBehavior = FILTER_RESTART;
+ }
+
+ if (isNotDefault())
+ {
+ // if not keeping current filter results, update last valid as well
+ switch(mFilterBehavior)
+ {
+ case FILTER_RESTART:
+ mMustPassGeneration = mFilterGeneration;
+ mMinRequiredGeneration = mFilterGeneration;
+ break;
+ case FILTER_LESS_RESTRICTIVE:
+ mMustPassGeneration = mFilterGeneration;
+ break;
+ case FILTER_MORE_RESTRICTIVE:
+ mMinRequiredGeneration = mFilterGeneration;
+ // must have passed either current filter generation (meaningless, as it hasn't been run yet)
+ // or some older generation, so keep the value
+ mMustPassGeneration = llmin(mMustPassGeneration, mFilterGeneration);
+ break;
+ default:
+ llerrs << "Bad filter behavior specified" << llendl;
+ }
+ }
+ else
+ {
+ // shortcut disabled filters to show everything immediately
+ mMinRequiredGeneration = 0;
+ mMustPassGeneration = S32_MAX;
+ }
+}
+
+BOOL LLInventoryFilter::isFilterWith(LLInventoryType::EType t)
+{
+ return mFilterOps.mFilterTypes & (0x01 << t);
+}
+
+std::string LLInventoryFilter::getFilterText()
+{
+ if (!mNeedTextRebuild)
+ {
+ return mFilterText;
+ }
+
+ mNeedTextRebuild = FALSE;
+ std::string filtered_types;
+ std::string not_filtered_types;
+ BOOL filtered_by_type = FALSE;
+ BOOL filtered_by_all_types = TRUE;
+ S32 num_filter_types = 0;
+ mFilterText.clear();
+
+ if (isFilterWith(LLInventoryType::IT_ANIMATION))
+ {
+ //filtered_types += " Animations,";
+ filtered_types += LLTrans::getString("Animations");
+ filtered_by_type = TRUE;
+ num_filter_types++;
+ }
+ else
+ {
+ //not_filtered_types += " Animations,";
+ not_filtered_types += LLTrans::getString("Animations");
+
+ filtered_by_all_types = FALSE;
+ }
+
+ if (isFilterWith(LLInventoryType::IT_CALLINGCARD))
+ {
+ //filtered_types += " Calling Cards,";
+ filtered_types += LLTrans::getString("Calling Cards");
+ filtered_by_type = TRUE;
+ num_filter_types++;
+ }
+ else
+ {
+ //not_filtered_types += " Calling Cards,";
+ not_filtered_types += LLTrans::getString("Calling Cards");
+ filtered_by_all_types = FALSE;
+ }
+
+ if (isFilterWith(LLInventoryType::IT_WEARABLE))
+ {
+ //filtered_types += " Clothing,";
+ filtered_types += LLTrans::getString("Clothing");
+ filtered_by_type = TRUE;
+ num_filter_types++;
+ }
+ else
+ {
+ //not_filtered_types += " Clothing,";
+ not_filtered_types += LLTrans::getString("Clothing");
+ filtered_by_all_types = FALSE;
+ }
+
+ if (isFilterWith(LLInventoryType::IT_GESTURE))
+ {
+ //filtered_types += " Gestures,";
+ filtered_types += LLTrans::getString("Gestures");
+ filtered_by_type = TRUE;
+ num_filter_types++;
+ }
+ else
+ {
+ //not_filtered_types += " Gestures,";
+ not_filtered_types += LLTrans::getString("Gestures");
+ filtered_by_all_types = FALSE;
+ }
+
+ if (isFilterWith(LLInventoryType::IT_LANDMARK))
+ {
+ //filtered_types += " Landmarks,";
+ filtered_types += LLTrans::getString("Landmarks");
+ filtered_by_type = TRUE;
+ num_filter_types++;
+ }
+ else
+ {
+ //not_filtered_types += " Landmarks,";
+ not_filtered_types += LLTrans::getString("Landmarks");
+ filtered_by_all_types = FALSE;
+ }
+
+ if (isFilterWith(LLInventoryType::IT_NOTECARD))
+ {
+ //filtered_types += " Notecards,";
+ filtered_types += LLTrans::getString("Notecards");
+ filtered_by_type = TRUE;
+ num_filter_types++;
+ }
+ else
+ {
+ //not_filtered_types += " Notecards,";
+ not_filtered_types += LLTrans::getString("Notecards");
+ filtered_by_all_types = FALSE;
+ }
+
+ if (isFilterWith(LLInventoryType::IT_OBJECT) && isFilterWith(LLInventoryType::IT_ATTACHMENT))
+ {
+ //filtered_types += " Objects,";
+ filtered_types += LLTrans::getString("Objects");
+ filtered_by_type = TRUE;
+ num_filter_types++;
+ }
+ else
+ {
+ //not_filtered_types += " Objects,";
+ not_filtered_types += LLTrans::getString("Objects");
+ filtered_by_all_types = FALSE;
+ }
+
+ if (isFilterWith(LLInventoryType::IT_LSL))
+ {
+ //filtered_types += " Scripts,";
+ filtered_types += LLTrans::getString("Scripts");
+ filtered_by_type = TRUE;
+ num_filter_types++;
+ }
+ else
+ {
+ //not_filtered_types += " Scripts,";
+ not_filtered_types += LLTrans::getString("Scripts");
+ filtered_by_all_types = FALSE;
+ }
+
+ if (isFilterWith(LLInventoryType::IT_SOUND))
+ {
+ //filtered_types += " Sounds,";
+ filtered_types += LLTrans::getString("Sounds");
+ filtered_by_type = TRUE;
+ num_filter_types++;
+ }
+ else
+ {
+ //not_filtered_types += " Sounds,";
+ not_filtered_types += LLTrans::getString("Sounds");
+ filtered_by_all_types = FALSE;
+ }
+
+ if (isFilterWith(LLInventoryType::IT_TEXTURE))
+ {
+ //filtered_types += " Textures,";
+ filtered_types += LLTrans::getString("Textures");
+ filtered_by_type = TRUE;
+ num_filter_types++;
+ }
+ else
+ {
+ //not_filtered_types += " Textures,";
+ not_filtered_types += LLTrans::getString("Textures");
+ filtered_by_all_types = FALSE;
+ }
+
+ if (isFilterWith(LLInventoryType::IT_SNAPSHOT))
+ {
+ //filtered_types += " Snapshots,";
+ filtered_types += LLTrans::getString("Snapshots");
+ filtered_by_type = TRUE;
+ num_filter_types++;
+ }
+ else
+ {
+ //not_filtered_types += " Snapshots,";
+ not_filtered_types += LLTrans::getString("Snapshots");
+ filtered_by_all_types = FALSE;
+ }
+
+ if (!gInventory.backgroundFetchActive()
+ && filtered_by_type
+ && !filtered_by_all_types)
+ {
+ mFilterText += " - ";
+ if (num_filter_types < 5)
+ {
+ mFilterText += filtered_types;
+ }
+ else
+ {
+ //mFilterText += "No ";
+ mFilterText += LLTrans::getString("No Filters");
+ mFilterText += not_filtered_types;
+ }
+ // remove the ',' at the end
+ mFilterText.erase(mFilterText.size() - 1, 1);
+ }
+
+ if (isSinceLogoff())
+ {
+ //mFilterText += " - Since Logoff";
+ mFilterText += LLTrans::getString("Since Logoff");
+ }
+ return mFilterText;
+}
+
+void LLInventoryFilter::toLLSD(LLSD& data)
+{
+ data["filter_types"] = (LLSD::Integer)getFilterTypes();
+ data["min_date"] = (LLSD::Integer)getMinDate();
+ data["max_date"] = (LLSD::Integer)getMaxDate();
+ data["hours_ago"] = (LLSD::Integer)getHoursAgo();
+ data["show_folder_state"] = (LLSD::Integer)getShowFolderState();
+ data["permissions"] = (LLSD::Integer)getFilterPermissions();
+ data["substring"] = (LLSD::String)getFilterSubString();
+ data["sort_order"] = (LLSD::Integer)getSortOrder();
+ data["since_logoff"] = (LLSD::Boolean)isSinceLogoff();
+}
+
+void LLInventoryFilter::fromLLSD(LLSD& data)
+{
+ if(data.has("filter_types"))
+ {
+ setFilterTypes((U32)data["filter_types"].asInteger());
+ }
+
+ if(data.has("min_date") && data.has("max_date"))
+ {
+ setDateRange(data["min_date"].asInteger(), data["max_date"].asInteger());
+ }
+
+ if(data.has("hours_ago"))
+ {
+ setHoursAgo((U32)data["hours_ago"].asInteger());
+ }
+
+ if(data.has("show_folder_state"))
+ {
+ setShowFolderState((EFolderShow)data["show_folder_state"].asInteger());
+ }
+
+ if(data.has("permissions"))
+ {
+ setFilterPermissions((PermissionMask)data["permissions"].asInteger());
+ }
+
+ if(data.has("substring"))
+ {
+ setFilterSubString(std::string(data["substring"].asString()));
+ }
+
+ if(data.has("sort_order"))
+ {
+ setSortOrder((U32)data["sort_order"].asInteger());
+ }
+
+ if(data.has("since_logoff"))
+ {
+ setDateRangeLastLogoff((bool)data["since_logoff"].asBoolean());
+ }
+}
diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h
new file mode 100644
index 0000000000..7c5f6681cf
--- /dev/null
+++ b/indra/newview/llinventoryfilter.h
@@ -0,0 +1,150 @@
+/**
+* @file llinventoryfilter.h
+* @brief Support for filtering your inventory to only display a subset of the
+* available items.
+*
+* $LicenseInfo:firstyear=2005&license=viewergpl$
+*
+* Copyright (c) 2005-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 LLINVENTORYFILTER_H
+#define LLINVENTORYFILTER_H
+
+// lots of includes here
+#include "llinventorytype.h"
+#include "llpermissionsflags.h" // PermissionsMask
+
+class LLFolderViewItem;
+
+class LLInventoryFilter
+{
+public:
+ typedef enum e_folder_show
+ {
+ SHOW_ALL_FOLDERS,
+ SHOW_NON_EMPTY_FOLDERS,
+ SHOW_NO_FOLDERS
+ } EFolderShow;
+
+ typedef enum e_filter_behavior
+ {
+ FILTER_NONE, // nothing to do, already filtered
+ FILTER_RESTART, // restart filtering from scratch
+ FILTER_LESS_RESTRICTIVE, // existing filtered items will certainly pass this filter
+ FILTER_MORE_RESTRICTIVE // if you didn't pass the previous filter, you definitely won't pass this one
+ } EFilterBehavior;
+
+ static const U32 SO_DATE = 1;
+ static const U32 SO_FOLDERS_BY_NAME = 2;
+ static const U32 SO_SYSTEM_FOLDERS_TO_TOP = 4;
+
+ LLInventoryFilter(const std::string& name);
+ virtual ~LLInventoryFilter();
+
+ void setFilterTypes(U32 types);
+ U32 getFilterTypes() const { return mFilterOps.mFilterTypes; }
+
+ void setFilterSubString(const std::string& string);
+ const std::string getFilterSubString(BOOL trim = FALSE);
+
+ void setFilterPermissions(PermissionMask perms);
+ PermissionMask getFilterPermissions() const { return mFilterOps.mPermissions; }
+
+ void setDateRange(time_t min_date, time_t max_date);
+ void setDateRangeLastLogoff(BOOL sl);
+ time_t getMinDate() const { return mFilterOps.mMinDate; }
+ time_t getMaxDate() const { return mFilterOps.mMaxDate; }
+
+ void setHoursAgo(U32 hours);
+ U32 getHoursAgo() const { return mFilterOps.mHoursAgo; }
+
+ void setShowFolderState( EFolderShow state);
+ EFolderShow getShowFolderState() { return mFilterOps.mShowFolderState; }
+
+ void setSortOrder(U32 order);
+ U32 getSortOrder() { return mOrder; }
+
+ BOOL check(LLFolderViewItem* item);
+ std::string::size_type getStringMatchOffset() const;
+ BOOL isActive();
+ BOOL isNotDefault();
+ BOOL isModified();
+ BOOL isModifiedAndClear();
+ BOOL isSinceLogoff();
+ void clearModified() { mModified = FALSE; mFilterBehavior = FILTER_NONE; }
+ const std::string getName() const { return mName; }
+ std::string getFilterText();
+
+ void setFilterCount(S32 count) { mFilterCount = count; }
+ S32 getFilterCount() { return mFilterCount; }
+ void decrementFilterCount() { mFilterCount--; }
+
+ void markDefault();
+ void resetDefault();
+
+ BOOL isFilterWith(LLInventoryType::EType t);
+
+ S32 getCurrentGeneration() const { return mFilterGeneration; }
+ S32 getMinRequiredGeneration() const { return mMinRequiredGeneration; }
+ S32 getMustPassGeneration() const { return mMustPassGeneration; }
+
+ //RN: this is public to allow system to externally force a global refilter
+ void setModified(EFilterBehavior behavior = FILTER_RESTART);
+
+ void toLLSD(LLSD& data);
+ void fromLLSD(LLSD& data);
+
+protected:
+ struct filter_ops
+ {
+ U32 mFilterTypes;
+ time_t mMinDate;
+ time_t mMaxDate;
+ U32 mHoursAgo;
+ EFolderShow mShowFolderState;
+ PermissionMask mPermissions;
+ };
+ filter_ops mFilterOps;
+ filter_ops mDefaultFilterOps;
+ std::string::size_type mSubStringMatchOffset;
+ std::string mFilterSubString;
+ U32 mOrder;
+ const std::string mName;
+ S32 mFilterGeneration;
+ S32 mMustPassGeneration;
+ S32 mMinRequiredGeneration;
+ S32 mFilterCount;
+ S32 mNextFilterGeneration;
+ EFilterBehavior mFilterBehavior;
+
+private:
+ U32 mLastLogoff;
+ BOOL mModified;
+ BOOL mNeedTextRebuild;
+ std::string mFilterText;
+};
+
+#endif
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 665ad5b1a2..9d3d383d1c 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -46,7 +46,7 @@
#include "llfloater.h"
#include "llfocusmgr.h"
#include "llinventorybridge.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
#include "llviewerinventory.h"
#include "llviewermessage.h"
#include "llviewerwindow.h"
@@ -155,9 +155,20 @@ bool LLCanCache::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
LLInventoryModel gInventory;
// Default constructor
-LLInventoryModel::LLInventoryModel() :
- mModifyMask(LLInventoryObserver::ALL),
+LLInventoryModel::LLInventoryModel()
+: mModifyMask(LLInventoryObserver::ALL),
+ mChangedItemIDs(),
+ mCategoryMap(),
+ mItemMap(),
+ mCategoryLock(),
+ mItemLock(),
mLastItem(NULL),
+ mParentChildCategoryTree(),
+ mParentChildItemTree(),
+ mObservers(),
+ mRootFolderID(),
+ mLibraryRootFolderID(),
+ mLibraryOwnerID(),
mIsAgentInvUsable(false)
{
}
@@ -299,7 +310,7 @@ LLUUID LLInventoryModel::findCategoryUUIDForType(LLAssetType::EType t, bool crea
LLUUID rv = findCatUUID(t);
if(rv.isNull() && isInventoryUsable() && create_folder)
{
- LLUUID root_id = gAgent.getInventoryRootID();
+ LLUUID root_id = gInventory.getRootFolderID();
if(root_id.notNull())
{
rv = createNewCategory(root_id, t, LLStringUtil::null);
@@ -312,7 +323,7 @@ LLUUID LLInventoryModel::findCategoryUUIDForType(LLAssetType::EType t, bool crea
// preferred type. Returns LLUUID::null if not found.
LLUUID LLInventoryModel::findCatUUID(LLAssetType::EType preferred_type)
{
- LLUUID root_id = gAgent.getInventoryRootID();
+ LLUUID root_id = gInventory.getRootFolderID();
if(LLAssetType::AT_CATEGORY == preferred_type)
{
return root_id;
@@ -464,12 +475,41 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id,
}
}
+void LLInventoryModel::updateLinkedObjects(const LLUUID& object_id)
+{
+ LLInventoryModel::cat_array_t cat_array;
+ LLInventoryModel::item_array_t item_array;
+ LLLinkedItemIDMatches is_linked_item_match(object_id);
+ collectDescendentsIf(gInventory.getRootFolderID(),
+ cat_array,
+ item_array,
+ LLInventoryModel::INCLUDE_TRASH,
+ is_linked_item_match);
+
+ for (LLInventoryModel::cat_array_t::iterator cat_iter = cat_array.begin();
+ cat_iter != cat_array.end();
+ cat_iter++)
+ {
+ LLViewerInventoryCategory *linked_cat = (*cat_iter);
+ addChangedMask(LLInventoryObserver::LABEL, linked_cat->getUUID());
+ };
+
+ for (LLInventoryModel::item_array_t::iterator iter = item_array.begin();
+ iter != item_array.end();
+ iter++)
+ {
+ LLViewerInventoryItem *linked_item = (*iter);
+ addChangedMask(LLInventoryObserver::LABEL, linked_item->getUUID());
+ };
+ notifyObservers();
+}
+
void LLInventoryModel::collectLinkedItems(const LLUUID& id,
item_array_t& items)
{
LLInventoryModel::cat_array_t cat_array;
LLLinkedItemIDMatches is_linked_item_match(id);
- collectDescendentsIf(gAgent.getInventoryRootID(),
+ collectDescendentsIf(gInventory.getRootFolderID(),
cat_array,
items,
LLInventoryModel::INCLUDE_TRASH,
@@ -500,7 +540,7 @@ void LLInventoryModel::appendPath(const LLUUID& id, std::string& path)
bool LLInventoryModel::isInventoryUsable()
{
bool result = false;
- if(gAgent.getInventoryRootID().notNull() && mIsAgentInvUsable)
+ if(gInventory.getRootFolderID().notNull() && mIsAgentInvUsable)
{
result = true;
}
@@ -814,10 +854,10 @@ void LLInventoryModel::purgeObject(const LLUUID &id)
void LLInventoryModel::purgeLinkedObjects(const LLUUID &id)
{
- LLInventoryItem* itemp = getItem(id);
- if (!itemp) return;
+ LLInventoryObject* objectp = getObject(id);
+ if (!objectp) return;
- if (LLAssetType::lookupIsLinkType(itemp->getActualType()))
+ if (LLAssetType::lookupIsLinkType(objectp->getActualType()))
{
return;
}
@@ -1478,8 +1518,8 @@ void LLInventoryModel::startBackgroundFetch(const LLUUID& cat_id)
if (!sFullFetchStarted)
{
sFullFetchStarted = TRUE;
- sFetchQueue.push_back(gInventoryLibraryRoot);
- sFetchQueue.push_back(gAgent.getInventoryRootID());
+ sFetchQueue.push_back(gInventory.getLibraryRootFolderID());
+ sFetchQueue.push_back(gInventory.getRootFolderID());
gIdleCallbacks.addFunction(&LLInventoryModel::backgroundFetch, NULL);
}
}
@@ -2263,7 +2303,7 @@ void LLInventoryModel::buildParentChildMap()
else
{
// it's a protected folder.
- cat->setParent(gAgent.getInventoryRootID());
+ cat->setParent(gInventory.getRootFolderID());
}
cat->updateServer(TRUE);
catsp = getUnlockedCatArray(cat->getParentUUID());
@@ -2363,7 +2403,7 @@ void LLInventoryModel::buildParentChildMap()
}
}
- const LLUUID& agent_inv_root_id = gAgent.getInventoryRootID();
+ LLUUID agent_inv_root_id = gInventory.getRootFolderID();
if (agent_inv_root_id.notNull())
{
cat_array_t* catsp = get_ptr_in_map(mParentChildCategoryTree, agent_inv_root_id);
@@ -2813,7 +2853,7 @@ void LLInventoryModel::processUpdateInventoryFolder(LLMessageSystem* msg,
gInventory.notifyObservers();
// *HACK: Do the 'show' logic for a new item in the inventory.
- LLInventoryView* view = LLInventoryView::getActiveInventory();
+ LLFloaterInventory* view = LLFloaterInventory::getActiveInventory();
if(view)
{
view->getPanel()->setSelection(lastfolder->getUUID(), TAKE_FOCUS_NO);
@@ -3022,13 +3062,13 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
// The incoming inventory could span more than one BulkInventoryUpdate packet,
// so record the transaction ID for this purchase, then wear all clothing
// that comes in as part of that transaction ID. JC
- if (LLInventoryView::sWearNewClothing)
+ if (LLFloaterInventory::sWearNewClothing)
{
- LLInventoryView::sWearNewClothingTransactionID = tid;
- LLInventoryView::sWearNewClothing = FALSE;
+ LLFloaterInventory::sWearNewClothingTransactionID = tid;
+ LLFloaterInventory::sWearNewClothing = FALSE;
}
- if (tid == LLInventoryView::sWearNewClothingTransactionID)
+ if (tid == LLFloaterInventory::sWearNewClothingTransactionID)
{
count = wearable_ids.size();
for (i = 0; i < count; ++i)
@@ -3046,7 +3086,7 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
gInventoryCallbacks.fire(cbinfo.mCallback, cbinfo.mInvID);
}
// Don't show the inventory. We used to call showAgentInventory here.
- //LLInventoryView* view = LLInventoryView::getActiveInventory();
+ //LLFloaterInventory* view = LLFloaterInventory::getActiveInventory();
//if(view)
//{
// const BOOL take_keyboard_focus = FALSE;
@@ -3056,10 +3096,10 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
// // HACK to open inventory offers that are accepted. This information
// // really needs to flow through the instant messages and inventory
// // transfer/update messages.
- // if (LLInventoryView::sOpenNextNewItem)
+ // if (LLFloaterInventory::sOpenNextNewItem)
// {
// view->openSelected();
- // LLInventoryView::sOpenNextNewItem = FALSE;
+ // LLFloaterInventory::sOpenNextNewItem = FALSE;
// }
//
// // restore keyboard focus
@@ -3224,6 +3264,36 @@ void LLInventoryModel::removeItem(const LLUUID& item_id)
}
}
+LLUUID LLInventoryModel::getRootFolderID() const
+{
+ return mRootFolderID;
+}
+
+void LLInventoryModel::setRootFolderID(const LLUUID& val)
+{
+ mRootFolderID = val;
+}
+
+LLUUID LLInventoryModel::getLibraryRootFolderID() const
+{
+ return mLibraryRootFolderID;
+}
+
+void LLInventoryModel::setLibraryRootFolderID(const LLUUID& val)
+{
+ mLibraryRootFolderID = val;
+}
+
+LLUUID LLInventoryModel::getLibraryOwnerID() const
+{
+ return mLibraryOwnerID;
+}
+
+void LLInventoryModel::setLibraryOwnerID(const LLUUID& val)
+{
+ mLibraryOwnerID = val;
+}
+
//----------------------------------------------------------------------------
// *NOTE: DEBUG functionality
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index 8dc3c1605f..da10528c9d 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -118,6 +118,7 @@ public:
public:
fetchInventoryResponder(const LLSD& request_sd) : mRequestSD(request_sd) {};
void result(const LLSD& content);
+
void error(U32 status, const std::string& reason);
public:
@@ -180,7 +181,6 @@ public:
cat_array_t& categories,
item_array_t& items,
BOOL include_trash);
-
void collectDescendentsIf(const LLUUID& id,
cat_array_t& categories,
item_array_t& items,
@@ -191,8 +191,9 @@ public:
// Assumes item_id is itself not a linked item.
void collectLinkedItems(const LLUUID& item_id,
item_array_t& items);
-
- // This method will return false if this inventory model is in an usabel state.
+ // Updates all linked objects pointing to this id.
+ void updateLinkedObjects(const LLUUID& object_id);
+
// The inventory model usage is sensitive to the initial construction of the
// model.
bool isInventoryUsable();
@@ -204,7 +205,7 @@ public:
// Calling this method with an inventory item will either change
// an existing item with a matching item_id, or will add the item
// to the current inventory. Returns the change mask generated by
- // the update. No notifcation will be sent to observers. This
+ // the update. No notification will be sent to observers. This
// method will only generate network traffic if the item had to be
// reparented.
// *NOTE: In usage, you will want to perform cache accounting
@@ -231,7 +232,7 @@ public:
// delete a particular inventory object by ID. This will purge one
// object from the internal data structures maintaining a
- // cosistent internal state. No cache accounting, observer
+ // consistent internal state. No cache accounting, observer
// notification, or server update is performed. Purges linked items.
void deleteObject(const LLUUID& id);
@@ -240,12 +241,12 @@ public:
void purgeObject(const LLUUID& id);
void purgeLinkedObjects(const LLUUID& id);
- // This is a method which collects the descendents of the id
+ // This is a method which collects the descendants of the id
// provided. If the category is not found, no action is
// taken. This method goes through the long winded process of
// removing server representation of folders and items while doing
// cache accounting in a fairly efficient manner. This method does
- // not notify observers (though maybe it shouldd...)
+ // not notify observers (though maybe it should...)
void purgeDescendentsOf(const LLUUID& id);
// This method optimally removes the referenced categories and
@@ -392,6 +393,22 @@ public:
static bool isEverythingFetched();
static void backgroundFetch(void*); // background fetch idle function
static void incrBulkFetch(S16 fetching) { sBulkFetchCount+=fetching; if (sBulkFetchCount<0) sBulkFetchCount=0; }
+
+
+ // Data about the agent's root folder and root library folder
+ // are stored here, rather than in LLAgent where it used to be, because
+ // gInventory is a singleton and represents the agent's inventory.
+ // The "library" is actually the inventory of a special agent,
+ // usually Alexandria Linden.
+ LLUUID getRootFolderID() const;
+ LLUUID getLibraryOwnerID() const;
+ LLUUID getLibraryRootFolderID() const;
+
+ // These are set during login with data from the server
+ void setRootFolderID(const LLUUID& id);
+ void setLibraryOwnerID(const LLUUID& id);
+ void setLibraryRootFolderID(const LLUUID& id);
+
protected:
// Internal methods which add inventory and make sure that all of
@@ -444,7 +461,7 @@ protected:
item_array_t* getUnlockedItemArray(const LLUUID& id);
protected:
- // Varaibles used to track what has changed since the last notify.
+ // Variables used to track what has changed since the last notify.
U32 mModifyMask;
typedef std::set<LLUUID> changed_items_t;
changed_items_t mChangedItemIDs;
@@ -475,6 +492,11 @@ protected:
typedef std::set<LLInventoryObserver*> observer_list_t;
observer_list_t mObservers;
+ // Agent inventory folder information.
+ LLUUID mRootFolderID;
+ LLUUID mLibraryRootFolderID;
+ LLUUID mLibraryOwnerID;
+
// completing the fetch once per session should be sufficient
static BOOL sBackgroundFetchActive;
static BOOL sTimelyFetchPending;
diff --git a/indra/newview/lljoystickbutton.cpp b/indra/newview/lljoystickbutton.cpp
index 8e6889a379..efc03b3d88 100644
--- a/indra/newview/lljoystickbutton.cpp
+++ b/indra/newview/lljoystickbutton.cpp
@@ -42,18 +42,18 @@
// Project includes
#include "llui.h"
#include "llagent.h"
-#include "llviewerimage.h"
-#include "llviewerimagelist.h"
+#include "llviewertexture.h"
+#include "llviewertexturelist.h"
#include "llviewerwindow.h"
#include "llmoveview.h"
#include "llglheaders.h"
-static LLDefaultWidgetRegistry::Register<LLJoystickAgentSlide> r1("joystick_slide");
-static LLDefaultWidgetRegistry::Register<LLJoystickAgentTurn> r2("joystick_turn");
-static LLDefaultWidgetRegistry::Register<LLJoystickCameraRotate> r3("joystick_rotate");
-static LLDefaultWidgetRegistry::Register<LLJoystickCameraZoom> r4("joystick_zoom");
-static LLDefaultWidgetRegistry::Register<LLJoystickCameraTrack> r5("joystick_track");
+static LLDefaultChildRegistry::Register<LLJoystickAgentSlide> r1("joystick_slide");
+static LLDefaultChildRegistry::Register<LLJoystickAgentTurn> r2("joystick_turn");
+static LLDefaultChildRegistry::Register<LLJoystickCameraRotate> r3("joystick_rotate");
+static LLDefaultChildRegistry::Register<LLJoystickCameraZoom> r4("joystick_zoom");
+static LLDefaultChildRegistry::Register<LLJoystickCameraTrack> r5("joystick_track");
@@ -552,7 +552,7 @@ void LLJoystickCameraRotate::draw()
}
// Draws image rotated by multiples of 90 degrees
-void LLJoystickCameraRotate::drawRotatedImage( LLImageGL* image, S32 rotations )
+void LLJoystickCameraRotate::drawRotatedImage( LLTexture* image, S32 rotations )
{
S32 width = image->getWidth();
S32 height = image->getHeight();
diff --git a/indra/newview/lljoystickbutton.h b/indra/newview/lljoystickbutton.h
index 954a8c481d..8caef30fa4 100644
--- a/indra/newview/lljoystickbutton.h
+++ b/indra/newview/lljoystickbutton.h
@@ -35,7 +35,7 @@
#include "llbutton.h"
#include "llcoord.h"
-#include "llviewerimage.h"
+#include "llviewertexture.h"
typedef enum e_joystick_quadrant
{
@@ -63,7 +63,7 @@ public:
Params()
: quadrant("quadrant", JQ_ORIGIN)
{
- label("");
+ label = "";
}
};
LLJoystick(const Params&);
@@ -150,7 +150,7 @@ public:
protected:
F32 getOrbitRate();
virtual void updateSlop();
- void drawRotatedImage( LLImageGL* image, S32 rotations );
+ void drawRotatedImage( LLTexture* image, S32 rotations );
protected:
BOOL mInLeft;
diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp
new file mode 100644
index 0000000000..b51064f226
--- /dev/null
+++ b/indra/newview/lllandmarkactions.cpp
@@ -0,0 +1,141 @@
+/**
+* @file lllandmarkactions.cpp
+* @brief LLLandmarkActions class implementation
+*
+* $LicenseInfo:firstyear=2001&license=viewergpl$
+*
+* Copyright (c) 2001-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h"
+#include "lllandmarkactions.h"
+
+#include "llagent.h"
+#include "llinventory.h"
+#include "llinventorymodel.h"
+#include "lllandmark.h"
+#include "lllandmarklist.h"
+#include "llnotifications.h"
+#include "llparcel.h"
+#include "llviewerinventory.h"
+#include "llviewerparcelmgr.h"
+#include "roles_constants.h"
+
+// Returns true if the given inventory item is a landmark pointing to the current parcel.
+// Used to filter inventory items.
+class LLIsAgentParcelLandmark : public LLInventoryCollectFunctor
+{
+public:
+ /*virtual*/ bool operator()(LLInventoryCategory* cat, LLInventoryItem* item)
+ {
+ if (!item || item->getType() != LLAssetType::AT_LANDMARK)
+ return false;
+
+ LLLandmark* landmark = gLandmarkList.getAsset(item->getAssetUUID());
+ if (!landmark) // the landmark not been loaded yet
+ return false;
+
+ LLVector3d landmark_global_pos;
+ if (!landmark->getGlobalPos(landmark_global_pos))
+ return false;
+
+ return LLViewerParcelMgr::getInstance()->inAgentParcel(landmark_global_pos);
+ }
+};
+
+bool LLLandmarkActions::landmarkAlreadyExists()
+{
+ // Determine whether there are landmarks pointing to the current parcel.
+ LLInventoryModel::cat_array_t cats;
+ LLInventoryModel::item_array_t items;
+ LLIsAgentParcelLandmark is_current_parcel_landmark;
+ gInventory.collectDescendentsIf(gInventory.getRootFolderID(),
+ cats,
+ items,
+ LLInventoryModel::EXCLUDE_TRASH,
+ is_current_parcel_landmark);
+
+ return !items.empty();
+}
+
+bool LLLandmarkActions::canCreateLandmarkHere()
+{
+ LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
+ if(!agent_parcel)
+ {
+ llwarns << "No agent region" << llendl;
+ return false;
+ }
+ if (agent_parcel->getAllowLandmark()
+ || LLViewerParcelMgr::isParcelOwnedByAgent(agent_parcel, GP_LAND_ALLOW_LANDMARK))
+ {
+ return true;
+ }
+
+ return false;
+}
+
+void LLLandmarkActions::createLandmarkHere(
+ const std::string& name,
+ const std::string& desc,
+ const LLUUID& folder_id)
+{
+ if(!gAgent.getRegion())
+ {
+ llwarns << "No agent region" << llendl;
+ return;
+ }
+ LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
+ if (!agent_parcel)
+ {
+ llwarns << "No agent parcel" << llendl;
+ return;
+ }
+ if (!canCreateLandmarkHere())
+ {
+ LLNotifications::instance().add("CannotCreateLandmarkNotOwner");
+ return;
+ }
+
+ create_inventory_item(gAgent.getID(), gAgent.getSessionID(),
+ folder_id, LLTransactionID::tnull,
+ name, desc,
+ LLAssetType::AT_LANDMARK,
+ LLInventoryType::IT_LANDMARK,
+ NOT_WEARABLE, PERM_ALL,
+ NULL);
+}
+
+void LLLandmarkActions::createLandmarkHere()
+{
+ std::string landmark_name, landmark_desc;
+
+ gAgent.buildLocationString(landmark_name, LLAgent::LOCATION_FORMAT_LANDMARK);
+ gAgent.buildLocationString(landmark_desc, LLAgent::LOCATION_FORMAT_FULL);
+ LLUUID folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK);
+
+ createLandmarkHere(landmark_name, landmark_desc, folder_id);
+}
diff --git a/indra/newview/lllandmarkactions.h b/indra/newview/lllandmarkactions.h
new file mode 100644
index 0000000000..e1e94edb75
--- /dev/null
+++ b/indra/newview/lllandmarkactions.h
@@ -0,0 +1,68 @@
+/**
+* @file lllandmarkactions.h
+* @brief LLLandmark class declaration
+*
+* $LicenseInfo:firstyear=2000&license=viewergpl$
+*
+* Copyright (c) 2000-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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_LLLANDMARKACTIONS_H
+#define LL_LLLANDMARKACTIONS_H
+
+/**
+* @brief Provides helper functions to manage landmarks
+*/
+class LLLandmarkActions
+{
+public:
+
+ /**
+ * @brief Checks whether landmark exists for current parcel.
+ */
+ static bool landmarkAlreadyExists();
+
+ /**
+ * @brief Checks whether agent has rights to create landmark for current parcel.
+ */
+ static bool canCreateLandmarkHere();
+
+ /**
+ * @brief Creates landmark for current parcel.
+ */
+ static void createLandmarkHere();
+
+ /**
+ * @brief Creates landmark for current parcel.
+ */
+ static void createLandmarkHere(
+ const std::string& name,
+ const std::string& desc,
+ const LLUUID& folder_id);
+
+};
+
+#endif //LL_LLLANDMARKACTIONS_H
diff --git a/indra/newview/lllistbrowser.cpp b/indra/newview/lllistbrowser.cpp
new file mode 100644
index 0000000000..edd8e9818f
--- /dev/null
+++ b/indra/newview/lllistbrowser.cpp
@@ -0,0 +1,37 @@
+/**
+ * @file lllistbrowser.cpp
+ * @brief UI widget showing a search filter, list view, icon action buttons,
+ * and verb action buttons, as usually embedded in the side tray.
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h"
+
+#include "lllistbrowser.h"
+
+// TODO
diff --git a/indra/newview/lllistbrowser.h b/indra/newview/lllistbrowser.h
new file mode 100644
index 0000000000..bc9498c514
--- /dev/null
+++ b/indra/newview/lllistbrowser.h
@@ -0,0 +1,36 @@
+/**
+ * @file lllistbrowser.h
+ * @brief UI widget showing a search filter, list view, icon action buttons,
+ * and verb action buttons, as usually embedded in the side tray.
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 LLLISTBROWSER_H
+#define LLLISTBROWSER_H
+
+#endif // LLLISTBROWSER_H
diff --git a/indra/newview/lllistview.cpp b/indra/newview/lllistview.cpp
new file mode 100644
index 0000000000..3019d5d3d5
--- /dev/null
+++ b/indra/newview/lllistview.cpp
@@ -0,0 +1,73 @@
+/**
+ * @file lllistview.cpp
+ * @brief UI widget containing a scrollable, possibly hierarchical list of
+ * folders (LLListViewFolder) and items (LLListViewItem).
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h"
+
+#include "lllistview.h"
+
+#include "lltextbox.h"
+#include "lluictrlfactory.h" // LLDefaultChildRegistry
+
+// linker optimizes this out on Windows until there is a real reference
+// to this file
+static LLDefaultChildRegistry::Register<LLListView> r("list_view");
+
+LLListView::Params::Params()
+: bg_color("bg_color"),
+ fg_selected_color("fg_selected_color"),
+ bg_selected_color("bg_selected_color")
+{}
+
+LLListView::LLListView(const Params& p)
+: LLUICtrl(p),
+ mLabel(NULL),
+ mBgColor(p.bg_color()),
+ mFgSelectedColor(p.fg_selected_color()),
+ mBgSelectedColor(p.bg_selected_color())
+{
+ LLRect label_rect(0, 20, 300, 0);
+ LLTextBox::Params text_box_params;
+ text_box_params.rect(label_rect);
+ text_box_params.text("This is a list-view");
+ mLabel = LLUICtrlFactory::create<LLTextBox>(text_box_params);
+ addChild(mLabel);
+}
+
+LLListView::~LLListView()
+{}
+
+
+// placeholder for setting a property
+void LLListView::setString(const std::string& s)
+{
+ mLabel->setValue( LLSD(s) );
+}
diff --git a/indra/newview/lllistview.h b/indra/newview/lllistview.h
new file mode 100644
index 0000000000..501c0c9e1f
--- /dev/null
+++ b/indra/newview/lllistview.h
@@ -0,0 +1,66 @@
+/**
+ * @file lllistview.h
+ * @brief UI widget containing a scrollable, possibly hierarchical list of
+ * folders (LLListViewFolder) and items (LLListViewItem).
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 LLLISTVIEW_H
+#define LLLISTVIEW_H
+
+#include "llui.h" // for LLUIColor, *TODO: use more specific header
+#include "lluictrl.h"
+
+class LLTextBox;
+
+class LLListView
+: public LLUICtrl
+{
+public:
+ struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
+ {
+ Optional<LLUIColor> bg_color,
+ fg_selected_color,
+ bg_selected_color;
+ Params();
+ };
+ LLListView(const Params& p);
+ virtual ~LLListView();
+
+ // placeholder for setting a property
+ void setString(const std::string& s);
+
+private:
+ // TODO: scroll container?
+ LLTextBox* mLabel; // just for testing
+ LLUIColor mBgColor;
+ LLUIColor mFgSelectedColor;
+ LLUIColor mBgSelectedColor;
+};
+
+#endif // LLLISTVIEW_H
diff --git a/indra/newview/lllocaltextureobject.cpp b/indra/newview/lllocaltextureobject.cpp
new file mode 100644
index 0000000000..e4a20aea68
--- /dev/null
+++ b/indra/newview/lllocaltextureobject.cpp
@@ -0,0 +1,149 @@
+/**
+ * @file lllocaltextureobject.cpp
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2009-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h"
+
+#include "lllocaltextureobject.h"
+
+#include "lltexlayer.h"
+#include "llviewertexture.h"
+#include "lltextureentry.h"
+#include "lluuid.h"
+
+
+LLLocalTextureObject::LLLocalTextureObject() :
+ mIsBakedReady(FALSE),
+ mDiscard(MAX_DISCARD_LEVEL+1)
+{
+ mImage = NULL;
+}
+
+LLLocalTextureObject::LLLocalTextureObject(LLViewerFetchedTexture *image, LLTextureEntry *entry, LLTexLayer *layer, LLUUID id)
+{
+ if (entry)
+ {
+ LLTextureEntry * te = new LLTextureEntry(*entry);
+ mTexEntry = boost::shared_ptr<LLTextureEntry>(te);
+ }
+
+ if (layer)
+ {
+ LLTexLayer *texLayer = new LLTexLayer(*layer);
+ mTexLayer = boost::shared_ptr<LLTexLayer>(texLayer);
+ }
+ mImage = image;
+ mID = id;
+}
+
+LLLocalTextureObject::LLLocalTextureObject(const LLLocalTextureObject &lto) :
+mImage(lto.mImage),
+mTexEntry(lto.mTexEntry),
+mTexLayer(lto.mTexLayer),
+mID(lto.mID),
+mIsBakedReady(lto.mIsBakedReady),
+mDiscard(lto.mDiscard)
+{
+}
+
+LLLocalTextureObject::~LLLocalTextureObject()
+{
+}
+
+LLViewerFetchedTexture* LLLocalTextureObject::getImage() const
+{
+ return mImage;
+}
+
+LLTextureEntry* LLLocalTextureObject::getTexEntry() const
+{
+ return mTexEntry.get();
+}
+
+LLTexLayer* LLLocalTextureObject::getTexLayer() const
+{
+ return mTexLayer.get();
+}
+
+LLUUID LLLocalTextureObject::getID() const
+{
+ return mID;
+}
+
+S32 LLLocalTextureObject::getDiscard() const
+{
+ return mDiscard;
+}
+
+BOOL LLLocalTextureObject::getBakedReady() const
+{
+ return mIsBakedReady;
+}
+
+void LLLocalTextureObject::setImage(LLViewerFetchedTexture* new_image)
+{
+ mImage = new_image;
+}
+
+void LLLocalTextureObject::setTexEntry(LLTextureEntry *new_te)
+{
+ LLTextureEntry *ptr = NULL;
+ if (new_te)
+ {
+ ptr = new LLTextureEntry(*new_te);
+ }
+ mTexEntry = boost::shared_ptr<LLTextureEntry>(ptr);
+}
+
+void LLLocalTextureObject::setTexLayer(LLTexLayer *new_tex_layer)
+{
+ LLTexLayer *ptr = NULL;
+ if (new_tex_layer)
+ {
+ ptr = new LLTexLayer(*new_tex_layer);
+ }
+ mTexLayer = boost::shared_ptr<LLTexLayer>(ptr);
+}
+
+void LLLocalTextureObject::setID(LLUUID new_id)
+{
+ mID = new_id;
+}
+
+void LLLocalTextureObject::setDiscard(S32 new_discard)
+{
+ mDiscard = new_discard;
+}
+
+void LLLocalTextureObject::setBakedReady(BOOL ready)
+{
+ mIsBakedReady = ready;
+}
+
diff --git a/indra/newview/lllocaltextureobject.h b/indra/newview/lllocaltextureobject.h
new file mode 100644
index 0000000000..79e1562dce
--- /dev/null
+++ b/indra/newview/lllocaltextureobject.h
@@ -0,0 +1,85 @@
+/**
+ * @file lllocaltextureobject.h
+ * @brief LLLocalTextureObject class header file
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2009-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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_LOCALTEXTUREOBJECT_H
+#define LL_LOCALTEXTUREOBJECT_H
+
+#include <boost/shared_ptr.hpp>
+
+class LLViewerFetchedTexture;
+class LLUUID;
+class LLTexLayer;
+class LLTextureEntry;
+
+// Stores all relevant information for a single texture
+// assumed to have ownership of all objects referred to -
+// will delete objects when being replaced or if object is destroyed.
+class LLLocalTextureObject
+{
+public:
+ LLLocalTextureObject();
+ LLLocalTextureObject(LLViewerFetchedTexture *image, LLTextureEntry *entry, LLTexLayer *layer, LLUUID id);
+ LLLocalTextureObject(const LLLocalTextureObject &lto);
+ ~LLLocalTextureObject();
+
+ LLViewerFetchedTexture* getImage() const;
+ LLTextureEntry* getTexEntry() const;
+ LLTexLayer* getTexLayer() const;
+ LLUUID getID() const;
+ S32 getDiscard() const;
+ BOOL getBakedReady() const;
+
+ void setImage(LLViewerFetchedTexture* new_image);
+ void setTexEntry(LLTextureEntry *new_te);
+ void setTexLayer(LLTexLayer *new_tex_layer);
+ void setID(LLUUID new_id);
+ void setDiscard(S32 new_discard);
+ void setBakedReady(BOOL ready);
+
+protected:
+
+private:
+
+ LLPointer<LLViewerFetchedTexture> mImage;
+ // NOTE: LLLocalTextureObject should be the exclusive owner of mTexEntry and mTexLayer
+ // using shared pointers here only for smart assignment & cleanup
+ // do NOT create new shared pointers to these objects, or keep pointers to them around
+ boost::shared_ptr<LLTextureEntry> mTexEntry;
+ boost::shared_ptr<LLTexLayer> mTexLayer;
+ LLUUID mID;
+
+ BOOL mIsBakedReady;
+ S32 mDiscard;
+};
+
+ #endif // LL_LOCALTEXTUREOBJECT_H
+
diff --git a/indra/newview/lllocationhistory.cpp b/indra/newview/lllocationhistory.cpp
index 179eca2532..471a0868bc 100644
--- a/indra/newview/lllocationhistory.cpp
+++ b/indra/newview/lllocationhistory.cpp
@@ -39,8 +39,7 @@
#include "llui.h"
LLLocationHistory::LLLocationHistory() :
- mFilename("typed_locations.txt"),
- mLoadedCallback(NULL)
+ mFilename("typed_locations.txt")
{
}
@@ -55,6 +54,11 @@ void LLLocationHistory::addItem(std::string item)
mItems.erase(mItems.begin(), mItems.end()-max_items);
}
+void LLLocationHistory::removeItems()
+{
+ mItems.erase(mItems.begin(), mItems.end());
+}
+
bool LLLocationHistory::getMatchingItems(std::string substring, location_list_t& result) const
{
@@ -129,6 +133,5 @@ void LLLocationHistory::load()
file.close();
- if (mLoadedCallback)
- mLoadedCallback();
+ mLoadedSignal();
}
diff --git a/indra/newview/lllocationhistory.h b/indra/newview/lllocationhistory.h
index d2a959ae62..19032686c1 100644
--- a/indra/newview/lllocationhistory.h
+++ b/indra/newview/lllocationhistory.h
@@ -46,14 +46,16 @@ class LLLocationHistory: public LLSingleton<LLLocationHistory>
public:
typedef std::vector<std::string> location_list_t;
typedef boost::function<void()> loaded_callback_t;
+ typedef boost::signals2::signal<void()> loaded_signal_t;
LLLocationHistory();
void addItem(std::string item);
+ void removeItems();
size_t getItemCount() const { return mItems.size(); }
const location_list_t& getItems() const { return mItems; }
bool getMatchingItems(std::string substring, location_list_t& result) const;
- void setLoadedCallback(loaded_callback_t cb) { mLoadedCallback = cb; }
+ boost::signals2::connection setLoadedCallback(loaded_callback_t cb) { return mLoadedSignal.connect(cb); }
void save() const;
void load();
@@ -62,7 +64,7 @@ public:
private:
std::vector<std::string> mItems;
std::string mFilename; /// File to store the history to.
- loaded_callback_t mLoadedCallback;
+ loaded_signal_t mLoadedSignal;
};
#endif
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index fac0de0f33..94abd128c4 100644
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -48,9 +48,9 @@
#include "llagent.h"
#include "llfloaterland.h"
#include "llinventorymodel.h"
+#include "lllandmarkactions.h"
#include "lllandmarklist.h"
#include "lllocationhistory.h"
-#include "llpanelplaces.h"
#include "llsidetray.h"
#include "llviewerinventory.h"
#include "llviewerparcelmgr.h"
@@ -84,28 +84,6 @@
* and choose the appropriate image for the "Add landmark" button.
*/
-// Returns true if the given inventory item is a landmark pointing to the current parcel.
-// Used to filter inventory items.
-class LLIsAgentParcelLandmark : public LLInventoryCollectFunctor
-{
-public:
- /*virtual*/ bool operator()(LLInventoryCategory* cat, LLInventoryItem* item)
- {
- if (!item || item->getType() != LLAssetType::AT_LANDMARK)
- return false;
-
- LLLandmark* landmark = gLandmarkList.getAsset(item->getAssetUUID());
- if (!landmark) // the landmark not been loaded yet
- return false;
-
- LLVector3d landmark_global_pos;
- if (!landmark->getGlobalPos(landmark_global_pos))
- return false;
-
- return LLViewerParcelMgr::getInstance()->inAgentParcel(landmark_global_pos);
- }
-};
-
/**
* Initiates loading the landmarks that have been just added.
*
@@ -167,15 +145,14 @@ private:
//============================================================================
-static LLDefaultWidgetRegistry::Register<LLLocationInputCtrl> r("location_input");
+static LLDefaultChildRegistry::Register<LLLocationInputCtrl> r("location_input");
LLLocationInputCtrl::Params::Params()
: add_landmark_image_enabled("add_landmark_image_enabled"),
add_landmark_image_disabled("add_landmark_image_disabled"),
add_landmark_button("add_landmark_button"),
add_landmark_hpad("add_landmark_hpad", 0),
- info_button("info_button"),
- background("background")
+ info_button("info_button")
{
}
@@ -185,11 +162,6 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p)
mInfoBtn(NULL),
mAddLandmarkBtn(NULL)
{
- // Background image.
- LLButton::Params bg_params = p.background;
- mBackground = LLUICtrlFactory::create<LLButton>(bg_params);
- addChildInBack(mBackground);
-
// "Place information" button.
LLButton::Params info_params = p.info_button;
mInfoBtn = LLUICtrlFactory::create<LLButton>(info_params);
@@ -213,8 +185,6 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p)
enableAddLandmarkButton(true);
addChild(mAddLandmarkBtn);
- setFocusReceivedCallback(boost::bind(&LLLocationInputCtrl::onFocusReceived, this));
- setFocusLostCallback(boost::bind(&LLLocationInputCtrl::onFocusLost, this));
setPrearrangeCallback(boost::bind(&LLLocationInputCtrl::onLocationPrearrange, this, _2));
updateWidgetlayout();
@@ -222,10 +192,10 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p)
// - Make the "Add landmark" button updated when either current parcel gets changed
// or a landmark gets created or removed from the inventory.
// - Update the location string on parcel change.
- LLViewerParcelMgr::getInstance()->setAgentParcelChangedCallback(
+ mParcelMgrConnection = LLViewerParcelMgr::getInstance()->setAgentParcelChangedCallback(
boost::bind(&LLLocationInputCtrl::onAgentParcelChange, this));
- LLLocationHistory::getInstance()->setLoadedCallback(
+ mLocationHistoryConnection = LLLocationHistory::getInstance()->setLoadedCallback(
boost::bind(&LLLocationInputCtrl::onLocationHistoryLoaded, this));
mRemoveLandmarkObserver = new LLRemoveLandmarkObserver(this);
@@ -240,6 +210,9 @@ LLLocationInputCtrl::~LLLocationInputCtrl()
gInventory.removeObserver(mAddLandmarkObserver);
delete mRemoveLandmarkObserver;
delete mAddLandmarkObserver;
+
+ mParcelMgrConnection.disconnect();
+ mLocationHistoryConnection.disconnect();
}
void LLLocationInputCtrl::setEnabled(BOOL enabled)
@@ -354,19 +327,21 @@ void LLLocationInputCtrl::onFocusReceived()
void LLLocationInputCtrl::onFocusLost()
{
+ LLUICtrl::onFocusLost();
refreshLocation();
}
void LLLocationInputCtrl::onInfoButtonClicked()
{
- LLSD key;
- key["type"] = LLPanelPlaces::AGENT;
-
- LLSideTray::getInstance()->showPanel("panel_places", key);
+ LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "agent"));
}
void LLLocationInputCtrl::onAddLandmarkButtonClicked()
{
+ LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "create_landmark"));
+
+ // Floater "Add Landmark" functionality moved to Side Tray
+ // TODO* Disable floater "Add Landmark" call
LLFloaterReg::showInstance("add_landmark");
}
@@ -461,41 +436,21 @@ void LLLocationInputCtrl::enableAddLandmarkButton(bool val)
// depending on whether current parcel has been landmarked.
void LLLocationInputCtrl::updateAddLandmarkButton()
{
- bool cur_parcel_landmarked = false;
-
- // Determine whether there are landmarks pointing to the current parcel.
- LLInventoryModel::cat_array_t cats;
- LLInventoryModel::item_array_t items;
- LLIsAgentParcelLandmark is_current_parcel_landmark;
- gInventory.collectDescendentsIf(gAgent.getInventoryRootID(),
- cats,
- items,
- LLInventoryModel::EXCLUDE_TRASH,
- is_current_parcel_landmark);
- cur_parcel_landmarked = !items.empty();
-
- enableAddLandmarkButton(!cur_parcel_landmarked);
+ enableAddLandmarkButton(!LLLandmarkActions::landmarkAlreadyExists());
}
void LLLocationInputCtrl::updateWidgetlayout()
{
const LLRect& rect = getLocalRect();
const LLRect& hist_btn_rect = mButton->getRect();
- LLRect info_btn_rect = mButton->getRect();
+ LLRect info_btn_rect = mInfoBtn->getRect();
// info button
info_btn_rect.setOriginAndSize(
- 0, (rect.getHeight() - info_btn_rect.getHeight()) / 2,
+ 2, (rect.getHeight() - info_btn_rect.getHeight()) / 2,
info_btn_rect.getWidth(), info_btn_rect.getHeight());
mInfoBtn->setRect(info_btn_rect);
- // background
- mBackground->setRect(LLRect(info_btn_rect.getWidth(), rect.mTop,
- rect.mRight - hist_btn_rect.getWidth(), rect.mBottom));
-
- // history button
- mButton->setRightHPad(0);
-
// "Add Landmark" button
{
LLRect al_btn_rect = mAddLandmarkBtn->getRect();
@@ -504,14 +459,4 @@ void LLLocationInputCtrl::updateWidgetlayout()
(rect.getHeight() - al_btn_rect.getHeight()) / 2);
mAddLandmarkBtn->setRect(al_btn_rect);
}
-
- // text entry
- if (mTextEntry)
- {
- LLRect text_entry_rect(rect);
- text_entry_rect.mLeft = info_btn_rect.getWidth();
- text_entry_rect.mRight = mAddLandmarkBtn->getRect().mLeft;
- text_entry_rect.stretch(0, -1); // make space for border
- mTextEntry->setRect(text_entry_rect);
- }
}
diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h
index 1732853263..2cc63a33b7 100644
--- a/indra/newview/lllocationinputctrl.h
+++ b/indra/newview/lllocationinputctrl.h
@@ -61,8 +61,7 @@ public:
add_landmark_image_disabled;
Optional<S32> add_landmark_hpad;
Optional<LLButton::Params> add_landmark_button,
- info_button,
- background;
+ info_button;
Params();
};
@@ -70,6 +69,8 @@ public:
/*virtual*/ void setEnabled(BOOL enabled);
/*virtual*/ BOOL handleToolTip(S32 x, S32 y, std::string& msg, LLRect* sticky_rect);
/*virtual*/ BOOL handleKeyHere(KEY key, MASK mask);
+ /*virtual*/ void onFocusReceived();
+ /*virtual*/ void onFocusLost();
//========================================================================
// LLUICtrl interface
@@ -98,8 +99,6 @@ private:
void updateAddLandmarkButton();
void updateWidgetlayout();
- void onFocusReceived();
- void onFocusLost();
void onInfoButtonClicked();
void onLocationHistoryLoaded();
void onLocationPrearrange(const LLSD& data);
@@ -107,13 +106,15 @@ private:
void onAddLandmarkButtonClicked();
void onAgentParcelChange();
- LLButton* mBackground;
LLButton* mAddLandmarkBtn;
LLButton* mInfoBtn;
S32 mAddLandmarkHPad;
LLAddLandmarkObserver* mAddLandmarkObserver;
LLRemoveLandmarkObserver* mRemoveLandmarkObserver;
+
+ boost::signals2::connection mParcelMgrConnection;
+ boost::signals2::connection mLocationHistoryConnection;
};
#endif
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index 16192079a2..f967fcaf97 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -296,7 +296,7 @@ void LLLoginInstance::updateApp(bool mandatory, const std::string& auth_msg)
{
// store off config state, as we might quit soon
gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE);
- gSavedSkinSettings.saveToFile(gSavedSettings.getString("SkinningSettingsFile"), TRUE);
+ LLUIColorTable::instance().saveUserSettings();
std::ostringstream message;
std::string msg;
diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp
index 7039776585..3d1d6cad74 100644
--- a/indra/newview/llmanip.cpp
+++ b/indra/newview/llmanip.cpp
@@ -40,7 +40,7 @@
#include "llrender.h"
#include "llprimitive.h"
#include "llview.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llagent.h"
#include "llviewercontrol.h"
@@ -581,9 +581,9 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const std::string
LLColor4 LLManip::setupSnapGuideRenderPass(S32 pass)
{
- static LLColor4 grid_color_fg = gSavedSkinSettings.getColor("GridlineColor");
- static LLColor4 grid_color_bg = gSavedSkinSettings.getColor("GridlineBGColor");
- static LLColor4 grid_color_shadow = gSavedSkinSettings.getColor("GridlineShadowColor");
+ static LLColor4 grid_color_fg = LLUIColorTable::instance().getColor("GridlineColor");
+ static LLColor4 grid_color_bg = LLUIColorTable::instance().getColor("GridlineBGColor");
+ static LLColor4 grid_color_shadow = LLUIColorTable::instance().getColor("GridlineShadowColor");
LLColor4 line_color;
F32 line_alpha = gSavedSettings.getF32("GridOpacity");
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index f228ea624b..d1d112c4bf 100644
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -1107,8 +1107,8 @@ BOOL LLManipRotate::updateVisiblity()
mCenterToProfilePlaneMag = mRadiusMeters * mRadiusMeters / mCenterToCamMag;
mCenterToProfilePlane = -mCenterToProfilePlaneMag * mCenterToCamNorm;
- mCenterScreen.set((S32)((0.5f - mRotationCenter.mdV[VY]) / gAgent.mHUDCurZoom * gViewerWindow->getWindowWidth()),
- (S32)((mRotationCenter.mdV[VZ] + 0.5f) / gAgent.mHUDCurZoom * gViewerWindow->getWindowHeight()));
+ mCenterScreen.set((S32)((0.5f - mRotationCenter.mdV[VY]) / gAgent.mHUDCurZoom * gViewerWindow->getWorldViewWidth()),
+ (S32)((mRotationCenter.mdV[VZ] + 0.5f) / gAgent.mHUDCurZoom * gViewerWindow->getWorldViewHeight()));
visible = TRUE;
}
else
@@ -1624,8 +1624,8 @@ void LLManipRotate::mouseToRay( S32 x, S32 y, LLVector3* ray_pt, LLVector3* ray_
{
if (LLSelectMgr::getInstance()->getSelection()->getSelectType() == SELECT_TYPE_HUD)
{
- F32 mouse_x = (((F32)x / gViewerWindow->getWindowWidth()) - 0.5f) / gAgent.mHUDCurZoom;
- F32 mouse_y = ((((F32)y) / gViewerWindow->getWindowHeight()) - 0.5f) / gAgent.mHUDCurZoom;
+ F32 mouse_x = (((F32)x / gViewerWindow->getWorldViewWidth()) - 0.5f) / gAgent.mHUDCurZoom;
+ F32 mouse_y = ((((F32)y) / gViewerWindow->getWorldViewHeight()) - 0.5f) / gAgent.mHUDCurZoom;
*ray_pt = LLVector3(-1.f, -mouse_x, mouse_y);
*ray_dir = LLVector3(1.f, 0.f, 0.f);
@@ -1699,7 +1699,7 @@ void LLManipRotate::highlightManipulators( S32 x, S32 y )
F32 dist_y = mouse_dir_y.normVec();
F32 dist_z = mouse_dir_z.normVec();
- F32 distance_threshold = (MAX_MANIP_SELECT_DISTANCE * mRadiusMeters) / gViewerWindow->getWindowHeight();
+ F32 distance_threshold = (MAX_MANIP_SELECT_DISTANCE * mRadiusMeters) / gViewerWindow->getWorldViewHeight();
if (llabs(dist_x - mRadiusMeters) * llmax(0.05f, proj_rot_x_axis) < distance_threshold)
{
diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp
index 5261c130ea..72596e850a 100644
--- a/indra/newview/llmanipscale.cpp
+++ b/indra/newview/llmanipscale.cpp
@@ -493,8 +493,8 @@ void LLManipScale::highlightManipulators(S32 x, S32 y)
mProjectedManipulators.insert(projManipulator);
}
- F32 half_width = (F32)gViewerWindow->getWindowWidth() / 2.f;
- F32 half_height = (F32)gViewerWindow->getWindowHeight() / 2.f;
+ F32 half_width = (F32)gViewerWindow->getWorldViewWidth() / 2.f;
+ F32 half_height = (F32)gViewerWindow->getWorldViewHeight() / 2.f;
LLVector2 manip2d;
LLVector2 mousePos((F32)x - half_width, (F32)y - half_height);
LLVector2 delta;
@@ -1368,7 +1368,7 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox)
else
{
F32 object_distance = dist_vec(mScaleCenter, LLViewerCamera::getInstance()->getOrigin());
- mSnapRegimeOffset = (SNAP_GUIDE_SCREEN_OFFSET * gViewerWindow->getWindowWidth() * object_distance) / LLViewerCamera::getInstance()->getPixelMeterRatio();
+ mSnapRegimeOffset = (SNAP_GUIDE_SCREEN_OFFSET * gViewerWindow->getWorldViewWidth() * object_distance) / LLViewerCamera::getInstance()->getPixelMeterRatio();
}
LLVector3 cam_at_axis;
F32 snap_guide_length;
@@ -1381,7 +1381,7 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox)
{
cam_at_axis = LLViewerCamera::getInstance()->getAtAxis();
F32 manipulator_distance = dist_vec(box_corner_agent, LLViewerCamera::getInstance()->getOrigin());
- snap_guide_length = (SNAP_GUIDE_SCREEN_LENGTH * gViewerWindow->getWindowWidth() * manipulator_distance) / LLViewerCamera::getInstance()->getPixelMeterRatio();
+ snap_guide_length = (SNAP_GUIDE_SCREEN_LENGTH * gViewerWindow->getWorldViewWidth() * manipulator_distance) / LLViewerCamera::getInstance()->getPixelMeterRatio();
}
mSnapGuideLength = snap_guide_length / llmax(0.1f, (llmin(mSnapGuideDir1 * cam_at_axis, mSnapGuideDir2 * cam_at_axis)));
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index b8c2a3d64b..cc2531d139 100644
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -78,7 +78,7 @@ const F32 PLANE_TICK_SIZE = 0.4f;
const F32 MANIPULATOR_SCALE_HALF_LIFE = 0.07f;
const F32 SNAP_ARROW_SCALE = 0.7f;
-static LLPointer<LLImageGL> sGridTex = NULL ;
+static LLPointer<LLViewerTexture> sGridTex = NULL ;
const LLManip::EManipPart MANIPULATOR_IDS[9] =
{
@@ -154,7 +154,7 @@ void LLManipTranslate::restoreGL()
U32 mip = 0;
destroyGL() ;
- sGridTex = new LLImageGL() ;
+ sGridTex = LLViewerTextureManager::getLocalTexture() ;
if(!sGridTex->createGLTexture())
{
sGridTex = NULL ;
@@ -414,7 +414,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
// Handle auto-rotation if necessary.
const F32 ROTATE_ANGLE_PER_SECOND = 30.f * DEG_TO_RAD;
- const S32 ROTATE_H_MARGIN = gViewerWindow->getWindowWidth() / 20;
+ const S32 ROTATE_H_MARGIN = gViewerWindow->getWorldViewWidth() / 20;
const F32 rotate_angle = ROTATE_ANGLE_PER_SECOND / gFPSClamped;
BOOL rotated = FALSE;
@@ -426,7 +426,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
gAgent.cameraOrbitAround(rotate_angle);
rotated = TRUE;
}
- else if (x > gViewerWindow->getWindowWidth() - ROTATE_H_MARGIN)
+ else if (x > gViewerWindow->getWorldViewWidth() - ROTATE_H_MARGIN)
{
gAgent.cameraOrbitAround(-rotate_angle);
rotated = TRUE;
@@ -960,8 +960,8 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y)
LLVector2 manip_start_2d;
LLVector2 manip_end_2d;
LLVector2 manip_dir;
- F32 half_width = gViewerWindow->getWindowWidth() / 2.f;
- F32 half_height = gViewerWindow->getWindowHeight() / 2.f;
+ F32 half_width = gViewerWindow->getWorldViewWidth() / 2.f;
+ F32 half_height = gViewerWindow->getWorldViewHeight() / 2.f;
LLVector2 mousePos((F32)x - half_width, (F32)y - half_height);
LLVector2 mouse_delta;
@@ -1225,7 +1225,7 @@ void LLManipTranslate::renderSnapGuides()
{
LLVector3 cam_to_selection = getPivotPoint() - LLViewerCamera::getInstance()->getOrigin();
F32 current_range = cam_to_selection.normVec();
- guide_size_meters = SNAP_GUIDE_SCREEN_SIZE * gViewerWindow->getWindowHeight() * current_range / LLViewerCamera::getInstance()->getPixelMeterRatio();
+ guide_size_meters = SNAP_GUIDE_SCREEN_SIZE * gViewerWindow->getWorldViewHeight() * current_range / LLViewerCamera::getInstance()->getPixelMeterRatio();
F32 fraction_of_fov = mAxisArrowLength / (F32) LLViewerCamera::getInstance()->getViewHeightInPixels();
F32 apparent_angle = fraction_of_fov * LLViewerCamera::getInstance()->getView(); // radians
@@ -1522,7 +1522,7 @@ void LLManipTranslate::renderSnapGuides()
float a = line_alpha;
- LLColor4 col = gSavedSkinSettings.getColor("SilhouetteChildColor");
+ LLColor4 col = LLUIColorTable::instance().getColor("SilhouetteChildColor");
{
//draw grid behind objects
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
@@ -1800,7 +1800,7 @@ void LLManipTranslate::renderTranslationHandles()
// Drag handles
if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
{
- mArrowLengthMeters = mAxisArrowLength / gViewerWindow->getWindowHeight();
+ mArrowLengthMeters = mAxisArrowLength / gViewerWindow->getWorldViewHeight();
mArrowLengthMeters /= gAgent.mHUDCurZoom;
}
else
diff --git a/indra/newview/llmemoryview.cpp b/indra/newview/llmemoryview.cpp
index ab5db93027..3c7716e9c2 100644
--- a/indra/newview/llmemoryview.cpp
+++ b/indra/newview/llmemoryview.cpp
@@ -119,7 +119,7 @@ void LLMemoryView::draw()
const S32 UPDATE_INTERVAL = 60;
const S32 MARGIN_AMT = 10;
static S32 curUpdate = UPDATE_INTERVAL;
- static LLCachedControl<LLColor4> s_console_color(gSavedSkinSettings, "ConsoleBackground", LLColor4U::black);
+ static LLUIColor s_console_color = LLUIColorTable::instance().getColor("ConsoleBackground", LLColor4U::black);
// setup update interval
if (curUpdate >= UPDATE_INTERVAL)
diff --git a/indra/newview/llmenucommands.cpp b/indra/newview/llmenucommands.cpp
index d76ddbf4d4..2433b6fac6 100644
--- a/indra/newview/llmenucommands.cpp
+++ b/indra/newview/llmenucommands.cpp
@@ -44,14 +44,14 @@
#include "llagent.h"
#include "llcallingcard.h"
-#include "llchatbar.h"
#include "llviewercontrol.h"
#include "llfirstuse.h"
#include "llfloaterchat.h"
#include "llfloaterdirectory.h"
#include "llfloaterworldmap.h"
#include "llgivemoney.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
+#include "lllineeditor.h"
#include "llnotify.h"
#include "llstatusbar.h"
#include "llimview.h"
@@ -67,7 +67,7 @@
#include "llworld.h"
#include "llworldmap.h"
#include "llfocusmgr.h"
-#include "llbottomtray.h"
+#include "llnearbychatbar.h"
void handle_pay_by_id(const LLUUID& agent_id)
{
const BOOL is_group = FALSE;
@@ -83,20 +83,20 @@ void handle_mouselook(void*)
void handle_chat(void*)
{
// give focus to chatbar if it's open but not focused
- if (gSavedSettings.getBOOL("ChatVisible") && gFocusMgr.childHasKeyboardFocus(
- LLBottomTray::getInstance()->getChatBox()))
+ if (gSavedSettings.getBOOL("ChatVisible") &&
+ gFocusMgr.childHasKeyboardFocus(LLNearbyChatBar::getInstance()->getChatBox()))
{
- LLChatBar::stopChat();
+ LLNearbyChatBar::stopChat();
}
else
{
- LLChatBar::startChat(NULL);
+ LLNearbyChatBar::startChat(NULL);
}
}
void handle_slash_key(void*)
{
- // LLChatBar::startChat("/");
+ // LLBottomTray::startChat("/");
//
// Don't do this, it results in a double-slash in the input field.
// Another "/" will be automatically typed for us, because the WM_KEYDOWN event
@@ -106,5 +106,5 @@ void handle_slash_key(void*)
// menu accelerators that put input focus into a field. And Mac works
// the same way. JC
- LLChatBar::startChat(NULL);
+ LLNearbyChatBar::startChat(NULL);
}
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 36ec2c779a..963be61d93 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -38,12 +38,14 @@
#include "indra_constants.h"
// Viewer includes
+
#include "llagent.h"
-#include "llviewercontrol.h"
#include "llbutton.h"
-#include "llviewerwindow.h"
+#include "llfloaterreg.h"
#include "lljoystickbutton.h"
#include "lluictrlfactory.h"
+#include "llviewerwindow.h"
+#include "llviewercontrol.h"
//
// Constants
@@ -59,28 +61,19 @@ const F32 NUDGE_TIME = 0.25f; // in seconds
// protected
LLFloaterMove::LLFloaterMove(const LLSD& key)
-: LLFloater()
+: LLFloater(key)
{
- setIsChrome(TRUE);
- const BOOL DONT_OPEN = FALSE;
- LLUICtrlFactory::getInstance()->buildFloater(this,"floater_moveview.xml", DONT_OPEN);
+// LLUICtrlFactory::getInstance()->buildFloater(this,"floater_moveview.xml", DONT_OPEN);
}
// virtual
-void LLFloaterMove::onClose(bool app_quitting)
-{
- destroy();
-
- if (!app_quitting)
- {
- gSavedSettings.setBOOL("ShowMovementControls", FALSE);
- }
-}
-// virtual
BOOL LLFloaterMove::postBuild()
{
+ setIsChrome(TRUE);
+
+
mForwardButton = getChild<LLJoystickAgentTurn>("forward btn");
mForwardButton->setHeldDownDelay(MOVE_BUTTON_DELAY);
@@ -116,11 +109,6 @@ BOOL LLFloaterMove::postBuild()
// Static member functions
//
-void LLFloaterMove::onOpen(const LLSD& key)
-{
- gSavedSettings.setBOOL("ShowMovementControls", TRUE);
-}
-
// protected static
F32 LLFloaterMove::getYawRate( F32 time )
{
@@ -138,14 +126,20 @@ F32 LLFloaterMove::getYawRate( F32 time )
// protected static
void LLFloaterMove::turnLeft(void *)
{
- F32 time = getInstance()->mTurnLeftButton->getHeldDownTime();
+ LLFloaterMove* instance = LLFloaterReg::getTypedInstance<LLFloaterMove>("moveview");
+ if(!instance) return;
+
+ F32 time = instance->mTurnLeftButton->getHeldDownTime();
gAgent.moveYaw( getYawRate( time ) );
}
// protected static
void LLFloaterMove::turnRight(void *)
{
- F32 time = getInstance()->mTurnRightButton->getHeldDownTime();
+ LLFloaterMove* instance = LLFloaterReg::getTypedInstance<LLFloaterMove>("moveview");
+ if(!instance) return;
+
+ F32 time = instance->mTurnRightButton->getHeldDownTime();
gAgent.moveYaw( -getYawRate( time ) );
}
diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h
index 8d7cdc881d..250315b9f2 100644
--- a/indra/newview/llmoveview.h
+++ b/indra/newview/llmoveview.h
@@ -44,18 +44,15 @@ class LLJoystickAgentSlide;
// Classes
//
class LLFloaterMove
-: public LLFloater,
- public LLFloaterSingleton<LLFloaterMove>
+: public LLFloater
{
- friend class LLUISingleton<LLFloaterMove, VisibilityPolicy<LLFloater> >;
-
-protected:
+ friend class LLFloaterReg;
+
+private:
LLFloaterMove(const LLSD& key);
~LLFloaterMove() {}
-
public:
- /*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ void onClose(bool app_quitting);
+
/*virtual*/ BOOL postBuild();
static F32 getYawRate(F32 time);
diff --git a/indra/newview/llnamebox.cpp b/indra/newview/llnamebox.cpp
index b85c1c759d..56648d3218 100644
--- a/indra/newview/llnamebox.cpp
+++ b/indra/newview/llnamebox.cpp
@@ -46,7 +46,7 @@
// statics
std::set<LLNameBox*> LLNameBox::sInstances;
-static LLDefaultWidgetRegistry::Register<LLNameBox> r("name_box");
+static LLDefaultChildRegistry::Register<LLNameBox> r("name_box");
LLNameBox::LLNameBox(const Params& p)
diff --git a/indra/newview/llnameeditor.cpp b/indra/newview/llnameeditor.cpp
index 7f9ba8ba5a..ccb33c770a 100644
--- a/indra/newview/llnameeditor.cpp
+++ b/indra/newview/llnameeditor.cpp
@@ -43,7 +43,7 @@
#include "llstring.h"
#include "llui.h"
-static LLDefaultWidgetRegistry::Register<LLNameEditor> r("name_editor");
+static LLDefaultChildRegistry::Register<LLNameEditor> r("name_editor");
// statics
std::set<LLNameEditor*> LLNameEditor::sInstances;
diff --git a/indra/newview/llnameeditor.h b/indra/newview/llnameeditor.h
index f9cabb5831..99e03a1166 100644
--- a/indra/newview/llnameeditor.h
+++ b/indra/newview/llnameeditor.h
@@ -50,6 +50,11 @@ public:
{
Optional<bool> is_group;
Optional<LLUUID> name_id;
+
+ Params()
+ : is_group("is_group"),
+ name_id("name_id")
+ {}
};
protected:
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp
index 722113928b..ffc3b2f37a 100644
--- a/indra/newview/llnamelistctrl.cpp
+++ b/indra/newview/llnamelistctrl.cpp
@@ -44,7 +44,7 @@
#include "llscrolllistcolumn.h"
#include "llsdparam.h"
-static LLDefaultWidgetRegistry::Register<LLNameListCtrl> r("name_list");
+static LLDefaultChildRegistry::Register<LLNameListCtrl> r("name_list");
void LLNameListCtrl::NameTypeNames::declareValues()
{
@@ -169,7 +169,7 @@ LLScrollListItem* LLNameListCtrl::addRow(const LLNameListCtrl::NameItem& name_it
if (!item) return NULL;
// use supplied name by default
- std::string fullname = name_item.display_name;
+ std::string fullname = name_item.name;
switch(name_item.target)
{
case GROUP:
diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h
index 6f64aa68ad..80feaea881 100644
--- a/indra/newview/llnamelistctrl.h
+++ b/indra/newview/llnamelistctrl.h
@@ -57,11 +57,11 @@ public:
struct NameItem : public LLInitParam::Block<NameItem, LLScrollListItem::Params>
{
- Optional<std::string> display_name;
+ Optional<std::string> name;
Optional<ENameType, NameTypeNames> target;
NameItem()
- : display_name("name"),
+ : name("name"),
target("target", INDIVIDUAL)
{}
};
@@ -94,6 +94,14 @@ public:
void addNameItem(NameItem& item, EAddPosition pos = ADD_BOTTOM);
/*virtual*/ LLScrollListItem* addElement(const LLSD& element, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL);
+ LLScrollListItem* addRow(const LLScrollListItem::Params& value, EAddPosition pos = ADD_BOTTOM)
+ {
+ // *NOTE:Mani - This implementation overrides the LLScrollListItem::addRow()
+ // method to call this class's special version of addRow().
+ // The dynamic_cast of a reference type should throw
+ // a std::bad_cast exception on failure.
+ return addRow(dynamic_cast<const NameItem&>(value), pos);
+ }
LLScrollListItem* addRow(const NameItem& value, EAddPosition pos = ADD_BOTTOM);
// Add a user to the list by name. It will be added, the name
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index cf1d9a5d86..58ec2d24a8 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -42,9 +42,11 @@
#include "llagent.h"
#include "llfloaterhtmlhelp.h"
+#include "lllandmarkactions.h"
#include "lllocationhistory.h"
#include "lllocationinputctrl.h"
#include "llteleporthistory.h"
+#include "llsearcheditor.h"
#include "llslurl.h"
#include "llurlsimstring.h"
#include "llviewerinventory.h"
@@ -174,9 +176,9 @@ LLNavigationBar::LLNavigationBar()
mBtnBack(NULL),
mBtnForward(NULL),
mBtnHome(NULL),
- mBtnHelp(NULL),
mCmbLocation(NULL),
- mLeSearch(NULL)
+ mLeSearch(NULL),
+ mPurgeTPHistoryItems(false)
{
setIsChrome(TRUE);
@@ -200,15 +202,12 @@ BOOL LLNavigationBar::postBuild()
mBtnBack = getChild<LLButton>("back_btn");
mBtnForward = getChild<LLButton>("forward_btn");
mBtnHome = getChild<LLButton>("home_btn");
- mBtnHelp = getChild<LLButton>("help_btn");
mCmbLocation= getChild<LLLocationInputCtrl>("location_combo");
- mLeSearch = getChild<LLLineEditor>("search_input");
-
- LLButton* search_btn = getChild<LLButton>("search_btn");
+ mLeSearch = getChild<LLSearchEditor>("search_input");
- if (!mBtnBack || !mBtnForward || !mBtnHome || !mBtnHelp ||
- !mCmbLocation || !mLeSearch || !search_btn)
+ if (!mBtnBack || !mBtnForward || !mBtnHome ||
+ !mCmbLocation || !mLeSearch)
{
llwarns << "Malformed navigation bar" << llendl;
return FALSE;
@@ -223,15 +222,13 @@ BOOL LLNavigationBar::postBuild()
mBtnForward->setHeldDownCallback(boost::bind(&LLNavigationBar::onBackOrForwardButtonHeldDown, this, _2));
mBtnHome->setClickedCallback(boost::bind(&LLNavigationBar::onHomeButtonClicked, this));
- mBtnHelp->setClickedCallback(boost::bind(&LLNavigationBar::onHelpButtonClicked, this));
mCmbLocation->setSelectionCallback(boost::bind(&LLNavigationBar::onLocationSelection, this));
mLeSearch->setCommitCallback(boost::bind(&LLNavigationBar::onSearchCommit, this));
- search_btn->setClickedCallback(boost::bind(&LLNavigationBar::onSearchCommit, this));
// Load the location field context menu
- mLocationContextMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_navbar.xml", gMenuHolder);
+ mLocationContextMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_navbar.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
if (!mLocationContextMenu)
{
llwarns << "Error loading navigation bar context menu" << llendl;
@@ -247,6 +244,12 @@ BOOL LLNavigationBar::postBuild()
void LLNavigationBar::draw()
{
+ if(mPurgeTPHistoryItems)
+ {
+ LLTeleportHistory::getInstance()->purgeItems();
+ onTeleportHistoryChanged();
+ mPurgeTPHistoryItems = false;
+ }
LLPanel::draw();
}
@@ -292,14 +295,9 @@ void LLNavigationBar::onHomeButtonClicked()
gAgent.teleportHome();
}
-void LLNavigationBar::onHelpButtonClicked()
-{
- gViewerHtmlHelp.show();
-}
-
void LLNavigationBar::onSearchCommit()
{
- invokeSearch(mLeSearch->getText());
+ invokeSearch(mLeSearch->getValue().asString());
}
void LLNavigationBar::onTeleportHistoryMenuItemClicked(const LLSD& userdata)
@@ -518,6 +516,10 @@ bool LLNavigationBar::onLocationContextMenuItemEnabled(const LLSD& userdata)
{
return location_entry->canSelectAll();
}
+ else if(item == std::string("can_landmark"))
+ {
+ return !LLLandmarkActions::landmarkAlreadyExists();
+ }
return false;
}
@@ -531,3 +533,12 @@ void LLNavigationBar::invokeSearch(std::string search_text)
{
LLFloaterReg::showInstance("search", LLSD().insert("panel", "all").insert("id", LLSD(search_text)));
}
+
+void LLNavigationBar::clearHistoryCache()
+{
+ mCmbLocation->removeall();
+ LLLocationHistory* lh = LLLocationHistory::getInstance();
+ lh->removeItems();
+ lh->save();
+ mPurgeTPHistoryItems= true;
+}
diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h
index 4c8375839e..a46c59306d 100644
--- a/indra/newview/llnavigationbar.h
+++ b/indra/newview/llnavigationbar.h
@@ -40,7 +40,7 @@ extern S32 NAVIGATION_BAR_HEIGHT;
class LLButton;
class LLLocationInputCtrl;
class LLMenuGL;
-class LLLineEditor;
+class LLSearchEditor;
/**
* Web browser-like navigation bar.
@@ -59,14 +59,15 @@ public:
/*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
void handleLoginComplete();
-
+ void clearHistoryCache();
+
private:
LLNavigationBar();
void rebuildTeleportHistoryMenu();
void showTeleportHistoryMenu();
void invokeSearch(std::string search_text);
-
+
// callbacks
bool onLocationContextMenuItemEnabled(const LLSD& userdata);
void onLocationContextMenuItemClicked(const LLSD& userdata);
@@ -79,7 +80,6 @@ private:
void onHelpButtonClicked();
void onLocationSelection();
void onLocationPrearrange(const LLSD& data);
- void onLocationHistoryLoaded();
void onSearchCommit();
void onRegionNameResponse(
std::string typed_location,
@@ -95,9 +95,9 @@ private:
LLButton* mBtnBack;
LLButton* mBtnForward;
LLButton* mBtnHome;
- LLButton* mBtnHelp;
- LLLineEditor* mLeSearch;
+ LLSearchEditor* mLeSearch;
LLLocationInputCtrl* mCmbLocation;
+ bool mPurgeTPHistoryItems;
};
#endif
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
new file mode 100644
index 0000000000..847262ddfd
--- /dev/null
+++ b/indra/newview/llnearbychat.cpp
@@ -0,0 +1,523 @@
+/**
+ * @file LLNearbyChat.cpp
+ * @brief Nearby chat history scrolling panel implementation
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h"
+
+#include "llnearbychat.h"
+#include "llviewercontrol.h"
+#include "llviewerwindow.h"
+#include "llrootview.h"
+//#include "llchatitemscontainerctrl.h"
+#include "lliconctrl.h"
+#include "llsidetray.h"
+#include "llfocusmgr.h"
+#include "llresizebar.h"
+#include "llresizehandle.h"
+#include "llmenugl.h"
+#include "llviewermenu.h"//for gMenuHolder
+
+#include "llnearbychathandler.h"
+#include "llchannelmanager.h"
+
+static const S32 RESIZE_BAR_THICKNESS = 3;
+
+LLNearbyChat::LLNearbyChat(const LLSD& key) :
+ LLFloater(key),
+ mEChatTearofState(CHAT_PINNED)
+{
+}
+
+LLNearbyChat::~LLNearbyChat()
+{
+}
+
+BOOL LLNearbyChat::postBuild()
+{
+ //resize bars
+ setCanResize(true);
+
+ mResizeBar[LLResizeBar::BOTTOM]->setVisible(false);
+ mResizeBar[LLResizeBar::LEFT]->setVisible(false);
+ mResizeBar[LLResizeBar::RIGHT]->setVisible(false);
+
+ mResizeBar[LLResizeBar::BOTTOM]->setResizeLimits(120,500);
+ mResizeBar[LLResizeBar::TOP]->setResizeLimits(120,500);
+ mResizeBar[LLResizeBar::LEFT]->setResizeLimits(220,600);
+ mResizeBar[LLResizeBar::RIGHT]->setResizeLimits(220,600);
+
+ mResizeHandle[0]->setVisible(false);
+ mResizeHandle[1]->setVisible(false);
+ mResizeHandle[2]->setVisible(false);
+ mResizeHandle[3]->setVisible(false);
+
+ //menu
+ LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
+ LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar;
+
+ enable_registrar.add("NearbyChat.Check", boost::bind(&LLNearbyChat::onNearbyChatCheckContextMenuItem, this, _2));
+ registrar.add("NearbyChat.Action", boost::bind(&LLNearbyChat::onNearbyChatContextMenuItemClicked, this, _2));
+
+
+ LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_nearby_chat.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+
+ if(menu)
+ mPopupMenuHandle = menu->getHandle();
+
+ gSavedSettings.declareS32("nearbychat_showicons_and_names",2,"NearByChat header settings",true);
+
+ /*
+ LLChatItemsContainerCtrl* panel = getChild<LLChatItemsContainerCtrl>("chat_history",false,false);
+ if(panel)
+ {
+ panel->setHeaderVisibility((EShowItemHeader)gSavedSettings.getS32("nearbychat_showicons_and_names"));
+ }
+ */
+
+ reshape(getRect().getWidth(), getRect().getHeight(), FALSE);
+
+ return LLFloater::postBuild();
+}
+
+#include "llagent.h" // gAgent
+#include "llfloaterscriptdebug.h"
+#include "llviewertexteditor.h"
+#include "llstylemap.h"
+
+LLColor4 nearbychat_get_text_color(const LLChat& chat)
+{
+ LLColor4 text_color;
+
+ if(chat.mMuted)
+ {
+ text_color.setVec(0.8f, 0.8f, 0.8f, 1.f);
+ }
+ else
+ {
+ switch(chat.mSourceType)
+ {
+ case CHAT_SOURCE_SYSTEM:
+ text_color = LLUIColorTable::instance().getColor("SystemChatColor");
+ break;
+ case CHAT_SOURCE_AGENT:
+ if (chat.mFromID.isNull())
+ {
+ text_color = LLUIColorTable::instance().getColor("SystemChatColor");
+ }
+ else
+ {
+ if(gAgentID == chat.mFromID)
+ {
+ text_color = LLUIColorTable::instance().getColor("UserChatColor");
+ }
+ else
+ {
+ text_color = LLUIColorTable::instance().getColor("AgentChatColor");
+ }
+ }
+ break;
+ case CHAT_SOURCE_OBJECT:
+ if (chat.mChatType == CHAT_TYPE_DEBUG_MSG)
+ {
+ text_color = LLUIColorTable::instance().getColor("ScriptErrorColor");
+ }
+ else if ( chat.mChatType == CHAT_TYPE_OWNER )
+ {
+ text_color = LLUIColorTable::instance().getColor("llOwnerSayChatColor");
+ }
+ else
+ {
+ text_color = LLUIColorTable::instance().getColor("ObjectChatColor");
+ }
+ break;
+ default:
+ text_color.setToWhite();
+ }
+
+ if (!chat.mPosAgent.isExactlyZero())
+ {
+ LLVector3 pos_agent = gAgent.getPositionAgent();
+ F32 distance = dist_vec(pos_agent, chat.mPosAgent);
+ if (distance > gAgent.getNearChatRadius())
+ {
+ // diminish far-off chat
+ text_color.mV[VALPHA] = 0.8f;
+ }
+ }
+ }
+
+ return text_color;
+}
+
+void nearbychat_add_timestamped_line(LLViewerTextEditor* edit, LLChat chat, const LLColor4& color)
+{
+ std::string line = chat.mFromName;
+ line +=": ";
+ line +=chat.mText;
+
+ bool prepend_newline = true;
+ if (gSavedSettings.getBOOL("ChatShowTimestamps"))
+ {
+ edit->appendTime(prepend_newline);
+ prepend_newline = false;
+ }
+
+ // If the msg is from an agent (not yourself though),
+ // extract out the sender name and replace it with the hotlinked name.
+ if (chat.mSourceType == CHAT_SOURCE_AGENT &&
+ chat.mFromID != LLUUID::null)
+ {
+ chat.mURL = llformat("secondlife:///app/agent/%s/about",chat.mFromID.asString().c_str());
+ }
+
+ // If the chat line has an associated url, link it up to the name.
+ if (!chat.mURL.empty()
+ && (line.length() > chat.mFromName.length() && line.find(chat.mFromName,0) == 0))
+ {
+ std::string start_line = line.substr(0, chat.mFromName.length() + 1);
+ line = line.substr(chat.mFromName.length() + 1);
+ const LLStyleSP &sourceStyle = LLStyleMap::instance().lookup(chat.mFromID,chat.mURL);
+ edit->appendStyledText(start_line, false, prepend_newline, sourceStyle);
+ prepend_newline = false;
+ }
+ edit->appendColoredText(line, false, prepend_newline, color);
+}
+
+
+
+void LLNearbyChat::addMessage(const LLChat& chat)
+{
+ /*
+ LLChatItemsContainerCtrl* panel = getChild<LLChatItemsContainerCtrl>("chat_history",false,false);
+ if(!panel)
+ return;
+ panel->addMessage(message);
+ */
+
+ //"Chat History Editor" !!!!!
+
+ LLColor4 color = nearbychat_get_text_color(chat);
+
+
+ if (chat.mChatType == CHAT_TYPE_DEBUG_MSG)
+ {
+ LLFloaterScriptDebug::addScriptLine(chat.mText,
+ chat.mFromName,
+ color,
+ chat.mFromID);
+ if (!gSavedSettings.getBOOL("ScriptErrorsAsChat"))
+ {
+ return;
+ }
+ }
+
+ // could flash the chat button in the status bar here. JC
+
+ LLViewerTextEditor* history_editor = getChild<LLViewerTextEditor>("Chat History Editor");
+
+ history_editor->setParseHTML(TRUE);
+ history_editor->setParseHighlights(TRUE);
+
+ if (!chat.mMuted)
+ nearbychat_add_timestamped_line(history_editor, chat, color);
+}
+
+void LLNearbyChat::onNearbySpeakers()
+{
+ LLSD param = "nearby_panel";
+ LLSideTray::getInstance()->showPanel("panel_people",param);
+}
+
+void LLNearbyChat::onTearOff()
+{
+ if(mEChatTearofState == CHAT_PINNED)
+ float_panel();
+ else
+ pinn_panel();
+}
+
+void LLNearbyChat::reshape(S32 width, S32 height, BOOL called_from_parent)
+{
+
+ LLFloater::reshape(width, height, called_from_parent);
+
+ LLPanel* caption = getChild<LLPanel>("chat_caption",false,false);
+
+ LLRect resize_rect;
+ resize_rect.setLeftTopAndSize( 0, height, width, RESIZE_BAR_THICKNESS);
+ if (mResizeBar[LLResizeBar::TOP])
+ {
+ mResizeBar[LLResizeBar::TOP]->reshape(width,RESIZE_BAR_THICKNESS);
+ mResizeBar[LLResizeBar::TOP]->setRect(resize_rect);
+ }
+
+ resize_rect.setLeftTopAndSize( 0, RESIZE_BAR_THICKNESS, width, RESIZE_BAR_THICKNESS);
+ if (mResizeBar[LLResizeBar::BOTTOM])
+ {
+ mResizeBar[LLResizeBar::BOTTOM]->reshape(width,RESIZE_BAR_THICKNESS);
+ mResizeBar[LLResizeBar::BOTTOM]->setRect(resize_rect);
+ }
+
+ resize_rect.setLeftTopAndSize( 0, height, RESIZE_BAR_THICKNESS, height);
+ if (mResizeBar[LLResizeBar::LEFT])
+ {
+ mResizeBar[LLResizeBar::LEFT]->reshape(RESIZE_BAR_THICKNESS,height);
+ mResizeBar[LLResizeBar::LEFT]->setRect(resize_rect);
+ }
+
+ resize_rect.setLeftTopAndSize( width - RESIZE_BAR_THICKNESS, height, RESIZE_BAR_THICKNESS, height);
+ if (mResizeBar[LLResizeBar::RIGHT])
+ {
+ mResizeBar[LLResizeBar::RIGHT]->reshape(RESIZE_BAR_THICKNESS,height);
+ mResizeBar[LLResizeBar::RIGHT]->setRect(resize_rect);
+ }
+
+
+ LLRect caption_rect;
+ if (caption)
+ {
+ caption_rect = caption->getRect();
+ caption_rect.setLeftTopAndSize( 2, height - RESIZE_BAR_THICKNESS, width - 4, caption_rect.getHeight());
+ caption->reshape( width - 4, caption_rect.getHeight(), 1);
+ caption->setRect(caption_rect);
+ }
+
+ //LLPanel* scroll_panel = getChild<LLPanel>("chat_history",false,false);
+ LLViewerTextEditor* scroll_panel = getChild<LLViewerTextEditor>("Chat History Editor");
+
+ if (scroll_panel)
+ {
+ LLRect scroll_rect = scroll_panel->getRect();
+ scroll_rect.setLeftTopAndSize( 2, height - caption_rect.getHeight() - RESIZE_BAR_THICKNESS, width - 4, height - caption_rect.getHeight() - RESIZE_BAR_THICKNESS*2);
+ scroll_panel->reshape( width - 4, height - caption_rect.getHeight() - RESIZE_BAR_THICKNESS*2, 1);
+ scroll_panel->setRect(scroll_rect);
+ }
+
+ //
+ if(mEChatTearofState == CHAT_PINNED)
+ {
+ const LLRect& parent_rect = gViewerWindow->getRootView()->getRect();
+
+ LLRect panel_rect;
+ panel_rect.setLeftTopAndSize( parent_rect.mLeft+2, parent_rect.mBottom+height+4, width, height);
+ setRect(panel_rect);
+ }
+ else
+ {
+ LLRect panel_rect;
+ panel_rect.setLeftTopAndSize( getRect().mLeft, getRect().mTop, width, height);
+ setRect(panel_rect);
+ }
+
+}
+
+BOOL LLNearbyChat::handleMouseDown (S32 x, S32 y, MASK mask)
+{
+ LLPanel* caption = getChild<LLPanel>("chat_caption",false,false);
+ if(caption)
+ {
+ LLUICtrl* nearby_speakers_btn = caption->getChild<LLUICtrl>("nearby_speakers_btn");
+ LLUICtrl* tearoff_btn = caption->getChild<LLUICtrl>("tearoff_btn");
+ LLUICtrl* close_btn = caption->getChild<LLUICtrl>("close_btn");
+
+ S32 caption_local_x = x - caption->getRect().mLeft;
+ S32 caption_local_y = y - caption->getRect().mBottom;
+
+ if(nearby_speakers_btn && tearoff_btn)
+ {
+ S32 local_x = caption_local_x - nearby_speakers_btn->getRect().mLeft;
+ S32 local_y = caption_local_y - nearby_speakers_btn->getRect().mBottom;
+ if(nearby_speakers_btn->pointInView(local_x, local_y))
+ {
+ onNearbySpeakers();
+ bringToFront( x, y );
+ return true;
+ }
+ local_x = caption_local_x - tearoff_btn->getRect().mLeft;
+ local_y = caption_local_y- tearoff_btn->getRect().mBottom;
+ if(tearoff_btn->pointInView(local_x, local_y))
+ {
+ onTearOff();
+ bringToFront( x, y );
+ return true;
+ }
+
+ if(close_btn)
+ {
+ local_x = caption_local_x - close_btn->getRect().mLeft;
+ local_y = caption_local_y - close_btn->getRect().mBottom;
+ if(close_btn->pointInView(local_x, local_y))
+ {
+ setVisible(false);
+ bringToFront( x, y );
+ return true;
+ }
+ }
+ }
+
+ if(mEChatTearofState == CHAT_UNPINNED && caption->pointInView(caption_local_x, caption_local_y) )
+ {
+ //start draggind
+ gFocusMgr.setMouseCapture(this);
+ mStart_Y = y;
+ mStart_X = x;
+ bringToFront( x, y );
+ return true;
+ }
+ }
+
+ return LLFloater::handleMouseDown(x,y,mask);
+}
+
+BOOL LLNearbyChat::handleMouseUp(S32 x, S32 y, MASK mask)
+{
+ if( hasMouseCapture() )
+ {
+ // Release the mouse
+ gFocusMgr.setMouseCapture( NULL );
+ mStart_X = 0;
+ mStart_Y = 0;
+ return true;
+ }
+
+ return LLFloater::handleMouseUp(x,y,mask);
+}
+
+BOOL LLNearbyChat::handleHover(S32 x, S32 y, MASK mask)
+{
+ if( hasMouseCapture() )
+ {
+ translate(x-mStart_X,y-mStart_Y);
+ return true;
+ }
+ return LLFloater::handleHover(x,y,mask);
+}
+
+void LLNearbyChat::pinn_panel()
+{
+ mEChatTearofState = CHAT_PINNED;
+ LLPanel* caption = getChild<LLPanel>("chat_caption",false,false);
+ LLIconCtrl* tearoff_btn = caption->getChild<LLIconCtrl>("tearoff_btn",false,false);
+
+ tearoff_btn->setValue("inv_item_landmark_visited.tga");
+
+ const LLRect& parent_rect = gViewerWindow->getRootView()->getRect();
+
+ LLRect panel_rect;
+ panel_rect.setLeftTopAndSize( parent_rect.mLeft+2, parent_rect.mBottom+getRect().getHeight()+4, getRect().getWidth(), getRect().getHeight());
+ setRect(panel_rect);
+
+ mResizeBar[LLResizeBar::BOTTOM]->setVisible(false);
+ mResizeBar[LLResizeBar::LEFT]->setVisible(false);
+ mResizeBar[LLResizeBar::RIGHT]->setVisible(false);
+
+}
+
+void LLNearbyChat::float_panel()
+{
+ mEChatTearofState = CHAT_UNPINNED;
+ LLPanel* caption = getChild<LLPanel>("chat_caption",false,false);
+ LLIconCtrl* tearoff_btn = caption->getChild<LLIconCtrl>("tearoff_btn",false,false);
+
+ tearoff_btn->setValue("inv_item_landmark.tga");
+ mResizeBar[LLResizeBar::BOTTOM]->setVisible(true);
+ mResizeBar[LLResizeBar::LEFT]->setVisible(true);
+ mResizeBar[LLResizeBar::RIGHT]->setVisible(true);
+
+ translate(4,4);
+}
+
+void LLNearbyChat::onNearbyChatContextMenuItemClicked(const LLSD& userdata)
+{
+ /*
+ LLChatItemsContainerCtrl* panel = getChild<LLChatItemsContainerCtrl>("chat_history",false,false);
+ if(!panel)
+ return;
+
+ std::string str = userdata.asString();
+ if(str == "show_buddy_icons")
+ panel->setHeaderVisibility(CHATITEMHEADER_SHOW_ONLY_ICON);
+ else if(str == "show_names")
+ panel->setHeaderVisibility(CHATITEMHEADER_SHOW_ONLY_NAME);
+ else if(str == "show_icons_and_names")
+ panel->setHeaderVisibility(CHATITEMHEADER_SHOW_BOTH);
+
+ gSavedSettings.setS32("nearbychat_showicons_and_names", (S32)panel->getHeaderVisibility());
+ */
+}
+bool LLNearbyChat::onNearbyChatCheckContextMenuItem(const LLSD& userdata)
+{
+ std::string str = userdata.asString();
+ if(str == "nearby_people")
+ onNearbySpeakers();
+ /*
+ LLChatItemsContainerCtrl* panel = getChild<LLChatItemsContainerCtrl>("chat_history",false,false);
+ if(!panel)
+ return false;
+
+ if(str == "show_buddy_icons")
+ return panel->getHeaderVisibility() == CHATITEMHEADER_SHOW_ONLY_ICON;
+ else if(str == "show_names")
+ return panel->getHeaderVisibility() == CHATITEMHEADER_SHOW_ONLY_NAME;
+ else if(str == "show_icons_and_names")
+ return panel->getHeaderVisibility() == CHATITEMHEADER_SHOW_BOTH;
+ else if(str == "nearby_people")
+ onNearbySpeakers();
+ */
+ return false;
+}
+
+BOOL LLNearbyChat::handleRightMouseDown(S32 x, S32 y, MASK mask)
+{
+ LLPanel* caption = getChild<LLPanel>("chat_caption",false,false);
+ if(caption && caption->pointInView(x - caption->getRect().mLeft, y - caption->getRect().mBottom) )
+ {
+ LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get();
+
+ if(menu)
+ {
+ menu->buildDrawLabels();
+ menu->updateParent(LLMenuGL::sMenuContainer);
+ LLMenuGL::showPopup(this, menu, x, y);
+ }
+ return true;
+ }
+ return LLFloater::handleRightMouseDown(x, y, mask);
+}
+
+void LLNearbyChat::onOpen(const LLSD& key )
+{
+ LLNotificationsUI::LLScreenChannel* chat_channel = LLNotificationsUI::LLChannelManager::getInstance()->getChannelByID(LLUUID(NEARBY_CHAT_ID));
+ if(chat_channel)
+ {
+ chat_channel->removeToastsFromChannel();
+ }
+}
diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h
new file mode 100644
index 0000000000..74e3710f40
--- /dev/null
+++ b/indra/newview/llnearbychat.h
@@ -0,0 +1,100 @@
+/**
+ * @file llnearbychat.h
+ * @brief nearby chat history scrolling panel implementation
+ *
+ * $LicenseInfo:firstyear=2004&license=viewergpl$
+ *
+ * Copyright (c) 2004-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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_LLNEARBYCHAT_H_
+#define LL_LLNEARBYCHAT_H_
+
+#include "llfloater.h"
+#include "llscrollbar.h"
+#include "llchat.h"
+
+class LLResizeBar;
+
+class LLNearbyChat: public LLFloater
+{
+public:
+ // enumerations used by the chat system
+ typedef enum e_chat_tearof_state
+ {
+ CHAT_PINNED = 0,
+ CHAT_UNPINNED = 1,
+ } EChatTearofState;
+
+ enum { RESIZE_BAR_COUNT=4 };
+
+ LLNearbyChat(const LLSD& key);
+ ~LLNearbyChat();
+
+ LLNearbyChat():mEChatTearofState(CHAT_PINNED){};
+ LLNearbyChat(const Params& params):mEChatTearofState(CHAT_PINNED){};
+
+ //static LLNearbyChat* createInstance();
+ //static LLNearbyChat* getInstance ();
+
+ BOOL postBuild ();
+ void reshape (S32 width, S32 height, BOOL called_from_parent = TRUE);
+
+ BOOL handleMouseDown (S32 x, S32 y, MASK mask);
+ BOOL handleMouseUp (S32 x, S32 y, MASK mask);
+ BOOL handleHover (S32 x, S32 y, MASK mask);
+
+ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
+
+ void addMessage (const LLChat& message);
+
+ void onNearbySpeakers ();
+ void onTearOff();
+
+ void onNearbyChatContextMenuItemClicked(const LLSD& userdata);
+ bool onNearbyChatCheckContextMenuItem(const LLSD& userdata);
+
+ virtual void onClose (bool app_quitting) { if(app_quitting) destroy(); else setVisible(false); }
+
+ virtual void onOpen (const LLSD& key);
+
+private:
+
+ void pinn_panel();
+ void float_panel();
+
+private:
+ EChatTearofState mEChatTearofState;
+ S32 mStart_X;
+ S32 mStart_Y;
+
+ //LLResizeBar* mResizeBar[RESIZE_BAR_COUNT];
+ LLHandle<LLView> mPopupMenuHandle;
+};
+
+#endif
+
+
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
new file mode 100644
index 0000000000..7b67ae645c
--- /dev/null
+++ b/indra/newview/llnearbychatbar.cpp
@@ -0,0 +1,549 @@
+/**
+ * @file llnearbychatbar.cpp
+ * @brief LLNearbyChatBar class implementation
+ *
+ * $LicenseInfo:firstyear=2002&license=viewergpl$
+ *
+ * Copyright (c) 2002-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h"
+
+#include "llnearbychatbar.h"
+#include "llbottomtray.h"
+#include "llagent.h"
+#include "llgesturemgr.h"
+#include "llmultigesture.h"
+#include "llkeyboard.h"
+#include "llanimationstates.h"
+#include "llviewerstats.h"
+#include "llcommandhandler.h"
+#include "llviewercontrol.h"
+
+S32 LLNearbyChatBar::sLastSpecialChatChannel = 0;
+
+// legacy calllback glue
+void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel);
+
+static LLDefaultChildRegistry::Register<LLGestureComboBox> r("gesture_combo_box");
+
+LLGestureComboBox::LLGestureComboBox(const LLComboBox::Params& p)
+ : LLComboBox(p)
+ , mGestureLabelTimer()
+ , mLabel(p.label)
+{
+ setCommitCallback(boost::bind(&LLGestureComboBox::onCommitGesture, this, _1));
+
+ // now register us as observer since we have a place to put the results
+ gGestureManager.addObserver(this);
+
+ // refresh list from current active gestures
+ refreshGestures();
+}
+
+LLGestureComboBox::~LLGestureComboBox()
+{
+ gGestureManager.removeObserver(this);
+}
+
+void LLGestureComboBox::refreshGestures()
+{
+ //store current selection so we can maintain it
+ std::string cur_gesture = getValue().asString();
+ selectFirstItem();
+ // clear
+ clearRows();
+
+ // collect list of unique gestures
+ std::map <std::string, BOOL> unique;
+ LLGestureManager::item_map_t::iterator it;
+ for (it = gGestureManager.mActive.begin(); it != gGestureManager.mActive.end(); ++it)
+ {
+ LLMultiGesture* gesture = (*it).second;
+ if (gesture)
+ {
+ if (!gesture->mTrigger.empty())
+ {
+ unique[gesture->mTrigger] = TRUE;
+ }
+ }
+ }
+
+ // add unique gestures
+ std::map <std::string, BOOL>::iterator it2;
+ for (it2 = unique.begin(); it2 != unique.end(); ++it2)
+ {
+ addSimpleElement((*it2).first);
+ }
+
+ sortByName();
+ // Insert label after sorting, at top, with separator below it
+ addSeparator(ADD_TOP);
+ addSimpleElement(mLabel, ADD_TOP);
+
+ if (!cur_gesture.empty())
+ {
+ selectByValue(LLSD(cur_gesture));
+ }
+ else
+ {
+ selectFirstItem();
+ }
+}
+
+void LLGestureComboBox::onCommitGesture(LLUICtrl* ctrl)
+{
+ LLCtrlListInterface* gestures = getListInterface();
+ if (gestures)
+ {
+ S32 index = gestures->getFirstSelectedIndex();
+ if (index == 0)
+ {
+ return;
+ }
+ const std::string& trigger = gestures->getSelectedValue().asString();
+
+ // pretend the user chatted the trigger string, to invoke
+ // substitution and logging.
+ std::string text(trigger);
+ std::string revised_text;
+ gGestureManager.triggerAndReviseString(text, &revised_text);
+
+ revised_text = utf8str_trim(revised_text);
+ if (!revised_text.empty())
+ {
+ // Don't play nodding animation
+ LLNearbyChatBar::sendChatFromViewer(revised_text, CHAT_TYPE_NORMAL, FALSE);
+ }
+ }
+
+ mGestureLabelTimer.start();
+ // free focus back to chat bar
+ setFocus(FALSE);
+}
+
+//virtual
+void LLGestureComboBox::draw()
+{
+ // HACK: Leave the name of the gesture in place for a few seconds.
+ const F32 SHOW_GESTURE_NAME_TIME = 2.f;
+ if (mGestureLabelTimer.getStarted() && mGestureLabelTimer.getElapsedTimeF32() > SHOW_GESTURE_NAME_TIME)
+ {
+ LLCtrlListInterface* gestures = getListInterface();
+ if (gestures) gestures->selectFirstItem();
+ mGestureLabelTimer.stop();
+ }
+
+ LLComboBox::draw();
+}
+
+LLNearbyChatBar::LLNearbyChatBar()
+ : LLPanel()
+ , mChatBox(NULL)
+{
+}
+
+//virtual
+BOOL LLNearbyChatBar::postBuild()
+{
+ mChatBox = getChild<LLLineEditor>("chat_box",TRUE,FALSE);
+
+ if (mChatBox)
+ {
+ mChatBox->setCommitCallback(boost::bind(&LLNearbyChatBar::onChatBoxCommit, this));
+ mChatBox->setKeystrokeCallback(&onChatBoxKeystroke, this);
+ mChatBox->setFocusLostCallback(&onChatBoxFocusLost, this);
+
+ mChatBox->setIgnoreArrowKeys(TRUE);
+ mChatBox->setCommitOnFocusLost( FALSE );
+ mChatBox->setRevertOnEsc( FALSE );
+ mChatBox->setIgnoreTab(TRUE);
+ mChatBox->setPassDelete(TRUE);
+ mChatBox->setReplaceNewlinesWithSpaces(FALSE);
+ mChatBox->setMaxTextLength(1023);
+ mChatBox->setEnableLineHistory(TRUE);
+ }
+
+ mTalkBtn = getChild<LLTalkButton>("talk",TRUE,FALSE);
+
+ return TRUE;
+}
+
+//static
+LLNearbyChatBar* LLNearbyChatBar::getInstance()
+{
+ return LLBottomTray::getInstance() ? LLBottomTray::getInstance()->getNearbyChatBar() : NULL;
+}
+
+std::string LLNearbyChatBar::getCurrentChat()
+{
+ return mChatBox ? mChatBox->getText() : LLStringUtil::null;
+}
+
+// virtual
+BOOL LLNearbyChatBar::handleKeyHere( KEY key, MASK mask )
+{
+ BOOL handled = FALSE;
+
+ // ALT-RETURN is reserved for windowed/fullscreen toggle
+ if( KEY_RETURN == key && mask == MASK_CONTROL)
+ {
+ // shout
+ sendChat(CHAT_TYPE_SHOUT);
+ handled = TRUE;
+ }
+
+ return handled;
+}
+
+void LLNearbyChatBar::onChatBoxKeystroke(LLLineEditor* caller, void* userdata)
+{
+ LLNearbyChatBar* self = (LLNearbyChatBar *)userdata;
+
+ LLWString raw_text;
+ if (self->mChatBox) raw_text = self->mChatBox->getWText();
+
+ // Can't trim the end, because that will cause autocompletion
+ // to eat trailing spaces that might be part of a gesture.
+ LLWStringUtil::trimHead(raw_text);
+
+ S32 length = raw_text.length();
+
+ if( (length > 0) && (raw_text[0] != '/') ) // forward slash is used for escape (eg. emote) sequences
+ {
+ gAgent.startTyping();
+ }
+ else
+ {
+ gAgent.stopTyping();
+ }
+
+ /* Doesn't work -- can't tell the difference between a backspace
+ that killed the selection vs. backspace at the end of line.
+ if (length > 1
+ && text[0] == '/'
+ && key == KEY_BACKSPACE)
+ {
+ // the selection will already be deleted, but we need to trim
+ // off the character before
+ std::string new_text = raw_text.substr(0, length-1);
+ self->mInputEditor->setText( new_text );
+ self->mInputEditor->setCursorToEnd();
+ length = length - 1;
+ }
+ */
+
+ KEY key = gKeyboard->currentKey();
+
+ // Ignore "special" keys, like backspace, arrows, etc.
+ if (length > 1
+ && raw_text[0] == '/'
+ && key < KEY_SPECIAL)
+ {
+ // we're starting a gesture, attempt to autocomplete
+
+ std::string utf8_trigger = wstring_to_utf8str(raw_text);
+ std::string utf8_out_str(utf8_trigger);
+
+ if (gGestureManager.matchPrefix(utf8_trigger, &utf8_out_str))
+ {
+ if (self->mChatBox)
+ {
+ std::string rest_of_match = utf8_out_str.substr(utf8_trigger.size());
+ self->mChatBox->setText(utf8_trigger + rest_of_match); // keep original capitalization for user-entered part
+ S32 outlength = self->mChatBox->getLength(); // in characters
+
+ // Select to end of line, starting from the character
+ // after the last one the user typed.
+ self->mChatBox->setSelection(length, outlength);
+ }
+ }
+
+ //llinfos << "GESTUREDEBUG " << trigger
+ // << " len " << length
+ // << " outlen " << out_str.getLength()
+ // << llendl;
+ }
+}
+
+// static
+void LLNearbyChatBar::onChatBoxFocusLost(LLFocusableElement* caller, void* userdata)
+{
+ // stop typing animation
+ gAgent.stopTyping();
+}
+
+void LLNearbyChatBar::sendChat( EChatType type )
+{
+ if (mChatBox)
+ {
+ LLWString text = mChatBox->getConvertedText();
+ if (!text.empty())
+ {
+ // store sent line in history, duplicates will get filtered
+ mChatBox->updateHistory();
+ // Check if this is destined for another channel
+ S32 channel = 0;
+ stripChannelNumber(text, &channel);
+
+ std::string utf8text = wstring_to_utf8str(text);
+ // Try to trigger a gesture, if not chat to a script.
+ std::string utf8_revised_text;
+ if (0 == channel)
+ {
+ // discard returned "found" boolean
+ gGestureManager.triggerAndReviseString(utf8text, &utf8_revised_text);
+ }
+ else
+ {
+ utf8_revised_text = utf8text;
+ }
+
+ utf8_revised_text = utf8str_trim(utf8_revised_text);
+
+ if (!utf8_revised_text.empty())
+ {
+ // Chat with animation
+ sendChatFromViewer(utf8_revised_text, type, TRUE);
+ }
+ }
+
+ mChatBox->setText(LLStringExplicit(""));
+ }
+
+ gAgent.stopTyping();
+
+ // If the user wants to stop chatting on hitting return, lose focus
+ // and go out of chat mode.
+ if (gSavedSettings.getBOOL("CloseChatOnReturn"))
+ {
+ stopChat();
+ }
+}
+
+void LLNearbyChatBar::onChatBoxCommit()
+{
+ if (mChatBox && mChatBox->getText().length() > 0)
+ {
+ sendChat(CHAT_TYPE_NORMAL);
+ }
+
+ gAgent.stopTyping();
+}
+
+void LLNearbyChatBar::sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate)
+{
+ sendChatFromViewer(utf8str_to_wstring(utf8text), type, animate);
+}
+
+void LLNearbyChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate)
+{
+ // Look for "/20 foo" channel chats.
+ S32 channel = 0;
+ LLWString out_text = stripChannelNumber(wtext, &channel);
+ std::string utf8_out_text = wstring_to_utf8str(out_text);
+ std::string utf8_text = wstring_to_utf8str(wtext);
+
+ utf8_text = utf8str_trim(utf8_text);
+ if (!utf8_text.empty())
+ {
+ utf8_text = utf8str_truncate(utf8_text, MAX_STRING - 1);
+ }
+
+ // Don't animate for chats people can't hear (chat to scripts)
+ if (animate && (channel == 0))
+ {
+ if (type == CHAT_TYPE_WHISPER)
+ {
+ lldebugs << "You whisper " << utf8_text << llendl;
+ gAgent.sendAnimationRequest(ANIM_AGENT_WHISPER, ANIM_REQUEST_START);
+ }
+ else if (type == CHAT_TYPE_NORMAL)
+ {
+ lldebugs << "You say " << utf8_text << llendl;
+ gAgent.sendAnimationRequest(ANIM_AGENT_TALK, ANIM_REQUEST_START);
+ }
+ else if (type == CHAT_TYPE_SHOUT)
+ {
+ lldebugs << "You shout " << utf8_text << llendl;
+ gAgent.sendAnimationRequest(ANIM_AGENT_SHOUT, ANIM_REQUEST_START);
+ }
+ else
+ {
+ llinfos << "send_chat_from_viewer() - invalid volume" << llendl;
+ return;
+ }
+ }
+ else
+ {
+ if (type != CHAT_TYPE_START && type != CHAT_TYPE_STOP)
+ {
+ lldebugs << "Channel chat: " << utf8_text << llendl;
+ }
+ }
+
+ send_chat_from_viewer(utf8_out_text, type, channel);
+}
+
+// static
+void LLNearbyChatBar::startChat(const char* line)
+{
+ LLBottomTray *bt = LLBottomTray::getInstance();
+
+ if (!bt)
+ return;
+
+ LLNearbyChatBar* cb = bt->getNearbyChatBar();
+
+ if (!cb || !cb->mChatBox)
+ return;
+
+ bt->setVisible(TRUE);
+ cb->mChatBox->setFocus(TRUE);
+
+ if (line)
+ {
+ std::string line_string(line);
+ cb->mChatBox->setText(line_string);
+ }
+
+ cb->mChatBox->setCursorToEnd();
+}
+
+// Exit "chat mode" and do the appropriate focus changes
+// static
+void LLNearbyChatBar::stopChat()
+{
+ LLBottomTray *bt = LLBottomTray::getInstance();
+
+ if (!bt)
+ return;
+
+ LLNearbyChatBar* cb = bt->getNearbyChatBar();
+
+ if (!cb || !cb->mChatBox)
+ return;
+
+ cb->mChatBox->setFocus(FALSE);
+
+ // stop typing animation
+ gAgent.stopTyping();
+}
+
+// If input of the form "/20foo" or "/20 foo", returns "foo" and channel 20.
+// Otherwise returns input and channel 0.
+LLWString LLNearbyChatBar::stripChannelNumber(const LLWString &mesg, S32* channel)
+{
+ if (mesg[0] == '/'
+ && mesg[1] == '/')
+ {
+ // This is a "repeat channel send"
+ *channel = sLastSpecialChatChannel;
+ return mesg.substr(2, mesg.length() - 2);
+ }
+ else if (mesg[0] == '/'
+ && mesg[1]
+ && LLStringOps::isDigit(mesg[1]))
+ {
+ // This a special "/20" speak on a channel
+ S32 pos = 0;
+
+ // Copy the channel number into a string
+ LLWString channel_string;
+ llwchar c;
+ do
+ {
+ c = mesg[pos+1];
+ channel_string.push_back(c);
+ pos++;
+ }
+ while(c && pos < 64 && LLStringOps::isDigit(c));
+
+ // Move the pointer forward to the first non-whitespace char
+ // Check isspace before looping, so we can handle "/33foo"
+ // as well as "/33 foo"
+ while(c && iswspace(c))
+ {
+ c = mesg[pos+1];
+ pos++;
+ }
+
+ sLastSpecialChatChannel = strtol(wstring_to_utf8str(channel_string).c_str(), NULL, 10);
+ *channel = sLastSpecialChatChannel;
+ return mesg.substr(pos, mesg.length() - pos);
+ }
+ else
+ {
+ // This is normal chat.
+ *channel = 0;
+ return mesg;
+ }
+}
+
+void LLNearbyChatBar::setPTTState(bool state)
+{
+ mTalkBtn->setSpeakBtnToggleState(state);
+}
+
+void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel)
+{
+ LLMessageSystem* msg = gMessageSystem;
+ msg->newMessageFast(_PREHASH_ChatFromViewer);
+ msg->nextBlockFast(_PREHASH_AgentData);
+ msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+ msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+ msg->nextBlockFast(_PREHASH_ChatData);
+ msg->addStringFast(_PREHASH_Message, utf8_out_text);
+ msg->addU8Fast(_PREHASH_Type, type);
+ msg->addS32("Channel", channel);
+
+ gAgent.sendReliableMessage();
+
+ LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CHAT_COUNT);
+}
+
+class LLChatHandler : public LLCommandHandler
+{
+public:
+ // not allowed from outside the app
+ LLChatHandler() : LLCommandHandler("chat", true) { }
+
+ // Your code here
+ bool handle(const LLSD& tokens, const LLSD& query_map,
+ LLWebBrowserCtrl* web)
+ {
+ if (tokens.size() < 2) return false;
+ S32 channel = tokens[0].asInteger();
+ std::string mesg = tokens[1].asString();
+ send_chat_from_viewer(mesg, CHAT_TYPE_NORMAL, channel);
+ return true;
+ }
+};
+
+// Creating the object registers with the dispatcher.
+LLChatHandler gChatHandler;
+
+
diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h
new file mode 100644
index 0000000000..d1f5fbff6b
--- /dev/null
+++ b/indra/newview/llnearbychatbar.h
@@ -0,0 +1,104 @@
+/**
+ * @file llnearbychatbar.h
+ * @brief LLNearbyChatBar class definition
+ *
+ * $LicenseInfo:firstyear=2002&license=viewergpl$
+ *
+ * Copyright (c) 2002-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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_LLNEARBYCHATBAR_H
+#define LL_LLNEARBYCHATBAR_H
+
+#include "llpanel.h"
+#include "llcombobox.h"
+#include "llgesturemgr.h"
+#include "llchat.h"
+#include "llchiclet.h"
+
+class LLGestureComboBox
+ : public LLComboBox
+ , public LLGestureManagerObserver
+{
+protected:
+ LLGestureComboBox(const LLComboBox::Params&);
+ friend class LLUICtrlFactory;
+public:
+ ~LLGestureComboBox();
+
+ void refreshGestures();
+ void onCommitGesture(LLUICtrl* ctrl);
+ virtual void draw();
+
+ // LLGestureManagerObserver trigger
+ virtual void changed() { refreshGestures(); }
+
+protected:
+ LLFrameTimer mGestureLabelTimer;
+ std::string mLabel;
+};
+
+class LLNearbyChatBar
+: public LLPanel
+{
+public:
+ // constructor for inline chat-bars (e.g. hosted in chat history window)
+ LLNearbyChatBar();
+ ~LLNearbyChatBar() {}
+
+ virtual BOOL postBuild();
+
+ static LLNearbyChatBar* getInstance();
+
+ LLLineEditor* getChatBox() { return mChatBox; }
+
+ std::string getCurrentChat();
+ virtual BOOL handleKeyHere( KEY key, MASK mask );
+
+ void setPTTState(bool state);
+ static void startChat(const char* line);
+ static void stopChat();
+
+ static void sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate);
+ static void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate);
+
+protected:
+ static void onChatBoxKeystroke(LLLineEditor* caller, void* userdata);
+ static void onChatBoxFocusLost(LLFocusableElement* caller, void* userdata);
+
+ void sendChat( EChatType type );
+ void onChatBoxCommit();
+
+ static LLWString stripChannelNumber(const LLWString &mesg, S32* channel);
+
+ // Which non-zero channel did we last chat on?
+ static S32 sLastSpecialChatChannel;
+
+ LLLineEditor* mChatBox;
+ LLTalkButton* mTalkBtn;
+};
+
+#endif
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
new file mode 100644
index 0000000000..cb1b65a604
--- /dev/null
+++ b/indra/newview/llnearbychathandler.cpp
@@ -0,0 +1,124 @@
+/**
+ * @file LLNearbyChatHandler.cpp
+ * @brief Nearby chat notification managment
+ *
+ * $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
+ * Copyright (c) 2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h"
+
+#include "llnearbychathandler.h"
+
+#include "llchatitemscontainerctrl.h"
+#include "llnearbychat.h"
+#include "llrecentpeople.h"
+
+#include "llviewercontrol.h"
+
+#include "llfloaterreg.h"//for LLFloaterReg::getTypedInstance
+
+//add LLNearbyChatHandler to LLNotificationsUI namespace
+namespace LLNotificationsUI{
+
+
+LLNearbyChatHandler::LLNearbyChatHandler(e_notification_type type, const LLSD& id)
+{
+ mType = type;
+ LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
+ /////////////////////////////////////////////////////
+ LLChannelManager::Params p; //TODO: check and correct
+ p.id = LLUUID(NEARBY_CHAT_ID);
+ p.channel_right_bound = nearby_chat->getRect().mRight;
+ p.channel_width = nearby_chat->getRect().mRight - 16; //HACK: 16 - ?
+ /////////////////////////////////////////////////////
+
+
+ // Getting a Channel for our notifications
+ mChannel = LLChannelManager::getInstance()->createChannel(p);
+ mChannel->setFollows(FOLLOWS_LEFT | FOLLOWS_BOTTOM | FOLLOWS_TOP);
+ mChannel->setOverflowFormatString("You have %d unread nearby chat messages");
+ mChannel->setStoreToasts(false);
+}
+LLNearbyChatHandler::~LLNearbyChatHandler()
+{
+}
+void LLNearbyChatHandler::processChat(const LLChat& chat_msg)
+{
+ if(chat_msg.mSourceType == CHAT_SOURCE_AGENT && chat_msg.mFromID.notNull())
+ LLRecentPeople::instance().add(chat_msg.mFromID);
+
+ if(chat_msg.mText.empty())
+ return;//don't process empty messages
+
+ LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
+ nearby_chat->addMessage(chat_msg);
+ if(nearby_chat->getVisible())
+ return;//no need in toast if chat is visible
+
+ LLUUID id;
+ id.generate();
+
+ LLChatItemCtrl* item = LLChatItemCtrl::createInstance();
+
+ item->setMessage(chat_msg);
+ //static S32 chat_item_width = nearby_chat->getRect().getWidth() - 16;
+ static S32 chat_item_width = 304;
+ item->setWidth(chat_item_width);
+ item->setHeaderVisibility((EShowItemHeader)gSavedSettings.getS32("nearbychat_showicons_and_names"));
+
+ item->setVisible(true);
+
+
+ LLToast* toast = mChannel->addToast(id, item);
+
+ toast->setOnMouseEnterCallback(boost::bind(&LLNearbyChatHandler::onToastDestroy, this, toast));
+ toast->setAndStartTimer(gSavedSettings.getS32("NotificationToastTime"));
+}
+
+void LLNearbyChatHandler::onToastDestroy(LLToast* toast)
+{
+ //TODO: what should be done to toasts here? may be htey are to be destroyed?
+ //toast->hide();
+ if(mChannel)
+ mChannel->removeToastsFromChannel();
+ else if(toast)
+ toast->hide();
+
+ LLFloaterReg::showTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
+}
+
+void LLNearbyChatHandler::onChicletClick(void)
+{
+}
+void LLNearbyChatHandler::onChicletClose(void)
+{
+
+}
+
+}
+
diff --git a/indra/newview/llnearbychathandler.h b/indra/newview/llnearbychathandler.h
new file mode 100644
index 0000000000..89ac08b9f0
--- /dev/null
+++ b/indra/newview/llnearbychathandler.h
@@ -0,0 +1,60 @@
+/**
+ * @file llnearbychathandler.h
+ * @brief nearby chat notify
+ *
+ * $LicenseInfo:firstyear=2004&license=viewergpl$
+ *
+ * Copyright (c) 2004-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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_LLNEARBYCHATHANDLER_H
+#define LL_LLNEARBYCHATHANDLER_H
+
+#include "llnotificationhandler.h"
+
+#define NEARBY_CHAT_ID "E1158BD6-661C-4981-9DAD-4DCBFF062502"
+
+//add LLNearbyChatHandler to LLNotificationsUI namespace
+namespace LLNotificationsUI{
+
+class LLNearbyChatHandler : public LLChatHandler
+{
+public:
+ LLNearbyChatHandler(e_notification_type type,const LLSD& id);
+ virtual ~LLNearbyChatHandler();
+
+
+ virtual void processChat(const LLChat& chat_msg);
+ virtual void onToastDestroy(LLToast* toast);
+ virtual void onChicletClick(void);
+ virtual void onChicletClose(void);
+
+protected:
+};
+
+}
+
+#endif /* LL_LLNEARBYCHATHANDLER_H */
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index b40af37f7e..7b0b0c2fb7 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -51,12 +51,15 @@
#include "llsurface.h"
#include "llviewercamera.h"
#include "llviewercontrol.h"
+#include "llviewertexture.h"
+#include "llviewertexturelist.h"
+#include "llviewermenu.h"
#include "llviewerobjectlist.h"
#include "llviewerregion.h"
#include "llworld.h"
#include "llworldmapview.h" // shared draw code
-static LLDefaultWidgetRegistry::Register<LLNetMap> r1("net_map");
+static LLDefaultChildRegistry::Register<LLNetMap> r1("net_map");
const F32 MAP_SCALE_MIN = 64;
const F32 MAP_SCALE_MID = 172;
@@ -112,12 +115,12 @@ void LLNetMap::translatePan( F32 delta_x, F32 delta_y )
void LLNetMap::draw()
{
static LLFrameTimer map_timer;
- static LLCachedControl<LLColor4> map_avatar_color(gSavedSkinSettings, "MapAvatarColor", LLColor4::white);
- static LLCachedControl<LLColor4> map_avatar_friend_color(gSavedSkinSettings, "MapAvatarFriendColor", LLColor4::white);
- static LLCachedControl<LLColor4> map_track_color(gSavedSkinSettings, "MapTrackColor", LLColor4::white);
- static LLCachedControl<LLColor4> map_track_disabled_color(gSavedSkinSettings, "MapTrackDisabledColor", LLColor4::white);
- static LLCachedControl<LLColor4> map_frustum_color(gSavedSkinSettings, "MapFrustumColor", LLColor4::white);
- static LLCachedControl<LLColor4> map_frustum_rotating_color(gSavedSkinSettings, "MapFrustumRotatingColor", LLColor4::white);
+ static LLUIColor map_avatar_color = LLUIColorTable::instance().getColor("MapAvatarColor", LLColor4::white);
+ static LLUIColor map_avatar_friend_color = LLUIColorTable::instance().getColor("MapAvatarFriendColor", LLColor4::white);
+ static LLUIColor map_track_color = LLUIColorTable::instance().getColor("MapTrackColor", LLColor4::white);
+ static LLUIColor map_track_disabled_color = LLUIColorTable::instance().getColor("MapTrackDisabledColor", LLColor4::white);
+ static LLUIColor map_frustum_color = LLUIColorTable::instance().getColor("MapFrustumColor", LLColor4::white);
+ static LLUIColor map_frustum_rotating_color = LLUIColorTable::instance().getColor("MapFrustumRotatingColor", LLColor4::white);
if (mObjectImagep.isNull())
{
@@ -664,7 +667,7 @@ void LLNetMap::createObjectImage()
mObjectRawImagep = new LLImageRaw(img_size, img_size, 4);
U8* data = mObjectRawImagep->getData();
memset( data, 0, img_size * img_size * 4 );
- mObjectImagep = new LLImageGL( mObjectRawImagep, FALSE);
+ mObjectImagep = LLViewerTextureManager::getLocalTexture( mObjectRawImagep.get(), FALSE);
setScale(mScale);
}
mUpdateNow = TRUE;
diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h
index cebc4af165..a673ea3f57 100644
--- a/indra/newview/llnetmap.h
+++ b/indra/newview/llnetmap.h
@@ -39,11 +39,11 @@
#include "v3dmath.h"
#include "v4color.h"
#include "llimage.h"
-#include "llimagegl.h"
class LLColor4U;
class LLCoordGL;
class LLTextBox;
+class LLViewerTexture ;
class LLNetMap : public LLUICtrl
{
@@ -106,7 +106,7 @@ private:
BOOL mUpdateNow;
LLVector3d mObjectImageCenterGlobal;
LLPointer<LLImageRaw> mObjectRawImagep;
- LLPointer<LLImageGL> mObjectImagep;
+ LLPointer<LLViewerTexture> mObjectImagep;
LLUUID mClosestAgentToCursor;
LLUUID mClosestAgentAtLastRightClick;
diff --git a/indra/newview/llnotificationalerthandler.cpp b/indra/newview/llnotificationalerthandler.cpp
new file mode 100644
index 0000000000..06826998bf
--- /dev/null
+++ b/indra/newview/llnotificationalerthandler.cpp
@@ -0,0 +1,116 @@
+/**
+ * @file llnotificationalerthandler.cpp
+ * @brief Notification Handler Class for Alert Notifications
+ *
+ * $LicenseInfo:firstyear=2000&license=viewergpl$
+ *
+ * Copyright (c) 2000-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h" // must be first include
+
+#include "llnotificationhandler.h"
+#include "lltoastnotifypanel.h"
+#include "llbottomtray.h"
+#include "llviewercontrol.h"
+
+#include "lltoastalertpanel.h"
+
+using namespace LLNotificationsUI;
+
+//--------------------------------------------------------------------------
+LLAlertHandler::LLAlertHandler(e_notification_type type, const LLSD& id) : mIsModal(false)
+{
+ mType = type;
+
+ LLBottomTray* tray = LLBottomTray::getInstance();
+ LLChannelManager::Params p;
+ p.id = LLUUID(ALERT_CHANNEL_ID);
+ p.channel_right_bound = tray->getRect().getWidth() / 2;
+ p.channel_width = 0;
+ p.align = NA_CENTRE;
+
+ // Getting a Channel for our notifications
+ mChannel = LLChannelManager::getInstance()->createChannel(p);
+ mChannel->setFollows(FOLLOWS_BOTTOM | FOLLOWS_TOP);
+}
+
+//--------------------------------------------------------------------------
+LLAlertHandler::~LLAlertHandler()
+{
+}
+
+//--------------------------------------------------------------------------
+void LLAlertHandler::processNotification(const LLSD& notify)
+{
+ LLToast* toast = NULL;
+
+ LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID());
+
+ if (notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "load")
+ {
+ LLToastAlertPanel* alert_dialog = new LLToastAlertPanel(notification, mIsModal);
+
+ toast = mChannel->addToast(notification->getID(), (LLToastPanel*)alert_dialog);
+ if(!toast)
+ return;
+ toast->setHideButtonEnabled(false);
+ toast->setOnToastDestroyCallback((boost::bind(&LLAlertHandler::onToastDestroy, this, toast)));
+ toast->setCanFade(false);
+ toast->setModal(mIsModal);
+ }
+ else if (notify["sigtype"].asString() == "change")
+ {
+ LLToastAlertPanel* alert_dialog = new LLToastAlertPanel(notification, mIsModal);
+ mChannel->modifyToastByNotificationID(notification->getID(), (LLToastPanel*)alert_dialog);
+ }
+ else
+ {
+ mChannel->killToastByNotificationID(notification->getID());
+ }
+}
+
+//--------------------------------------------------------------------------
+
+void LLAlertHandler::onToastDestroy(LLToast* toast)
+{
+ toast->close();
+}
+
+//--------------------------------------------------------------------------
+void LLAlertHandler::onChicletClick(void)
+{
+}
+
+//--------------------------------------------------------------------------
+void LLAlertHandler::onChicletClose(void)
+{
+}
+
+//--------------------------------------------------------------------------
+
+
diff --git a/indra/newview/llnotificationgrouphandler.cpp b/indra/newview/llnotificationgrouphandler.cpp
new file mode 100644
index 0000000000..ad09f43c10
--- /dev/null
+++ b/indra/newview/llnotificationgrouphandler.cpp
@@ -0,0 +1,117 @@
+/**
+ * @file llnotificationgrouphandler.cpp
+ * @brief Notification Handler Class for Group Notifications
+ *
+ * $LicenseInfo:firstyear=2000&license=viewergpl$
+ *
+ * Copyright (c) 2000-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h" // must be first include
+
+#include "llnotificationhandler.h"
+#include "lltoastgroupnotifypanel.h"
+#include "llagent.h"
+#include "llbottomtray.h"
+#include "llviewercontrol.h"
+
+using namespace LLNotificationsUI;
+
+//--------------------------------------------------------------------------
+LLGroupHandler::LLGroupHandler(e_notification_type type, const LLSD& id)
+{
+ mType = type;
+
+ // getting a Chiclet and creating params for a channel
+ LLBottomTray* tray = LLBottomTray::getInstance();
+ mChiclet = tray->getSysWell();
+ LLChannelManager::Params p;
+ p.chiclet = mChiclet;
+ p.channel_right_bound = tray->getRect().mRight - gSavedSettings.getS32("NotificationChannelRightMargin");
+ p.channel_width = gSavedSettings.getS32("NotifyBoxWidth");
+
+ // Getting a Channel for our notifications
+ mChannel = LLChannelManager::getInstance()->createChannel(p);
+}
+
+//--------------------------------------------------------------------------
+LLGroupHandler::~LLGroupHandler()
+{
+}
+
+//--------------------------------------------------------------------------
+void LLGroupHandler::processNotification(const LLSD& notify)
+{
+ LLToast* toast = NULL;
+
+ LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID());
+ if(notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "change")
+ {
+ LLPanel* notify_box = new LLToastGroupNotifyPanel(notification);
+ toast = mChannel->addToast(notification->getID(), notify_box);
+ if(!toast)
+ return;
+ toast->setAndStartTimer(gSavedSettings.getS32("NotificationToastTime"));
+ toast->setOnToastDestroyCallback((boost::bind(&LLGroupHandler::onToastDestroy, this, toast)));
+ mChiclet->setCounter(mChiclet->getCounter() + 1);
+ }
+ else if (notify["sigtype"].asString() == "delete")
+ {
+ mChannel->killToastByNotificationID(notification->getID());
+ }
+}
+
+//--------------------------------------------------------------------------
+void LLGroupHandler::onToastDestroy(LLToast* toast)
+{
+ mChiclet->setCounter(mChiclet->getCounter() - 1);
+ toast->close();
+}
+
+//--------------------------------------------------------------------------
+void LLGroupHandler::onChicletClick(void)
+{
+}
+
+//--------------------------------------------------------------------------
+void LLGroupHandler::onChicletClose(void)
+{
+}
+
+//--------------------------------------------------------------------------
+
+
+//--------------------------------------------------------------------------
+
+
+//--------------------------------------------------------------------------
+
+
+//--------------------------------------------------------------------------
+
+
+//--------------------------------------------------------------------------
+
diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h
new file mode 100644
index 0000000000..9037fc82ab
--- /dev/null
+++ b/indra/newview/llnotificationhandler.h
@@ -0,0 +1,180 @@
+/**
+ * @file llnotificationhandler.h
+ * @brief Here are implemented Notification Handling Classes.
+ *
+ * $LicenseInfo:firstyear=2003&license=viewergpl$
+ *
+ * Copyright (c) 2003-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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_LLNOTIFICATIONHANDLER_H
+#define LL_LLNOTIFICATIONHANDLER_H
+
+
+#include "llwindow.h"
+
+#include "llnotifications.h"
+#include "llchannelmanager.h"
+#include "llchat.h"
+
+namespace LLNotificationsUI
+{
+// ID for channel that displays Alert Notifications
+#define ALERT_CHANNEL_ID "F3E07BC8-A973-476D-8C7F-F3B7293975D1"
+
+// ENotificationType enumerates all possible types of notifications that could be met
+//
+typedef enum e_notification_type
+{
+ NT_NOTIFY,
+ NT_NOTIFYTIP,
+ NT_GROUPNOTIFY,
+ NT_IMCHAT,
+ NT_GROUPCHAT,
+ NT_NEARBYCHAT,
+ NT_ALERT,
+ NT_ALERTMODAL
+} ENotificationType;
+
+/**
+ * Handler of notification events.
+ * This handler manages events related to toasts and chicklets. This is base class
+ * for chat and system notification handlers.
+ */
+
+// LLEventHandler is a base class that specifies a common interface for all
+// notification handlers. It states, that every handler must react on the follofing
+// events:
+// - destroying of a toast;
+// - clicking on a correspondet chiclet;
+// - closing of a correspondent chiclet.
+// Also every handler must have the following attributes:
+// - type of the notification that this handler is responsible to;
+// - pointer to a correspondent chiclet;
+// - pointer to a correspondent screen channel, in which all toasts of the handled notification's
+// type should be displayed
+//
+class LLEventHandler
+{
+public:
+ virtual ~LLEventHandler() {};
+
+ virtual void onToastDestroy(LLToast* toast)=0;
+ virtual void onChicletClick(void)=0;
+ virtual void onChicletClose(void)=0;
+
+ LLScreenChannel* mChannel;
+ LLChiclet* mChiclet;
+ e_notification_type mType;
+};
+
+// LLSysHandler and LLChatHandler are more specific base classes
+// that divide all notification handlers on to groups:
+// - handlers for different system notifications (script dialogs, tips, group notices and alerts);
+// - handlers for different messaging notifications (nearby chat, IM chat, group chat etc.)
+/**
+ * Handler for system notifications.
+ */
+class LLSysHandler : public LLEventHandler
+{
+public:
+ virtual ~LLSysHandler() {};
+
+ virtual void processNotification(const LLSD& notify)=0;
+};
+
+/**
+ * Handler for chat message notifications.
+ */
+class LLChatHandler : public LLEventHandler
+{
+public:
+ virtual ~LLChatHandler() {};
+
+ virtual void processChat(const LLChat& chat_msg)=0;
+};
+
+/**
+ * Handler for system informational notices.
+ * It manages life time of tip and script notices.
+ */
+class LLInfoHandler : public LLSysHandler
+{
+public:
+ LLInfoHandler(e_notification_type type, const LLSD& id);
+ virtual ~LLInfoHandler();
+
+
+ virtual void processNotification(const LLSD& notify);
+ virtual void onToastDestroy(LLToast* toast);
+ virtual void onChicletClick(void);
+ virtual void onChicletClose(void);
+
+protected:
+};
+
+
+/**
+ * Handler for group system notices.
+ */
+class LLGroupHandler : public LLSysHandler
+{
+public:
+ LLGroupHandler(e_notification_type type, const LLSD& id);
+ virtual ~LLGroupHandler();
+
+
+ virtual void processNotification(const LLSD& notify);
+ virtual void onToastDestroy(LLToast* toast);
+ virtual void onChicletClick(void);
+ virtual void onChicletClose(void);
+
+protected:
+};
+
+/**
+ * Handler for alert system notices.
+ */
+class LLAlertHandler : public LLSysHandler
+{
+public:
+ LLAlertHandler(e_notification_type type, const LLSD& id);
+ virtual ~LLAlertHandler();
+
+ void setAlertMode(bool is_modal) { mIsModal = is_modal; }
+
+ virtual void processNotification(const LLSD& notify);
+ virtual void onToastDestroy(LLToast* toast);
+ virtual void onChicletClick(void);
+ virtual void onChicletClose(void);
+
+protected:
+ bool mIsModal;
+};
+
+}
+#endif
+
diff --git a/indra/newview/llnotificationmanager.cpp b/indra/newview/llnotificationmanager.cpp
new file mode 100644
index 0000000000..3eda0d0d14
--- /dev/null
+++ b/indra/newview/llnotificationmanager.cpp
@@ -0,0 +1,127 @@
+/**
+ * @file llnotificationmanager.cpp
+ * @brief Class implements a brige between the old and a new notification sistems
+ *
+ * $LicenseInfo:firstyear=2000&license=viewergpl$
+ *
+ * Copyright (c) 2000-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h" // must be first include
+
+
+#include "llnotificationmanager.h"
+#include "llnearbychathandler.h"
+
+#include "boost/bind.hpp"
+
+using namespace LLNotificationsUI;
+
+//--------------------------------------------------------------------------
+LLNotificationManager::LLNotificationManager()
+{
+ mNotifyHandlers.clear();
+ init();
+}
+
+//--------------------------------------------------------------------------
+LLNotificationManager::~LLNotificationManager()
+{
+}
+
+//--------------------------------------------------------------------------
+void LLNotificationManager::init()
+{
+ LLNotificationChannel::buildChannel("Notifications", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "notify"));
+ LLNotificationChannel::buildChannel("NotificationTips", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "notifytip"));
+ LLNotificationChannel::buildChannel("Group Notifications", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "groupnotify"));
+ LLNotificationChannel::buildChannel("Alerts", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "alert"));
+ LLNotificationChannel::buildChannel("AlertModal", "Visible", LLNotificationFilters::filterBy<std::string>(&LLNotification::getType, "alertmodal"));
+
+ LLNotifications::instance().getChannel("Notifications")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1));
+ LLNotifications::instance().getChannel("NotificationTips")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1));
+ LLNotifications::instance().getChannel("Group Notifications")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1));
+ LLNotifications::instance().getChannel("Alerts")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1));
+ LLNotifications::instance().getChannel("AlertModal")->connectChanged(boost::bind(&LLNotificationManager::onNotification, this, _1));
+
+ mNotifyHandlers["notify"] = boost::shared_ptr<LLEventHandler>(new LLInfoHandler(NT_NOTIFY, LLSD()));
+ mNotifyHandlers["notifytip"] = mNotifyHandlers["notify"];
+ mNotifyHandlers["groupnotify"] = boost::shared_ptr<LLEventHandler>(new LLGroupHandler(NT_GROUPNOTIFY, LLSD()));
+ mNotifyHandlers["alert"] = boost::shared_ptr<LLEventHandler>(new LLAlertHandler(NT_ALERT, LLSD()));
+ mNotifyHandlers["alertmodal"] = mNotifyHandlers["alert"];
+
+ mNotifyHandlers["nearbychat"] = boost::shared_ptr<LLEventHandler>(new LLNearbyChatHandler(NT_NEARBYCHAT, LLSD()));
+}
+
+//--------------------------------------------------------------------------
+bool LLNotificationManager::onNotification(const LLSD& notify)
+{
+ LLSysHandler* handle = NULL;
+
+ LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID());
+
+ if (!notification)
+ return false;
+
+ std::string notification_type = notification->getType();
+ handle = dynamic_cast<LLSysHandler*>(mNotifyHandlers[notification_type].get());
+
+ if(!handle)
+ return false;
+
+ if( notification_type == "alertmodal" )
+ dynamic_cast<LLAlertHandler*>(handle)->setAlertMode(true);
+
+ handle->processNotification(notify);
+
+ return true;
+}
+
+//--------------------------------------------------------------------------
+void LLNotificationManager::onChat(const LLChat& msg,ENotificationType type)
+{
+ switch(type)
+ {
+ case NT_NEARBYCHAT:
+ {
+ LLNearbyChatHandler* handle = dynamic_cast<LLNearbyChatHandler*>(mNotifyHandlers["nearbychat"].get());
+
+ if(handle)
+ handle->processChat(msg);
+ }
+ break;
+ default: //no need to handle all enum types
+ break;
+ }
+}
+
+//--------------------------------------------------------------------------
+
+
+
+
diff --git a/indra/newview/llnotificationmanager.h b/indra/newview/llnotificationmanager.h
new file mode 100644
index 0000000000..838a00ee11
--- /dev/null
+++ b/indra/newview/llnotificationmanager.h
@@ -0,0 +1,79 @@
+// Notification Manager Class
+/**
+ * @file llnotificationmanager.h
+ * @brief Class implements a brige between the old and a new notification sistems
+ *
+ * $LicenseInfo:firstyear=2003&license=viewergpl$
+ *
+ * Copyright (c) 2003-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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_LLNOTIFICATIONMANAGER_H
+#define LL_LLNOTIFICATIONMANAGER_H
+
+#include "lluictrl.h"
+#include "llnotificationhandler.h"
+
+
+#include <map>
+#include <string>
+
+#include <boost/shared_ptr.hpp>
+
+namespace LLNotificationsUI {
+
+class LLToast;
+
+/**
+ * Responsible for registering notification handlers.
+ */
+class LLNotificationManager : public LLUICtrl, public LLSingleton<LLNotificationManager>
+{
+ typedef std::pair<std::string, LLEventHandler*> eventhandlers;
+public:
+ LLNotificationManager();
+ virtual ~LLNotificationManager();
+
+ //TODO: make private
+ // this method initialize handlers' map for different types of notifications
+ void init(void);
+ //TODO: combine processing and storage (*)
+
+ // this method reacts on system notifications and calls an appropriate handler
+ bool onNotification(const LLSD& notification);
+
+ // this method reacts on chat notifications and calls an appropriate handler
+ void onChat(const LLChat& msg,ENotificationType type);
+
+private:
+ //TODO (*)
+ std::map<std::string, boost::shared_ptr<LLEventHandler> > mNotifyHandlers;
+ std::map<std::string, LLChatHandler*> mChatHandlers;
+};
+
+}
+#endif
+
diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp
index ff26707a56..955f50caf5 100644
--- a/indra/newview/lloutputmonitorctrl.cpp
+++ b/indra/newview/lloutputmonitorctrl.cpp
@@ -39,41 +39,63 @@
// viewer includes
#include "llvoiceclient.h"
-static LLDefaultWidgetRegistry::Register<LLOutputMonitorCtrl> r("output_monitor");
+// default options set in output_monitor.xml
+static LLDefaultChildRegistry::Register<LLOutputMonitorCtrl> r("output_monitor");
// The defaults will be initialized in the constructor.
-LLColor4 LLOutputMonitorCtrl::sColorMuted;
-LLColor4 LLOutputMonitorCtrl::sColorOverdriven;
-LLColor4 LLOutputMonitorCtrl::sColorNormal;
+//LLColor4 LLOutputMonitorCtrl::sColorMuted;
+//LLColor4 LLOutputMonitorCtrl::sColorOverdriven;
+//LLColor4 LLOutputMonitorCtrl::sColorNormal;
LLColor4 LLOutputMonitorCtrl::sColorBound;
-S32 LLOutputMonitorCtrl::sRectsNumber = 0;
-F32 LLOutputMonitorCtrl::sRectWidthRatio = 0.f;
-F32 LLOutputMonitorCtrl::sRectHeightRatio = 0.f;
+//S32 LLOutputMonitorCtrl::sRectsNumber = 0;
+//F32 LLOutputMonitorCtrl::sRectWidthRatio = 0.f;
+//F32 LLOutputMonitorCtrl::sRectHeightRatio = 0.f;
+
+LLOutputMonitorCtrl::Params::Params()
+: draw_border("draw_border"),
+ image_mute("image_mute"),
+ image_off("image_off"),
+ image_on("image_on"),
+ image_level_1("image_level_1"),
+ image_level_2("image_level_2"),
+ image_level_3("image_level_3")
+{
+ draw_border = true;
+ name = "output_monitor";
+ follows.flags(FOLLOWS_LEFT|FOLLOWS_TOP);
+ mouse_opaque = false;
+};
LLOutputMonitorCtrl::LLOutputMonitorCtrl(const LLOutputMonitorCtrl::Params& p)
: LLView(p),
mPower(0),
- mIsMuted(true)
+ mIsMuted(true),
+ mImageMute(p.image_mute),
+ mImageOff(p.image_off),
+ mImageOn(p.image_on),
+ mImageLevel1(p.image_level_1),
+ mImageLevel2(p.image_level_2),
+ mImageLevel3(p.image_level_3)
{
- static LLUICachedControl<LLColor4> output_monitor_muted_color("OutputMonitorMutedColor", LLColor4::orange);
- static LLUICachedControl<LLColor4> output_monitor_overdriven_color("OutputMonitorOverdrivenColor", LLColor4::red);
- static LLUICachedControl<LLColor4> output_monitor_normal_color("OutputMonitorNotmalColor", LLColor4::green);
- static LLUICachedControl<LLColor4> output_monitor_bound_color("OutputMonitorBoundColor", LLColor4::white);
- static LLUICachedControl<S32> output_monitor_rects_number("OutputMonitorRectanglesNumber", 20);
- static LLUICachedControl<F32> output_monitor_rect_width_ratio("OutputMonitorRectangleWidthRatio", 0.5f);
- static LLUICachedControl<F32> output_monitor_rect_height_ratio("OutputMonitorRectangleHeightRatio", 0.8f);
+ //static LLUIColor output_monitor_muted_color = LLUIColorTable::instance().getColor("OutputMonitorMutedColor", LLColor4::orange);
+ //static LLUIColor output_monitor_overdriven_color = LLUIColorTable::instance().getColor("OutputMonitorOverdrivenColor", LLColor4::red);
+ //static LLUIColor output_monitor_normal_color = LLUIColorTable::instance().getColor("OutputMonitorNotmalColor", LLColor4::green);
+ static LLUIColor output_monitor_bound_color = LLUIColorTable::instance().getColor("OutputMonitorBoundColor", LLColor4::white);
+ //static LLUICachedControl<S32> output_monitor_rects_number("OutputMonitorRectanglesNumber", 20);
+ //static LLUICachedControl<F32> output_monitor_rect_width_ratio("OutputMonitorRectangleWidthRatio", 0.5f);
+ //static LLUICachedControl<F32> output_monitor_rect_height_ratio("OutputMonitorRectangleHeightRatio", 0.8f);
// IAN BUG compare to existing pattern where these are members - some will change per-widget and need to be anyway
// sent feedback to PE
// *TODO: it looks suboptimal to load the defaults every time an output monitor is constructed.
- sColorMuted = output_monitor_muted_color;
- sColorOverdriven = output_monitor_overdriven_color;
- sColorNormal = output_monitor_normal_color;
+ //sColorMuted = output_monitor_muted_color;
+ //sColorOverdriven = output_monitor_overdriven_color;
+ //sColorNormal = output_monitor_normal_color;
sColorBound = output_monitor_bound_color;
- sRectsNumber = output_monitor_rects_number;
- sRectWidthRatio = output_monitor_rect_width_ratio;
- sRectHeightRatio = output_monitor_rect_height_ratio;
+ //sRectsNumber = output_monitor_rects_number;
+ //sRectWidthRatio = output_monitor_rect_width_ratio;
+ //sRectHeightRatio = output_monitor_rect_height_ratio;
mBorder = p.draw_border;
}
@@ -89,6 +111,48 @@ void LLOutputMonitorCtrl::setPower(F32 val)
void LLOutputMonitorCtrl::draw()
{
+ // Copied from llmediaremotectrl.cpp
+ // *TODO: Give the LLOutputMonitorCtrl an agent-id to monitor, then
+ // call directly into gVoiceClient to ask if that agent-id is muted, is
+ // speaking, and what power. This avoids duplicating data, which can get
+ // out of sync.
+ LLPointer<LLUIImage> icon;
+ if (mIsMuted)
+ {
+ icon = mImageMute;
+ }
+ else if (mPower == 0.f)
+ {
+ icon = mImageOff;
+ }
+ else if (mPower < LLVoiceClient::OVERDRIVEN_POWER_LEVEL)
+ {
+ S32 icon_image_idx = llmin(2, llfloor((mPower / LLVoiceClient::OVERDRIVEN_POWER_LEVEL) * 3.f));
+ switch(icon_image_idx)
+ {
+ default:
+ case 0:
+ icon = mImageOn;
+ break;
+ case 1:
+ icon = mImageLevel1;
+ break;
+ case 2:
+ icon = mImageLevel2;
+ break;
+ }
+ }
+ else
+ {
+ // overdriven
+ icon = mImageLevel3;
+ }
+
+ if (icon)
+ {
+ icon->draw(0, 0);
+ }
+
//
// Fill the monitor with a bunch of small rectangles.
// The rectangles will be filled with gradient color,
@@ -98,41 +162,41 @@ void LLOutputMonitorCtrl::draw()
//
const int monh = getRect().getHeight();
const int monw = getRect().getWidth();
- int maxrects = sRectsNumber;
- const int period = llmax(1, monw / maxrects, 0, 0); // "1" - min value for the period
- const int rectw = llmax(1, llfloor(period * sRectWidthRatio), 0, 0); // "1" - min value for the rect's width
- const int recth = llfloor(monh * sRectHeightRatio);
+ //int maxrects = sRectsNumber;
+ //const int period = llmax(1, monw / maxrects, 0, 0); // "1" - min value for the period
+ //const int rectw = llmax(1, llfloor(period * sRectWidthRatio), 0, 0); // "1" - min value for the rect's width
+ //const int recth = llfloor(monh * sRectHeightRatio);
- if(period == 1 && rectw == 1) //if we have so small control, then "maxrects = monitor's_width - 2*monitor_border's_width
- maxrects = monw-2;
+ //if(period == 1 && rectw == 1) //if we have so small control, then "maxrects = monitor's_width - 2*monitor_border's_width
+ // maxrects = monw-2;
- const int nrects = mIsMuted ? maxrects : llfloor(mPower * maxrects); // how many rects to draw?
- const int rectbtm = (monh - recth) / 2;
- const int recttop = rectbtm + recth;
-
- LLColor4 rect_color;
-
- for (int i=1, xpos = 0; i <= nrects; i++)
- {
- // Calculate color to use for the current rectangle.
- if (mIsMuted)
- {
- rect_color = sColorMuted;
- }
- else
- {
- F32 frac = (mPower * i/nrects) / LLVoiceClient::OVERDRIVEN_POWER_LEVEL;
- // Use overdriven color if the power exceeds overdriven level.
- if (frac > 1.0f)
- frac = 1.0f;
- rect_color = lerp(sColorNormal, sColorOverdriven, frac);
- }
+ //const int nrects = mIsMuted ? maxrects : llfloor(mPower * maxrects); // how many rects to draw?
+ //const int rectbtm = (monh - recth) / 2;
+ //const int recttop = rectbtm + recth;
+ //
+ //LLColor4 rect_color;
+ //
+ //for (int i=1, xpos = 0; i <= nrects; i++)
+ //{
+ // // Calculate color to use for the current rectangle.
+ // if (mIsMuted)
+ // {
+ // rect_color = sColorMuted;
+ // }
+ // else
+ // {
+ // F32 frac = (mPower * i/nrects) / LLVoiceClient::OVERDRIVEN_POWER_LEVEL;
+ // // Use overdriven color if the power exceeds overdriven level.
+ // if (frac > 1.0f)
+ // frac = 1.0f;
+ // rect_color = lerp(sColorNormal, sColorOverdriven, frac);
+ // }
+
+ // // Draw rectangle filled with the color.
+ // gl_rect_2d(xpos, recttop, xpos+rectw, rectbtm, rect_color, TRUE);
+ // xpos += period;
+ //}
- // Draw rectangle filled with the color.
- gl_rect_2d(xpos, recttop, xpos+rectw, rectbtm, rect_color, TRUE);
- xpos += period;
- }
-
//
// Draw bounding box.
//
diff --git a/indra/newview/lloutputmonitorctrl.h b/indra/newview/lloutputmonitorctrl.h
index 881ad0f010..e391c14e40 100644
--- a/indra/newview/lloutputmonitorctrl.h
+++ b/indra/newview/lloutputmonitorctrl.h
@@ -50,14 +50,14 @@ public:
struct Params : public LLInitParam::Block<Params, LLView::Params>
{
Optional<bool> draw_border;
+ Mandatory<LLUIImage*> image_mute,
+ image_off,
+ image_on,
+ image_level_1,
+ image_level_2,
+ image_level_3;
- Params()
- {
- draw_border = true;
- name = "output_monitor";
- follows.flags(FOLLOWS_LEFT|FOLLOWS_TOP);
- mouse_opaque = false;
- };
+ Params();
};
protected:
bool mBorder;
@@ -77,16 +77,22 @@ public:
void setIsMuted(bool val) { mIsMuted = val; }
private:
- static LLColor4 sColorMuted;
- static LLColor4 sColorNormal;
- static LLColor4 sColorOverdriven;
+ //static LLColor4 sColorMuted;
+ //static LLColor4 sColorNormal;
+ //static LLColor4 sColorOverdriven;
static LLColor4 sColorBound;
- static S32 sRectsNumber;
- static F32 sRectWidthRatio;
- static F32 sRectHeightRatio;
+ //static S32 sRectsNumber;
+ //static F32 sRectWidthRatio;
+ //static F32 sRectHeightRatio;
F32 mPower;
bool mIsMuted;
+ LLPointer<LLUIImage> mImageMute;
+ LLPointer<LLUIImage> mImageOff;
+ LLPointer<LLUIImage> mImageOn;
+ LLPointer<LLUIImage> mImageLevel1;
+ LLPointer<LLUIImage> mImageLevel2;
+ LLPointer<LLUIImage> mImageLevel3;
};
#endif
diff --git a/indra/newview/lloverlaybar.cpp b/indra/newview/lloverlaybar.cpp
index 2ccd729e0a..a24d1ed54a 100644
--- a/indra/newview/lloverlaybar.cpp
+++ b/indra/newview/lloverlaybar.cpp
@@ -41,7 +41,6 @@
#include "llrender.h"
#include "llagent.h"
#include "llbutton.h"
-#include "llchatbar.h"
#include "llfocusmgr.h"
#include "llimview.h"
#include "llmediaremotectrl.h"
@@ -49,7 +48,7 @@
#include "lltextbox.h"
#include "llui.h"
#include "llviewercontrol.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerjoystick.h"
#include "llviewermedia.h"
#include "llviewermenu.h" // handle_reset_view()
@@ -92,12 +91,6 @@ void* LLOverlayBar::createVoiceRemote(void* userdata)
return self->mVoiceRemote;
}
-void* LLOverlayBar::createChatBar(void* userdata)
-{
- gChatBar = new LLChatBar();
- return gChatBar;
-}
-
LLOverlayBar::LLOverlayBar()
: LLPanel(),
mMediaRemote(NULL),
@@ -111,7 +104,6 @@ LLOverlayBar::LLOverlayBar()
mFactoryMap["media_remote"] = LLCallbackMap(LLOverlayBar::createMediaRemote, this);
mFactoryMap["voice_remote"] = LLCallbackMap(LLOverlayBar::createVoiceRemote, this);
- mFactoryMap["chat_bar"] = LLCallbackMap(LLOverlayBar::createChatBar, this);
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_overlaybar.xml");
}
diff --git a/indra/newview/lloverlaybar.h b/indra/newview/lloverlaybar.h
index f0cf480458..ffdbd96f60 100644
--- a/indra/newview/lloverlaybar.h
+++ b/indra/newview/lloverlaybar.h
@@ -85,7 +85,6 @@ public:
protected:
static void* createMediaRemote(void* userdata);
static void* createVoiceRemote(void* userdata);
- static void* createChatBar(void* userdata);
void enableMediaButtons();
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index d7929cc5c2..f57489934a 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -38,13 +38,13 @@
#include "llavatarconstants.h"
#include "llcallingcard.h"
#include "llcombobox.h"
-#include "llfriendactions.h"
+#include "llavataractions.h"
#include "llimview.h"
#include "lltexteditor.h"
#include "lltexturectrl.h"
#include "lltooldraganddrop.h"
-#include "llviewermenu.h" // *FIX: for is_agent_friend()
#include "llscrollcontainer.h"
+#include "llweb.h"
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLDropTarget
@@ -61,6 +61,7 @@ public:
{
Optional<LLUUID> agent_id;
Params()
+ : agent_id("agent_id")
{
mouse_opaque(false);
follows.flags(FOLLOWS_ALL);
@@ -114,7 +115,7 @@ BOOL LLDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
return FALSE;
}
-static LLDefaultWidgetRegistry::Register<LLDropTarget> r("drop_target");
+static LLDefaultChildRegistry::Register<LLDropTarget> r("drop_target");
//////////////////////////////////////////////////////////////////////////
//-----------------------------------------------------------------------------
@@ -139,7 +140,6 @@ LLPanelProfileTab::LLPanelProfileTab(const Params& params )
LLPanelProfileTab::~LLPanelProfileTab()
{
- // *TODO Vadim: use notNull() instead. (there are several similar cases below)
if(mAvatarId.notNull())
{
LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(),this);
@@ -165,9 +165,15 @@ void LLPanelProfileTab::setProfileType()
mProfileType = (gAgentID == mAvatarId) ? PT_OWN : PT_OTHER;
}
+void LLPanelProfileTab::onOpen(const LLSD& key)
+{
+ onActivate(key);
+}
+
void LLPanelProfileTab::onActivate(const LLUUID& id)
{
setAvatarId(id);
+ scrollToTop();
updateData();
}
@@ -177,7 +183,7 @@ void LLPanelProfileTab::onAddFriend()
{
std::string name;
gCacheName->getFullName(getAvatarId(),name);
- LLFriendActions::requestFriendshipDialog(getAvatarId(), name);
+ LLAvatarActions::requestFriendshipDialog(getAvatarId(), name);
}
}
@@ -195,7 +201,16 @@ void LLPanelProfileTab::onTeleport()
{
if(getAvatarId().notNull())
{
- LLFriendActions::offerTeleport(getAvatarId());
+ LLAvatarActions::offerTeleport(getAvatarId());
+ }
+}
+
+void LLPanelProfileTab::scrollToTop()
+{
+ LLScrollContainer* scrollContainer = getChild<LLScrollContainer>("profile_scroll", FALSE, FALSE);
+ if (NULL != scrollContainer)
+ {
+ scrollContainer->goToTop();
}
}
@@ -260,23 +275,29 @@ void LLPanelAvatarProfile::processProperties(void* data, EAvatarProcessorType ty
if (!isEditMode())
{
setCaptionText(avatar_data);
- }
- childSetValue("show_in_search_checkbox", (BOOL)(avatar_data->flags & AVATAR_ALLOW_PUBLISH));
-
- if (avatar_data->partner_id.notNull())
- {
- std::string first, last;
- BOOL found = gCacheName->getName(avatar_data->partner_id, first, last);
- if (found)
+ if (avatar_data->partner_id.notNull())
{
- childSetTextArg("partner_text", "[FIRST]", first);
- childSetTextArg("partner_text", "[LAST]", last);
+ std::string first, last;
+ BOOL found = gCacheName->getName(avatar_data->partner_id, first, last);
+ if (found)
+ {
+ childSetTextArg("partner_text", "[FIRST]", first);
+ childSetTextArg("partner_text", "[LAST]", last);
+ }
}
+ else
+ {
+ childSetTextArg("partner_text", "[FIRST]", getString("no_partner_text"));
+ }
+ }
+ else
+ {
+ childSetValue("show_in_search_checkbox", (BOOL)(avatar_data->flags & AVATAR_ALLOW_PUBLISH));
}
- //http://secondlife.com/partner
+
bool online = avatar_data->flags & AVATAR_ONLINE;
- if(is_agent_friend(avatar_data->avatar_id))
+ if(LLAvatarActions::isFriend(avatar_data->avatar_id))
{
// Online status NO could be because they are hidden
// If they are a friend, we may know the truth!
@@ -306,6 +327,12 @@ void LLPanelAvatarProfile::processProperties(void* data, EAvatarProcessorType ty
}
mStatusCombobox->setValue(status);
}
+ if (isOwnProfile())
+ {
+ std::string full_name;
+ gCacheName->getFullName(mAvatarId, full_name);
+ childSetValue("user_name", full_name);
+ }
}
else if(APT_GROUPS == type)
{
@@ -313,12 +340,17 @@ void LLPanelAvatarProfile::processProperties(void* data, EAvatarProcessorType ty
if(avatar_groups)
{
std::string groups;
- LLAvatarGroups::group_list_t::const_iterator it = avatar_groups->group_list.begin();
- for(; avatar_groups->group_list.end() != it; ++it)
- {
+ if (!avatar_groups->group_list.empty()) {
+ LLAvatarGroups::group_list_t::const_iterator it = avatar_groups->group_list.begin();
LLAvatarGroups::LLGroupData group_data = *it;
- groups += group_data.group_name;
- groups += ", ";
+ groups+= group_data.group_name;
+ while (++it != avatar_groups->group_list.end())
+ {
+ group_data = *it;
+ groups += ", ";
+ groups += group_data.group_name;
+
+ }
}
childSetValue("sl_groups",groups);
}
@@ -438,6 +470,14 @@ void LLPanelAvatarProfile::onShareButtonClick()
mStatusMessage->setCommitCallback(boost::bind(&LLPanelAvatarProfile::onStatusMessageChanged, this));
}
+ if (!isEditMode())
+ {
+ childSetActionTextbox("homepage_edit", boost::bind(&LLPanelAvatarProfile::onHomepageTextboxClicked, this));
+ childSetActionTextbox("payment_update_link", boost::bind(&LLPanelAvatarProfile::onUpdateAccountTextboxClicked, this));
+ childSetActionTextbox("my_account_link", boost::bind(&LLPanelAvatarProfile::onMyAccountTextboxClicked, this));
+ childSetActionTextbox("partner_edit_link", boost::bind(&LLPanelAvatarProfile::onPartnerEditTextboxClicked, this));
+ }
+
childSetCommitCallback("add_friend",(boost::bind(&LLPanelAvatarProfile::onAddFriendButtonClick,this)),NULL);
childSetCommitCallback("im",(boost::bind(&LLPanelAvatarProfile::onIMButtonClick,this)),NULL);
childSetCommitCallback("call",(boost::bind(&LLPanelAvatarProfile::onCallButtonClick,this)),NULL);
@@ -460,22 +500,13 @@ void LLPanelAvatarProfile::onShareButtonClick()
return TRUE;
}
+
void LLPanelAvatarProfile::onOpen(const LLSD& key)
{
- setAvatarId(key);
- scrollToTop();
+ onActivate(key);
updateChildrenList();
- updateData();
}
-void LLPanelAvatarProfile::scrollToTop()
-{
- LLScrollContainer* scrollContainer = getChild<LLScrollContainer>("profile_scroll", FALSE, FALSE);
- if (NULL != scrollContainer)
- {
- scrollContainer->goToTop();
- }
-}
void LLPanelAvatarProfile::updateChildrenList()
{
@@ -486,29 +517,35 @@ void LLPanelAvatarProfile::updateChildrenList()
switch (mProfileType)
{
case PT_OWN:
- childSetVisible("status_panel",FALSE);
- childSetVisible("profile_buttons_panel",FALSE);
- childSetVisible("title_groups_text",FALSE);
- childSetVisible("sl_groups",FALSE);
+ childSetVisible("user_name", true);
+ childSetVisible("status_panel", false);
+ childSetVisible("profile_buttons_panel", false);
+ childSetVisible("title_groups_text", false);
+ childSetVisible("sl_groups", false);
mUpdated = true;
- childSetVisible("status_me_panel",TRUE);
- childSetVisible("profile_me_buttons_panel",TRUE);
+ childSetVisible("status_me_panel", true);
+ childSetVisible("profile_me_buttons_panel", true);
break;
case PT_OTHER:
- childSetVisible("status_me_panel",FALSE);
- childSetVisible("profile_me_buttons_panel",FALSE);
+ childSetVisible("user_name", false);
+ childSetVisible("status_me_panel", false);
+ childSetVisible("profile_me_buttons_panel", false);
- childSetVisible("status_panel",TRUE);
- childSetVisible("profile_buttons_panel",TRUE);
- childSetVisible("title_groups_text",TRUE);
- childSetVisible("sl_groups",TRUE);
+ childSetVisible("status_panel", true);
+ childSetVisible("profile_buttons_panel", true);
+ childSetVisible("title_groups_text", true);
+ childSetVisible("sl_groups", true);
// account actions
- childSetVisible("account_actions_panel", FALSE);
- childSetVisible("partner_edit_link", FALSE);
+ childSetVisible("account_actions_panel", false);
+ childSetVisible("partner_edit_link", false);
- mUpdated = true;
+ //hide for friends
+ childSetEnabled("add_friend", !LLAvatarActions::isFriend(getAvatarId()));
+
+ //need to update profile view on every activate
+ mUpdated = false;
break;
case PT_UNKNOWN: break;//do nothing
default:
@@ -546,6 +583,31 @@ void LLPanelAvatarProfile::onStatusMessageChanged()
updateData();
}
+//static
+void LLPanelAvatarProfile::onUrlTextboxClicked(std::string url)
+{
+ LLWeb::loadURL(url);
+}
+
+void LLPanelAvatarProfile::onHomepageTextboxClicked()
+{
+ onUrlTextboxClicked(childGetValue("homepage_edit").asString());
+}
+
+void LLPanelAvatarProfile::onUpdateAccountTextboxClicked()
+{
+ onUrlTextboxClicked(getString("payment_update_link_url"));
+}
+
+void LLPanelAvatarProfile::onMyAccountTextboxClicked()
+{
+ onUrlTextboxClicked(getString("my_account_link_url"));
+}
+
+void LLPanelAvatarProfile::onPartnerEditTextboxClicked()
+{
+ onUrlTextboxClicked(getString("partner_edit_link_url"));
+}
//-----------------------------------------------------------------------------
// LLPanelAvatarNotes()
@@ -664,3 +726,15 @@ void LLPanelAvatarNotes::processProperties(void* data, EAvatarProcessorType type
}
}
}
+
+void LLPanelAvatarNotes::onActivate(const LLUUID& id)
+{
+ LLPanelProfileTab::onActivate(id);
+ updateChildrenList();
+}
+
+void LLPanelAvatarNotes::updateChildrenList()
+{
+ //hide for friends
+ childSetEnabled("add_friend", !LLAvatarActions::isFriend(getAvatarId()));
+}
diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h
index f72eb1990d..2b0fbaf193 100644
--- a/indra/newview/llpanelavatar.h
+++ b/indra/newview/llpanelavatar.h
@@ -34,37 +34,10 @@
#define LL_LLPANELAVATAR_H
#include "llpanel.h"
-#include "v3dmath.h"
-#include "lluuid.h"
-#include "llwebbrowserctrl.h"
-
#include "llavatarpropertiesprocessor.h"
-class LLButton;
-class LLCheckBoxCtrl;
class LLComboBox;
-class LLDropTarget;
-class LLInventoryItem;
class LLLineEditor;
-class LLNameEditor;
-class LLPanelAvatar;
-class LLScrollListCtrl;
-class LLTabContainer;
-class LLTextBox;
-class LLTextEditor;
-class LLTextureCtrl;
-class LLUICtrl;
-class LLViewerImage;
-class LLViewerObject;
-class LLMessageSystem;
-class LLIconCtrl;
-class LLWebBrowserCtrl;
-class LLVector3d;
-class LLFloaterReg;
-
-class LLPanelMeProfile;
-class LLPanelPick;
-class LLAgent;
enum EOnlineStatus
{
@@ -87,7 +60,9 @@ public:
const LLUUID& getAvatarId(){return mAvatarId;}
virtual void updateData() = 0;
-
+
+ virtual void onOpen(const LLSD& key);
+
virtual void onActivate(const LLUUID& id);
typedef enum e_profile_type
@@ -109,6 +84,9 @@ protected:
virtual ~LLPanelProfileTab();
void setProfileType();
+private:
+ void scrollToTop();
+
protected:
e_profile_type mProfileType;
LLUUID mAvatarId;
@@ -133,17 +111,7 @@ public:
virtual void clearControls();
/*virtual*/ BOOL postBuild(void);
- void onOpen(const LLSD& key);
-
- void onAddFriendButtonClick();
-
- void onIMButtonClick();
-
- void onCallButtonClick();
-
- void onTeleportButtonClick();
-
- void onShareButtonClick();
+ /*virtual*/ void onOpen(const LLSD& key);
private:
bool isOwnProfile(){return PT_OWN == mProfileType;}
@@ -152,7 +120,18 @@ private:
void onStatusChanged();
void onStatusMessageChanged();
void setCaptionText(const LLAvatarData* avatar_data);
- void scrollToTop();
+
+ static void onUrlTextboxClicked(std::string url);
+ void onHomepageTextboxClicked();
+ void onUpdateAccountTextboxClicked();
+ void onMyAccountTextboxClicked();
+ void onPartnerEditTextboxClicked();
+
+ void onAddFriendButtonClick();
+ void onIMButtonClick();
+ void onCallButtonClick();
+ void onTeleportButtonClick();
+ void onShareButtonClick();
protected:
@@ -175,6 +154,8 @@ public:
static void* create(void* data);
+ void onActivate(const LLUUID& id);
+
BOOL postBuild(void);
void onCommitRights();
@@ -188,6 +169,8 @@ public:
void updateData();
protected:
+
+ void updateChildrenList();
};
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index c328bcb7f9..df687ffb30 100644
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -42,10 +42,12 @@
#include "lldispatcher.h"
#include "llfloaterreg.h"
#include "llparcel.h"
+#include "lltabcontainer.h"
#include "message.h"
#include "llagent.h"
#include "llalertdialog.h"
+#include "llavataractions.h"
#include "llbutton.h"
#include "llcheckboxctrl.h"
#include "llclassifiedflags.h"
@@ -53,7 +55,6 @@
#include "llcommandhandler.h" // for classified HTML detail page click tracking
#include "llviewercontrol.h"
#include "lllineeditor.h"
-#include "llfloateravatarinfo.h"
#include "llfloaterclassified.h"
#include "lltextbox.h"
#include "llcombobox.h"
@@ -931,12 +932,12 @@ bool LLPanelClassified::confirmPublish(const LLSD& notification, const LLSD& res
void LLPanelClassified::onClickTeleport(void* data)
{
LLPanelClassified* self = (LLPanelClassified*)data;
-
- if (!self->mPosGlobal.isExactlyZero())
+ LLFloaterWorldMap* worldmap_instance = LLFloaterWorldMap::getInstance();
+
+ if (!self->mPosGlobal.isExactlyZero()&&worldmap_instance)
{
- gAgent.teleportViaLocation(self->mPosGlobal);
- LLFloaterWorldMap::getInstance()->trackLocation(self->mPosGlobal);
-
+ gAgent.teleportViaLocation(self->mPosGlobal);
+ worldmap_instance->trackLocation(self->mPosGlobal);
self->sendClassifiedClickMessage("teleport");
}
}
@@ -946,9 +947,12 @@ void LLPanelClassified::onClickTeleport(void* data)
void LLPanelClassified::onClickMap(void* data)
{
LLPanelClassified* self = (LLPanelClassified*)data;
- LLFloaterWorldMap::getInstance()->trackLocation(self->mPosGlobal);
- LLFloaterReg::showInstance("world_map", "center");
-
+ LLFloaterWorldMap* worldmap_instance = LLFloaterWorldMap::getInstance();
+ if(worldmap_instance)
+ {
+ worldmap_instance->trackLocation(self->mPosGlobal);
+ LLFloaterReg::showInstance("world_map", "center");
+ }
self->sendClassifiedClickMessage("map");
}
@@ -956,7 +960,7 @@ void LLPanelClassified::onClickMap(void* data)
void LLPanelClassified::onClickProfile(void* data)
{
LLPanelClassified* self = (LLPanelClassified*)data;
- LLFloaterAvatarInfo::showFromDirectory(self->mCreatorID);
+ LLAvatarActions::showProfile(self->mCreatorID);
self->sendClassifiedClickMessage("profile");
}
diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp
index b7ec485872..5da646497b 100644
--- a/indra/newview/llpanelcontents.cpp
+++ b/indra/newview/llpanelcontents.cpp
@@ -193,5 +193,5 @@ void LLPanelContents::onClickNewScript(void *userdata)
void LLPanelContents::onClickPermissions(void *userdata)
{
LLPanelContents* self = (LLPanelContents*)userdata;
- gFloaterView->getParentFloater(self)->addDependentFloater(LLFloaterBulkPermission::showInstance());
+ gFloaterView->getParentFloater(self)->addDependentFloater(LLFloaterReg::showInstance("bulk_perms"));
}
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 2ff22416ec..e9e71644b1 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -411,7 +411,7 @@ void LLPanelFace::getState()
{
LLUUID get(LLViewerObject* object, S32 te)
{
- LLViewerImage* image = object->getTEImage(te);
+ LLViewerTexture* image = object->getTEImage(te);
return image ? image->getID() : LLUUID::null;
}
} func;
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index d495373cc4..b1b464b4e4 100644
--- a/indra/newview/llpanelgroupgeneral.cpp
+++ b/indra/newview/llpanelgroupgeneral.cpp
@@ -44,7 +44,7 @@
#include "llcheckboxctrl.h"
#include "llcombobox.h"
#include "lldbstrings.h"
-#include "llfriendactions.h"
+#include "llavataractions.h"
#include "lllineeditor.h"
#include "llnamebox.h"
#include "llnamelistctrl.h"
@@ -216,8 +216,7 @@ BOOL LLPanelGroupGeneral::postBuild()
}
mIncompleteMemberDataStr = getString("incomplete_member_data_str");
- mConfirmGroupCreateStr = getString("confirm_group_create_str");
-
+
// If the group_id is null, then we are creating a new group
if (mGroupID.isNull())
{
@@ -375,7 +374,7 @@ void LLPanelGroupGeneral::openProfile(void* data)
LLScrollListItem* selected = self->mListVisibleMembers->getFirstSelected();
if (selected)
{
- LLFriendActions::showProfile(selected->getUUID());
+ LLAvatarActions::showProfile(selected->getUUID());
}
}
}
@@ -450,9 +449,7 @@ bool LLPanelGroupGeneral::apply(std::string& mesg)
return false;
}
- LLSD args;
- args["MESSAGE"] = mConfirmGroupCreateStr;
- LLNotifications::instance().add("GenericAlertYesCancel", args, LLSD(), boost::bind(&LLPanelGroupGeneral::createGroupCallback, this, _1, _2));
+ LLNotifications::instance().add("CreateGroupCost", LLSD(), LLSD(), boost::bind(&LLPanelGroupGeneral::createGroupCallback, this, _1, _2));
return false;
}
diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h
index 5d673d5219..c04b40819d 100644
--- a/indra/newview/llpanelgroupgeneral.h
+++ b/indra/newview/llpanelgroupgeneral.h
@@ -87,7 +87,6 @@ private:
BOOL mChanged;
BOOL mFirstUse;
std::string mIncompleteMemberDataStr;
- std::string mConfirmGroupCreateStr;
LLUUID mDefaultIconID;
// Group information (include any updates in updateChanged)
diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp
index ea092645e7..39a9f231b2 100644
--- a/indra/newview/llpanelgrouplandmoney.cpp
+++ b/indra/newview/llpanelgrouplandmoney.cpp
@@ -247,9 +247,12 @@ void LLPanelGroupLandMoney::impl::onMapButton()
F64 global_z = gAgent.getPositionGlobal().mdV[VZ];
LLVector3d pos_global(global_x, global_y, global_z);
- LLFloaterWorldMap::getInstance()->trackLocation(pos_global);
-
- LLFloaterReg::showInstance("world_map", "center");
+ LLFloaterWorldMap* worldmap_instance = LLFloaterWorldMap::getInstance();
+ if(worldmap_instance)
+ {
+ worldmap_instance->trackLocation(pos_global);
+ LLFloaterReg::showInstance("world_map", "center");
+ }
}
bool LLPanelGroupLandMoney::impl::applyContribution()
diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp
index 201cf5a023..15ae374447 100644
--- a/indra/newview/llpanelgroupnotices.cpp
+++ b/indra/newview/llpanelgroupnotices.cpp
@@ -39,7 +39,7 @@
#include "llinventory.h"
#include "llviewerinventory.h"
#include "llinventorymodel.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
#include "llagent.h"
#include "lltooldraganddrop.h"
@@ -105,7 +105,7 @@ protected:
LLUUID mGroupID;
};
-static LLDefaultWidgetRegistry::Register<LLGroupDropTarget> r("group_drop_target");
+static LLDefaultChildRegistry::Register<LLGroupDropTarget> r("group_drop_target");
LLGroupDropTarget::LLGroupDropTarget(const LLGroupDropTarget::Params& p)
: LLView(p),
@@ -152,6 +152,7 @@ BOOL LLGroupDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
case DAD_BODYPART:
case DAD_ANIMATION:
case DAD_GESTURE:
+ case DAD_CALLINGCARD:
{
LLViewerInventoryItem* inv_item = (LLViewerInventoryItem*)cargo_data;
if(gInventory.getItem(inv_item->getUUID())
@@ -175,7 +176,6 @@ BOOL LLGroupDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
break;
}
case DAD_CATEGORY:
- case DAD_CALLINGCARD:
default:
*accept = ACCEPT_NO;
break;
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index 9e537be425..1c52c3cea4 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -37,7 +37,7 @@
#include "llagent.h"
#include "llbutton.h"
#include "llfloatergroupinvite.h"
-#include "llfriendactions.h"
+#include "llavataractions.h"
#include "lliconctrl.h"
#include "lllineeditor.h"
#include "llnamelistctrl.h"
@@ -49,7 +49,7 @@
#include "lltabcontainer.h"
#include "lltextbox.h"
#include "lltexteditor.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerwindow.h"
#include "llfocusmgr.h"
@@ -1289,7 +1289,7 @@ void LLPanelGroupMembersSubTab::handleMemberDoubleClick()
LLScrollListItem* selected = mMembersList->getFirstSelected();
if (selected)
{
- LLFriendActions::showProfile(selected->getUUID());
+ LLAvatarActions::showProfile(selected->getUUID());
}
}
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp
new file mode 100644
index 0000000000..45fe625a13
--- /dev/null
+++ b/indra/newview/llpanelimcontrolpanel.cpp
@@ -0,0 +1,87 @@
+/**
+ * @file llpanelavatar.cpp
+ * @brief LLPanelAvatar and related class implementations
+ *
+ * $LicenseInfo:firstyear=2004&license=viewergpl$
+ *
+ * Copyright (c) 2004-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h"
+
+#include "llpanelimcontrolpanel.h"
+
+#include "llavataractions.h"
+#include "llavatariconctrl.h"
+#include "llbutton.h"
+
+static LLRegisterPanelClassWrapper<LLPanelIMControlPanel> t_im_control_panel("panel_im_control_panel");
+
+LLPanelIMControlPanel::LLPanelIMControlPanel()
+: LLPanel()
+{
+}
+
+LLPanelIMControlPanel::~LLPanelIMControlPanel()
+{
+}
+
+BOOL LLPanelIMControlPanel::postBuild()
+{
+ childSetAction("view_profile_btn", boost::bind(&LLPanelIMControlPanel::onViewProfileButtonClicked, this));
+ childSetAction("add_friend_btn", boost::bind(&LLPanelIMControlPanel::onAddFriendButtonClicked, this));
+ childSetAction("call_btn", boost::bind(&LLPanelIMControlPanel::onCallButtonClicked, this));
+ childSetAction("share_btn", boost::bind(&LLPanelIMControlPanel::onShareButtonClicked, this));
+
+ return TRUE;
+}
+
+void LLPanelIMControlPanel::onViewProfileButtonClicked()
+{
+ LLAvatarActions::showProfile(getChild<LLAvatarIconCtrl>("avatar_icon")->getAvatarId());
+}
+
+void LLPanelIMControlPanel::onAddFriendButtonClicked()
+{
+ LLAvatarIconCtrl* avatar_icon = getChild<LLAvatarIconCtrl>("avatar_icon");
+ std::string full_name = avatar_icon->getFirstName() + " " + avatar_icon->getLastName();
+ LLAvatarActions::requestFriendshipDialog(avatar_icon->getAvatarId(), full_name);
+}
+
+void LLPanelIMControlPanel::onCallButtonClicked()
+{
+ // *TODO: Implement
+}
+
+void LLPanelIMControlPanel::onShareButtonClicked()
+{
+ // *TODO: Implement
+}
+
+void LLPanelIMControlPanel::setAvatarId(const LLUUID& avatar_id)
+{
+ getChild<LLAvatarIconCtrl>("avatar_icon")->setValue(avatar_id);
+}
diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h
new file mode 100644
index 0000000000..be3b2d3130
--- /dev/null
+++ b/indra/newview/llpanelimcontrolpanel.h
@@ -0,0 +1,55 @@
+/**
+ * @file llpanelimcontrolpanel.h
+ * @brief LLPanelIMControlPanel and related class definitions
+ *
+ * $LicenseInfo:firstyear=2004&license=viewergpl$
+ *
+ * Copyright (c) 2004-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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_LLPANELIMCONTROLPANEL_H
+#define LL_LLPANELIMCONTROLPANEL_H
+
+#include "llpanel.h"
+
+class LLPanelIMControlPanel : public LLPanel
+{
+public:
+ LLPanelIMControlPanel();
+ ~LLPanelIMControlPanel();
+
+ BOOL postBuild();
+
+ void setAvatarId(const LLUUID& avatar_id);
+
+private:
+ void onViewProfileButtonClicked();
+ void onAddFriendButtonClicked();
+ void onCallButtonClicked();
+ void onShareButtonClicked();
+};
+
+#endif // LL_LLPANELIMCONTROLPANEL_H
diff --git a/indra/newview/llpanelland.cpp b/indra/newview/llpanelland.cpp
index 92fe082ef2..bce5525a40 100644
--- a/indra/newview/llpanelland.cpp
+++ b/indra/newview/llpanelland.cpp
@@ -40,6 +40,7 @@
#include "llbutton.h"
#include "llcheckboxctrl.h"
#include "llfloaterland.h"
+#include "llfloaterreg.h"
#include "lltextbox.h"
#include "llviewercontrol.h"
#include "llviewerparcelmgr.h"
@@ -262,7 +263,7 @@ void LLPanelLandInfo::onClickAbout(void*)
LLViewerParcelMgr::getInstance()->selectParcelInRectangle();
}
- LLFloaterLand::showInstance();
+ LLFloaterReg::showInstance("about_land");
}
void LLPanelLandInfo::onShowOwnersHelp(void* user_data)
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 24b4082630..7bf7ceb6d2 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -31,12 +31,15 @@
#include "llviewerprecompiledheaders.h"
+#include "llpanellandmarks.h"
+
+#include "llbutton.h"
#include "llfloaterreg.h"
#include "lllandmark.h"
#include "llfloaterworldmap.h"
+#include "llfoldervieweventlistener.h"
#include "lllandmarklist.h"
-#include "llpanellandmarks.h"
#include "llsidetray.h"
#include "lltabcontainer.h"
#include "llworldmap.h"
@@ -138,9 +141,10 @@ void LLLandmarksPanel::onShowOnMap()
if (!landmark->getGlobalPos(landmark_global_pos))
return;
- if (!landmark_global_pos.isExactlyZero())
+ LLFloaterWorldMap* worldmap_instance = LLFloaterWorldMap::getInstance();
+ if (!landmark_global_pos.isExactlyZero() && worldmap_instance)
{
- LLFloaterWorldMap::getInstance()->trackLocation(landmark_global_pos);
+ worldmap_instance->trackLocation(landmark_global_pos);
LLFloaterReg::showInstance("world_map", "center");
}
}
@@ -157,8 +161,6 @@ void LLLandmarksPanel::onTeleport()
{
listenerp->openItem();
}
-
- togglePanelPlacesButtons(TRUE);
}
/*
@@ -195,6 +197,28 @@ void LLLandmarksPanel::onCopySLURL()
}
*/
+// virtual
+void LLLandmarksPanel::updateVerbs()
+{
+ if (!isTabVisible())
+ return;
+
+ BOOL enabled = FALSE;
+
+ LLFolderViewItem* current_item = mInventoryPanel->getRootFolder()->getCurSelectedItem();
+ if (current_item)
+ {
+ LLFolderViewEventListener* listenerp = current_item->getListener();
+ if (listenerp->getInventoryType() == LLInventoryType::IT_LANDMARK)
+ {
+ enabled = TRUE;
+ }
+ }
+
+ mTeleportBtn->setEnabled(enabled);
+ mShowOnMapBtn->setEnabled(enabled);
+}
+
void LLLandmarksPanel::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action)
{
LLFolderViewItem* current_item = mInventoryPanel->getRootFolder()->getCurSelectedItem();
@@ -224,16 +248,14 @@ void LLLandmarksPanel::onSelectionChange(const std::deque<LLFolderViewItem*> &it
if (!mActionBtn->getVisible())
mActionBtn->setVisible(TRUE);
-
- togglePanelPlacesButtons(TRUE);
}
else
{
if (mActionBtn->getVisible())
mActionBtn->setVisible(FALSE);
-
- togglePanelPlacesButtons(FALSE);
}
+
+ updateVerbs();
}
void LLLandmarksPanel::onSelectorButtonClicked()
@@ -244,9 +266,14 @@ void LLLandmarksPanel::onSelectorButtonClicked()
if (listenerp->getInventoryType() == LLInventoryType::IT_LANDMARK)
{
LLSD key;
- key["type"] = LLPanelPlaces::LANDMARK;
+ key["type"] = "landmark";
key["id"] = listenerp->getUUID();
LLSideTray::getInstance()->showPanel("panel_places", key);
}
}
+
+void LLLandmarksPanel::setSelectedItem(const LLUUID& obj_id)
+{
+ mInventoryPanel->setSelection(obj_id, FALSE);
+}
diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h
index 0f400a722e..0b11270fb5 100644
--- a/indra/newview/llpanellandmarks.h
+++ b/indra/newview/llpanellandmarks.h
@@ -33,7 +33,7 @@
#ifndef LL_LLPANELLANDMARKS_H
#define LL_LLPANELLANDMARKS_H
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
#include "llinventorymodel.h"
#include "llpanelplacestab.h"
@@ -48,9 +48,11 @@ public:
/*virtual*/ void onShowOnMap();
/*virtual*/ void onTeleport();
///*virtual*/ void onCopySLURL();
+ /*virtual*/ void updateVerbs();
void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action);
void onSelectorButtonClicked();
+ void setSelectedItem(const LLUUID& obj_id);
private:
LLInventoryPanel* mInventoryPanel;
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 7af1cbf51f..8e5625f49a 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -57,7 +57,7 @@
#include "lluiconstants.h"
#include "llurlsimstring.h"
#include "llviewerbuild.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewermenu.h" // for handle_preferences()
#include "llviewernetwork.h"
#include "llviewerwindow.h" // to link into child list
@@ -362,7 +362,7 @@ LLPanelLogin::~LLPanelLogin()
gResponsePtr->setParent( 0 );
//// We know we're done with the image, so be rid of it.
- //gImageList.deleteImage( mLogoImage );
+ //gTextureList.deleteImage( mLogoImage );
}
// virtual
diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h
index 540f938053..83a31eecda 100644
--- a/indra/newview/llpanellogin.h
+++ b/indra/newview/llpanellogin.h
@@ -37,6 +37,7 @@
#include "llpointer.h" // LLPointer<>
#include "llwebbrowserctrl.h" // LLWebBrowserCtrlObserver
+class LLLineEditor;
class LLUIImage;
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 1d7a2748cc..92a8653252 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -35,7 +35,7 @@
// libs
#include "llfloaterreg.h"
#include "llmenugl.h"
-#include "llsearcheditor.h"
+#include "llfiltereditor.h"
#include "lltabcontainer.h"
#include "lluictrlfactory.h"
@@ -47,7 +47,7 @@
#include "llcallingcard.h" // for LLAvatarTracker
#include "llfloateravatarpicker.h"
#include "llfloaterminiinspector.h"
-#include "llfriendactions.h"
+#include "llavataractions.h"
#include "llgroupactions.h"
#include "llgrouplist.h"
#include "llrecentpeople.h"
@@ -62,10 +62,18 @@ using namespace LLOldEvents;
#define NEARBY_LIST_UPDATE_INTERVAL 1
#define RECENT_LIST_UPDATE_DELAY 1
+static const std::string NEARBY_TAB_NAME = "nearby_panel";
+static const std::string FRIENDS_TAB_NAME = "friends_panel";
+static const std::string GROUP_TAB_NAME = "groups_panel";
+static const std::string RECENT_TAB_NAME = "recent_panel";
+
static LLRegisterPanelClassWrapper<LLPanelPeople> t_people("panel_people");
//=============================================================================
+/**
+ * Updates given list either on regular basis or on external events (up to implementation).
+ */
class LLPanelPeople::Updater
{
public:
@@ -74,15 +82,31 @@ public:
: mCallback(cb)
{
}
+
virtual ~Updater()
{
}
+
+ /**
+ * Force the list updates.
+ *
+ * This may start repeated updates until all names are complete.
+ */
+ virtual void forceUpdate() {}
+
+ /**
+ * Activate/deactivate updater.
+ *
+ * This may start/stop regular updates.
+ */
virtual void setActive(bool) {}
+
protected:
bool updateList(U32 mask = 0)
{
return mCallback(mask);
}
+
callback_t mCallback;
};
@@ -99,10 +123,13 @@ public:
/**
* Updates the friends list.
+ *
+ * Updates the list on external events which trigger the changed() method.
*/
class LLFriendListUpdater : public LLAvatarListUpdater, public LLFriendObserver
{
LOG_CLASS(LLFriendListUpdater);
+
public:
LLFriendListUpdater(callback_t cb)
: LLAvatarListUpdater(cb, FRIEND_LIST_UPDATE_TIMEOUT)
@@ -111,20 +138,20 @@ public:
// For notification when SIP online status changes.
LLVoiceClient::getInstance()->addObserver(this);
}
+
~LLFriendListUpdater()
{
LLVoiceClient::getInstance()->removeObserver(this);
LLAvatarTracker::instance().removeObserver(this);
}
- /*virtual*/ void setActive(bool val)
- {
- if (!val)
- return;
+ /*virtual*/ void forceUpdate()
+ {
// Perform updates until all names are loaded.
if (!updateList(LLFriendObserver::ADD))
changed(LLFriendObserver::ADD);
}
+
/*virtual*/ void changed(U32 mask)
{
// events can arrive quickly in bulk - we need not process EVERY one of them -
@@ -134,6 +161,7 @@ public:
// save-up all the mask-bits which have come-in
mMask |= mask;
}
+
/*virtual*/ BOOL tick()
{
if (updateList(mMask))
@@ -145,33 +173,33 @@ public:
return FALSE;
}
+
private:
U32 mMask;
};
/**
* Periodically updates the nearby people list while the Nearby tab is active.
+ *
+ * The period is defined by NEARBY_LIST_UPDATE_INTERVAL constant.
*/
class LLNearbyListUpdater : public LLAvatarListUpdater
{
LOG_CLASS(LLNearbyListUpdater);
+
public:
LLNearbyListUpdater(callback_t cb)
: LLAvatarListUpdater(cb, NEARBY_LIST_UPDATE_INTERVAL)
{
setActive(false);
}
- /*virtual*/ BOOL tick()
- {
- updateList();
- return FALSE;
- }
+
/*virtual*/ void setActive(bool val)
{
if (val)
{
// update immediately and start regular updates
- tick();
+ updateList();
mEventTimer.start();
}
else
@@ -180,6 +208,17 @@ public:
mEventTimer.stop();
}
}
+
+ /*virtual*/ void forceUpdate()
+ {
+ updateList();
+ }
+
+ /*virtual*/ BOOL tick()
+ {
+ updateList();
+ return FALSE;
+ }
private:
};
@@ -189,13 +228,20 @@ private:
class LLRecentListUpdater : public LLAvatarListUpdater
{
LOG_CLASS(LLRecentListUpdater);
+
public:
LLRecentListUpdater(callback_t cb)
: LLAvatarListUpdater(cb, RECENT_LIST_UPDATE_DELAY)
{
LLRecentPeople::instance().setChangedCallback(boost::bind(&LLRecentListUpdater::onRecentPeopleChanged, this));
}
+
private:
+ /*virtual*/ void forceUpdate()
+ {
+ onRecentPeopleChanged();
+ }
+
/*virtual*/ BOOL tick()
{
// Update the list until we get all the names.
@@ -207,6 +253,7 @@ private:
return FALSE;
}
+
void onRecentPeopleChanged()
{
if (!updateList())
@@ -223,16 +270,24 @@ private:
class LLGroupListUpdater : public LLPanelPeople::Updater, public LLSimpleListener
{
LOG_CLASS(LLGroupListUpdater);
+
public:
LLGroupListUpdater(callback_t cb)
: LLPanelPeople::Updater(cb)
{
gAgent.addListener(this, "new group");
}
+
~LLGroupListUpdater()
{
gAgent.removeListener(this);
}
+
+ /*virtual*/ void forceUpdate()
+ {
+ updateList();
+ }
+
/*virtual*/ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
// Why is "new group" sufficient?
@@ -251,7 +306,7 @@ public:
LLPanelPeople::LLPanelPeople()
: LLPanel(),
mFilterSubString(LLStringUtil::null),
- mSearchEditor(NULL),
+ mFilterEditor(NULL),
mTabContainer(NULL),
mFriendList(NULL),
mNearbyList(NULL),
@@ -271,28 +326,28 @@ LLPanelPeople::~LLPanelPeople()
delete mGroupListUpdater;
LLView::deleteViewByHandle(mGroupPlusMenuHandle);
- LLView::deleteViewByHandle(mGroupMinusMenuHandle);
}
BOOL LLPanelPeople::postBuild()
{
- mSearchEditor = getChild<LLSearchEditor>("filter_input");
+ mFilterEditor = getChild<LLFilterEditor>("filter_input");
+ mFilterEditor->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
mTabContainer = getChild<LLTabContainer>("tabs");
mTabContainer->setCommitCallback(boost::bind(&LLPanelPeople::onTabSelected, this, _2));
- mTabContainer->selectTabByName("friends_panel"); // must go after setting commit callback
+ mTabContainer->selectTabByName(FRIENDS_TAB_NAME); // must go after setting commit callback
- mFriendList = getChild<LLPanel>("friends_panel")->getChild<LLAvatarList>("avatar_list");
- mNearbyList = getChild<LLPanel>("nearby_panel")->getChild<LLAvatarList>("avatar_list");
- mRecentList = getChild<LLPanel>("recent_panel")->getChild<LLAvatarList>("avatar_list");
+ mFriendList = getChild<LLPanel>(FRIENDS_TAB_NAME)->getChild<LLAvatarList>("avatar_list");
+ mNearbyList = getChild<LLPanel>(NEARBY_TAB_NAME)->getChild<LLAvatarList>("avatar_list");
+ mRecentList = getChild<LLPanel>(RECENT_TAB_NAME)->getChild<LLAvatarList>("avatar_list");
mGroupList = getChild<LLGroupList>("group_list");
- LLPanel* groups_panel = getChild<LLPanel>("groups_panel");
+ LLPanel* groups_panel = getChild<LLPanel>(GROUP_TAB_NAME);
groups_panel->childSetAction("activate_btn", boost::bind(&LLPanelPeople::onActivateButtonClicked, this));
groups_panel->childSetAction("plus_btn", boost::bind(&LLPanelPeople::onGroupPlusButtonClicked, this));
groups_panel->childSetAction("minus_btn", boost::bind(&LLPanelPeople::onGroupMinusButtonClicked, this));
- LLPanel* friends_panel = getChild<LLPanel>("friends_panel");
+ LLPanel* friends_panel = getChild<LLPanel>(FRIENDS_TAB_NAME);
friends_panel->childSetAction("add_btn", boost::bind(&LLPanelPeople::onAddFriendWizButtonClicked, this));
friends_panel->childSetAction("del_btn", boost::bind(&LLPanelPeople::onDeleteFriendButtonClicked, this));
@@ -319,89 +374,95 @@ BOOL LLPanelPeople::postBuild()
// Create menus.
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
registrar.add("People.Group.Plus.Action", boost::bind(&LLPanelPeople::onGroupPlusMenuItemClicked, this, _2));
- LLMenuGL* plus_menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_group_plus.xml", gMenuHolder);
+ LLMenuGL* plus_menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_group_plus.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
mGroupPlusMenuHandle = plus_menu->getHandle();
- registrar.add("People.Group.Minus.Action", boost::bind(&LLPanelPeople::onGroupMinusMenuItemClicked, this, _2));
- LLMenuGL* minus_menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_group_minus.xml", gMenuHolder);
- mGroupMinusMenuHandle = minus_menu->getHandle();
// Perform initial update.
- mFriendListUpdater->setActive(true);
+ mFriendListUpdater->forceUpdate();
updateGroupList();
updateRecentList();
return TRUE;
}
-bool LLPanelPeople::refreshFriendNames(U32 changed_mask)
+bool LLPanelPeople::updateFriendList(U32 changed_mask)
{
- // get all buddies we know about
- LLAvatarTracker::buddy_map_t all_buddies;
- LLAvatarTracker::instance().copyBuddyList(all_buddies);
-
- bool have_names = true;
-
+ // Refresh names.
if (changed_mask & (LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE))
{
+ // get all buddies we know about
+ LLAvatarTracker::buddy_map_t all_buddies;
+ LLAvatarTracker::instance().copyBuddyList(all_buddies);
+
// *TODO: it's suboptimal to rebuild the whole list on online status change.
// convert the buddy map to vector
- std::vector<LLUUID> avatar_ids;
+ mFriendVec.clear();
LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin();
for (; buddy_it != all_buddies.end(); ++buddy_it)
- avatar_ids.push_back(buddy_it->first);
+ mFriendVec.push_back(buddy_it->first);
- // do refresh the friend list
- if (avatar_ids.size() > 0)
- have_names = mFriendList->updateList(avatar_ids);
- else
- mFriendList->setCommentText(getString("no_friends"));
+ return filterFriendList();
}
- return have_names;
+ return true;
}
-bool LLPanelPeople::updateFriendList(U32 changed_mask)
+bool LLPanelPeople::updateNearbyList()
{
- // Refresh names.
- if (changed_mask & (LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE))
- {
- return refreshFriendNames(changed_mask);
- }
-
+ LLWorld::getInstance()->getAvatars(&mNearbyVec, NULL, gAgent.getPositionGlobal(), gSavedSettings.getF32("NearMeRange"));
+ filterNearbyList();
+
return true;
}
-bool LLPanelPeople::updateNearbyList()
+bool LLPanelPeople::updateRecentList()
{
- std::vector<LLUUID> avatar_ids;
+ LLRecentPeople::instance().get(mRecentVec);
+ filterRecentList();
- LLWorld::getInstance()->getAvatars(&avatar_ids, NULL, gAgent.getPositionGlobal(), gSavedSettings.getF32("NearMeRange"));
+ return true;
+}
- mNearbyList->updateList(avatar_ids);
+bool LLPanelPeople::updateGroupList()
+{
+ bool have_names = mGroupList->update(mFilterSubString);
- if (avatar_ids.size() == 0)
- mNearbyList->setCommentText(getString("no_one_near"));
+ if (mGroupList->isEmpty())
+ mGroupList->setCommentText(getString("no_groups"));
- return true;
+ return have_names;
}
-bool LLPanelPeople::updateRecentList()
+bool LLPanelPeople::filterFriendList()
{
- std::vector<LLUUID> avatar_ids;
+ // We must always update Friends list to clear the latest removed friend.
+ bool have_names = mFriendList->update(mFriendVec, mFilterSubString);
- LLRecentPeople::instance().get(avatar_ids);
-
- if (avatar_ids.size() > 0)
- return mRecentList->updateList(avatar_ids);
+ if (mFriendVec.size() == 0)
+ mFriendList->setCommentText(getString("no_friends"));
- mRecentList->setCommentText(getString("no_people"));
- return true;
+ return have_names;
}
-bool LLPanelPeople::updateGroupList()
+bool LLPanelPeople::filterNearbyList()
+{
+ bool have_names = mNearbyList->update(mNearbyVec, mFilterSubString);
+
+ if (mNearbyVec.size() == 0)
+ mNearbyList->setCommentText(getString("no_one_near"));
+
+ return have_names;
+}
+
+bool LLPanelPeople::filterRecentList()
{
- return mGroupList->updateList();
+ if (mRecentVec.size() > 0)
+ return mRecentList->update(mRecentVec, mFilterSubString);
+
+ mRecentList->setCommentText(getString("no_people"));
+
+ return true;
}
void LLPanelPeople::buttonSetVisible(std::string btn_name, BOOL visible)
@@ -433,10 +494,10 @@ void LLPanelPeople::buttonSetAction(const std::string& btn_name, const commit_si
void LLPanelPeople::updateButtons()
{
std::string cur_tab = mTabContainer->getCurrentPanel()->getName();
- bool nearby_tab_active = (cur_tab == "nearby_panel");
- bool friends_tab_active = (cur_tab == "friends_panel");
- bool group_tab_active = (cur_tab == "groups_panel");
- bool recent_tab_active = (cur_tab == "recent_panel");
+ bool nearby_tab_active = (cur_tab == NEARBY_TAB_NAME);
+ bool friends_tab_active = (cur_tab == FRIENDS_TAB_NAME);
+ bool group_tab_active = (cur_tab == GROUP_TAB_NAME);
+ bool recent_tab_active = (cur_tab == RECENT_TAB_NAME);
LLUUID selected_id;
buttonSetVisible("group_info_btn", group_tab_active);
@@ -449,17 +510,19 @@ void LLPanelPeople::updateButtons()
if (group_tab_active)
{
+ bool item_selected = mGroupList->getFirstSelected() != NULL;
bool cur_group_active = true;
- selected_id = mGroupList->getCurrentID();
- if (selected_id.notNull())
+ if (item_selected)
+ {
+ selected_id = mGroupList->getCurrentID();
cur_group_active = (gAgent.getGroupID() == selected_id);
-
- bool item_selected = selected_id.notNull();
+ }
+
LLPanel* groups_panel = mTabContainer->getCurrentPanel();
- groups_panel->childSetEnabled("activate_btn", !item_selected || !cur_group_active); // "none" or a non-active group selected
+ groups_panel->childSetEnabled("activate_btn", item_selected && !cur_group_active); // "none" or a non-active group selected
groups_panel->childSetEnabled("plus_btn", item_selected);
- groups_panel->childSetEnabled("minus_btn", item_selected);
+ groups_panel->childSetEnabled("minus_btn", item_selected && selected_id.notNull());
}
else
{
@@ -489,11 +552,11 @@ LLAvatarList* LLPanelPeople::getActiveAvatarList() const
{
std::string cur_tab = mTabContainer->getCurrentPanel()->getName();
- if (cur_tab == "friends_panel")
+ if (cur_tab == FRIENDS_TAB_NAME)
return mFriendList;
- if (cur_tab == "nearby_panel")
+ if (cur_tab == NEARBY_TAB_NAME)
return mNearbyList;
- if (cur_tab == "recent_panel")
+ if (cur_tab == RECENT_TAB_NAME)
return mRecentList;
return NULL;
@@ -535,15 +598,20 @@ void LLPanelPeople::onVisibilityChange(BOOL new_visibility)
}
else
{
- // Make the tab-container re-select current tab
- // for onTabSelected() callback to get called.
- // (currently this is needed to reactivate nearby list updates
- // when we get visible)
- mTabContainer->selectTab(mTabContainer->getCurrentPanelIndex());
+ reSelectedCurrentTab();
}
}
-void LLPanelPeople::onSearchEdit(const std::string& search_string)
+// Make the tab-container re-select current tab
+// for onTabSelected() callback to get called.
+// (currently this is needed to reactivate nearby list updates
+// when we get visible)
+void LLPanelPeople::reSelectedCurrentTab()
+{
+ mTabContainer->selectTab(mTabContainer->getCurrentPanelIndex());
+}
+
+void LLPanelPeople::onFilterEdit(const std::string& search_string)
{
if (mFilterSubString == search_string)
return;
@@ -552,13 +620,21 @@ void LLPanelPeople::onSearchEdit(const std::string& search_string)
LLStringUtil::toUpper(mFilterSubString);
LLStringUtil::trimHead(mFilterSubString);
- mSearchEditor->setText(mFilterSubString);
+ mFilterEditor->setText(mFilterSubString);
+
+ // Apply new filter to all tabs.
+ filterNearbyList();
+ filterFriendList();
+ filterRecentList();
+ updateGroupList();
+
+ updateButtons();
}
void LLPanelPeople::onTabSelected(const LLSD& param)
{
std::string tab_name = getChild<LLPanel>(param.asString())->getName();
- mNearbyListUpdater->setActive(tab_name == "nearby_panel");
+ mNearbyListUpdater->setActive(tab_name == NEARBY_TAB_NAME);
updateButtons();
}
@@ -583,7 +659,7 @@ void LLPanelPeople::onAvatarListCommitted(LLAvatarList* list)
void LLPanelPeople::onViewProfileButtonClicked()
{
LLUUID id = getCurrentItemID();
- LLFriendActions::showProfile(id);
+ LLAvatarActions::showProfile(id);
}
void LLPanelPeople::onAddFriendButtonClicked()
@@ -593,7 +669,7 @@ void LLPanelPeople::onAddFriendButtonClicked()
{
std::string name;
gCacheName->getFullName(id, name);
- LLFriendActions::requestFriendshipDialog(id, name);
+ LLAvatarActions::requestFriendshipDialog(id, name);
}
}
@@ -610,7 +686,7 @@ void LLPanelPeople::onAddFriendWizButtonClicked()
void LLPanelPeople::onDeleteFriendButtonClicked()
{
- LLFriendActions::removeFriendDialog(getCurrentItemID());
+ LLAvatarActions::removeFriendDialog(getCurrentItemID());
}
void LLPanelPeople::onGroupInfoButtonClicked()
@@ -632,7 +708,7 @@ void LLPanelPeople::onImButtonClicked()
LLUUID id = getCurrentItemID();
if (id.notNull())
{
- LLFriendActions::startIM(id);
+ LLAvatarActions::startIM(id);
}
}
@@ -648,7 +724,7 @@ void LLPanelPeople::onAvatarPicked(
void*)
{
if (!names.empty() && !ids.empty())
- LLFriendActions::requestFriendshipDialog(ids[0], names[0]);
+ LLAvatarActions::requestFriendshipDialog(ids[0], names[0]);
}
bool LLPanelPeople::onFriendListUpdate(U32 changed_mask)
@@ -673,11 +749,9 @@ void LLPanelPeople::onGroupPlusButtonClicked()
void LLPanelPeople::onGroupMinusButtonClicked()
{
- LLMenuGL* minus_menu = (LLMenuGL*)mGroupMinusMenuHandle.get();
- if (!minus_menu)
- return;
-
- showGroupMenu(minus_menu);
+ LLUUID group_id = getCurrentItemID();
+ if (group_id.notNull())
+ LLGroupActions::leave(group_id);
}
void LLPanelPeople::onGroupPlusMenuItemClicked(const LLSD& userdata)
@@ -690,19 +764,6 @@ void LLPanelPeople::onGroupPlusMenuItemClicked(const LLSD& userdata)
LLGroupActions::create();
}
-void LLPanelPeople::onGroupMinusMenuItemClicked(const LLSD& userdata)
-{
- std::string chosen_item = userdata.asString();
-
- LLUUID group_id = getCurrentItemID();
- if (chosen_item == "leave_group")
- LLGroupActions::leave(group_id);
- /*
- else if (chosen_item == "delete_group")
- ; // *TODO: how to delete a group?
- */
-}
-
void LLPanelPeople::onCallButtonClicked()
{
// *TODO: not implemented yet
@@ -710,7 +771,7 @@ void LLPanelPeople::onCallButtonClicked()
void LLPanelPeople::onTeleportButtonClicked()
{
- LLFriendActions::offerTeleport(getCurrentItemID());
+ LLAvatarActions::offerTeleport(getCurrentItemID());
}
void LLPanelPeople::onShareButtonClicked()
@@ -725,5 +786,22 @@ void LLPanelPeople::onMoreButtonClicked()
void LLPanelPeople::onOpen(const LLSD& key)
{
- mTabContainer->selectTab(key.asInteger());
+ // Profile View is activated through LLSideTray::showPanel(),
+ // hide Profile View to be able to see Panel People content
+ hideProfileView();
+
+ std::string tab_name = key.asString();
+ if (!tab_name.empty())
+ mTabContainer->selectTabByName(tab_name);
+ else
+ reSelectedCurrentTab();
+}
+
+void LLPanelPeople::hideProfileView()
+{
+ LLView* view = getChildView("panel_profile_view",true,false);
+ if(view && view->getVisible())
+ {
+ view->setVisible(false);
+ }
}
diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h
index 4d535f287c..2ac1bf424c 100644
--- a/indra/newview/llpanelpeople.h
+++ b/indra/newview/llpanelpeople.h
@@ -37,7 +37,7 @@
#include "llcallingcard.h" // for avatar tracker
-class LLSearchEditor;
+class LLFilterEditor;
class LLTabContainer;
class LLAvatarList;
class LLGroupList;
@@ -61,8 +61,10 @@ private:
bool updateNearbyList();
bool updateRecentList();
bool updateGroupList();
+ bool filterFriendList();
+ bool filterNearbyList();
+ bool filterRecentList();
void updateButtons();
- bool refreshFriendNames(U32 changed_mask);
LLAvatarList* getActiveAvatarList() const;
LLUUID getCurrentItemID() const;
void buttonSetVisible(std::string btn_name, BOOL visible);
@@ -72,8 +74,10 @@ private:
/*virtual*/ void onVisibilityChange(BOOL new_visibility);
+ void reSelectedCurrentTab();
+
// UI callbacks
- void onSearchEdit(const std::string& search_string);
+ void onFilterEdit(const std::string& search_string);
void onTabSelected(const LLSD& param);
void onViewProfileButtonClicked();
void onAddFriendButtonClicked();
@@ -92,7 +96,6 @@ private:
void onGroupPlusButtonClicked();
void onGroupMinusButtonClicked();
void onGroupPlusMenuItemClicked(const LLSD& userdata);
- void onGroupMinusMenuItemClicked(const LLSD& userdata);
// misc callbacks
bool onFriendListUpdate(U32 changed_mask);
@@ -101,7 +104,9 @@ private:
const std::vector<LLUUID>& ids,
void*);
- LLSearchEditor* mSearchEditor;
+ void hideProfileView();
+
+ LLFilterEditor* mFilterEditor;
LLTabContainer* mTabContainer;
LLAvatarList* mFriendList;
LLAvatarList* mNearbyList;
@@ -109,7 +114,6 @@ private:
LLGroupList* mGroupList;
LLHandle<LLView> mGroupPlusMenuHandle;
- LLHandle<LLView> mGroupMinusMenuHandle;
Updater* mFriendListUpdater;
Updater* mNearbyListUpdater;
@@ -117,6 +121,17 @@ private:
Updater* mGroupListUpdater;
std::string mFilterSubString;
+
+ // The vectors below contain up-to date avatar lists
+ // for the corresponding tabs.
+ // When the user enters a filter, it gets applied
+ // to all the vectors and the result is shown in the tabs.
+ // We don't need to have such a vector for the groups tab
+ // since re-fetching the groups list is always fast.
+ typedef std::vector<LLUUID> uuid_vector_t;
+ uuid_vector_t mNearbyVec;
+ uuid_vector_t mFriendVec;
+ uuid_vector_t mRecentVec;
};
#endif //LL_LLPANELPEOPLE_H
diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp
index 9fdde9e757..371c0f2df3 100644
--- a/indra/newview/llpanelpermissions.cpp
+++ b/indra/newview/llpanelpermissions.cpp
@@ -53,16 +53,16 @@
#include "llagent.h"
#include "llstatusbar.h" // for getBalance()
#include "lllineeditor.h"
-#include "llradiogroup.h"
#include "llcombobox.h"
#include "lluiconstants.h"
#include "lldbstrings.h"
#include "llfloatergroupinfo.h"
#include "llfloatergroups.h"
-#include "llfriendactions.h"
+#include "llavataractions.h"
#include "llnamebox.h"
#include "llviewercontrol.h"
#include "lluictrlfactory.h"
+#include "llspinctrl.h"
#include "roles_constants.h"
///----------------------------------------------------------------------------
@@ -100,6 +100,8 @@ BOOL LLPanelPermissions::postBuild()
childSetCommitCallback("checkbox for sale",LLPanelPermissions::onCommitSaleInfo,this);
childSetCommitCallback("sale type",LLPanelPermissions::onCommitSaleType,this);
+
+ childSetCommitCallback("Edit Cost", LLPanelPermissions::onCommitSaleInfo, this);
childSetCommitCallback("checkbox next owner can modify",LLPanelPermissions::onCommitNextOwnerModify,this);
childSetCommitCallback("checkbox next owner can copy",LLPanelPermissions::onCommitNextOwnerCopy,this);
@@ -208,12 +210,9 @@ void LLPanelPermissions::refresh()
childSetValue("search_check", FALSE);
childSetEnabled("search_check", false);
- LLRadioGroup* RadioSaleType = getChild<LLRadioGroup>("sale type");
- if(RadioSaleType)
- {
- RadioSaleType->setSelectedIndex(-1);
- RadioSaleType->setEnabled(FALSE);
- }
+ LLComboBox* combo_sale_type = getChild<LLComboBox>("sale type");
+ combo_sale_type->setValue(LLSaleInfo::FS_COPY);
+ combo_sale_type->setEnabled(FALSE);
childSetEnabled("Cost",false);
childSetText("Cost",getString("Cost Default"));
@@ -417,22 +416,22 @@ void LLPanelPermissions::refresh()
childSetText("Cost",getString("Cost Default"));
}
- LLLineEditor *editPrice = getChild<LLLineEditor>("Edit Cost");
- if(keyboard_focus_view != editPrice)
+ LLSpinCtrl *edit_price = getChild<LLSpinCtrl>("Edit Cost");
+ if(!edit_price->hasFocus())
{
// If the sale price is mixed then set the cost to MIXED, otherwise
// set to the actual cost.
if (num_for_sale > 0 && is_for_sale_mixed)
{
- childSetText("Edit Cost",getString("Sale Mixed"));
+ edit_price->setTentative(TRUE);
}
else if (num_for_sale > 0 && is_sale_price_mixed)
{
- childSetText("Edit Cost",getString("Cost Mixed"));
+ edit_price->setTentative(TRUE);
}
else
{
- childSetText("Edit Cost",llformat("%d",individual_sale_price));
+ edit_price->setValue(individual_sale_price);
}
}
// The edit fields are only enabled if you can sell this object
@@ -742,20 +741,17 @@ void LLPanelPermissions::refresh()
BOOL valid_sale_info = LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info);
LLSaleInfo::EForSale sale_type = sale_info.getSaleType();
- LLRadioGroup* RadioSaleType = getChild<LLRadioGroup>("sale type");
- if(RadioSaleType)
+ LLComboBox* combo_sale_type = getChild<LLComboBox>("sale type");
+ if (valid_sale_info)
{
- if (valid_sale_info)
- {
- RadioSaleType->setSelectedIndex((S32)sale_type - 1);
- RadioSaleType->setTentative(FALSE); // unfortunately this doesn't do anything at the moment.
- }
- else
- {
- // default option is sell copy, determined to be safest
- RadioSaleType->setSelectedIndex((S32)LLSaleInfo::FS_COPY - 1);
- RadioSaleType->setTentative(TRUE); // unfortunately this doesn't do anything at the moment.
- }
+ combo_sale_type->setValue(sale_type == LLSaleInfo::FS_NOT ? LLSaleInfo::FS_COPY : sale_type);
+ combo_sale_type->setTentative(FALSE); // unfortunately this doesn't do anything at the moment.
+ }
+ else
+ {
+ // default option is sell copy, determined to be safest
+ combo_sale_type->setValue(LLSaleInfo::FS_COPY);
+ combo_sale_type->setTentative(TRUE); // unfortunately this doesn't do anything at the moment.
}
childSetValue("checkbox for sale", num_for_sale != 0);
@@ -811,7 +807,7 @@ void LLPanelPermissions::onClickCreator(void *data)
{
LLPanelPermissions *self = (LLPanelPermissions *)data;
- LLFriendActions::showProfile(self->mCreatorID);
+ LLAvatarActions::showProfile(self->mCreatorID);
}
// static
@@ -827,7 +823,7 @@ void LLPanelPermissions::onClickOwner(void *data)
}
else
{
- LLFriendActions::showProfile(self->mOwnerID);
+ LLAvatarActions::showProfile(self->mOwnerID);
}
}
@@ -991,44 +987,14 @@ void LLPanelPermissions::setAllSaleInfo()
// Set the sale type if the object(s) are for sale.
if(checkPurchase && checkPurchase->get())
{
- LLRadioGroup* RadioSaleType = getChild<LLRadioGroup>("sale type");
- if(RadioSaleType)
- {
- switch(RadioSaleType->getSelectedIndex())
- {
- case 0:
- sale_type = LLSaleInfo::FS_ORIGINAL;
- break;
- case 1:
- sale_type = LLSaleInfo::FS_COPY;
- break;
- case 2:
- sale_type = LLSaleInfo::FS_CONTENTS;
- break;
- default:
- sale_type = LLSaleInfo::FS_COPY;
- break;
- }
- }
+ sale_type = static_cast<LLSaleInfo::EForSale>(getChild<LLComboBox>("sale type")->getValue().asInteger());
}
S32 price = -1;
- LLLineEditor *editPrice = getChild<LLLineEditor>("Edit Cost");
- if (editPrice)
- {
- // Don't extract the price if it's labeled as MIXED or is empty.
- const std::string& editPriceString = editPrice->getText();
- if (editPriceString != getString("Cost Mixed") && editPriceString != getString("Sale Mixed") &&
- !editPriceString.empty())
- {
- price = atoi(editPriceString.c_str());
- }
- else
- {
- price = DEFAULT_PRICE;
- }
- }
+ LLSpinCtrl *edit_price = getChild<LLSpinCtrl>("Edit Cost");
+ price = (edit_price->getTentative()) ? DEFAULT_PRICE : edit_price->getValue().asInteger();
+
// If somehow an invalid price, turn the sale off.
if (price < 0)
sale_type = LLSaleInfo::FS_NOT;
diff --git a/indra/newview/llpanelpick.cpp b/indra/newview/llpanelpick.cpp
index 65be4718ef..cda1a9e7e7 100644
--- a/indra/newview/llpanelpick.cpp
+++ b/indra/newview/llpanelpick.cpp
@@ -38,13 +38,16 @@
#include "llpanel.h"
#include "message.h"
#include "llagent.h"
+#include "llbutton.h"
#include "llparcel.h"
#include "llviewerparcelmgr.h"
#include "lltexturectrl.h"
#include "lluiconstants.h"
+#include "llworldmap.h"
+#include "llfloaterworldmap.h"
+#include "llfloaterreg.h"
#include "llavatarpropertiesprocessor.h"
#include "llpanelpick.h"
-#include "llpanelmeprofile.h"
#define XML_PANEL_EDIT_PICK "panel_edit_pick.xml"
@@ -55,6 +58,12 @@
#define XML_SNAPSHOT "pick_snapshot"
#define XML_LOCATION "pick_location"
+#define XML_BTN_SAVE "save_changes_btn"
+
+#define SAVE_BTN_LABEL "[WHAT]"
+#define LABEL_PICK = "Pick"
+#define LABEL_CHANGES = "Changes"
+
LLPanelPick::LLPanelPick(BOOL edit_mode/* = FALSE */)
: LLPanel(), LLAvatarPropertiesObserver(),
@@ -78,15 +87,27 @@ LLPanelPick::LLPanelPick(BOOL edit_mode/* = FALSE */)
LLPanelPick::~LLPanelPick()
{
- if (!mCreatorId.isNull()) LLAvatarPropertiesProcessor::instance().removeObserver(mCreatorId, this);
+ if (mCreatorId.notNull()) LLAvatarPropertiesProcessor::instance().removeObserver(mCreatorId, this);
}
void LLPanelPick::reset()
{
+ setEditMode(FALSE);
+
mPickId.setNull();
mCreatorId.setNull();
mParcelId.setNull();
+ setPickName("");
+ setPickDesc("");
+ setPickLocation("");
+ mSnapshotCtrl->setImageAssetID(LLUUID::null);
+
+ //*HACK just setting asset id to NULL not enough to clear
+ //the texture controls, w/o setValid(FALSE) it continues to
+ //draw the previously set image
+ mSnapshotCtrl->setValid(FALSE);
+
mDataReceived = FALSE;
mPosGlobal.clearVec();
@@ -98,17 +119,24 @@ BOOL LLPanelPick::postBuild()
if (mEditMode)
{
- childSetAction("cancel_btn", onClickCancel, this);
- childSetAction("set_to_curr_location_btn", onClickSet, this);
- childSetAction("save_changes_btn", onClickSave, this);
+ childSetAction("cancel_btn", boost::bind(&LLPanelPick::onClickCancel, this));
+ childSetAction("set_to_curr_location_btn", boost::bind(&LLPanelPick::onClickSet, this));
+ childSetAction(XML_BTN_SAVE, boost::bind(&LLPanelPick::onClickSave, this));
+
+ mSnapshotCtrl->setMouseEnterCallback(boost::bind(&LLPanelPick::childSetVisible, this, "edit_icon", true));
+ mSnapshotCtrl->setMouseLeaveCallback(boost::bind(&LLPanelPick::childSetVisible, this, "edit_icon", false));
}
else
{
- childSetAction("edit_btn", onClickEdit, this);
- childSetAction("teleport_btn", onClickTeleport, this);
- childSetAction("show_on_map_btn", onClickMap, this);
- childSetAction("back_btn", onClickBack, this);
- //*TODO set on menu
+ childSetAction("edit_btn", boost::bind(&LLPanelPick::onClickEdit, this));
+ childSetAction("teleport_btn", boost::bind(&LLPanelPick::onClickTeleport, this));
+ childSetAction("show_on_map_btn", boost::bind(&LLPanelPick::onClickMap, this));
+
+ if (!mBackCb.empty())
+ {
+ LLButton* button = findChild<LLButton>("back_btn");
+ if (button) button->setClickedCallback(mBackCb);
+ }
}
return TRUE;
@@ -119,21 +147,15 @@ void LLPanelPick::init(LLUUID creator_id, LLUUID pick_id)
mCreatorId = creator_id;
mPickId = pick_id;
- // on Pick Info panel (for non-Agent picks) edit_btn should be invisible
- if (!mEditMode)
- {
- if (mCreatorId != gAgentID)
- {
- childSetEnabled("edit_btn", FALSE);
- childSetVisible("edit_btn", FALSE);
- }
- else
- {
- childSetEnabled("edit_btn", TRUE);
- childSetVisible("edit_btn", TRUE);
- }
- }
+ //*TODO consider removing this, already called by setEditMode()
+ updateButtons();
+ requestData();
+}
+
+void LLPanelPick::requestData()
+{
+ mDataReceived = FALSE;
LLAvatarPropertiesProcessor::instance().addObserver(mCreatorId, this);
LLAvatarPropertiesProcessor::instance().sendDataRequest(mCreatorId, APT_PICK_INFO, &mPickId);
}
@@ -143,11 +165,14 @@ void LLPanelPick::init(LLPickData *pick_data)
mPickId = pick_data->pick_id;
mCreatorId = pick_data->creator_id;
- setName(pick_data->name);
- setDesc(pick_data->desc);
- setLocation(pick_data->location_text);
+ setPickName(pick_data->name);
+ setPickDesc(pick_data->desc);
+ setPickLocation(pick_data->location_text);
mSnapshotCtrl->setImageAssetID(pick_data->snapshot_id);
+ //*HACK see reset() where the texture control was set to FALSE
+ mSnapshotCtrl->setValid(TRUE);
+
mPosGlobal = pick_data->pos_global;
mSimName = pick_data->sim_name;
mParcelId = pick_data->parcel_id;
@@ -164,12 +189,14 @@ void LLPanelPick::createNewPick()
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if (parcel)
{
- setName(parcel->getName());
- setDesc(parcel->getDesc());
+ setPickName(parcel->getName());
+ setPickDesc(parcel->getDesc());
mSnapshotCtrl->setImageAssetID(parcel->getSnapshotID());
}
sendUpdate();
+
+ childSetLabelArg(XML_BTN_SAVE, SAVE_BTN_LABEL, std::string("Pick"));
}
/*virtual*/ void LLPanelPick::processProperties(void* data, EAvatarProcessorType type)
@@ -183,7 +210,7 @@ void LLPanelPick::createNewPick()
init(pick_data);
mDataReceived = TRUE;
- LLAvatarPropertiesProcessor::instance().removeObserver(gAgentID, this);
+ LLAvatarPropertiesProcessor::instance().removeObserver(mCreatorId, this);
}
@@ -192,47 +219,36 @@ void LLPanelPick::setEditMode( BOOL edit_mode )
if (mEditMode == edit_mode) return;
mEditMode = edit_mode;
- if (edit_mode)
- {
- // preserve data before killing controls
- std::string name = getName();
- std::string desc = getDesc();
- std::string location = getLocation();
- LLUUID snapshot_id = mSnapshotCtrl->getImageAssetID();
- LLRect old_rect = getRect();
+ // preserve data before killing controls
+ LLUUID snapshot_id = mSnapshotCtrl->getImageAssetID();
+ LLRect old_rect = getRect();
- deleteAllChildren();
+ deleteAllChildren();
+ if (edit_mode)
+ {
LLUICtrlFactory::getInstance()->buildPanel(this, XML_PANEL_EDIT_PICK);
-
- //*NOTE this code is from LLPanelMeProfile.togglePanel()... doubt this is a right way to do things
- reshape(old_rect.getWidth(), old_rect.getHeight());
- old_rect.setLeftTopAndSize(0, old_rect.getHeight(), old_rect.getWidth(), old_rect.getHeight());
- setRect(old_rect);
-
- // time to restore data
- setName(name);
- setDesc(desc);
- setLocation(location);
- mSnapshotCtrl->setImageAssetID(snapshot_id);
}
else
{
- // returning to VIEW mode - need to perform cleanup
- // this is the case when that panel is reused between viewing/editing different picks
- deleteAllChildren();
- reset();
LLUICtrlFactory::getInstance()->buildPanel(this, XML_PANEL_PICK_INFO);
}
-}
-//*HACK need to be redone - control panel toggling from parent (Me Panel/Avatar Profile Panel)
-void LLPanelPick::setPanelMeProfile(LLPanelMeProfile* meProfilePanel)
-{
- mMeProfilePanel = meProfilePanel;
+ //*NOTE this code is from LLPanelMeProfile.togglePanel()... doubt this is a right way to do things
+ reshape(old_rect.getWidth(), old_rect.getHeight());
+ old_rect.setLeftTopAndSize(0, old_rect.getHeight(), old_rect.getWidth(), old_rect.getHeight());
+ setRect(old_rect);
+
+ // time to restore data
+ setPickName(mName);
+ setPickDesc(mDesc);
+ setPickLocation(mLocation);
+ mSnapshotCtrl->setImageAssetID(snapshot_id);
+
+ updateButtons();
}
-void LLPanelPick::setName(std::string name)
+void LLPanelPick::setPickName(std::string name)
{
if (mEditMode)
{
@@ -242,9 +258,12 @@ void LLPanelPick::setName(std::string name)
{
childSetWrappedText(XML_NAME, name);
}
+
+ //preserving non-wrapped text for info/edit modes switching
+ mName = name;
}
-void LLPanelPick::setDesc(std::string desc)
+void LLPanelPick::setPickDesc(std::string desc)
{
if (mEditMode)
{
@@ -254,24 +273,30 @@ void LLPanelPick::setDesc(std::string desc)
{
childSetWrappedText(XML_DESC, desc);
}
+
+ //preserving non-wrapped text for info/edit modes switching
+ mDesc = desc;
}
-void LLPanelPick::setLocation(std::string location)
+void LLPanelPick::setPickLocation(std::string location)
{
childSetWrappedText(XML_LOCATION, location);
+
+ //preserving non-wrapped text for info/edit modes switching
+ mLocation = location;
}
-std::string LLPanelPick::getName()
+std::string LLPanelPick::getPickName()
{
return childGetValue(XML_NAME).asString();
}
-std::string LLPanelPick::getDesc()
+std::string LLPanelPick::getPickDesc()
{
return childGetValue(XML_DESC).asString();
}
-std::string LLPanelPick::getLocation()
+std::string LLPanelPick::getPickLocation()
{
return childGetValue(XML_LOCATION).asString();
}
@@ -292,13 +317,16 @@ void LLPanelPick::sendUpdate()
//legacy var need to be deleted
pick_data.top_pick = FALSE;
pick_data.parcel_id = mParcelId;
- pick_data.name = getName();
- pick_data.desc = getDesc();
+ pick_data.name = getPickName();
+ pick_data.desc = getPickDesc();
pick_data.snapshot_id = mSnapshotCtrl->getImageAssetID();
pick_data.pos_global = mPosGlobal;
pick_data.sort_order = 0;
pick_data.enabled = TRUE;
+ mDataReceived = FALSE;
+ LLAvatarPropertiesProcessor::instance().addObserver(gAgentID, this);
+
LLAvatarPropertiesProcessor::instance().sendDataUpdate(&pick_data, APT_PICK_INFO);
}
@@ -308,85 +336,117 @@ void LLPanelPick::sendUpdate()
//-----------------------------------------
//static
-void LLPanelPick::onClickEdit(void* data)
-{
- LLPanelPick* self = (LLPanelPick*)data;
- if (!self) return;
- if (self->mEditMode) return;
- if (!self->mDataReceived) return;
-
- self->setEditMode(TRUE);
-}
-
-//static
-void LLPanelPick::onClickTeleport(void* data)
+void LLPanelPick::onClickEdit()
{
- //LLPanelPick* self = (LLPanelPick*)data;
- //*TODO implement
+ if (mEditMode) return;
+ if (!mDataReceived) return;
+ setEditMode(TRUE);
}
//static
-void LLPanelPick::onClickMap(void* data)
+void LLPanelPick::onClickTeleport()
{
- //LLPanelPick* self = (LLPanelPick*)data;
- //*TODO implement
+ teleport(mPosGlobal);
}
-//*HACK need to move panel toggling to parent panels
//static
-void LLPanelPick::onClickBack(void* data)
+void LLPanelPick::onClickMap()
{
- LLPanelPick* self = (LLPanelPick*)data;
- if (!self) return;
- self->mMeProfilePanel->togglePanel(self);
+ showOnMap(mPosGlobal);
}
-
//-----------------------------------------
// "EDIT PICK" (EDIT MODE) BUTTON HANDLERS
//-----------------------------------------
//static
-void LLPanelPick::onClickCancel(void* data)
+void LLPanelPick::onClickCancel()
{
- LLPanelPick* self = (LLPanelPick*) data;
- if (!self) return;
- if (!self->mEditMode) return;
- self->mMeProfilePanel->togglePanel(self);
+ if (!mEditMode) return;
+
+ LLUUID pick_id = mPickId;
+ LLUUID creator_id = mCreatorId;
+ reset();
+ init(creator_id, pick_id);
}
// static
-void LLPanelPick::onClickSet(void* data)
+void LLPanelPick::onClickSet()
{
- //TODO check whether pick data was received before
-
- LLPanelPick* self = (LLPanelPick*) data;
- if (!self) return;
- if (!self->mEditMode) return;
+ if (!mEditMode) return;
+ if (!mDataReceived) return;
// Save location for later.
- self->mPosGlobal = gAgent.getPositionGlobal();
+ mPosGlobal = gAgent.getPositionGlobal();
- S32 region_x = llround((F32)self->mPosGlobal.mdV[VX]) % REGION_WIDTH_UNITS;
- S32 region_y = llround((F32)self->mPosGlobal.mdV[VY]) % REGION_WIDTH_UNITS;
- S32 region_z = llround((F32)self->mPosGlobal.mdV[VZ]);
+ S32 region_x = llround((F32)mPosGlobal.mdV[VX]) % REGION_WIDTH_UNITS;
+ S32 region_y = llround((F32)mPosGlobal.mdV[VY]) % REGION_WIDTH_UNITS;
+ S32 region_z = llround((F32)mPosGlobal.mdV[VZ]);
std::string location_text = "(will update after save), ";
- location_text.append(self->mSimName);
+ location_text.append(mSimName);
location_text.append(llformat(" (%d, %d, %d)", region_x, region_y, region_z));
- self->setLocation(location_text);
+ setPickLocation(location_text);
}
// static
-void LLPanelPick::onClickSave(void* data)
+void LLPanelPick::onClickSave()
{
- LLPanelPick* self = (LLPanelPick*)data;
- if (!self->mEditMode) return;
- if (!self->mDataReceived) return;
+ if (!mEditMode) return;
+ if (!mDataReceived) return;
+
+ sendUpdate();
+ setEditMode(FALSE);
+}
- //*TODO check if data was received before
- self->sendUpdate();
- self->mMeProfilePanel->togglePanel(self);
+void LLPanelPick::updateButtons()
+{
+
+ // on Pick Info panel (for non-Agent picks) edit_btn should be invisible
+ if (mEditMode)
+ {
+ childSetLabelArg(XML_BTN_SAVE, SAVE_BTN_LABEL, std::string("Changes"));
+ }
+ else
+ {
+ if (mCreatorId != gAgentID)
+ {
+ childSetEnabled("edit_btn", FALSE);
+ childSetVisible("edit_btn", FALSE);
+ }
+ else
+ {
+ childSetEnabled("edit_btn", TRUE);
+ childSetVisible("edit_btn", TRUE);
+ }
+ }
+}
+
+void LLPanelPick::setExitCallback(commit_callback_t cb)
+{
+ mBackCb = cb;
+ if (!mEditMode)
+ {
+ LLButton* button = findChild<LLButton>("back_btn");
+ if (button) button->setClickedCallback(mBackCb);
+ }
+}
+
+//static
+void LLPanelPick::teleport(const LLVector3d& position)
+{
+ if (!position.isExactlyZero())
+ {
+ gAgent.teleportViaLocation(position);
+ LLFloaterWorldMap::getInstance()->trackLocation(position);
+ }
+}
+
+//static
+void LLPanelPick::showOnMap(const LLVector3d& position)
+{
+ LLFloaterWorldMap::getInstance()->trackLocation(position);
+ LLFloaterReg::showInstance("world_map", "center");
}
diff --git a/indra/newview/llpanelpick.h b/indra/newview/llpanelpick.h
index 8ada1a39fb..15b0d6c541 100644
--- a/indra/newview/llpanelpick.h
+++ b/indra/newview/llpanelpick.h
@@ -41,7 +41,6 @@
class LLTextureCtrl;
class LLMessageSystem;
-class LLPanelMeProfile;
class LLAvatarPropertiesObserver;
class LLPanelPick : public LLPanel, public LLAvatarPropertiesObserver
@@ -51,6 +50,7 @@ public:
LLPanelPick(BOOL edit_mode = FALSE);
/*virtual*/ ~LLPanelPick();
+ // switches the panel to the VIEW mode and resets controls
void reset();
/*virtual*/ BOOL postBuild();
@@ -59,47 +59,61 @@ public:
// initial position, etc.
void createNewPick();
+ //initializes the panel with data of the pick with id = pick_id
+ //owned by the avatar with id = creator_id
void init(LLUUID creator_id, LLUUID pick_id);
/*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
+ // switches the panel to either View or Edit mode
void setEditMode(BOOL edit_mode);
- //TODO redo panel toggling
- void setPanelMeProfile(LLPanelMeProfile* meProfilePanel);
+ // because this panel works in two modes (edit/view) we are
+ // free from managing two panel for editing and viewing picks and so
+ // are free from controlling switching between them in the parent panel (e.g. Me Profile)
+ // but that causes such a complication that we cannot set a callback for a "Back" button
+ // from the parent panel only once, so we have to preserve that callback
+ // in the pick panel and set it for the back button everytime postBuild() is called.
+ void setExitCallback(commit_callback_t cb);
+
+ static void teleport(const LLVector3d& position);
+ static void showOnMap(const LLVector3d& position);
+
protected:
- void setName(std::string name);
- void setDesc(std::string desc);
- void setLocation(std::string location);
+ void setPickName(std::string name);
+ void setPickDesc(std::string desc);
+ void setPickLocation(std::string location);
- std::string getName();
- std::string getDesc();
- std::string getLocation();
+ std::string getPickName();
+ std::string getPickDesc();
+ std::string getPickLocation();
void sendUpdate();
+ void requestData();
+
void init(LLPickData *pick_data);
+ void updateButtons();
+
//-----------------------------------------
// "PICK INFO" (VIEW MODE) BUTTON HANDLERS
//-----------------------------------------
- static void onClickEdit(void* data);
- static void onClickTeleport(void* data);
- static void onClickMap(void* data);
- static void onClickBack(void* data);
+ void onClickEdit();
+ void onClickTeleport();
+ void onClickMap();
//-----------------------------------------
// "EDIT PICK" (EDIT MODE) BUTTON HANDLERS
//-----------------------------------------
- static void onClickSet(void* data);
- static void onClickSave(void* data);
- static void onClickCancel(void* data);
+ void onClickSet();
+ void onClickSave();
+ void onClickCancel();
protected:
BOOL mEditMode;
LLTextureCtrl* mSnapshotCtrl;
- BOOL mDataRequested;
BOOL mDataReceived;
LLUUID mPickId;
@@ -108,8 +122,12 @@ protected:
LLUUID mParcelId;
std::string mSimName;
- //TODO redo panel toggling
- LLPanelMeProfile* mMeProfilePanel;
+ //These strings are used to keep non-wrapped text
+ std::string mName;
+ std::string mDesc;
+ std::string mLocation;
+
+ commit_callback_t mBackCb;
};
#endif // LL_LLPANELPICK_H
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index 1a3aa8a33a..e8d6ff9ec9 100644
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -36,37 +36,43 @@
#include "llavatarconstants.h"
#include "lltexturectrl.h"
#include "llviewergenericmessage.h" // send_generic_message
-#include "llworldmap.h"
-#include "llfloaterworldmap.h"
-#include "llpanelmeprofile.h"
-#include "llfloaterreg.h"
+#include "llmenugl.h"
+#include "llviewermenu.h"
+#include "llregistry.h"
+
#include "llpanelpicks.h"
#include "llavatarpropertiesprocessor.h"
+#include "llpanelavatar.h"
+#include "llpanelprofile.h"
#include "llpanelpick.h"
+#include "llscrollcontainer.h"
+
+static const std::string XML_BTN_NEW = "new_btn";
+static const std::string XML_BTN_DELETE = "trash_btn";
+static const std::string XML_BTN_INFO = "info_btn";
+static const std::string XML_BTN_TELEPORT = "teleport_btn";
+static const std::string XML_BTN_SHOW_ON_MAP = "show_on_map_btn";
+
+static const std::string XML_PICKS_LIST = "back_panel";
-#define XML_BTN_NEW "new_btn"
-#define XML_BTN_DELETE "trash_btn"
-#define XML_BTN_INFO "info_btn"
+#define PICK_ITEMS_BETWEEN 5
//-----------------------------------------------------------------------------
// LLPanelPicks
//-----------------------------------------------------------------------------
-LLPanelPicks::LLPanelPicks(const LLUUID& avatar_id /* = LLUUID::null */)
-:LLPanelProfileTab(avatar_id), mMeProfilePanel(NULL)
+LLPanelPicks::LLPanelPicks()
+: LLPanelProfileTab(LLUUID::null),
+ mPopupMenu(NULL),
+ mSelectedPickItem(NULL),
+ mProfilePanel(NULL),
+ mPickPanel(NULL)
{
- updateData();
-}
-
-LLPanelPicks::LLPanelPicks(const Params& params)
-:LLPanelProfileTab(params), mMeProfilePanel(NULL)
-{
-
}
LLPanelPicks::~LLPanelPicks()
{
- if(!getAvatarId().isNull())
+ if(getAvatarId().notNull())
{
LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(),this);
}
@@ -74,12 +80,6 @@ LLPanelPicks::~LLPanelPicks()
void* LLPanelPicks::create(void* data /* = NULL */)
{
- LLSD* id = NULL;
- if(data)
- {
- id = static_cast<LLSD*>(data);
- return new LLPanelPicks(LLUUID(id->asUUID()));
- }
return new LLPanelPicks();
}
@@ -99,8 +99,13 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type)
gCacheName->getName(getAvatarId(),name,second_name);
childSetTextArg("pick_title", "[NAME]",name);
- LLView* picks_list = getChild<LLView>("back_panel",TRUE,FALSE);
+ LLView* picks_list = getPicksList();
if(!picks_list) return;
+
+ // to restore selection of the same item later
+ LLUUID pick_id_selected(LLUUID::null);
+ if (mSelectedPickItem) pick_id_selected = mSelectedPickItem->getPickId();
+
clear();
//*TODO move it somewhere else?
@@ -108,13 +113,9 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type)
childSetEnabled(XML_BTN_NEW, false);
childSetEnabled(XML_BTN_DELETE, false);
childSetEnabled(XML_BTN_INFO, false);
+ childSetEnabled(XML_BTN_TELEPORT,!avatar_picks->picks_list.empty());
+ childSetEnabled(XML_BTN_SHOW_ON_MAP,!avatar_picks->picks_list.empty());
- S32 height = avatar_picks->picks_list.size() * 85;
- LLRect rc = picks_list->getRect();
- rc.setLeftTopAndSize(rc.mLeft,rc.mTop,rc.getWidth(),height);
- picks_list->setRect(rc);
- picks_list->reshape(rc.getWidth(),rc.getHeight());
-
LLAvatarPicks::picks_list_t::const_iterator it = avatar_picks->picks_list.begin();
for(; avatar_picks->picks_list.end() != it; ++it)
{
@@ -122,32 +123,26 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type)
std::string pick_name = it->second;
LLPickItem* picture = LLPickItem::create();
+ picture->childSetAction("info_chevron", boost::bind(&LLPanelPicks::onClickInfo, this));
+
picks_list->addChild(picture);
- picture->setPictureName(pick_name);
- picture->setPictureId(pick_id);
+ picture->setPickName(pick_name);
+ picture->setPickId(pick_id);
picture->setCreatorId(getAvatarId());
- S32 last_bottom = picks_list->getRect().getHeight();
- if(mPickItemList.size() > 0)
- {
- last_bottom = mPickItemList[mPickItemList.size()-1]->getRect().mBottom;
- last_bottom -= 5;
- }
- LLRect rc = picture->getRect();
- rc.mBottom = last_bottom - rc.getHeight();
- rc.mTop = last_bottom;
- picture->reshape(rc.getWidth(),rc.getHeight());
- picture->setRect(rc);
-
-
LLAvatarPropertiesProcessor::instance().addObserver(mAvatarId, picture);
picture->update();
mPickItemList.push_back(picture);
+ if (pick_id_selected != LLUUID::null &&
+ pick_id == pick_id_selected) setSelectedPickItem(picture);
}
+
+ reshapePicksList();
LLAvatarPropertiesProcessor::getInstance()->removeObserver(getAvatarId(),this);
updateButtons();
+ if (!mSelectedPickItem && mPickItemList.size()) setSelectedPickItem(mPickItemList.back());
picks_list->setEnabled(TRUE);
}
@@ -156,7 +151,7 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type)
void LLPanelPicks::clear()
{
- LLView* scroll = getChild<LLView>("back_panel",TRUE,FALSE);
+ LLView* scroll = getPicksList();
if(scroll)
{
picture_list_t::const_iterator it = mPickItemList.begin();
@@ -167,27 +162,110 @@ void LLPanelPicks::clear()
}
}
mPickItemList.clear();
+ mSelectedPickItem = NULL;
+}
+
+
+LLPickItem* LLPanelPicks::getSelectedPickItem()
+{
+ return mSelectedPickItem;
+}
+
+
+void LLPanelPicks::removePickItem( LLPickItem* pick_item )
+{
+ LLView* scroll = getPicksList();
+ scroll->removeChild(pick_item);
+ mPickItemList.remove(pick_item);
+ if (mPickItemList.size() == 0)
+ {
+ mSelectedPickItem = NULL;
+ }
+ else
+ {
+ setSelectedPickItem(mPickItemList.back());
+ }
+
+ reshapePicksList();
+}
+
+void LLPanelPicks::reshapePicksList()
+{
+ if (!mPickItemList.size()) return;
+ LLView* pickList = getPicksList();
+
+ S32 last_bottom = pickList->getRect().getHeight();
+ child_list_const_iter_t child_it, child_first_it = pickList->getChildList()->begin();
+ for ( child_it = child_first_it; child_it != pickList->getChildList()->end(); ++child_it)
+ {
+ LLView* const childp = *child_it;
+ if(child_it != child_first_it)
+ {
+ last_bottom -= childp->getRect().getHeight();
+ last_bottom -= PICK_ITEMS_BETWEEN;
+ }
+ reshapePickItem(childp, last_bottom,pickList->getRect().getWidth());
+ }
+
+ S32 height = pickList->getChildCount() * ((*child_first_it)->getRect().getHeight() + PICK_ITEMS_BETWEEN);
+ LLRect rc = pickList->getRect();
+ rc.setLeftTopAndSize(rc.mLeft, rc.mTop, rc.getWidth(), height);
+ pickList->reshape(rc.getWidth(), rc.getHeight());
+ pickList->setRect(rc);
+}
+
+void LLPanelPicks::reshapePickItem(LLView* const pick_item, const S32 last_bottom, const S32 newWidth)
+{
+ LLRect rc = pick_item->getRect();
+ rc.mBottom = last_bottom - rc.getHeight();
+ rc.mTop = last_bottom;
+ pick_item->setRect(rc);
+ pick_item->reshape(newWidth, rc.getHeight());
}
-BOOL LLPanelPicks::postBuild(void)
+LLView* LLPanelPicks::getPicksList() const
{
- childSetAction(XML_BTN_INFO, onClickInfo, this);
- childSetAction(XML_BTN_NEW, onClickNew, this);
- childSetAction(XML_BTN_DELETE, onClickDelete, this);
+ return getChild<LLView>(XML_PICKS_LIST, TRUE, FALSE);
+}
+
+BOOL LLPanelPicks::postBuild()
+{
+ childSetAction(XML_BTN_DELETE, boost::bind(&LLPanelPicks::onClickDelete, this));
+
+ childSetAction("teleport_btn", boost::bind(&LLPanelPicks::onClickTeleport, this));
+ childSetAction("show_on_map_btn", boost::bind(&LLPanelPicks::onClickMap, this));
- childSetAction("teleport_btn", onClickTeleport, this);
- childSetAction("show_on_map_btn", onClickMap, this);
+ childSetAction("info_btn", boost::bind(&LLPanelPicks::onClickInfo, this));
+ childSetAction("new_btn", boost::bind(&LLPanelPicks::onClickNew, this));
+
+ CommitCallbackRegistry::ScopedRegistrar registar;
+ registar.add("Pick.Info", boost::bind(&LLPanelPicks::onClickInfo, this));
+ registar.add("Pick.Edit", boost::bind(&LLPanelPicks::onClickMenuEdit, this));
+ registar.add("Pick.Teleport", boost::bind(&LLPanelPicks::onClickTeleport, this));
+ registar.add("Pick.Map", boost::bind(&LLPanelPicks::onClickMap, this));
+ registar.add("Pick.Delete", boost::bind(&LLPanelPicks::onClickDelete, this));
+ mPopupMenu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_picks.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+
return TRUE;
}
-void LLPanelPicks::onActivate(const LLUUID& id)
+void LLPanelPicks::onOpen(const LLSD& key)
{
+ const LLUUID id(key.asUUID());
BOOL self = (gAgent.getID() == id);
// only agent can edit her picks
childSetEnabled("edit_panel", self);
childSetVisible("edit_panel", self);
+ // Disable buttons when viewing profile for first time
+ if(getAvatarId() != id)
+ {
+ childSetEnabled(XML_BTN_INFO,FALSE);
+ childSetEnabled(XML_BTN_TELEPORT,FALSE);
+ childSetEnabled(XML_BTN_SHOW_ON_MAP,FALSE);
+ }
+
// and see a special title - set as invisible by default in xml file
if (self)
{
@@ -195,176 +273,231 @@ void LLPanelPicks::onActivate(const LLUUID& id)
childSetVisible("pick_title_agent", self);
}
- LLPanelProfileTab::onActivate(id);
+ LLPanelProfileTab::onOpen(key);
}
-
//static
-void LLPanelPicks::onClickInfo(void *data)
+void LLPanelPicks::onClickDelete()
{
- LLPanelPicks* self = (LLPanelPicks*) data;
- if (self)
+ LLPickItem* pick_item = getSelectedPickItem();
+ if (!pick_item) return;
+
+ LLSD args;
+ args["PICK"] = pick_item->getPickName();
+ LLNotifications::instance().add("DeleteAvatarPick", args, LLSD(), boost::bind(&LLPanelPicks::callbackDelete, this, _1, _2));
+}
+
+bool LLPanelPicks::callbackDelete(const LLSD& notification, const LLSD& response)
+{
+ S32 option = LLNotification::getSelectedOption(notification, response);
+
+ LLPickItem* pick_item = getSelectedPickItem();
+
+ if (0 == option)
{
- LLPanelPick* panel_pick_info = new LLPanelPick();
-
- //*TODO redo, use the selected pick from List View, but not the first (last) one
- LLView* scroll = self->getChild<LLView>("back_panel", TRUE, FALSE);
- LLPickItem* pick = static_cast<LLPickItem*>(scroll->getFirstChild());
- if (!pick) return;
+ LLAvatarPropertiesProcessor::instance().sendPickDelete(pick_item->getPickId());
+ removePickItem(pick_item);
+ }
+ updateButtons();
+ return false;
+}
- panel_pick_info->init(pick->getCreatorId(), pick->getPickId());
+bool LLPanelPicks::callbackTeleport( const LLSD& notification, const LLSD& response )
+{
+ S32 option = LLNotification::getSelectedOption(notification, response);
- //*HACK redo toggling of panels (should work on both "profiles")
- if (self->mMeProfilePanel)
- {
- panel_pick_info->setPanelMeProfile(self->mMeProfilePanel);
- //self->mMeProfilePanel->addChildInBack(panel_pick_info);
- self->mMeProfilePanel->togglePanel(panel_pick_info);
- }
+ if (0 == option)
+ {
+ onClickTeleport();
}
+ return false;
}
//static
-void LLPanelPicks::onClickNew(void *data)
+void LLPanelPicks::onClickTeleport()
+{
+ LLPickItem* pick_item = getSelectedPickItem();
+ if (!pick_item) return;
+ LLPanelPick::teleport(pick_item->getPosGlobal());
+}
+
+//static
+void LLPanelPicks::onClickMap()
+{
+ LLPickItem* pick_item = getSelectedPickItem();
+ if (!pick_item) return;
+ LLPanelPick::showOnMap(pick_item->getPosGlobal());
+}
+
+
+BOOL LLPanelPicks::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
- LLPanelPicks* self = (LLPanelPicks*) data;
- if(self && self->mMeProfilePanel)
+ if (isMouseInPick(x, y))
{
- if (self->mPickItemList.size() >= MAX_AVATAR_PICKS)
+ if (mPopupMenu)
{
- //*TODO show warning message
- return;
+ mPopupMenu->buildDrawLabels();
+ mPopupMenu->updateParent(LLMenuGL::sMenuContainer);
+ ((LLContextMenu*)mPopupMenu)->show(x, y);
+ LLMenuGL::showPopup(this, mPopupMenu, x, y);
}
-
- //in edit mode
- LLPanelPick* panel_edit_pick = new LLPanelPick(TRUE);
- panel_edit_pick->createNewPick();
-
- //*HACK redo toggling of panels
- panel_edit_pick->setPanelMeProfile(self->mMeProfilePanel);
- self->mMeProfilePanel->togglePanel(panel_edit_pick);
+ return TRUE;
}
+ return LLPanel::handleRightMouseDown(x, y, mask);
}
-//static
-void LLPanelPicks::onClickDelete(void *data)
+BOOL LLPanelPicks::handleMouseDown( S32 x, S32 y, MASK mask )
{
- LLPanelPicks* self = (LLPanelPicks*) data;
- if(self && self->mMeProfilePanel)
- {
- //*TODO redo, use the selected pick from List View, but not the first (last) one
- LLView* scroll = self->getChild<LLView>("back_panel", TRUE, FALSE);
- LLPickItem* first_pick = static_cast<LLPickItem*>(scroll->getFirstChild());
- if (!first_pick) return;
+ isMouseInPick(x, y);
+ return LLPanel::handleMouseDown(x, y, mask);
+}
- LLSD args;
- args["PICK"] = first_pick->getPickName();
- LLNotifications::instance().add("DeleteAvatarPick", args, LLSD(), boost::bind(&LLPanelPicks::callbackDelete, self, _1, _2));
+BOOL LLPanelPicks::handleDoubleClick(S32 x, S32 y, MASK mask)
+{
+ if (isMouseInPick(x, y))
+ {
+ LLPickItem* pick_item = getSelectedPickItem();
+ if (pick_item)
+ {
+ LLSD args;
+ args["PICK"] = pick_item->getPickName();
+ LLNotifications::instance().add("TeleportToPick", args, LLSD(), boost::bind(&LLPanelPicks::callbackTeleport, this, _1, _2));
+ }
+ return TRUE;
}
+ return LLPanel::handleDoubleClick(x, y, mask);
}
-bool LLPanelPicks::callbackDelete(const LLSD& notification, const LLSD& response)
+void LLPanelPicks::updateButtons()
{
- S32 option = LLNotification::getSelectedOption(notification, response);
-
- //*TODO redo, use the selected pick from List View, but not the first (last) one
- LLView* scroll = getChild<LLView>("back_panel",TRUE,FALSE);
- LLPickItem* first_pick = static_cast<LLPickItem*>(scroll->getFirstChild());
- if (!first_pick) return false;
+ int picks_num = mPickItemList.size();
+ childSetEnabled(XML_BTN_INFO, picks_num > 0);
- if (0 == option)
+ if (mAvatarId == gAgentID)
{
- LLAvatarPropertiesProcessor::instance().sendPickDelete(first_pick->getPickId());
+ childSetEnabled(XML_BTN_NEW, picks_num < MAX_AVATAR_PICKS);
+ childSetEnabled(XML_BTN_DELETE, picks_num > 0);
- scroll->removeChild(first_pick);
- mPickItemList.pop_back();
- first_pick = NULL;
+ //*TODO move somewhere this calls
+ // we'd better set them up earlier when a panel was being constructed
+ mPopupMenu->setItemVisible("pick_delete", TRUE);
+ mPopupMenu->setItemVisible("pick_edit", TRUE);
+ mPopupMenu->setItemVisible("pick_separator", TRUE);
}
- updateButtons();
- return false;
-}
-void LLPanelPicks::setPanelMeProfile(LLPanelMeProfile* meProfilePanel)
-{
- mMeProfilePanel = meProfilePanel;
+ //*TODO update buttons like Show on Map, Teleport etc.
+
}
-//static
-void LLPanelPicks::teleport(const LLVector3d& position)
+void LLPanelPicks::setSelectedPickItem(LLPickItem* item)
{
- if (!position.isExactlyZero())
+ if (!item) return;
+ if (mSelectedPickItem == item) return;
+ if (mSelectedPickItem && mSelectedPickItem->isBackgroundVisible())
{
- gAgent.teleportViaLocation(position);
- LLFloaterWorldMap::getInstance()->trackLocation(position);
+ mSelectedPickItem->setBackgroundVisible(FALSE);
}
+ item->setBackgroundVisible(TRUE);
+ mSelectedPickItem = item;
}
-//static
-void LLPanelPicks::onClickTeleport(void* data)
+BOOL LLPanelPicks::isMouseInPick( S32 x, S32 y )
{
- LLPanelPicks* self = (LLPanelPicks*)data;
+ LLScrollContainer* scroll = getChild<LLScrollContainer>("profile_scroll");
+ if (!scroll->parentPointInView(x, y)) return FALSE;
- if (!self->mPickItemList.size()) return;
+ S32 x_l = x;
+ S32 y_l = y;
+
+ picture_list_t::const_iterator it = mPickItemList.begin();
+ for(; mPickItemList.end() != it; ++it)
+ {
+ localPointToOtherView(x, y, &x_l, &y_l, (*it));
+ if ((*it)->pointInView(x_l, y_l))
+ {
+ setSelectedPickItem(*it);
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
- //*TODO use the selected Pick instead of the last one in the list of Picks
- LLPickItem* last_pick = self->mPickItemList.back();
- if (!last_pick) return;
- teleport(last_pick->getPosGlobal());
+void LLPanelPicks::setProfilePanel(LLPanelProfile* profile_panel)
+{
+ mProfilePanel = profile_panel;
}
-//static
-void LLPanelPicks::onClickMap(void* data)
+
+void LLPanelPicks::buildPickPanel()
{
- LLPanelPicks* self = (LLPanelPicks*)data;
-
- if (!self->mPickItemList.size()) return;
-
- //*TODO use the selected Pick instead of the last one in the list of Picks
- LLPickItem* last_pick = self->mPickItemList.back();
- if (!last_pick) return;
+ if (mPickPanel == NULL)
+ {
+ mPickPanel = new LLPanelPick();
+ mPickPanel->setExitCallback(boost::bind(&LLPanelPicks::onClickBack, this));
+ }
+}
+
+void LLPanelPicks::onClickNew()
+{
+ buildPickPanel();
+ mPickPanel->setEditMode(TRUE);
+ mPickPanel->createNewPick();
+ getProfilePanel()->togglePanel(mPickPanel);
+}
- showOnMap(last_pick->getPosGlobal());
+void LLPanelPicks::onClickInfo()
+{
+ LLPickItem* pick = getSelectedPickItem();
+ if (!pick) return;
+ buildPickPanel();
+ mPickPanel->reset();
+ mPickPanel->init(pick->getCreatorId(), pick->getPickId());
+ getProfilePanel()->togglePanel(mPickPanel);
}
-//static
-void LLPanelPicks::showOnMap(const LLVector3d& position)
+void LLPanelPicks::onClickBack()
{
- LLFloaterWorldMap::getInstance()->trackLocation(position);
- LLFloaterReg::showInstance("world_map", "center");
+ getProfilePanel()->togglePanel(mPickPanel);
}
-void LLPanelPicks::updateButtons()
+void LLPanelPicks::onClickMenuEdit()
{
- int picks_num = mPickItemList.size();
- childSetEnabled(XML_BTN_INFO, picks_num > 0);
+ //*TODO, refactor - most of that is similar to onClickInfo
+ LLPickItem* pick = getSelectedPickItem();
+ if (!pick) return;
- if (mAvatarId == gAgentID)
- {
- childSetEnabled(XML_BTN_NEW, picks_num < MAX_AVATAR_PICKS);
- childSetEnabled(XML_BTN_DELETE, picks_num > 0);
- }
+ buildPickPanel();
+ mPickPanel->reset();
+ mPickPanel->init(pick->getCreatorId(), pick->getPickId());
+ mPickPanel->setEditMode(TRUE);
+ getProfilePanel()->togglePanel(mPickPanel);
}
+inline LLPanelProfile* LLPanelPicks::getProfilePanel()
+{
+ llassert_always(NULL != mProfilePanel);
+ return mProfilePanel;
+}
//-----------------------------------------------------------------------------
// LLPanelPicks
//-----------------------------------------------------------------------------
LLPickItem::LLPickItem()
: LLPanel()
-, mPicID(LLUUID::null)
+, mPickID(LLUUID::null)
, mCreatorID(LLUUID::null)
, mParcelID(LLUUID::null)
, mSnapshotID(LLUUID::null)
, mNeedData(true)
{
- LLUICtrlFactory::getInstance()->buildPanel(this,"panel_pic_list_item.xml");
+ LLUICtrlFactory::getInstance()->buildPanel(this,"panel_pick_list_item.xml");
}
LLPickItem::~LLPickItem()
{
- if (!mCreatorID.isNull())
+ if (mCreatorID.notNull())
{
LLAvatarPropertiesProcessor::instance().removeObserver(mCreatorID, this);
}
@@ -378,7 +511,7 @@ LLPickItem* LLPickItem::create()
void LLPickItem::init(LLPickData* pick_data)
{
- setPictureDescription(pick_data->desc);
+ setPickDesc(pick_data->desc);
setSnapshotId(pick_data->snapshot_id);
mPosGlobal = pick_data->pos_global;
mLocation = pick_data->location_text;
@@ -390,12 +523,7 @@ void LLPickItem::init(LLPickData* pick_data)
}
}
-void LLPickItem::setPicture()
-{
-
-}
-
-void LLPickItem::setPictureName(const std::string& name)
+void LLPickItem::setPickName(const std::string& name)
{
mPickName = name;
childSetValue("picture_name",name);
@@ -417,19 +545,19 @@ const LLUUID& LLPickItem::getSnapshotId()
return mSnapshotID;
}
-void LLPickItem::setPictureDescription(const std::string& descr)
+void LLPickItem::setPickDesc(const std::string& descr)
{
childSetValue("picture_descr",descr);
}
-void LLPickItem::setPictureId(const LLUUID& id)
+void LLPickItem::setPickId(const LLUUID& id)
{
- mPicID = id;
+ mPickID = id;
}
const LLUUID& LLPickItem::getPickId()
{
- return mPicID;
+ return mPickID;
}
const LLVector3d& LLPickItem::getPosGlobal()
@@ -450,7 +578,7 @@ const std::string LLPickItem::getDescription()
void LLPickItem::update()
{
mNeedData = true;
- LLAvatarPropertiesProcessor::instance().sendDataRequest(mCreatorID, APT_PICK_INFO, &mPicID);
+ LLAvatarPropertiesProcessor::instance().sendDataRequest(mCreatorID, APT_PICK_INFO, &mPickID);
mNeedData = false;
}
@@ -461,9 +589,9 @@ void LLPickItem::processProperties(void *data, EAvatarProcessorType type)
LLPickData* pick_data = static_cast<LLPickData *>(data);
if (!pick_data) return;
- if (mPicID != pick_data->pick_id) return;
+ if (mPickID != pick_data->pick_id) return;
init(pick_data);
- LLAvatarPropertiesProcessor::instance().removeObserver(pick_data->agent_id, this);
+ LLAvatarPropertiesProcessor::instance().removeObserver(mCreatorID, this);
}
diff --git a/indra/newview/llpanelpicks.h b/indra/newview/llpanelpicks.h
index bb1ee06780..e0e7f69532 100644
--- a/indra/newview/llpanelpicks.h
+++ b/indra/newview/llpanelpicks.h
@@ -37,13 +37,16 @@
#include "v3dmath.h"
#include "lluuid.h"
#include "llavatarpropertiesprocessor.h"
+#include "llpanelavatar.h"
+#include "llregistry.h"
+class LLPanelProfile;
class LLMessageSystem;
class LLVector3d;
class LLPanelProfileTab;
-class LLPanelMeProfile;
class LLPanelPick;
class LLAgent;
+class LLMenuGL;
class LLPickItem;
@@ -51,46 +54,72 @@ class LLPanelPicks
: public LLPanelProfileTab
{
public:
- LLPanelPicks(const LLUUID& avatar_id = LLUUID::null);
- LLPanelPicks(const Params& params );
+ LLPanelPicks();
~LLPanelPicks();
static void* create(void* data);
- static void teleport(const LLVector3d& position);
-
- static void showOnMap(const LLVector3d& position);
-
/*virtual*/ BOOL postBuild(void);
- /*virtual*/ void onActivate(const LLUUID& id);
+ /*virtual*/ void onOpen(const LLSD& key);
void processProperties(void* data, EAvatarProcessorType type);
void updateData();
- void setPanelMeProfile(LLPanelMeProfile*);
-
void clear();
- //*TODO implement
- //LLPickItem& getSelectedPick();
+ // returns the selected pick item
+ LLPickItem* getSelectedPickItem();
+
+ // removes the specified pick item
+ void removePickItem(LLPickItem* pick_item);
+
+ /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
+ /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
+ /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
+
+ //*NOTE top down approch when panel toggling is done only by
+ // parent panels failed to work (picks related code was in me profile panel)
+ void setProfilePanel(LLPanelProfile* profile_panel);
private:
- static void onClickInfo(void* data);
- static void onClickNew(void* data);
- static void onClickDelete(void* data);
- static void onClickTeleport(void* data);
- static void onClickMap(void* data);
+ void onClickDelete();
+ void onClickTeleport();
+ void onClickMap();
+
+ //------------------------------------------------
+ // Callbacks which require panel toggling
+ //------------------------------------------------
+ void onClickNew();
+ void onClickInfo();
+ void onClickBack();
+ void onClickMenuEdit();
+
+ void buildPickPanel();
bool callbackDelete(const LLSD& notification, const LLSD& response);
+ bool callbackTeleport(const LLSD& notification, const LLSD& response);
+ void reshapePicksList();
+ void reshapePickItem(LLView* const pick_item, const S32 last_bottom, const S32 newWidth);
+ LLView* getPicksList() const;
void updateButtons();
- typedef std::vector<LLPickItem*> picture_list_t;
+ void setSelectedPickItem(LLPickItem* item);
+
+ BOOL isMouseInPick(S32 x, S32 y);
+
+ LLPanelProfile* getProfilePanel();
+
+
+ typedef std::list<LLPickItem*> picture_list_t;
picture_list_t mPickItemList;
- LLPanelMeProfile* mMeProfilePanel;
+ LLMenuGL* mPopupMenu;
+ LLPickItem* mSelectedPickItem;
+ LLPanelProfile* mProfilePanel;
+ LLPanelPick* mPickPanel;
};
class LLPickItem : public LLPanel, public LLAvatarPropertiesObserver
@@ -103,13 +132,11 @@ public:
void init(LLPickData* pick_data);
- void setPictureName(const std::string& name);
-
- void setPictureDescription(const std::string& descr);
+ void setPickName(const std::string& name);
- void setPicture();
+ void setPickDesc(const std::string& descr);
- void setPictureId(const LLUUID& id);
+ void setPickId(const LLUUID& id);
void setCreatorId(const LLUUID& id) {mCreatorID = id;};
@@ -139,7 +166,7 @@ public:
protected:
- LLUUID mPicID;
+ LLUUID mPickID;
LLUUID mCreatorID;
LLUUID mParcelID;
LLUUID mSnapshotID;
diff --git a/indra/newview/llpanelplace.cpp b/indra/newview/llpanelplace.cpp
index ad385d8bdf..83702c08ab 100644
--- a/indra/newview/llpanelplace.cpp
+++ b/indra/newview/llpanelplace.cpp
@@ -356,16 +356,17 @@ void LLPanelPlace::onClickTeleport(void* data)
}
// LLFloater* parent_floaterp = (LLFloater*)self->getParent();
parent_viewp->setVisible(false);
- if(self->mLandmarkAssetID.notNull())
+ LLFloaterWorldMap* worldmap_instance = LLFloaterWorldMap::getInstance();
+ if(self->mLandmarkAssetID.notNull() && worldmap_instance)
{
gAgent.teleportViaLandmark(self->mLandmarkAssetID);
- LLFloaterWorldMap::getInstance()->trackLandmark(self->mLandmarkAssetID);
+ worldmap_instance->trackLandmark(self->mLandmarkAssetID);
}
- else if (!self->mPosGlobal.isExactlyZero())
+ else if (!self->mPosGlobal.isExactlyZero() && worldmap_instance)
{
gAgent.teleportViaLocation(self->mPosGlobal);
- LLFloaterWorldMap::getInstance()->trackLocation(self->mPosGlobal);
+ worldmap_instance->trackLocation(self->mPosGlobal);
}
}
@@ -373,9 +374,11 @@ void LLPanelPlace::onClickTeleport(void* data)
void LLPanelPlace::onClickMap(void* data)
{
LLPanelPlace* self = (LLPanelPlace*)data;
- if (!self->mPosGlobal.isExactlyZero())
+ LLFloaterWorldMap* worldmap_instance = LLFloaterWorldMap::getInstance();
+
+ if (!self->mPosGlobal.isExactlyZero() && worldmap_instance)
{
- LLFloaterWorldMap::getInstance()->trackLocation(self->mPosGlobal);
+ worldmap_instance->trackLocation(self->mPosGlobal);
LLFloaterReg::showInstance("world_map", "center");
}
}
diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp
index 951c223668..b43828e681 100644
--- a/indra/newview/llpanelplaceinfo.cpp
+++ b/indra/newview/llpanelplaceinfo.cpp
@@ -34,43 +34,40 @@
#include "llpanelplaceinfo.h"
-// *TODO: reorder includes to match the coding standard
+#include "roles_constants.h"
+#include "llsdutil.h"
+#include "llsecondlifeurls.h"
+
#include "llinventory.h"
-#include "llviewercontrol.h"
+#include "llparcel.h"
+
#include "llqueryflags.h"
-#include "llui.h"
-#include "llsecondlifeurls.h"
-#include "llfloater.h"
-#include "llfloaterreg.h"
-#include "llagent.h"
-#include "llviewerwindow.h"
-#include "llviewerinventory.h"
#include "llbutton.h"
-#include "llfloaterworldmap.h"
#include "lllineeditor.h"
-#include "llinventorymodel.h"
-#include "lluiconstants.h"
-#include "roles_constants.h"
+#include "llscrollcontainer.h"
#include "lltextbox.h"
-#include "llviewertexteditor.h"
+
+#include "llagent.h"
+#include "llfloaterworldmap.h"
+#include "llinventorymodel.h"
#include "lltexturectrl.h"
-#include "lltrans.h"
-#include "llworldmap.h"
+#include "llviewerinventory.h"
+#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
-#include "lluictrlfactory.h"
-#include "llweb.h"
-#include "llsdutil.h"
+#include "llviewertexteditor.h"
+#include "llworldmap.h"
#include "llsdutil_math.h"
-static LLRegisterPanelClassWrapper<LLPanelPlaceInfo> t_places("panel_landmark_info");
+static LLRegisterPanelClassWrapper<LLPanelPlaceInfo> t_place_info("panel_place_info");
LLPanelPlaceInfo::LLPanelPlaceInfo()
: LLPanel(),
mParcelID(),
mRequestedID(),
mPosRegion(),
- mLandmarkID()
+ mLandmarkID(),
+ mMinHeight(0)
{}
LLPanelPlaceInfo::~LLPanelPlaceInfo()
@@ -83,6 +80,9 @@ LLPanelPlaceInfo::~LLPanelPlaceInfo()
BOOL LLPanelPlaceInfo::postBuild()
{
+ mTitle = getChild<LLTextBox>("panel_title");
+ mCurrentTitle = mTitle->getText();
+
// Since this is only used in the directory browser, always
// disable the snapshot control. Otherwise clicking on it will
// open a texture picker.
@@ -105,7 +105,14 @@ BOOL LLPanelPlaceInfo::postBuild()
mNotesEditor->setCommitCallback(boost::bind(&LLPanelPlaceInfo::onCommitTitleOrNote, this, NOTE));
mNotesEditor->setCommitOnFocusLost(true);
- mInfoPanel = getChild<LLPanel>("info_panel");
+ LLScrollContainer* scroll_container = getChild<LLScrollContainer>("scroll_container");
+ scroll_container->setBorderVisible(FALSE);
+ mMinHeight = scroll_container->getScrolledViewRect().getHeight();
+
+ mScrollingPanel = getChild<LLPanel>("scrolling_panel");
+
+ mInfoPanel = getChild<LLPanel>("info_panel", TRUE, FALSE);
+ mMediaPanel = getChild<LLMediaPanel>("media_panel", TRUE, FALSE);
return TRUE;
}
@@ -217,6 +224,8 @@ void LLPanelPlaceInfo::resetLocation()
mCreated->setText(not_available);
mTitleEditor->setText(LLStringUtil::null);
mNotesEditor->setText(LLStringUtil::null);
+ mSnapshotCtrl->setImageAssetID(LLUUID::null);
+ mSnapshotCtrl->setFallbackImageName("default_land_picture.j2c");
}
//virtual
@@ -226,6 +235,70 @@ void LLPanelPlaceInfo::setParcelID(const LLUUID& parcel_id)
sendParcelInfoRequest();
}
+void LLPanelPlaceInfo::setInfoType(INFO_TYPE type)
+{
+ if (!mInfoPanel)
+ return;
+
+ switch(type)
+ {
+ case CREATE_LANDMARK:
+ mCurrentTitle = getString("title_create_landmark");
+
+ toggleMediaPanel(FALSE);
+ break;
+
+ case PLACE:
+ mCurrentTitle = getString("title_place");
+
+ if (!isMediaPanelVisible())
+ {
+ mTitle->setText(mCurrentTitle);
+ }
+ break;
+
+ // Hide Media Panel if showing information about
+ // a landmark or a teleport history item
+ case LANDMARK:
+ mCurrentTitle = getString("title_landmark");
+
+ toggleMediaPanel(FALSE);
+ break;
+
+ case TELEPORT_HISTORY:
+ mCurrentTitle = getString("title_place");
+
+ toggleMediaPanel(FALSE);
+ break;
+ }
+}
+
+BOOL LLPanelPlaceInfo::isMediaPanelVisible()
+{
+ if (!mMediaPanel)
+ return FALSE;
+
+ return mMediaPanel->getVisible();
+}
+
+void LLPanelPlaceInfo::toggleMediaPanel(BOOL visible)
+{
+ if (!(mMediaPanel && mInfoPanel))
+ return;
+
+ if (visible)
+ {
+ mTitle->setText(getString("title_media"));
+ }
+ else
+ {
+ mTitle->setText(mCurrentTitle);
+ }
+
+ mInfoPanel->setVisible(!visible);
+ mMediaPanel->setVisible(visible);
+}
+
void LLPanelPlaceInfo::sendParcelInfoRequest()
{
if (mParcelID != mRequestedID)
@@ -300,21 +373,33 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data)
region_z = llround(parcel_data.global_z);
}
+ std::string name;
if (!parcel_data.sim_name.empty())
{
- std::string name = llformat("%s (%d, %d, %d)",
- parcel_data.sim_name.c_str(), region_x, region_y, region_z);
+ name = llformat("%s (%d, %d, %d)",
+ parcel_data.sim_name.c_str(), region_x, region_y, region_z);
mRegionName->setText(name);
}
+
+ if (mCurrentTitle != getString("title_landmark"))
+ {
+ mTitleEditor->setText(parcel_data.name + "; " + name);
+ mNotesEditor->setText(LLStringUtil::null);
+ }
}
void LLPanelPlaceInfo::displayParcelInfo(const LLVector3& pos_region,
const LLUUID& region_id,
const LLVector3d& pos_global)
{
- LLSD body;
mPosRegion = pos_region;
- std::string url = gAgent.getRegion()->getCapability("RemoteParcelRequest");
+
+ LLViewerRegion* region = gAgent.getRegion();
+ if (!region)
+ return;
+
+ LLSD body;
+ std::string url = region->getCapability("RemoteParcelRequest");
if (!url.empty())
{
body["location"] = ll_sd_from_vector3(pos_region);
@@ -333,8 +418,29 @@ void LLPanelPlaceInfo::displayParcelInfo(const LLVector3& pos_region,
{
mDescEditor->setText(getString("server_update_text"));
}
- mSnapshotCtrl->setImageAssetID(LLUUID::null);
- mSnapshotCtrl->setFallbackImageName("default_land_picture.j2c");
+}
+
+void LLPanelPlaceInfo::displayAgentParcelInfo()
+{
+ mPosRegion = gAgent.getPositionAgent();
+
+ LLViewerRegion* region = gAgent.getRegion();
+ LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
+ if (!region || !parcel)
+ return;
+
+ LLParcelData parcel_data;
+ parcel_data.desc = parcel->getDesc();
+ parcel_data.flags = parcel->getParcelFlags();
+ parcel_data.name = parcel->getName();
+ parcel_data.sim_name = gAgent.getRegion()->getName();
+ parcel_data.snapshot_id = parcel->getSnapshotID();
+ LLVector3d global_pos = gAgent.getPositionGlobal();
+ parcel_data.global_x = global_pos.mdV[0];
+ parcel_data.global_y = global_pos.mdV[1];
+ parcel_data.global_z = global_pos.mdV[2];
+
+ processParcelInfo(parcel_data);
}
void LLPanelPlaceInfo::onCommitTitleOrNote(LANDMARK_INFO_TYPE type)
@@ -381,3 +487,13 @@ void LLPanelPlaceInfo::onCommitTitleOrNote(LANDMARK_INFO_TYPE type)
gInventory.notifyObservers();
}
}
+
+void LLPanelPlaceInfo::reshape(S32 width, S32 height, BOOL called_from_parent)
+{
+ if (mMinHeight > 0)
+ {
+ mScrollingPanel->reshape(mScrollingPanel->getRect().getWidth(), mMinHeight);
+ }
+
+ LLView::reshape(width, height, called_from_parent);
+}
diff --git a/indra/newview/llpanelplaceinfo.h b/indra/newview/llpanelplaceinfo.h
index f88e29bc91..f06a2d1fb7 100644
--- a/indra/newview/llpanelplaceinfo.h
+++ b/indra/newview/llpanelplaceinfo.h
@@ -1,5 +1,5 @@
/**
- * @file llpanelplace.h
+ * @file llpanelplaceinfo.h
* @brief Displays place information in Side Tray.
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
@@ -40,50 +40,75 @@
#include "lliconctrl.h"
+#include "llpanelmedia.h"
#include "llremoteparcelrequest.h"
class LLButton;
-class LLTextBox;
+class LLInventoryItem;
class LLLineEditor;
+class LLTextBox;
class LLTextEditor;
class LLTextureCtrl;
-class LLInventoryItem;
class LLPanelPlaceInfo : public LLPanel, LLRemoteParcelInfoObserver
{
public:
+ enum INFO_TYPE
+ {
+ CREATE_LANDMARK,
+ PLACE,
+ LANDMARK,
+ TELEPORT_HISTORY
+ };
+
LLPanelPlaceInfo();
/*virtual*/ ~LLPanelPlaceInfo();
/*virtual*/ BOOL postBuild();
+ // Ignore all old location information, useful if you are
+ // recycling an existing dialog and need to clear it.
void resetLocation();
- // Ignore all old location information, useful if you are
- // recycling an existing dialog and need to clear it.
+ // Sends a request for data about the given parcel, which will
+ // only update the location if there is none already available.
/*virtual*/ void setParcelID(const LLUUID& parcel_id);
- // Sends a request for data about the given parcel, which will
- // only update the location if there is none already available.
+ // Depending on how the panel was triggered
+ // (from landmark or current location, or other)
+ // sets a corresponding title and contents.
+ void setInfoType(INFO_TYPE type);
+
+ BOOL isMediaPanelVisible();
+ void toggleMediaPanel(BOOL visible);
void displayItemInfo(const LLInventoryItem* pItem);
/*virtual*/ void setErrorStatus(U32 status, const std::string& reason);
void sendParcelInfoRequest();
+
+ // Displays information about a remote parcel.
+ // Sends a request to the server.
void displayParcelInfo(const LLVector3& pos_region,
const LLUUID& region_id,
const LLVector3d& pos_global);
+
+ // Displays information about the parcel the agent is currently on
+ // without sending a request to the server.
+ void displayAgentParcelInfo();
+
void nameUpdatedCallback(LLTextBox* text,
const std::string& first,
const std::string& last);
/*virtual*/ void processParcelInfo(const LLParcelData& parcel_data);
+ /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
private:
enum LANDMARK_INFO_TYPE
- {
- TITLE,
- NOTE
- };
+ {
+ TITLE,
+ NOTE
+ };
void onCommitTitleOrNote(LANDMARK_INFO_TYPE type);
@@ -91,7 +116,10 @@ private:
LLUUID mRequestedID;
LLUUID mLandmarkID;
LLVector3 mPosRegion;
+ std::string mCurrentTitle;
+ S32 mMinHeight;
+ LLTextBox* mTitle;
LLTextureCtrl* mSnapshotCtrl;
LLTextBox* mRegionName;
LLTextBox* mParcelName;
@@ -102,8 +130,10 @@ private:
LLTextBox* mCreated;
LLLineEditor* mTitleEditor;
LLTextEditor* mNotesEditor;
- LLTextBox* mLocationEditor;
+ LLTextBox* mLocationEditor;
+ LLPanel* mScrollingPanel;
LLPanel* mInfoPanel;
+ LLMediaPanel* mMediaPanel;
};
#endif // LL_LLPANELPLACEINFO_H
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index d18cac9f42..b443cc4d5e 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -31,32 +31,45 @@
#include "llviewerprecompiledheaders.h"
+#include "llassettype.h"
+
+#include "lllandmark.h"
+
#include "llfloaterreg.h"
-#include "llsearcheditor.h"
+#include "llnotifications.h"
+#include "llfiltereditor.h"
#include "lltabcontainer.h"
#include "lluictrlfactory.h"
-#include "lllandmark.h"
-
#include "llagent.h"
#include "lllandmarklist.h"
#include "llfloaterworldmap.h"
#include "llpanelplaces.h"
#include "llpanellandmarks.h"
#include "llpanelteleporthistory.h"
+#include "llsidetray.h"
+#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
+// Helper function to get local position from global
+const LLVector3 get_pos_local_from_global(const LLVector3d &pos_global);
+
static LLRegisterPanelClassWrapper<LLPanelPlaces> t_places("panel_places");
LLPanelPlaces::LLPanelPlaces()
: LLPanel(),
mFilterSubString(LLStringUtil::null),
mActivePanel(NULL),
- mSearchEditor(NULL),
- mPlaceInfo(NULL)
+ mFilterEditor(NULL),
+ mPlaceInfo(NULL),
+ mItem(NULL),
+ mPosGlobal()
{
gInventory.addObserver(this);
+ LLViewerParcelMgr::getInstance()->setAgentParcelChangedCallback(
+ boost::bind(&LLPanelPlaces::onAgentParcelChange, this));
+
//LLUICtrlFactory::getInstance()->buildPanel(this, "panel_places.xml"); // Called from LLRegisterPanelClass::defaultPanelClassBuilder()
}
@@ -68,19 +81,30 @@ LLPanelPlaces::~LLPanelPlaces()
BOOL LLPanelPlaces::postBuild()
{
+ mTeleportBtn = getChild<LLButton>("teleport_btn");
+ mTeleportBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onTeleportButtonClicked, this));
+
+ mShowOnMapBtn = getChild<LLButton>("map_btn");
+ mShowOnMapBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onShowOnMapButtonClicked, this));
+
+ //mShareBtn = getChild<LLButton>("share_btn");
+ //mShareBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onShareButtonClicked, this));
+
+ mOverflowBtn = getChild<LLButton>("overflow_btn");
+
mTabContainer = getChild<LLTabContainer>("Places Tabs");
if (mTabContainer)
{
mTabContainer->setCommitCallback(boost::bind(&LLPanelPlaces::onTabSelected, this));
}
- mSearchEditor = getChild<LLSearchEditor>("Filter");
- if (mSearchEditor)
+ mFilterEditor = getChild<LLFilterEditor>("Filter");
+ if (mFilterEditor)
{
- mSearchEditor->setSearchCallback(boost::bind(&LLPanelPlaces::onSearchEdit, this, _1));
+ mFilterEditor->setCommitCallback(boost::bind(&LLPanelPlaces::onFilterEdit, this, _2));
}
- mPlaceInfo = dynamic_cast<LLPanelPlaceInfo*>(getChild<LLPanel>("panel_landmark_info"));
+ mPlaceInfo = getChild<LLPanelPlaceInfo>("panel_place_info", TRUE, FALSE);
if (mPlaceInfo)
{
LLButton* back_btn = mPlaceInfo->getChild<LLButton>("back_btn");
@@ -88,60 +112,59 @@ BOOL LLPanelPlaces::postBuild()
{
back_btn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this));
}
- }
- //childSetAction("share_btn", boost::bind(&LLPanelPlaces::onShareButtonClicked, this), this);
- childSetAction("teleport_btn", boost::bind(&LLPanelPlaces::onTeleportButtonClicked, this), this);
- childSetAction("map_btn", boost::bind(&LLPanelPlaces::onShowOnMapButtonClicked, this), this);
+ // *TODO: Assign the action to an appropriate event.
+ mOverflowBtn->setClickedCallback(boost::bind(&LLPanelPlaces::toggleMediaPanel, this));
+ }
return TRUE;
}
-void LLPanelPlaces::draw()
-{
- LLPanel::draw();
-}
-
void LLPanelPlaces::onOpen(const LLSD& key)
{
if(key.size() == 0)
return;
+ mPlaceInfoType = key["type"].asString();
+ mPosGlobal.setZero();
togglePlaceInfoPanel(TRUE);
-
- mPlaceInfoType = key["type"].asInteger();
+ updateVerbs();
- if (mPlaceInfoType == AGENT)
+ if (mPlaceInfoType == "agent")
{
- // We don't need to teleport to the current location so disable the button
- getChild<LLButton>("teleport_btn")->setEnabled(FALSE);
-
- mPlaceInfo->displayParcelInfo(gAgent.getPositionAgent(),
- gAgent.getRegion()->getRegionID(),
- gAgent.getPositionGlobal());
+ mPlaceInfo->setInfoType(LLPanelPlaceInfo::PLACE);
+ mPlaceInfo->displayAgentParcelInfo();
+
+ mPosGlobal = gAgent.getPositionGlobal();
}
- else if (mPlaceInfoType == LANDMARK)
+ else if (mPlaceInfoType == "create_landmark")
{
- LLInventoryItem* item = gInventory.getItem(key["id"].asUUID());
+ mPlaceInfo->setInfoType(LLPanelPlaceInfo::CREATE_LANDMARK);
+ mPlaceInfo->displayAgentParcelInfo();
+
+ mPosGlobal = gAgent.getPositionGlobal();
+ }
+ else if (mPlaceInfoType == "landmark")
+ {
+ LLUUID item_uuid = key["id"].asUUID();
+ LLInventoryItem* item = gInventory.getItem(item_uuid);
if (!item)
return;
-
- mPlaceInfo->displayItemInfo(item);
-
- LLLandmark* landmark = gLandmarkList.getAsset(item->getAssetUUID());
- if (!landmark)
- return;
-
- LLUUID region_id;
- landmark->getRegionID(region_id);
- LLVector3d pos_global;
- landmark->getGlobalPos(pos_global);
- mPlaceInfo->displayParcelInfo(landmark->getRegionPos(),
- region_id,
- pos_global);
-
+
+ setItem(item);
}
- else if (mPlaceInfoType == TELEPORT_HISTORY)
+ else if (mPlaceInfoType == "remote_place")
+ {
+ mPosGlobal = LLVector3d(key["x"].asReal(),
+ key["y"].asReal(),
+ key["z"].asReal());
+
+ mPlaceInfo->setInfoType(LLPanelPlaceInfo::PLACE);
+ mPlaceInfo->displayParcelInfo(get_pos_local_from_global(mPosGlobal),
+ LLUUID(),
+ mPosGlobal);
+ }
+ else if (mPlaceInfoType == "teleport_history")
{
S32 index = key["id"].asInteger();
@@ -150,18 +173,48 @@ void LLPanelPlaces::onOpen(const LLSD& key)
LLVector3d pos_global = hist_items[index].mGlobalPos;
- F32 region_x = (F32)fmod( pos_global.mdV[VX], (F64)REGION_WIDTH_METERS );
- F32 region_y = (F32)fmod( pos_global.mdV[VY], (F64)REGION_WIDTH_METERS );
-
- LLVector3 pos_local(region_x, region_y, (F32)pos_global.mdV[VZ]);
-
- mPlaceInfo->displayParcelInfo(pos_local,
+ mPlaceInfo->setInfoType(LLPanelPlaceInfo::TELEPORT_HISTORY);
+ mPlaceInfo->displayParcelInfo(get_pos_local_from_global(pos_global),
hist_items[index].mRegionID,
pos_global);
}
}
-void LLPanelPlaces::onSearchEdit(const std::string& search_string)
+void LLPanelPlaces::setItem(LLInventoryItem* item)
+{
+ mItem = item;
+
+ // If the item is a link get a linked item
+ if (mItem->getType() == LLAssetType::AT_LINK)
+ {
+ mItem = gInventory.getItem(mItem->getAssetUUID());
+ if (mItem.isNull())
+ return;
+ }
+
+ mPlaceInfo->setInfoType(LLPanelPlaceInfo::LANDMARK);
+ mPlaceInfo->displayItemInfo(mItem);
+
+ LLLandmark* lm = gLandmarkList.getAsset(mItem->getAssetUUID(),
+ boost::bind(&LLPanelPlaces::onLandmarkLoaded, this, _1));
+ if (lm)
+ {
+ onLandmarkLoaded(lm);
+ }
+}
+
+void LLPanelPlaces::onLandmarkLoaded(LLLandmark* landmark)
+{
+ LLUUID region_id;
+ landmark->getRegionID(region_id);
+ LLVector3d pos_global;
+ landmark->getGlobalPos(pos_global);
+ mPlaceInfo->displayParcelInfo(landmark->getRegionPos(),
+ region_id,
+ pos_global);
+}
+
+void LLPanelPlaces::onFilterEdit(const std::string& search_string)
{
if (mFilterSubString != search_string)
{
@@ -170,7 +223,7 @@ void LLPanelPlaces::onSearchEdit(const std::string& search_string)
LLStringUtil::toUpper(mFilterSubString);
LLStringUtil::trimHead(mFilterSubString);
- mSearchEditor->setText(mFilterSubString);
+ mFilterEditor->setText(mFilterSubString);
mActivePanel->onSearchEdit(mFilterSubString);
}
@@ -178,24 +231,20 @@ void LLPanelPlaces::onSearchEdit(const std::string& search_string)
void LLPanelPlaces::onTabSelected()
{
+ mActivePanel = dynamic_cast<LLPanelPlacesTab*>(mTabContainer->getCurrentPanel());
if (!mActivePanel)
return;
- mActivePanel = dynamic_cast<LLPanelPlacesTab*>(mTabContainer->getCurrentPanel());
-
- if (mActivePanel)
- {
- mActivePanel->onSearchEdit(mFilterSubString);
- mActivePanel->onTabSelected();
- }
+ onFilterEdit(mFilterSubString);
+ mActivePanel->updateVerbs();
}
+/*
void LLPanelPlaces::onShareButtonClicked()
{
// TODO: Launch the "Things" Share wizard
}
-/*
void LLPanelPlaces::onAddLandmarkButtonClicked()
{
LLFloaterReg::showInstance("add_landmark");
@@ -209,19 +258,64 @@ void LLPanelPlaces::onCopySLURLButtonClicked()
void LLPanelPlaces::onTeleportButtonClicked()
{
- mActivePanel->onTeleport();
+ if (mPlaceInfo->getVisible())
+ {
+ if (mPlaceInfoType == "landmark")
+ {
+ LLSD payload;
+ payload["asset_id"] = mItem->getAssetUUID();
+ LLNotifications::instance().add("TeleportFromLandmark", LLSD(), payload);
+ }
+ else if (mPlaceInfoType == "remote_place")
+ {
+ LLFloaterWorldMap* worldmap_instance = LLFloaterWorldMap::getInstance();
+ if (!mPosGlobal.isExactlyZero() && worldmap_instance)
+ {
+ gAgent.teleportViaLocation(mPosGlobal);
+ worldmap_instance->trackLocation(mPosGlobal);
+ }
+ }
+ }
+ else
+ {
+ mActivePanel->onTeleport();
+ }
}
void LLPanelPlaces::onShowOnMapButtonClicked()
{
- if (!mPlaceInfoType)
+ if (mPlaceInfo->getVisible())
{
- LLVector3d global_pos = gAgent.getPositionGlobal();
- if (!global_pos.isExactlyZero())
+ LLFloaterWorldMap* worldmap_instance = LLFloaterWorldMap::getInstance();
+ if(!worldmap_instance)
+ return;
+
+ if (mPlaceInfoType == "agent" ||
+ mPlaceInfoType == "create_landmark" ||
+ mPlaceInfoType == "remote_place")
+ {
+ if (!mPosGlobal.isExactlyZero())
{
- LLFloaterWorldMap::getInstance()->trackLocation(global_pos);
+ worldmap_instance->trackLocation(mPosGlobal);
LLFloaterReg::showInstance("world_map", "center");
}
+ }
+ else if (mPlaceInfoType == "landmark")
+ {
+ LLLandmark* landmark = gLandmarkList.getAsset(mItem->getAssetUUID());
+ if (!landmark)
+ return;
+
+ LLVector3d landmark_global_pos;
+ if (!landmark->getGlobalPos(landmark_global_pos))
+ return;
+
+ if (!landmark_global_pos.isExactlyZero())
+ {
+ worldmap_instance->trackLocation(landmark_global_pos);
+ LLFloaterReg::showInstance("world_map", "center");
+ }
+ }
}
else
{
@@ -232,6 +326,19 @@ void LLPanelPlaces::onShowOnMapButtonClicked()
void LLPanelPlaces::onBackButtonClicked()
{
togglePlaceInfoPanel(FALSE);
+
+ // Resetting mPlaceInfoType when Place Info panel is closed.
+ mPlaceInfoType = LLStringUtil::null;
+
+ updateVerbs();
+}
+
+void LLPanelPlaces::toggleMediaPanel()
+{
+ if (!mPlaceInfo)
+ return;
+
+ mPlaceInfo->toggleMediaPanel(!mPlaceInfo->isMediaPanelVisible());
}
void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible)
@@ -240,7 +347,7 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible)
return;
mPlaceInfo->setVisible(visible);
- mSearchEditor->setVisible(!visible);
+ mFilterEditor->setVisible(!visible);
mTabContainer->setVisible(!visible);
if (visible)
@@ -249,7 +356,7 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible)
LLRect rect = getRect();
LLRect new_rect = LLRect(rect.mLeft, rect.mTop, rect.mRight, mTabContainer->getRect().mBottom);
- mPlaceInfo->reshape(new_rect.getWidth(),new_rect.getHeight());
+ mPlaceInfo->reshape(new_rect.getWidth(),new_rect.getHeight());
}
}
@@ -267,7 +374,7 @@ void LLPanelPlaces::changed(U32 mask)
mTabContainer->addTabPanel(
LLTabContainer::TabPanelParams().
panel(landmarks_panel).
- label("Landmarks").
+ label(getString("landmarks_tab_title")).
insert_at(LLTabContainer::END));
}
@@ -279,7 +386,7 @@ void LLPanelPlaces::changed(U32 mask)
mTabContainer->addTabPanel(
LLTabContainer::TabPanelParams().
panel(teleport_history_panel).
- label("Teleport History").
+ label(getString("teleport_history_tab_title")).
insert_at(LLTabContainer::END));
}
@@ -291,3 +398,51 @@ void LLPanelPlaces::changed(U32 mask)
// so remove the observer
gInventory.removeObserver(this);
}
+
+void LLPanelPlaces::onAgentParcelChange()
+{
+ if (mPlaceInfo->getVisible() && (mPlaceInfoType == "agent" || mPlaceInfoType == "create_landmark"))
+ {
+ LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", mPlaceInfoType));
+ }
+ else
+ {
+ updateVerbs();
+ }
+}
+
+void LLPanelPlaces::updateVerbs()
+{
+ bool is_place_info_visible = mPlaceInfo->getVisible();
+ bool is_agent_place_info_visible = mPlaceInfoType == "agent";
+ if (is_place_info_visible)
+ {
+ if (is_agent_place_info_visible || mPlaceInfoType == "create_landmark")
+ {
+ // We don't need to teleport to the current location so disable the button
+ mTeleportBtn->setEnabled(FALSE);
+ }
+ else if (mPlaceInfoType == "landmark" || mPlaceInfoType == "remote_place")
+ {
+ mTeleportBtn->setEnabled(TRUE);
+ }
+
+ mShowOnMapBtn->setEnabled(TRUE);
+ }
+ else
+ {
+ mActivePanel->updateVerbs();
+ }
+
+ // Enable overflow button only when showing the information about agent's current location.
+ mOverflowBtn->setEnabled(is_place_info_visible && is_agent_place_info_visible);
+}
+
+const LLVector3 get_pos_local_from_global(const LLVector3d &pos_global)
+{
+ F32 region_x = (F32)fmod( pos_global.mdV[VX], (F64)REGION_WIDTH_METERS );
+ F32 region_y = (F32)fmod( pos_global.mdV[VY], (F64)REGION_WIDTH_METERS );
+
+ LLVector3 pos_local(region_x, region_y, (F32)pos_global.mdV[VZ]);
+ return pos_local;
+}
diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h
index 533fb8dd82..c100ace8cc 100644
--- a/indra/newview/llpanelplaces.h
+++ b/indra/newview/llpanelplaces.h
@@ -32,6 +32,8 @@
#ifndef LL_LLPANELPLACES_H
#define LL_LLPANELPLACES_H
+#include "lltimer.h"
+
#include "llpanel.h"
#include "llinventory.h"
@@ -39,47 +41,65 @@
#include "llinventorymodel.h"
#include "llpanelplaceinfo.h"
+class LLInventoryItem;
+class LLLandmark;
class LLPanelPlacesTab;
-class LLSearchEditor;
+class LLFilterEditor;
class LLTabContainer;
class LLPanelPlaces : public LLPanel, LLInventoryObserver
{
public:
- enum PLACE_INFO_TYPE
- {
- AGENT,
- LANDMARK,
- TELEPORT_HISTORY
- };
-
LLPanelPlaces();
virtual ~LLPanelPlaces();
/*virtual*/ BOOL postBuild();
- /*virtual*/ void draw();
/*virtual*/ void changed(U32 mask);
/*virtual*/ void onOpen(const LLSD& key);
- void onSearchEdit(const std::string& search_string);
+ void setItem(LLInventoryItem* item);
+
+private:
+ void onLandmarkLoaded(LLLandmark* landmark);
+ void onFilterEdit(const std::string& search_string);
void onTabSelected();
+
//void onAddLandmarkButtonClicked();
//void onCopySLURLButtonClicked();
- void onShareButtonClicked();
+ //void onShareButtonClicked();
void onTeleportButtonClicked();
void onShowOnMapButtonClicked();
void onBackButtonClicked();
+
+ void toggleMediaPanel();
void togglePlaceInfoPanel(BOOL visible);
-private:
- LLSearchEditor* mSearchEditor;
- LLPanelPlacesTab* mActivePanel;
- LLTabContainer* mTabContainer;
- LLPanelPlaceInfo* mPlaceInfo;
- std::string mFilterSubString;
-
- // Place information type currently shown in Information panel
- S32 mPlaceInfoType;
+ void onAgentParcelChange();
+ void updateVerbs();
+
+ LLFilterEditor* mFilterEditor;
+ LLPanelPlacesTab* mActivePanel;
+ LLTabContainer* mTabContainer;
+ LLPanelPlaceInfo* mPlaceInfo;
+
+ //LLButton* mShareBtn;
+ LLButton* mTeleportBtn;
+ LLButton* mShowOnMapBtn;
+ LLButton* mOverflowBtn;
+
+ // Pointer to a landmark item or to a linked landmark
+ LLPointer<LLInventoryItem> mItem;
+
+ // Absolute position of the location for teleport, may not
+ // be available (hence zero)
+ LLVector3d mPosGlobal;
+
+ // Search string for filtering landmarks and teleport
+ // history locations
+ std::string mFilterSubString;
+
+ // Information type currently shown in Place Information panel
+ std::string mPlaceInfoType;
};
#endif //LL_LLPANELPLACES_H
diff --git a/indra/newview/llpanelplacestab.cpp b/indra/newview/llpanelplacestab.cpp
index 2b38aa0890..7c0a7b0cc4 100644
--- a/indra/newview/llpanelplacestab.cpp
+++ b/indra/newview/llpanelplacestab.cpp
@@ -31,14 +31,24 @@
#include "llviewerprecompiledheaders.h"
+#include "llpanelplacestab.h"
+
#include "llwindow.h"
#include "llnotifications.h"
+#include "llbutton.h"
#include "llslurl.h"
-#include "llpanelplacestab.h"
#include "llworldmap.h"
+bool LLPanelPlacesTab::isTabVisible()
+{
+ LLUICtrl* parent = getParentUICtrl();
+ if (!parent) return false;
+ if (!parent->getVisible()) return false;
+ return true;
+}
+
void LLPanelPlacesTab::setPanelPlacesButtons(LLPanelPlaces* panel)
{
//mShareBtn = panel->getChild<LLButton>("share_btn");
@@ -75,24 +85,3 @@ void LLPanelPlacesTab::onRegionResponse(const LLVector3d& landmark_global_pos,
LLNotifications::instance().add("CopySLURL", args);
}
-
-void LLPanelPlacesTab::onTabSelected()
-{
- togglePanelPlacesButtons(TRUE);
-}
-
-void LLPanelPlacesTab::togglePanelPlacesButtons(BOOL enabled)
-{
- if (enabled)
- {
- //mShareBtn->setEnabled(TRUE);
- mTeleportBtn->setEnabled(TRUE);
- mShowOnMapBtn->setEnabled(TRUE);
- }
- else
- {
- //mShareBtn->setEnabled(FALSE);
- mTeleportBtn->setEnabled(FALSE);
- mShowOnMapBtn->setEnabled(FALSE);
- }
-}
diff --git a/indra/newview/llpanelplacestab.h b/indra/newview/llpanelplacestab.h
index 5d6b7d1090..1c70869414 100644
--- a/indra/newview/llpanelplacestab.h
+++ b/indra/newview/llpanelplacestab.h
@@ -43,23 +43,21 @@ public:
virtual ~LLPanelPlacesTab() {}
virtual void onSearchEdit(const std::string& string) = 0;
+ virtual void updateVerbs() = 0; // Updates buttons at the bottom of Places panel
//virtual void onShare() = 0;
virtual void onShowOnMap() = 0;
virtual void onTeleport() = 0;
//virtual void onCopySLURL() = 0;
+ bool isTabVisible(); // Check if parent TabContainer is visible.
+
void setPanelPlacesButtons(LLPanelPlaces* panel);
void onRegionResponse(const LLVector3d& landmark_global_pos,
U64 region_handle,
const std::string& url,
const LLUUID& snapshot_id,
bool teleport);
- void onTabSelected();
-
protected:
- void togglePanelPlacesButtons(BOOL enabled);
-
-private:
//LLButton* mShareBtn;
LLButton* mTeleportBtn;
LLButton* mShowOnMapBtn;
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
new file mode 100644
index 0000000000..deca08050b
--- /dev/null
+++ b/indra/newview/llpanelprofile.cpp
@@ -0,0 +1,146 @@
+/**
+* @file llpanelprofile.cpp
+* @brief Profile panel implementation
+*
+* $LicenseInfo:firstyear=2009&license=viewergpl$
+*
+* Copyright (c) 2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h"
+#include "llpanelprofile.h"
+#include "lltabcontainer.h"
+#include "llpanelpicks.h"
+#include "llagent.h"
+
+static const std::string PANEL_PICKS = "panel_picks";
+static const std::string PANEL_NOTES = "panel_notes";
+static const std::string PANEL_PROFILE = "panel_profile";
+
+static LLRegisterPanelClassWrapper<LLPanelAvatarProfile> t_panel_profile(PANEL_PROFILE);
+static LLRegisterPanelClassWrapper<LLPanelPicks> t_panel_picks(PANEL_PICKS);
+
+
+LLPanelProfile::LLPanelProfile()
+: LLPanel(),
+ mTabContainer(NULL)
+{
+}
+
+LLPanelProfile::~LLPanelProfile()
+{
+}
+
+BOOL LLPanelProfile::postBuild()
+{
+ mTabContainer = getChild<LLTabContainer>("tabs");
+ mTabContainer->setCommitCallback(boost::bind(&LLPanelProfile::onTabSelected, this, _2));
+
+ LLPanelPicks* panel_picks = getChild<LLPanelPicks>(PANEL_PICKS);
+ panel_picks->setProfilePanel(this);
+ mTabs[PANEL_PICKS] = panel_picks;
+
+ mTabs[PANEL_PROFILE] = getChild<LLPanelAvatarProfile>(PANEL_PROFILE);
+
+ return TRUE;
+}
+
+void LLPanelProfile::onOpen(const LLSD& key)
+{
+ //*NOTE LLUUID::null in this context means Agent related stuff
+ LLUUID id(key.has("id") ? key["id"].asUUID() : gAgentID);
+ if (key.has("open_tab_name"))
+ mTabContainer->selectTabByName(key["open_tab_name"]);
+
+ if(id.notNull() && mAvatarId.notNull() && mAvatarId != id)
+ {
+ mTabs[PANEL_PROFILE]->clear();
+ mTabs[PANEL_PICKS]->clear();
+ mTabs[PANEL_NOTES]->clear();
+ }
+
+ mAvatarId = id;
+
+ mTabContainer->getCurrentPanel()->onOpen(mAvatarId);
+}
+
+//*TODO redo panel toggling
+void LLPanelProfile::togglePanel(LLPanel* panel)
+{
+ // TRUE - we need to open/expand "panel"
+ BOOL expand = this->getChildList()->back() != panel; // mTabContainer->getVisible();
+
+ if (expand)
+ {
+ //*NOTE on view profile panel along with tabcontainer there is
+ // a backbutton that will be shown when there will be a panel over it even
+ //if that panel has visible backgroud
+ setAllChildrenVisible(FALSE);
+
+ panel->setVisible(TRUE);
+ if (panel->getParent() != this)
+ {
+ addChildInBack(panel);
+ }
+ else
+ {
+ sendChildToBack(panel);
+ }
+
+ LLRect new_rect = getRect();
+ panel->reshape(new_rect.getWidth(), new_rect.getHeight());
+ new_rect.setLeftTopAndSize(0, new_rect.getHeight(), new_rect.getWidth(), new_rect.getHeight());
+ panel->setRect(new_rect);
+ }
+ else
+ {
+ this->setAllChildrenVisible(TRUE);
+ if (panel->getParent() == this) removeChild(panel);
+ sendChildToBack(mTabContainer);
+ mTabContainer->getCurrentPanel()->onOpen(mAvatarId);
+ }
+}
+
+
+void LLPanelProfile::onTabSelected(const LLSD& param)
+{
+ std::string tab_name = param.asString();
+ if (NULL != mTabs[tab_name])
+ {
+ mTabs[tab_name]->onOpen(mAvatarId);
+ }
+}
+
+void LLPanelProfile::setAllChildrenVisible(BOOL visible)
+{
+ const child_list_t* child_list = getChildList();
+ for (child_list_const_iter_t child_it = child_list->begin(); child_it != child_list->end(); ++child_it)
+ {
+ LLView* viewp = *child_it;
+ viewp->setVisible(visible);
+ }
+}
+
diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h
new file mode 100644
index 0000000000..e8aea849df
--- /dev/null
+++ b/indra/newview/llpanelprofile.h
@@ -0,0 +1,72 @@
+/**
+* @file llpanelprofile.h
+* @brief Profile panel
+*
+* $LicenseInfo:firstyear=2009&license=viewergpl$
+*
+* Copyright (c) 2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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_LLPANELPROFILE_H
+#define LL_LLPANELPROFILE_H
+
+#include "llviewerprecompiledheaders.h"
+#include "llpanel.h"
+#include "llpanelavatar.h"
+
+class LLTabContainer;
+
+class LLPanelProfile : public LLPanel
+{
+ LOG_CLASS(LLPanelProfile);
+
+public:
+ virtual BOOL postBuild();
+
+ virtual void onOpen(const LLSD& key);
+
+ virtual void togglePanel(LLPanel*);
+
+protected:
+ LLPanelProfile();
+ ~LLPanelProfile();
+
+ void onTabSelected(const LLSD& param);
+
+ void setAllChildrenVisible(BOOL visible);
+
+
+ LLTabContainer* mTabContainer;
+
+ typedef std::map<std::string, LLPanelProfileTab*> profile_tabs_t;
+ profile_tabs_t mTabs;
+
+ LLUUID mAvatarId;
+};
+
+
+
+#endif //LL_LLPANELPROFILE_H
diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp
index 0d25272f88..7d02c8ff0b 100644
--- a/indra/newview/llpanelprofileview.cpp
+++ b/indra/newview/llpanelprofileview.cpp
@@ -32,11 +32,10 @@
#include "llviewerprecompiledheaders.h"
#include "llpanelprofileview.h"
-#include <llfloaterreg.h>
-#include <lltabcontainer.h>
-#include <lluictrlfactory.h>
+
#include "llpanelavatar.h"
#include "llpanelpicks.h"
+#include "llpanelprofile.h"
static LLRegisterPanelClassWrapper<LLPanelProfileView> t_panel_target_profile("panel_profile_view");
static LLRegisterPanelClassWrapper<LLPanelAvatarNotes> t_panel_notes("panel_notes");
@@ -46,7 +45,7 @@ static std::string PANEL_PICKS = "panel_picks";
static std::string PANEL_NOTES = "panel_notes";
LLPanelProfileView::LLPanelProfileView()
-: LLPanel()
+: LLPanelProfile()
{
}
@@ -57,37 +56,23 @@ LLPanelProfileView::~LLPanelProfileView(void)
/*virtual*/
void LLPanelProfileView::onOpen(const LLSD& key)
{
- if (!getVisible())
- setVisible(TRUE);
-
- LLUUID id(key.asUUID());
- if(id.notNull() && mProfileId.notNull() && mProfileId != id)
- {
- mTabs[PANEL_PROFILE]->clear();
- mTabs[PANEL_PICKS]->clear();
- mTabs[PANEL_NOTES]->clear();
- }
-
- mProfileId = id;
- mTabs[PANEL_PROFILE]->onOpen(mProfileId);
- mTabs[PANEL_PICKS]->setAvatarId(mProfileId);
- mTabs[PANEL_PICKS]->updateData();
- mTabs[PANEL_NOTES]->setAvatarId(mProfileId);
- mTabs[PANEL_NOTES]->updateData();
+ LLPanelProfile::onOpen(key);
+
+ //*NOTE profile view panel doesn't have own side tray tab and
+ //is usually opened over People side tray tab. By Back button
+ // Profile View panel just becomes invisible, see onBackBtnClick()
+ setVisible(TRUE);
std::string full_name;
- gCacheName->getFullName(key,full_name);
+ gCacheName->getFullName(key["id"],full_name);
childSetValue("user_name",full_name);
}
BOOL LLPanelProfileView::postBuild()
{
- mTabContainer = getChild<LLTabContainer>("profile_tabs");
- mTabContainer->setCommitCallback(boost::bind(&LLPanelProfileView::onTabSelected, this, _2));
+ LLPanelProfile::postBuild();
- mTabs[PANEL_PROFILE] = (getChild<LLPanelAvatarProfile>(PANEL_PROFILE));
- mTabs[PANEL_PICKS] = (getChild<LLPanelPicks>(PANEL_PICKS));
mTabs[PANEL_NOTES] = (getChild<LLPanelAvatarNotes>(PANEL_NOTES));
childSetCommitCallback("back",boost::bind(&LLPanelProfileView::onBackBtnClick,this),NULL);
@@ -98,14 +83,6 @@ BOOL LLPanelProfileView::postBuild()
//private
-void LLPanelProfileView::initTabs(const LLSD& key)
-{
-}
-
-void LLPanelProfileView::onTabSelected(const LLSD& param)
-{
-}
-
void LLPanelProfileView::onBackBtnClick()
{
setVisible(FALSE);
diff --git a/indra/newview/llpanelprofileview.h b/indra/newview/llpanelprofileview.h
index 2d89f15fe4..6c5fc77951 100644
--- a/indra/newview/llpanelprofileview.h
+++ b/indra/newview/llpanelprofileview.h
@@ -33,12 +33,13 @@
#ifndef LL_LLPANELPROFILEVIEW_H
#define LL_LLPANELPROFILEVIEW_H
-#include <llpanel.h>
+#include "llpanel.h"
+#include "llpanelprofile.h"
+class LLPanelProfile;
class LLPanelProfileTab;
-class LLTabContainer;
-class LLPanelProfileView : public LLPanel
+class LLPanelProfileView : public LLPanelProfile
{
LOG_CLASS(LLPanelProfileView);
friend class LLUICtrlFactory;
@@ -48,22 +49,10 @@ public:
~LLPanelProfileView(void);
- void onTabSelected(const LLSD& param);
-
void onOpen(const LLSD& key);
BOOL postBuild();
-
- void initTabs(const LLSD& key);
-
void onBackBtnClick();
-
-private:
- LLTabContainer* mTabContainer;
-
- typedef std::map<std::string, LLPanelProfileTab*> profile_tabs_t;
- profile_tabs_t mTabs;
- LLUUID mProfileId;
};
#endif //LL_LLPANELPROFILEVIEW_H
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index eb35834dc0..51cd05376a 100644
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -92,8 +92,15 @@ void LLTeleportHistoryPanel::onShowOnMap()
S32 index = itemp->getColumn(LIST_INDEX)->getValue().asInteger();
- // teleport to existing item in history, so we don't add it again
- mTeleportHistory->goToItem(index);
+ const LLTeleportHistory::slurl_list_t& hist_items = mTeleportHistory->getItems();
+
+ LLVector3d global_pos = hist_items[index].mGlobalPos;
+
+ if (!global_pos.isExactlyZero())
+ {
+ LLFloaterWorldMap::getInstance()->trackLocation(global_pos);
+ LLFloaterReg::showInstance("world_map", "center");
+ }
}
// virtual
@@ -104,7 +111,8 @@ void LLTeleportHistoryPanel::onTeleport()
return;
S32 index = itemp->getColumn(LIST_INDEX)->getValue().asInteger();
-
+
+ // teleport to existing item in history, so we don't add it again
mTeleportHistory->goToItem(index);
}
@@ -132,6 +140,26 @@ void LLTeleportHistoryPanel::onCopySLURL()
}
*/
+// virtual
+void LLTeleportHistoryPanel::updateVerbs()
+{
+ if (!isTabVisible())
+ return;
+
+ S32 index = 0;
+ S32 cur_item = 0;
+
+ LLScrollListItem* itemp = mHistoryItems->getFirstSelected();
+ if (itemp)
+ {
+ index = itemp->getColumn(LIST_INDEX)->getValue().asInteger();
+ cur_item = mTeleportHistory->getCurrentItemIndex();
+ }
+
+ mTeleportBtn->setEnabled(index != cur_item);
+ mShowOnMapBtn->setEnabled(itemp != NULL);
+}
+
void LLTeleportHistoryPanel::showTeleportHistory()
{
const LLTeleportHistory::slurl_list_t& hist_items = mTeleportHistory->getItems();
@@ -181,17 +209,12 @@ void LLTeleportHistoryPanel::showTeleportHistory()
}
}
- togglePanelPlacesButtons(mHistoryItems->getFirstSelected() != NULL);
+ updateVerbs();
}
void LLTeleportHistoryPanel::handleItemSelect(const LLSD& data)
{
- LLScrollListItem* itemp = mHistoryItems->getFirstSelected();
-
- if (!itemp)
- return;
-
- togglePanelPlacesButtons(TRUE);
+ updateVerbs();
}
//static
@@ -204,7 +227,7 @@ void LLTeleportHistoryPanel::onDoubleClickItem(void* user_data)
return;
LLSD key;
- key["type"] = LLPanelPlaces::TELEPORT_HISTORY;
+ key["type"] = "teleport_history";
key["id"] = itemp->getColumn(LIST_INDEX)->getValue().asInteger();
LLSideTray::getInstance()->showPanel("panel_places", key);
diff --git a/indra/newview/llpanelteleporthistory.h b/indra/newview/llpanelteleporthistory.h
index 6f41c97eec..553385b37e 100644
--- a/indra/newview/llpanelteleporthistory.h
+++ b/indra/newview/llpanelteleporthistory.h
@@ -50,7 +50,8 @@ public:
/*virtual*/ void onShowOnMap();
/*virtual*/ void onTeleport();
///*virtual*/ void onCopySLURL();
-
+ /*virtual*/ void updateVerbs();
+
void showTeleportHistory();
void handleItemSelect(const LLSD& data);
diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp
index 676943ff87..9a987c8d7c 100644
--- a/indra/newview/llpreview.cpp
+++ b/indra/newview/llpreview.cpp
@@ -51,7 +51,7 @@
#include "llagent.h"
#include "llvoavatarself.h"
#include "llselectmgr.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
#include "llviewerinventory.h"
#include "llviewerwindow.h"
#include "lltrans.h"
diff --git a/indra/newview/llpreviewanim.cpp b/indra/newview/llpreviewanim.cpp
index 6857d14fff..c4037c94fe 100644
--- a/indra/newview/llpreviewanim.cpp
+++ b/indra/newview/llpreviewanim.cpp
@@ -36,7 +36,7 @@
#include "llbutton.h"
#include "llresmgr.h"
#include "llinventory.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
#include "llvoavatarself.h"
#include "llagent.h" // gAgent
#include "llkeyframemotion.h"
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index dc6ee44936..ac08fd23a4 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -559,7 +559,7 @@ void LLPreviewGesture::addAnimations()
PERM_ITEM_UNRESTRICTED,
gAgent.getID(),
gAgent.getGroupID());
- gInventory.collectDescendentsIf(gAgent.getInventoryRootID(),
+ gInventory.collectDescendentsIf(gInventory.getRootFolderID(),
cats,
items,
LLInventoryModel::EXCLUDE_TRASH,
@@ -604,7 +604,7 @@ void LLPreviewGesture::addSounds()
PERM_ITEM_UNRESTRICTED,
gAgent.getID(),
gAgent.getGroupID());
- gInventory.collectDescendentsIf(gAgent.getInventoryRootID(),
+ gInventory.collectDescendentsIf(gInventory.getRootFolderID(),
cats,
items,
LLInventoryModel::EXCLUDE_TRASH,
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 7c50bc5977..7883b1ab06 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -973,7 +973,7 @@ void LLPreviewLSL::loadAsset()
const LLInventoryItem* item = gInventory.getItem(mItemUUID);
BOOL is_library = item
&& !gInventory.isObjectDescendentOf(mItemUUID,
- gAgent.getInventoryRootID());
+ gInventory.getRootFolderID());
if(!item)
{
// do the more generic search.
diff --git a/indra/newview/llpreviewsound.cpp b/indra/newview/llpreviewsound.cpp
index 7e7be5b2c6..84f7562297 100644
--- a/indra/newview/llpreviewsound.cpp
+++ b/indra/newview/llpreviewsound.cpp
@@ -36,7 +36,7 @@
#include "llagent.h" // gAgent
#include "llbutton.h"
#include "llinventory.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
#include "lllineeditor.h"
#include "llpreviewsound.h"
#include "llresmgr.h"
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index 3204006e43..9122e49a06 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -39,15 +39,15 @@
#include "llfilepicker.h"
#include "llfloaterreg.h"
#include "llimagetga.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
#include "llinventory.h"
#include "llresmgr.h"
#include "lltrans.h"
#include "lltextbox.h"
#include "lltextureview.h"
#include "llui.h"
-#include "llviewerimage.h"
-#include "llviewerimagelist.h"
+#include "llviewertexture.h"
+#include "llviewertexturelist.h"
#include "lluictrlfactory.h"
#include "llviewerwindow.h"
#include "lllineeditor.h"
@@ -205,7 +205,7 @@ void LLPreviewTexture::draw()
LLFontGL::NORMAL,
LLFontGL::DROP_SHADOW);
- F32 data_progress = mImage->mDownloadProgress;
+ F32 data_progress = mImage->getDownloadProgress() ;
// Draw the progress bar.
const S32 BAR_HEIGHT = 12;
@@ -295,7 +295,7 @@ void LLPreviewTexture::onFocusReceived()
// static
void LLPreviewTexture::onFileLoadedForSave(BOOL success,
- LLViewerImage *src_vi,
+ LLViewerFetchedTexture *src_vi,
LLImageRaw* src,
LLImageRaw* aux_src,
S32 discard_level,
@@ -357,8 +357,8 @@ void LLPreviewTexture::updateDimensions()
mUpdateDimensions = FALSE;
- S32 image_height = llmax(1, mImage->getHeight(0));
- S32 image_width = llmax(1, mImage->getWidth(0));
+ S32 image_height = llmax(1, mImage->getFullHeight());
+ S32 image_width = llmax(1, mImage->getFullWidth());
// Attempt to make the image 1:1 on screen.
// If that fails, cut width by half.
S32 client_width = image_width;
@@ -379,8 +379,8 @@ void LLPreviewTexture::updateDimensions()
S32 view_height = client_height + vert_pad;
// set text on dimensions display (should be moved out of here and into a callback of some sort)
- childSetTextArg("dimensions", "[WIDTH]", llformat("%d", mImage->mFullWidth));
- childSetTextArg("dimensions", "[HEIGHT]", llformat("%d", mImage->mFullHeight));
+ childSetTextArg("dimensions", "[WIDTH]", llformat("%d", mImage->getFullWidth()));
+ childSetTextArg("dimensions", "[HEIGHT]", llformat("%d", mImage->getFullHeight()));
// add space for dimensions
S32 info_height = 0;
@@ -464,15 +464,15 @@ void LLPreviewTexture::updateDimensions()
void LLPreviewTexture::loadAsset()
{
- mImage = gImageList.getImage(mImageID, MIPMAP_TRUE, FALSE);
- mImage->setBoostLevel(LLViewerImage::BOOST_PREVIEW);
+ mImage = LLViewerTextureManager::getFetchedTexture(mImageID, MIPMAP_TRUE, FALSE, LLViewerTexture::LOD_TEXTURE);
+ mImage->setBoostLevel(LLViewerTexture::BOOST_PREVIEW);
mAssetStatus = PREVIEW_ASSET_LOADING;
updateDimensions();
}
LLPreview::EAssetStatus LLPreviewTexture::getAssetStatus()
{
- if (mImage.notNull() && (mImage->mFullWidth * mImage->mFullHeight > 0))
+ if (mImage.notNull() && (mImage->getFullWidth() * mImage->getFullHeight() > 0))
{
mAssetStatus = PREVIEW_ASSET_LOADED;
}
diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h
index 45b173e7bf..9ace304fa6 100644
--- a/indra/newview/llpreviewtexture.h
+++ b/indra/newview/llpreviewtexture.h
@@ -36,7 +36,7 @@
#include "llpreview.h"
#include "llbutton.h"
#include "llframetimer.h"
-#include "llviewerimage.h"
+#include "llviewertexture.h"
class LLImageRaw;
@@ -60,7 +60,7 @@ public:
static void saveToFile(void* userdata);
static void onFileLoadedForSave(
BOOL success,
- LLViewerImage *src_vi,
+ LLViewerFetchedTexture *src_vi,
LLImageRaw* src,
LLImageRaw* aux_src,
S32 discard_level,
@@ -75,7 +75,7 @@ protected:
private:
void updateDimensions();
LLUUID mImageID;
- LLPointer<LLViewerImage> mImage;
+ LLPointer<LLViewerFetchedTexture> mImage;
BOOL mLoadingFullImage;
std::string mSaveFileName;
LLFrameTimer mSavedFileTimer;
diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp
index 38d617e468..f70cfc59ec 100644
--- a/indra/newview/llprogressview.cpp
+++ b/indra/newview/llprogressview.cpp
@@ -40,7 +40,6 @@
#include "llrender.h"
#include "llui.h"
#include "llfontgl.h"
-#include "llimagegl.h"
#include "lltimer.h"
#include "lltextbox.h"
#include "llglheaders.h"
@@ -51,7 +50,7 @@
#include "llprogressbar.h"
#include "llstartup.h"
#include "llviewercontrol.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerwindow.h"
#include "llappviewer.h"
#include "llweb.h"
@@ -147,10 +146,10 @@ void LLProgressView::draw()
// Paint bitmap if we've got one
glPushMatrix();
- if (gStartImageGL)
+ if (gStartTexture)
{
LLGLSUIDefault gls_ui;
- gGL.getTexUnit(0)->bind(gStartImageGL);
+ gGL.getTexUnit(0)->bind(gStartTexture.get());
gGL.color4f(1.f, 1.f, 1.f, mFadeTimer.getStarted() ? clamp_rescale(mFadeTimer.getElapsedTimeF32(), 0.f, FADE_IN_TIME, 1.f, 0.f) : 1.f);
F32 image_aspect = (F32)gStartImageWidth / (F32)gStartImageHeight;
S32 width = getRect().getWidth();
@@ -186,7 +185,7 @@ void LLProgressView::draw()
{
gFocusMgr.removeTopCtrlWithoutCallback(this);
LLPanel::setVisible(FALSE);
- gStartImageGL = NULL;
+ gStartTexture = NULL;
}
return;
}
diff --git a/indra/newview/llremoteparcelrequest.cpp b/indra/newview/llremoteparcelrequest.cpp
index fe4e8b5d0c..1ac0175b83 100644
--- a/indra/newview/llremoteparcelrequest.cpp
+++ b/indra/newview/llremoteparcelrequest.cpp
@@ -57,7 +57,13 @@ void LLRemoteParcelRequestResponder::result(const LLSD& content)
{
LLUUID parcel_id = content["parcel_id"];
- mObserverHandle.get()->setParcelID(parcel_id);
+ // Panel inspecting the information may be closed and destroyed
+ // before this response is received.
+ LLRemoteParcelInfoObserver* observer = mObserverHandle.get();
+ if (observer)
+ {
+ observer->setParcelID(parcel_id);
+ }
}
//If we get back an error (not found, etc...), handle it here
@@ -67,7 +73,13 @@ void LLRemoteParcelRequestResponder::error(U32 status, const std::string& reason
llinfos << "LLRemoteParcelRequest::error("
<< status << ": " << reason << ")" << llendl;
- mObserverHandle.get()->setErrorStatus(status, reason);
+ // Panel inspecting the information may be closed and destroyed
+ // before this response is received.
+ LLRemoteParcelInfoObserver* observer = mObserverHandle.get();
+ if (observer)
+ {
+ observer->setErrorStatus(status, reason);
+ }
}
void LLRemoteParcelInfoProcessor::addObserver(const LLUUID& parcel_id, LLRemoteParcelInfoObserver* observer)
diff --git a/indra/newview/llrootview.h b/indra/newview/llrootview.h
index af9517f922..f704fecddd 100644
--- a/indra/newview/llrootview.h
+++ b/indra/newview/llrootview.h
@@ -36,20 +36,16 @@
#include "llview.h"
#include "lluictrlfactory.h"
-class LLRootViewRegistry : public LLWidgetRegistry<LLRootViewRegistry>
+class LLRootViewRegistry : public LLChildRegistry<LLRootViewRegistry>
{};
class LLRootView : public LLView
{
public:
+ typedef LLRootViewRegistry child_registry_t;
+
LLRootView(const Params& p)
: LLView(p)
{}
-
- const widget_registry_t& getChildRegistry() const
- {
- // use default widget registry
- return LLRootViewRegistry::instance();
- }
};
#endif //LL_LLROOTVIEW_H
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
new file mode 100644
index 0000000000..5dca12e06b
--- /dev/null
+++ b/indra/newview/llscreenchannel.cpp
@@ -0,0 +1,403 @@
+/**
+ * @file llscreenchannel.cpp
+ * @brief Class implements a channel on a screen in which appropriate toasts may appear.
+ *
+ * $LicenseInfo:firstyear=2000&license=viewergpl$
+ *
+ * Copyright (c) 2000-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h" // must be first include
+
+#include "lliconctrl.h"
+#include "lltextbox.h"
+#include "llscreenchannel.h"
+
+#include "llviewercontrol.h"
+
+#include <algorithm>
+
+using namespace LLNotificationsUI;
+
+bool LLScreenChannel::mWasStartUpToastShown = false;
+
+//--------------------------------------------------------------------------
+LLScreenChannel::LLScreenChannel(): mUnreadToastsPanel(NULL),
+ mToastAlignment(NA_BOTTOM),
+ mStoreToasts(true),
+ mHiddenToastsNum(0),
+ mOverflowToastHidden(false),
+ mIsHovering(false),
+ mControlHovering(false)
+{
+ setFollows(FOLLOWS_RIGHT | FOLLOWS_BOTTOM | FOLLOWS_TOP);
+
+ //TODO: load as a resource string
+ mOverflowFormatString = "You have %d more notification";
+
+ setMouseOpaque( false );
+}
+
+void LLScreenChannel::init(S32 channel_left, S32 channel_right)
+{
+ S32 channel_top = getRootView()->getRect().getHeight() - gSavedSettings.getS32("NavBarMargin");
+ S32 channel_bottom = getRootView()->getRect().mBottom + gSavedSettings.getS32("ChannelBottomPanelMargin");
+ setRect(LLRect(channel_left, channel_top, channel_right, channel_bottom));
+
+}
+
+//--------------------------------------------------------------------------
+LLScreenChannel::~LLScreenChannel()
+{
+}
+
+//--------------------------------------------------------------------------
+void LLScreenChannel::reshape(S32 width, S32 height, BOOL called_from_parent)
+{
+ LLUICtrl::reshape(width, height, called_from_parent);
+ if(mToastAlignment != NA_CENTRE)
+ showToasts();
+}
+
+//--------------------------------------------------------------------------
+LLToast* LLScreenChannel::addToast(LLUUID id, LLPanel* panel, bool is_not_tip)
+{
+ ToastElem new_toast_elem(id, panel);
+
+ mOverflowToastHidden = false;
+
+ mToastList.push_back(new_toast_elem);
+ getRootView()->addChild(new_toast_elem.toast);
+ new_toast_elem.toast->setOnFadeCallback(boost::bind(&LLScreenChannel::onToastFade, this, new_toast_elem.toast));
+ if(mControlHovering)
+ {
+ new_toast_elem.toast->setOnToastHoverCallback(boost::bind(&LLScreenChannel::onToastHover, this, _1, _2));
+ }
+
+ // don't show toasts until StartUp toast will fade, but show alerts
+ if(!mWasStartUpToastShown && mToastAlignment != NA_CENTRE)
+ {
+ new_toast_elem.toast->stopTimer();
+ // Count and store only non tip notifications
+ if(is_not_tip)
+ {
+ mHiddenToastsNum++;
+ storeToast(new_toast_elem);
+ }
+ else
+ {
+ // destroy tip toasts at once
+ new_toast_elem.toast->close();
+ }
+ // remove toast from channel
+ mToastList.pop_back();
+ }
+ else
+ {
+ showToasts();
+ }
+
+ return new_toast_elem.toast;
+}
+
+//--------------------------------------------------------------------------
+void LLScreenChannel::onToastFade(LLToast* toast)
+{
+ std::vector<ToastElem>::iterator it = find(mToastList.begin(), mToastList.end(), static_cast<LLPanel*>(toast));
+
+ bool destroy_toast = toast->isViewed() || !mStoreToasts || !toast->getCanBeStored();
+ if(destroy_toast)
+ {
+ mToastList.erase(it);
+ toast->mOnToastDestroy(toast, LLSD());
+ }
+ else
+ {
+ storeToast((*it));
+ mToastList.erase(it);
+ }
+
+ showToasts();
+}
+
+//--------------------------------------------------------------------------
+
+void LLScreenChannel::storeToast(ToastElem& toast_elem)
+{
+ mStoredToastList.push_back(toast_elem);
+}
+
+//--------------------------------------------------------------------------
+void LLScreenChannel::loadStoredToastsToChannel()
+{
+ std::vector<ToastElem>::iterator it;
+
+ if(mStoredToastList.size() == 0)
+ return;
+
+ mOverflowToastHidden = false;
+
+ for(it = mStoredToastList.begin(); it != mStoredToastList.end(); ++it)
+ {
+ (*it).toast->resetTimer();
+ mToastList.push_back((*it));
+ }
+
+ mStoredToastList.clear();
+ showToasts();
+}
+
+//--------------------------------------------------------------------------
+void LLScreenChannel::killToastByNotificationID(LLUUID id)
+{
+ std::vector<ToastElem>::iterator it = find(mToastList.begin(), mToastList.end(), id);
+
+ if( it != mToastList.end())
+ {
+ LLToast* toast = (*it).toast;
+ mToastList.erase(it);
+ toast->mOnToastDestroy(toast, LLSD());
+ showToasts();
+ }
+}
+
+//--------------------------------------------------------------------------
+void LLScreenChannel::modifyToastByNotificationID(LLUUID id, LLPanel* panel)
+{
+ std::vector<ToastElem>::iterator it = find(mToastList.begin(), mToastList.end(), id);
+
+ if( it != mToastList.end() && panel)
+ {
+ LLToast* toast = (*it).toast;
+ LLPanel* old_panel = toast->getPanel();
+ toast->removeChild(old_panel);
+ delete old_panel;
+ toast->arrange(panel);
+ toast->resetTimer();
+ showToasts();
+ }
+}
+
+//--------------------------------------------------------------------------
+void LLScreenChannel::showToasts()
+{
+ if(mToastList.size() == 0 || mIsHovering)
+ return;
+
+ hideToastsFromScreen();
+
+ switch(mToastAlignment)
+ {
+ case NA_TOP :
+ showToastsTop();
+ break;
+
+ case NA_CENTRE :
+ showToastsCentre();
+ break;
+
+ case NA_BOTTOM :
+ showToastsBottom();
+ }
+}
+
+//--------------------------------------------------------------------------
+void LLScreenChannel::showToastsBottom()
+{
+ LLRect toast_rect;
+ S32 bottom = getRect().mBottom;
+ std::vector<ToastElem>::reverse_iterator it;
+
+ for(it = mToastList.rbegin(); it != mToastList.rend(); ++it)
+ {
+ if(it != mToastList.rbegin())
+ {
+ bottom = (*(it-1)).toast->getRect().mTop;
+ }
+
+ toast_rect = (*it).toast->getRect();
+ toast_rect.setLeftTopAndSize(getRect().mLeft, bottom + toast_rect.getHeight()+gSavedSettings.getS32("ToastMargin"), toast_rect.getWidth() ,toast_rect.getHeight());
+ (*it).toast->setRect(toast_rect);
+
+ bool stop_showing_toasts = (*it).toast->getRect().mTop > getRect().getHeight();
+
+ if(!stop_showing_toasts)
+ {
+ if( it != mToastList.rend()-1)
+ {
+ stop_showing_toasts = ((*it).toast->getRect().mTop + gSavedSettings.getS32("OverflowToastHeight") + gSavedSettings.getS32("ToastMargin")) > getRect().getHeight();
+ }
+ }
+
+ if(stop_showing_toasts)
+ break;
+
+ (*it).toast->setVisible(TRUE);
+ }
+
+ if(it != mToastList.rend() && !mOverflowToastHidden)
+ {
+ mHiddenToastsNum = 0;
+ for(; it != mToastList.rend(); it++)
+ {
+ mHiddenToastsNum++;
+ }
+ createOverflowToast(bottom);
+ }
+}
+
+//--------------------------------------------------------------------------
+void LLScreenChannel::showToastsCentre()
+{
+ LLRect toast_rect;
+ S32 bottom = (getRect().mTop - getRect().mBottom)/2 + mToastList[0].toast->getRect().getHeight()/2;
+ std::vector<ToastElem>::reverse_iterator it;
+
+ for(it = mToastList.rbegin(); it != mToastList.rend(); ++it)
+ {
+ toast_rect = (*it).toast->getRect();
+ toast_rect.setLeftTopAndSize(getRect().mLeft - toast_rect.getWidth() / 2, bottom + toast_rect.getHeight() / 2 + gSavedSettings.getS32("ToastMargin"), toast_rect.getWidth() ,toast_rect.getHeight());
+ (*it).toast->setRect(toast_rect);
+
+ (*it).toast->setVisible(TRUE);
+ }
+}
+
+//--------------------------------------------------------------------------
+void LLScreenChannel::showToastsTop()
+{
+}
+
+//--------------------------------------------------------------------------
+void LLScreenChannel::createOverflowToast(S32 bottom, F32 timer)
+{
+ LLRect toast_rect;
+ mUnreadToastsPanel = new LLToast(NULL);
+
+ if(!mUnreadToastsPanel)
+ return;
+
+ mUnreadToastsPanel->setOnFadeCallback(boost::bind(&LLScreenChannel::onOverflowToastHide, this));
+
+ LLTextBox* text_box = mUnreadToastsPanel->getChild<LLTextBox>("toast_text");
+ LLIconCtrl* icon = mUnreadToastsPanel->getChild<LLIconCtrl>("icon");
+ std::string text = llformat(mOverflowFormatString.c_str(),mHiddenToastsNum);
+ if(mHiddenToastsNum == 1)
+ {
+ text += ".";
+ }
+ else
+ {
+ text += "s.";
+ }
+
+ toast_rect = mUnreadToastsPanel->getRect();
+ mUnreadToastsPanel->reshape(getRect().getWidth(), toast_rect.getHeight(), true);
+ toast_rect.setLeftTopAndSize(getRect().mLeft, bottom + toast_rect.getHeight()+gSavedSettings.getS32("ToastMargin"), getRect().getWidth(), toast_rect.getHeight());
+ mUnreadToastsPanel->setRect(toast_rect);
+ mUnreadToastsPanel->setAndStartTimer(timer ? timer : gSavedSettings.getS32("NotificationToastTime"));
+ getRootView()->addChild(mUnreadToastsPanel);
+
+ text_box->setValue(text);
+ text_box->setVisible(TRUE);
+ icon->setVisible(TRUE);
+
+ mUnreadToastsPanel->setVisible(TRUE);
+}
+
+//--------------------------------------------------------------------------
+void LLScreenChannel::onOverflowToastHide()
+{
+ mOverflowToastHidden = true;
+ onCommit();
+}
+
+//--------------------------------------------------------------------------
+void LLScreenChannel::hideToastsFromScreen()
+{
+ if(mUnreadToastsPanel)
+ {
+ mUnreadToastsPanel->close();
+ delete mUnreadToastsPanel;
+ mUnreadToastsPanel = NULL;
+ }
+ for(std::vector<ToastElem>::iterator it = mToastList.begin(); it != mToastList.end(); it++)
+ (*it).toast->setVisible(FALSE);
+}
+
+//--------------------------------------------------------------------------
+void LLScreenChannel::removeToastsFromChannel()
+{
+ hideToastsFromScreen();
+ for(std::vector<ToastElem>::iterator it = mToastList.begin(); it != mToastList.end(); it++)
+ {
+ (*it).toast->close();
+ //toast->mOnToastDestroy(toast, LLSD()); //TODO: check OnToastDestroy handler for chat
+ }
+ mToastList.clear();
+}
+
+//--------------------------------------------------------------------------
+void LLScreenChannel::onToastHover(LLToast* toast, bool mouse_enter)
+{
+ // because of LLViewerWindow::updateUI() that ALWAYS calls onMouseEnter BEFORE onMouseLeave
+ // we must check this to prevent incorrect setting for hovering in a channel
+ std::map<LLToast*, bool>::iterator it_first, it_second;
+ S32 stack_size = mToastEventStack.size();
+ mIsHovering = mouse_enter;
+
+ switch(stack_size)
+ {
+ case 0:
+ mToastEventStack.insert(std::pair<LLToast*, bool>(toast, mouse_enter));
+ break;
+ case 1:
+ it_first = mToastEventStack.begin();
+ if((*it_first).second && !mouse_enter && ((*it_first).first != toast) )
+ {
+ mToastEventStack.clear();
+ mIsHovering = true;
+ }
+ else
+ {
+ mToastEventStack.clear();
+ mToastEventStack.insert(std::pair<LLToast*, bool>(toast, mouse_enter));
+ }
+ break;
+ default:
+ LL_ERRS ("LLScreenChannel::onToastHover: stack size error " ) << stack_size << llendl;
+ }
+
+ if(!mIsHovering)
+ showToasts();
+}
+
+//--------------------------------------------------------------------------
+
+
+
+
diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h
new file mode 100644
index 0000000000..f05c205e2a
--- /dev/null
+++ b/indra/newview/llscreenchannel.h
@@ -0,0 +1,147 @@
+/**
+ * @file llscreenchannel.h
+ * @brief Class implements a channel on a screen in which appropriate toasts may appear.
+ *
+ * $LicenseInfo:firstyear=2003&license=viewergpl$
+ *
+ * Copyright (c) 2003-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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_LLSCREENCHANNEL_H
+#define LL_LLSCREENCHANNEL_H
+
+#include "lltoast.h"
+
+#include <map>
+#include <boost/shared_ptr.hpp>
+
+namespace LLNotificationsUI
+{
+
+typedef enum e_notification_toast_alignment
+{
+ NA_TOP,
+ NA_CENTRE,
+ NA_BOTTOM,
+} EToastAlignment;
+
+
+/**
+ * Screen channel manages toasts visibility and positioning on the screen.
+ */
+class LLScreenChannel : public LLUICtrl
+{
+ friend class LLChannelManager;
+public:
+ LLScreenChannel();
+ virtual ~LLScreenChannel();
+
+ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+
+ LLToast* addToast(LLUUID id, LLPanel* panel, bool is_not_tip = true);
+ void init(S32 channel_left, S32 channel_right);
+
+ void killToastByNotificationID(LLUUID id);
+ void modifyToastByNotificationID(LLUUID id, LLPanel* panel);
+
+ void setToastAlignment(e_notification_toast_alignment align) {mToastAlignment = align;}
+
+ void setControlHovering(bool control) { mControlHovering = control; }
+ void setHovering(bool hovering) { mIsHovering = hovering; }
+
+ void removeToastsFromChannel();
+ void hideToastsFromScreen();
+
+ void setStoreToasts(bool store) { mStoreToasts = store; }
+ void loadStoredToastsToChannel();
+
+ void showToasts();
+
+ S32 getNumberOfHiddenToasts() { return mHiddenToastsNum;}
+ void setNumberOfHiddenToasts(S32 num) { mHiddenToastsNum = num;}
+
+ static void setStartUpToastShown() { mWasStartUpToastShown = true; }
+
+ e_notification_toast_alignment getToastAlignment() {return mToastAlignment;}
+
+ void setOverflowFormatString ( std::string str) { mOverflowFormatString = str; }
+
+private:
+ struct ToastElem
+ {
+ LLUUID id;
+ LLToast* toast;
+ ToastElem(LLUUID lluuid, LLPanel* panel) : id(lluuid)
+ {
+ toast = new LLToast(panel);
+ }
+
+ ToastElem(const ToastElem& toast_elem)
+ {
+ id = toast_elem.id;
+ toast = toast_elem.toast;
+ }
+
+ bool operator == (const LLUUID &id_op) const
+ {
+ return (id == id_op);
+ }
+
+ bool operator == (LLPanel* panel_op) const
+ {
+ return (toast == panel_op);
+ }
+ };
+
+ void onToastHover(LLToast* toast, bool mouse_enter);
+
+ void onToastFade(LLToast* toast);
+ void storeToast(ToastElem& toast_elem);
+
+ void showToastsBottom();
+ void showToastsCentre();
+ void showToastsTop();
+
+ void createOverflowToast(S32 bottom, F32 timer = 0);
+ void onOverflowToastHide();
+
+ static bool mWasStartUpToastShown;
+ bool mControlHovering;
+ bool mIsHovering;
+ bool mStoreToasts;
+ bool mOverflowToastHidden;
+ S32 mHiddenToastsNum;
+ LLToast* mUnreadToastsPanel;
+ std::vector<ToastElem> mToastList;
+ std::vector<ToastElem> mStoredToastList;
+ e_notification_toast_alignment mToastAlignment;
+ std::map<LLToast*, bool> mToastEventStack;
+
+ std::string mOverflowFormatString;
+};
+
+}
+#endif
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index ed7c7dce12..c24b3f0d04 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -57,6 +57,7 @@
#include "llfloaterinspect.h"
#include "llfloaterproperties.h"
#include "llfloaterreporter.h"
+#include "llfloaterreg.h"
#include "llfloatertools.h"
#include "llframetimer.h"
#include "llhudeffecttrail.h"
@@ -73,7 +74,7 @@
#include "llui.h"
#include "llviewercamera.h"
#include "llviewercontrol.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewermenu.h"
#include "llviewerobject.h"
#include "llviewerobjectlist.h"
@@ -187,12 +188,12 @@ LLSelectMgr::LLSelectMgr()
sHighlightUAnim = gSavedSettings.getF32("SelectionHighlightUAnim");
sHighlightVAnim = gSavedSettings.getF32("SelectionHighlightVAnim");
- sSilhouetteParentColor =gSavedSkinSettings.getColor("SilhouetteParentColor");
- sSilhouetteChildColor = gSavedSkinSettings.getColor("SilhouetteChildColor");
- sHighlightParentColor = gSavedSkinSettings.getColor("HighlightParentColor");
- sHighlightChildColor = gSavedSkinSettings.getColor("HighlightChildColor");
- sHighlightInspectColor = gSavedSkinSettings.getColor("HighlightInspectColor");
- sContextSilhouetteColor = gSavedSkinSettings.getColor("ContextSilhouetteColor")*0.5f;
+ sSilhouetteParentColor =LLUIColorTable::instance().getColor("SilhouetteParentColor");
+ sSilhouetteChildColor = LLUIColorTable::instance().getColor("SilhouetteChildColor");
+ sHighlightParentColor = LLUIColorTable::instance().getColor("HighlightParentColor");
+ sHighlightChildColor = LLUIColorTable::instance().getColor("HighlightChildColor");
+ sHighlightInspectColor = LLUIColorTable::instance().getColor("HighlightInspectColor");
+ sContextSilhouetteColor = LLUIColorTable::instance().getColor("ContextSilhouetteColor")*0.5f;
sRenderLightRadius = gSavedSettings.getBOOL("RenderLightRadius");
@@ -1424,7 +1425,7 @@ void LLSelectMgr::selectionSetImage(const LLUUID& imageid)
// Texture picker defaults aren't inventory items
// * Don't need to worry about permissions for them
// * Can just apply the texture and be done with it.
- objectp->setTEImage(te, gImageList.getImage(mImageID, TRUE, FALSE));
+ objectp->setTEImage(te, LLViewerTextureManager::getFetchedTexture(mImageID, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE));
}
return true;
}
@@ -1580,7 +1581,7 @@ BOOL LLSelectMgr::selectionRevertTextures()
}
else
{
- object->setTEImage(te, gImageList.getImage(id));
+ object->setTEImage(te, LLViewerTextureManager::getFetchedTexture(id, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE));
}
}
}
@@ -4543,7 +4544,7 @@ void LLSelectMgr::updateSilhouettes()
if (!mSilhouetteImagep)
{
- mSilhouetteImagep = gImageList.getImageFromFile("silhouette.j2c", TRUE, TRUE);
+ mSilhouetteImagep = LLViewerTextureManager::getFetchedTextureFromFile("silhouette.j2c", TRUE, TRUE);
}
mHighlightedObjects->cleanupNodes();
@@ -4813,7 +4814,7 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
return;
}
- gGL.getTexUnit(0)->bind(mSilhouetteImagep.get());
+ gGL.getTexUnit(0)->bind(mSilhouetteImagep);
LLGLSPipelineSelection gls_select;
gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.f);
LLGLEnable blend(GL_BLEND);
@@ -4842,8 +4843,12 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
}
if (mSelectedObjects->getNumNodes())
{
- LLUUID inspect_item_id = LLFloaterInspect::getSelectedUUID();
-
+ LLFloaterInspect* inspect_instance = LLFloaterReg::getTypedInstance<LLFloaterInspect>("inspect");
+ LLUUID inspect_item_id= LLUUID::null;
+ if(inspect_instance)
+ {
+ inspect_item_id = inspect_instance->getSelectedUUID();
+ }
for (S32 pass = 0; pass < 2; pass++)
{
for (LLObjectSelection::iterator iter = mSelectedObjects->begin();
@@ -5400,7 +5405,11 @@ void dialog_refresh_all()
}
LLFloaterProperties::dirtyAll();
- LLFloaterInspect::dirty();
+ LLFloaterInspect* inspect_instance = LLFloaterReg::getTypedInstance<LLFloaterInspect>("inspect");
+ if(inspect_instance)
+ {
+ inspect_instance->dirty();
+ }
}
S32 get_family_count(LLViewerObject *parent)
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index 992cc1e906..cfc2b702fc 100644
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -54,7 +54,7 @@
#include "boost/iterator/filter_iterator.hpp"
class LLMessageSystem;
-class LLViewerImage;
+class LLViewerTexture;
class LLViewerObject;
class LLColor4;
class LLVector3;
@@ -690,7 +690,7 @@ private:
static bool confirmDelete(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle handle);
private:
- LLPointer<LLViewerImage> mSilhouetteImagep;
+ LLPointer<LLViewerTexture> mSilhouetteImagep;
LLObjectSelectionHandle mSelectedObjects;
LLObjectSelectionHandle mHoverObjects;
LLObjectSelectionHandle mHighlightedObjects;
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index e7008abe60..2688399139 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -36,23 +36,22 @@
#include "llsidetray.h"
#include "llviewerwindow.h"
-#include "llaccordionpanel.h"
+#include "llaccordionctrl.h"
#include "llfocusmgr.h"
#include "llrootview.h"
-#include "llcollapsiblectrl.h"
+#include "llaccordionctrltab.h"
#include "llfloater.h" //for gFloaterView
#include "lliconctrl.h"//for Home tab icon
#include "llwindow.h"//for SetCursor
-#include "llbottomtray.h"//for reshape
//#include "llscrollcontainer.h"
using namespace std;
static LLRootViewRegistry::Register<LLSideTray> t1("side_tray");
-static LLDefaultWidgetRegistry::Register<LLSideTrayTab> t2("sidetray_tab");
+static LLDefaultChildRegistry::Register<LLSideTrayTab> t2("sidetray_tab");
static const std::string COLLAPSED_NAME = "<<";
static const std::string EXPANDED_NAME = ">>";
@@ -64,24 +63,11 @@ LLSideTray* LLSideTray::sInstance = 0;
class LLSideTrayInfoPanel: public LLPanel
{
-protected:
- LLSideTrayInfoPanel(){}
+
public:
- static LLSideTrayInfoPanel* createInstance(const string& image, const string& name,const string& description)
+ LLSideTrayInfoPanel():LLPanel()
{
- LLSideTrayInfoPanel* panel = new LLSideTrayInfoPanel();
- LLUICtrlFactory::getInstance()->buildPanel(panel,"panel_sidetray_tab_info.xml");
- if(panel)
- panel->setData(image, name,description);
- panel->setBorderVisible(true);
- return panel;
-
- }
- void setData(const string& image, const string& name,const string& description)
- {
- getChild<LLTextBox>("tab_name",false,false)->setValue(name);
- getChild<LLTextBox>("tab_description",false,false)->setValue(description);
- getChild<LLIconCtrl>("tab_icon",false,false)->setValue(image);
+ setBorderVisible(true);
}
BOOL handleHover(S32 x, S32 y, MASK mask)
@@ -92,18 +78,25 @@ public:
BOOL handleMouseUp(S32 x, S32 y, MASK mask)
{
+ std::string name = getName();
onCommit();
+ LLSideTray::getInstance()->selectTabByName(name);
return LLPanel::handleMouseUp(x,y,mask);
}
+ void reshape (S32 width, S32 height, BOOL called_from_parent )
+ {
+ return LLPanel::reshape(width, height, called_from_parent);
+ }
};
+static LLRegisterPanelClassWrapper<LLSideTrayInfoPanel> t_people("panel_sidetray_home_info");
LLSideTray* LLSideTray::getInstance()
{
if (!sInstance)
{
- sInstance = LLUICtrlFactory::createFromFile<LLSideTray>("panel_side_tray.xml",gViewerWindow->getRootView());
+ sInstance = LLUICtrlFactory::createFromFile<LLSideTray>("panel_side_tray.xml",gViewerWindow->getRootView(), LLRootView::child_registry_t::instance());
}
return sInstance;
@@ -114,41 +107,23 @@ bool LLSideTray::instanceCreated ()
return sInstance!=0;
}
-LLSideTrayTab::LLSideTrayTab(const Params& params):mAccordionPanel(0)
+LLSideTrayTab::LLSideTrayTab(const Params& params):mMainPanel(0)
{
mImagePath = params.image_path;
mTabTitle = params.tab_title;
- mDescription = params.tab_description;
+ mDescription = params.description;
}
LLSideTrayTab::~LLSideTrayTab()
{
}
-void LLSideTrayTab::addPanel(LLPanel* panel)
-{
- //addChild(panel,false);
-}
-
bool LLSideTrayTab::addChild(LLView* view, S32 tab_group)
{
- if(mAccordionPanel == 0)
- {
- mAccordionPanel = new LLAccordionPanel();
- mAccordionPanel->setVisible(TRUE);
- LLPanel::addChild(mAccordionPanel,tab_group);
- }
-
-
- bool res = true;
- if(TAB_PANEL_CAPTION_NAME != view->getName())//skip our caption panel
- {
- mAccordionPanel->addCollapsibleCtrl(view);
- }
- else
- res = LLPanel::addChild(view,tab_group);
-
- return res;
+ if(mMainPanel == 0 && TAB_PANEL_CAPTION_NAME != view->getName())//skip our caption panel
+ mMainPanel = view;
+ return LLPanel::addChild(view,tab_group);
+ //return res;
}
@@ -156,14 +131,14 @@ bool LLSideTrayTab::addChild(LLView* view, S32 tab_group)
//virtual
BOOL LLSideTrayTab::postBuild()
{
- LLPanel* title_panel = LLUICtrlFactory::getInstance()->createFromFile<LLPanel>("panel_side_tray_tab_caption.xml",this);
+ LLPanel* title_panel = LLUICtrlFactory::getInstance()->createFromFile<LLPanel>("panel_side_tray_tab_caption.xml",this, child_registry_t::instance());
string name = title_panel->getName();
LLPanel::addChild(title_panel);
title_panel->getChild<LLTextBox>(TAB_PANEL_CAPTION_TITLE_BOX)->setValue(mTabTitle);
- static LLUICachedControl<LLColor4> default_background_color ("FloaterDefaultBackgroundColor", *(new LLColor4));
- static LLUICachedControl<LLColor4> focus_background_color ("FloaterFocusBackgroundColor", *(new LLColor4));
+ static LLUIColor default_background_color = LLUIColorTable::instance().getColor("FloaterDefaultBackgroundColor");
+ static LLUIColor focus_background_color = LLUIColorTable::instance().getColor("FloaterFocusBackgroundColor");
setTransparentColor(default_background_color);
setBackgroundColor(focus_background_color);
@@ -171,11 +146,6 @@ BOOL LLSideTrayTab::postBuild()
return true;
}
-S32 LLSideTrayTab::getMaxSideBarTabWidth()
-{
- return (mAccordionPanel)?mAccordionPanel->getMaxPanelWidth():0;
-}
-
static const S32 splitter_margin = 1;
//virtual
@@ -191,17 +161,18 @@ void LLSideTrayTab::arrange(S32 width, S32 height )
offset = title_panel->getRect().getHeight();
}
- LLRect sRect = mAccordionPanel->getRect();
+ LLRect sRect = mMainPanel->getRect();
sRect.setLeftTopAndSize( splitter_margin, height - offset - splitter_margin, width - 2*splitter_margin, height - offset - 2*splitter_margin);
- mAccordionPanel->setRect(sRect);
+ mMainPanel->reshape(sRect.getWidth(),sRect.getHeight());
+ mMainPanel->setRect(sRect);
+
+
- mAccordionPanel->setMaxWidth(sRect.getWidth());
- mAccordionPanel->arrange();
}
void LLSideTrayTab::reshape (S32 width, S32 height, BOOL called_from_parent )
{
- if(!mAccordionPanel)
+ if(!mMainPanel)
return;
S32 offset = 0;
@@ -216,12 +187,12 @@ void LLSideTrayTab::reshape (S32 width, S32 height, BOOL called_from_parent )
- LLRect sRect = mAccordionPanel->getRect();
+ LLRect sRect = mMainPanel->getRect();
sRect.setLeftTopAndSize( splitter_margin, height - offset - splitter_margin, width - 2*splitter_margin, height - offset - 2*splitter_margin);
- mAccordionPanel->setMaxWidth(sRect.getWidth());
- mAccordionPanel->reshape(sRect.getWidth(), sRect.getHeight());
+ //mMainPanel->setMaxWidth(sRect.getWidth());
+ mMainPanel->reshape(sRect.getWidth(), sRect.getHeight());
- mAccordionPanel->setRect(sRect);
+ mMainPanel->setRect(sRect);
}
@@ -237,7 +208,9 @@ void LLSideTrayTab::draw()
void LLSideTrayTab::onOpen (const LLSD& key)
{
- mAccordionPanel->onOpen(key);
+ LLPanel* panel = dynamic_cast<LLPanel*>(mMainPanel);
+ if(panel)
+ panel->onOpen(key);
}
LLSideTrayTab* LLSideTrayTab::createInstance ()
@@ -252,11 +225,11 @@ LLSideTrayTab* LLSideTrayTab::createInstance ()
//virtual
LLSideTray::LLSideTray(Params& params)
- :mActiveTab(0)
+ : LLPanel(params)
+ ,mActiveTab(0)
,mCollapsed(false)
,mCollapseButton(0)
- ,mMaxBarWidth(0)
- ,mHomeTab(0)
+ ,mMaxBarWidth(params.rect.width)
{
mCollapsed=params.collapsed;
}
@@ -264,14 +237,10 @@ LLSideTray::LLSideTray(Params& params)
BOOL LLSideTray::postBuild()
{
- calcMaxSideBarWidth();
-
createButtons();
- createHomeTab();
-
arrange();
- selectTabByName("home_tab");
+ selectTabByName("sidebar_home");
if(mCollapsed)
collapseSideBar();
@@ -340,8 +309,6 @@ bool LLSideTray::selectTabByIndex(size_t index)
bool LLSideTray::selectTabByName (const std::string& name)
{
LLSideTrayTab* side_bar = getTab(name);
- if(side_bar == 0 && name == "home_tab")
- side_bar = mHomeTab;
if(side_bar == NULL || side_bar == mActiveTab)
return false;
@@ -374,7 +341,7 @@ bool LLSideTray::selectTabByName (const std::string& name)
LLButton* LLSideTray::createButton (const std::string& name,const std::string& image,LLUICtrl::commit_callback_t callback)
{
- static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams<LLSideTray::Params>());
+ static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams<LLSideTray>());
LLButton::Params bparams;
@@ -423,9 +390,10 @@ void LLSideTray::createButtons ()
mCollapseButton = createButton(EXPANDED_NAME,"",boost::bind(&LLSideTray::onToggleCollapse, this));
//create buttons for tabs
- child_vector_const_iter_t child_it;
+ child_vector_const_iter_t child_it = mTabs.begin();
+ ++child_it;
- for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it)
+ for ( ; child_it != mTabs.end(); ++child_it)
{
LLSideTrayTab* sidebar_tab = dynamic_cast<LLSideTrayTab*>(*child_it);
if(sidebar_tab == NULL)
@@ -452,7 +420,7 @@ void LLSideTray::onToggleCollapse()
if(mCollapsed)
{
expandSideBar();
- selectTabByName("home_tab");
+ selectTabByName("sidebar_home");
}
else
collapseSideBar();
@@ -475,11 +443,7 @@ void LLSideTray::reflectCollapseChange()
void LLSideTray::arrange ()
{
- static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams<LLSideTray::Params>());
-
- calcMaxSideBarWidth();
-
-
+ static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams<LLSideTray>());
setPanelRect();
@@ -528,10 +492,6 @@ void LLSideTray::arrange ()
sidebar_tab->setRect(ctrl_rect);
sidebar_tab->arrange(mMaxBarWidth,getRect().getHeight());
}
-
- mHomeTab->setRect(ctrl_rect);
- mHomeTab->arrange(mMaxBarWidth,getRect().getHeight());
-
}
void LLSideTray::collapseSideBar ()
@@ -553,25 +513,6 @@ void LLSideTray::expandSideBar ()
}
-void LLSideTray::calcMaxSideBarWidth()
-{
-
- S32 max_bar_width = 0;
-
-
- child_vector_const_iter_t child_it;
- for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it)
- {
- LLSideTrayTab* sidebar_tab = dynamic_cast<LLSideTrayTab*>(*child_it);
- if(sidebar_tab == NULL)
- continue;
- max_bar_width = llmax(max_bar_width,sidebar_tab->getMaxSideBarTabWidth());
- }
-
- if(max_bar_width > 0)
- mMaxBarWidth = max_bar_width;
-
-}
void LLSideTray::highlightFocused()
{
if(!mActiveTab)
@@ -600,7 +541,7 @@ void LLSideTray::reshape (S32 width, S32 height, BOOL called_from_parent)
if(!mActiveTab)
return;
- static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams<LLSideTray::Params>());
+ static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams<LLSideTray>());
setPanelRect();
@@ -649,19 +590,16 @@ void LLSideTray::reshape (S32 width, S32 height, BOOL called_from_parent)
sidebar_tab->setRect(ctrl_rect);
}
-
- mHomeTab->reshape(mMaxBarWidth,getRect().getHeight());
- ctrl_rect.setLeftTopAndSize(sidetray_params.default_button_width,getRect().getHeight(),mMaxBarWidth,getRect().getHeight());
- mHomeTab->setRect(ctrl_rect);
-
-
}
/**
* Activate tab with "panel_name" panel
- * if no such tab - return false, otherwise true
+ * if no such tab - return false, otherwise true.
+ * TODO* In some cases a pointer to a panel of
+ * a specific class may be needed so this method
+ * would need to use templates.
*/
-bool LLSideTray::showPanel (const std::string& panel_name, const LLSD& params)
+LLPanel* LLSideTray::showPanel (const std::string& panel_name, const LLSD& params)
{
//arrange tabs
child_vector_const_iter_t child_it;
@@ -674,56 +612,18 @@ bool LLSideTray::showPanel (const std::string& panel_name, const LLSD& params)
LLPanel* panel = dynamic_cast<LLPanel*>(view);
if(panel)
panel->onOpen(params);
- return true;
+ return panel;
}
}
- return false;
+ return NULL;
}
-void LLSideTray::createHomeTab()
-{
- mHomeTab = LLSideTrayTab::createInstance();
- child_vector_iter_t child_it;
- for ( child_it = mTabs.begin(); child_it != mTabs.end(); ++child_it)
- {
- LLSideTrayTab* sidebar_tab = dynamic_cast<LLSideTrayTab*>(*child_it);
- if(sidebar_tab == NULL)
- continue;
-
- LLPanel* panel = LLSideTrayInfoPanel::createInstance(sidebar_tab->mImagePath,sidebar_tab->getTabTitle(),sidebar_tab->getDescription());
-
- panel->setCommitCallback(boost::bind(&LLSideTray::onTabButtonClick, this, sidebar_tab->getName()));
-
- LLCollapsibleCtrl::Params panel_params;
- panel_params.display_children(true);
- panel_params.collapsible(false);
- panel_params.header_visible(false);
- panel_params.can_resize(false);
- panel_params.min_height(200);
- panel_params.padding_left(10);
- panel_params.padding_right(10);
- panel_params.padding_top(5);
- panel_params.padding_bottom(5);
-
- LLCollapsibleCtrl* ctrl = LLUICtrlFactory::create<LLCollapsibleCtrl>(panel_params);
-
-
- ctrl->setPanel(panel);
- ctrl->postBuild();
- mHomeTab->addChild(ctrl,0);
- }
-
- mHomeTab->setBackgroundVisible(true);
- mHomeTab->postBuild();
-
- LLUICtrl::addChild(mHomeTab, 0);
-}
static const S32 fake_offset = 132;
static const S32 fake_top_offset = 78;
void LLSideTray::setPanelRect ()
{
- static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams<LLSideTray::Params>());
+ static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams<LLSideTray>());
const LLRect& parent_rect = gViewerWindow->getRootView()->getRect();
@@ -732,8 +632,6 @@ void LLSideTray::setPanelRect ()
panel_width+=mMaxBarWidth;
S32 panel_height = parent_rect.getHeight()-fake_top_offset;
- panel_height -= LLBottomTray::getInstance()->getRect().getHeight();
-
LLRect panel_rect;
panel_rect.setLeftTopAndSize( parent_rect.mRight-panel_width, parent_rect.mTop-fake_top_offset, panel_width, panel_height);
setRect(panel_rect);
@@ -741,6 +639,6 @@ void LLSideTray::setPanelRect ()
S32 LLSideTray::getTrayWidth()
{
- static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams<LLSideTray::Params>());
+ static LLSideTray::Params sidetray_params(LLUICtrlFactory::getDefaultParams<LLSideTray>());
return getRect().getWidth() - (sidetray_params.default_button_width + sidetray_params.default_button_margin);
}
diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h
index 7d26925753..99e84f8141 100644
--- a/indra/newview/llsidetray.h
+++ b/indra/newview/llsidetray.h
@@ -37,7 +37,7 @@
#include "string"
class LLSideTray;
-class LLAccordionPanel;
+class LLAccordionCtrl;
class LLSideTrayTab: public LLPanel
{
@@ -51,21 +51,20 @@ public:
// image name
Optional<std::string> image_path;
Optional<std::string> tab_title;
- Optional<std::string> tab_description;
- Params():image_path("image","")
- ,tab_title("tab_title","no title")
- ,tab_description("description","no description")
+ Optional<std::string> description;
+ Params()
+ : image_path("image"),
+ tab_title("tab_title","no title"),
+ description("description","no description")
{};
};
protected:
LLSideTrayTab(const Params& params);
- S32 getMaxSideBarTabWidth();
public:
virtual ~LLSideTrayTab();
- void addPanel (LLPanel* panel);
/*virtual*/ BOOL postBuild ();
/*virtual*/ bool addChild (LLView* view, S32 tab_group);
@@ -87,7 +86,7 @@ private:
std::string mImagePath;
std::string mDescription;
- LLAccordionPanel* mAccordionPanel;
+ LLView* mMainPanel;
};
@@ -110,14 +109,14 @@ public:
Optional<S32> default_button_height;
Optional<S32> default_button_margin;
- Params():
- collapsed("collapsed",false)
- ,tab_btn_image_normal("tab_btn_image","sidebar_tab_left.tga")
- ,tab_btn_image_selected("tab_btn_image_selected","button_enabled_selected_32x128.tga")
- ,default_button_width("tab_btn_width",32)
- ,default_button_height("tab_btn_height",32)
- ,default_button_margin("tab_btn_margin",0)
- {};
+ Params()
+ : collapsed("collapsed",false),
+ tab_btn_image_normal("tab_btn_image","sidebar_tab_left.tga"),
+ tab_btn_image_selected("tab_btn_image_selected","button_enabled_selected_32x128.tga"),
+ default_button_width("tab_btn_width",32),
+ default_button_height("tab_btn_height",32),
+ default_button_margin("tab_btn_margin",0)
+ {};
};
static LLSideTray* getInstance ();
@@ -163,9 +162,9 @@ public:
/**
* Activate tab with "panel_name" panel
- * if no such tab - return false, otherwise true
+ * if no such tab - return NULL, otherwise a pointer to the panel
*/
- bool showPanel (const std::string& panel_name, const LLSD& params);
+ LLPanel* showPanel (const std::string& panel_name, const LLSD& params);
/*
* collapse SideBar, hiding visible tab and moving tab buttons
@@ -209,15 +208,12 @@ protected:
void createButtons ();
LLButton* createButton (const std::string& name,const std::string& image,LLUICtrl::commit_callback_t callback);
- void createHomeTab ();
void arrange ();
void reflectCollapseChange();
void toggleTabButton (LLSideTrayTab* tab);
- void calcMaxSideBarWidth();
-
void setPanelRect ();
@@ -225,7 +221,6 @@ private:
std::map<std::string,LLButton*> mTabButtons;
child_vector_t mTabs;
- LLSideTrayTab* mHomeTab;
LLSideTrayTab* mActiveTab;
LLButton* mCollapseButton;
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index f8b824732f..c4364ed6ca 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -577,7 +577,7 @@ void LLSpatialPartition::rebuildGeom(LLSpatialGroup* group)
return;
}
- if (group->changeLOD())
+ if (!LLPipeline::sSkipUpdate && group->changeLOD())
{
group->mLastUpdateDistance = group->mDistance;
group->mLastUpdateViewAngle = group->mViewAngle;
@@ -826,7 +826,7 @@ class LLSpatialSetStateDiff : public LLSpatialSetState
public:
LLSpatialSetStateDiff(U32 state) : LLSpatialSetState(state) { }
- virtual void traverse(const LLSpatialGroup::TreeNode* n)
+ virtual void traverse(const LLSpatialGroup::OctreeNode* n)
{
LLSpatialGroup* group = (LLSpatialGroup*) n->getListener(0);
@@ -885,7 +885,7 @@ class LLSpatialClearStateDiff : public LLSpatialClearState
public:
LLSpatialClearStateDiff(U32 state) : LLSpatialClearState(state) { }
- virtual void traverse(const LLSpatialGroup::TreeNode* n)
+ virtual void traverse(const LLSpatialGroup::OctreeNode* n)
{
LLSpatialGroup* group = (LLSpatialGroup*) n->getListener(0);
@@ -1498,7 +1498,7 @@ public:
return false;
}
- virtual void traverse(const LLSpatialGroup::TreeNode* n)
+ virtual void traverse(const LLSpatialGroup::OctreeNode* n)
{
LLSpatialGroup* group = (LLSpatialGroup*) n->getListener(0);
@@ -2356,7 +2356,7 @@ void renderTexturePriority(LLDrawable* drawable)
LLGLDisable blend(GL_BLEND);
- //LLViewerImage* imagep = facep->getTexture();
+ //LLViewerTexture* imagep = facep->getTexture();
//if (imagep)
{
@@ -2386,7 +2386,7 @@ void renderTexturePriority(LLDrawable* drawable)
/*S32 boost = imagep->getBoostLevel();
if (boost)
{
- F32 t = (F32) boost / (F32) (LLViewerImage::BOOST_MAX_LEVEL-1);
+ F32 t = (F32) boost / (F32) (LLViewerTexture::BOOST_MAX_LEVEL-1);
LLVector4 col = lerp(boost_cold, boost_hot, t);
LLGLEnable blend_on(GL_BLEND);
gGL.blendFunc(GL_SRC_ALPHA, GL_ONE);
@@ -2896,7 +2896,7 @@ LLDrawable* LLSpatialPartition::lineSegmentIntersect(const LLVector3& start, con
}
LLDrawInfo::LLDrawInfo(U16 start, U16 end, U32 count, U32 offset,
- LLViewerImage* texture, LLVertexBuffer* buffer,
+ LLViewerTexture* texture, LLVertexBuffer* buffer,
BOOL fullbright, U8 bump, BOOL particle, F32 part_size)
:
mVertexBuffer(buffer),
diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h
index 8aec5c8377..13ab35402c 100644
--- a/indra/newview/llspatialpartition.h
+++ b/indra/newview/llspatialpartition.h
@@ -67,12 +67,12 @@ protected:
public:
LLDrawInfo(U16 start, U16 end, U32 count, U32 offset,
- LLViewerImage* image, LLVertexBuffer* buffer,
+ LLViewerTexture* image, LLVertexBuffer* buffer,
BOOL fullbright = FALSE, U8 bump = 0, BOOL particle = FALSE, F32 part_size = 0);
LLPointer<LLVertexBuffer> mVertexBuffer;
- LLPointer<LLViewerImage> mTexture;
+ LLPointer<LLViewerTexture> mTexture;
LLColor4U mGlowColor;
S32 mDebugColor;
const LLMatrix4* mTextureMatrix;
@@ -164,7 +164,7 @@ public:
typedef std::vector<LLPointer<LLDrawInfo> > drawmap_elem_t;
typedef std::map<U32, drawmap_elem_t > draw_map_t;
typedef std::vector<LLPointer<LLVertexBuffer> > buffer_list_t;
- typedef std::map<LLPointer<LLViewerImage>, buffer_list_t> buffer_texture_map_t;
+ typedef std::map<LLPointer<LLViewerTexture>, buffer_list_t> buffer_texture_map_t;
typedef std::map<U32, buffer_texture_map_t> buffer_map_t;
typedef LLOctreeListener<LLDrawable> BaseType;
diff --git a/indra/newview/llsprite.cpp b/indra/newview/llsprite.cpp
index 893ed22297..dce4e9d144 100644
--- a/indra/newview/llsprite.cpp
+++ b/indra/newview/llsprite.cpp
@@ -48,7 +48,7 @@
#include "lldrawable.h"
#include "llface.h"
#include "llviewercamera.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
LLVector3 LLSprite::sCameraUp(0.0f,0.0f,1.0f);
LLVector3 LLSprite::sCameraRight(1.0f,0.0f,0.0f);
diff --git a/indra/newview/llsprite.h b/indra/newview/llsprite.h
index 28f4ec5d03..eefe2a2386 100644
--- a/indra/newview/llsprite.h
+++ b/indra/newview/llsprite.h
@@ -40,7 +40,7 @@
#include "v4color.h"
#include "lluuid.h"
#include "llgl.h"
-#include "llviewerimage.h"
+#include "llviewertexture.h"
class LLViewerCamera;
@@ -82,7 +82,7 @@ public:
public:
LLUUID mImageID;
- LLPointer<LLViewerImage> mImagep;
+ LLPointer<LLViewerTexture> mImagep;
private:
F32 mWidth;
F32 mHeight;
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index eb585f8fe3..cc933fbf1e 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -94,9 +94,6 @@
#include "llface.h"
#include "llfeaturemanager.h"
#include "llfirstuse.h"
-#include "llfloateractivespeakers.h"
-#include "llfloaterbeacons.h"
-#include "llfloatercamera.h"
#include "llfloaterchat.h"
#include "llfloatergesture.h"
#include "llfloaterhud.h"
@@ -112,7 +109,7 @@
#include "llimagebmp.h"
#include "llinventorybridge.h"
#include "llinventorymodel.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
#include "llkeyboard.h"
#include "llloginhandler.h" // gLoginHandler, SLURL support
#include "lllogininstance.h" // Host the login module.
@@ -153,7 +150,7 @@
#include "llviewerdisplay.h"
#include "llviewergenericmessage.h"
#include "llviewergesture.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewermedia.h"
#include "llviewermenu.h"
#include "llviewermessage.h"
@@ -207,7 +204,7 @@ bool gAgentMovementCompleted = false;
std::string SCREEN_HOME_FILENAME = "screen_home.bmp";
std::string SCREEN_LAST_FILENAME = "screen_last.bmp";
-LLPointer<LLImageGL> gStartImageGL;
+LLPointer<LLViewerTexture> gStartTexture;
//
// Imported globals
@@ -312,7 +309,7 @@ void update_texture_fetch()
LLAppViewer::getTextureCache()->update(1); // unpauses the texture cache thread
LLAppViewer::getImageDecodeThread()->update(1); // unpauses the image thread
LLAppViewer::getTextureFetch()->update(1); // unpauses the texture fetch thread
- gImageList.updateImages(0.10f);
+ gTextureList.updateImages(0.10f);
}
// Returns false to skip other idle processing. Should only return
@@ -369,7 +366,7 @@ bool idle_startup()
if (!gNoRender)
{
// Update images?
- gImageList.updateImages(0.01f);
+ gTextureList.updateImages(0.01f);
}
if ( STATE_FIRST == LLStartUp::getStartupState() )
@@ -453,13 +450,24 @@ bool idle_startup()
#if LL_WINDOWS
// On the windows dev builds, unpackaged, the message_template.msg
- // file will be located in
- // indra/build-vc**/newview/<config>/app_settings.
+ // file will be located in:
+ // build-vc**/newview/<config>/app_settings
if (!found_template)
{
message_template_path = gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, "app_settings", "message_template.msg");
found_template = LLFile::fopen(message_template_path.c_str(), "r"); /* Flawfinder: ignore */
}
+ #elif LL_DARWIN
+ // On Mac dev builds, message_template.msg lives in:
+ // indra/build-*/newview/<config>/Second Life/Contents/Resources/app_settings
+ if (!found_template)
+ {
+ message_template_path =
+ gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE,
+ "../Resources/app_settings",
+ "message_template.msg");
+ found_template = LLFile::fopen(message_template_path.c_str(), "r"); /* Flawfinder: ignore */
+ }
#endif
if (found_template)
@@ -722,8 +730,10 @@ bool idle_startup()
std::string msg = LLTrans::getString("LoginInitializingBrowser");
set_startup_status(0.03f, msg.c_str(), gAgent.mMOTD.c_str());
display_startup();
+#if !defined(LL_WINDOWS) || !defined(LL_DEBUG)
+ // This generates an error in debug mode on Windows
LLViewerMedia::initBrowser();
-
+#endif
LLStartUp::setStartupState( STATE_LOGIN_SHOW );
return FALSE;
}
@@ -836,8 +846,6 @@ bool idle_startup()
gDirUtilp->setLindenUserDir(gFirstname, gLastname);
LLFile::mkdir(gDirUtilp->getLindenUserDir());
- LLLocationHistory::getInstance()->load();
-
// Set PerAccountSettingsFile to the default value.
gSavedSettings.setString("PerAccountSettingsFile",
gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT,
@@ -856,10 +864,13 @@ bool idle_startup()
}
//Default the path if one isn't set.
- if (gSavedPerAccountSettings.getString("InstantMessageLogPath").empty())
+ if (gSavedPerAccountSettings.getString("InstantMessageLogFolder").empty())
{
gDirUtilp->setChatLogsDir(gDirUtilp->getOSUserAppDir());
- gSavedPerAccountSettings.setString("InstantMessageLogPath",gDirUtilp->getChatLogsDir());
+ std::string chat_log_dir = gDirUtilp->getChatLogsDir();
+ std::string chat_log_top_folder=gDirUtilp->getBaseFileName(chat_log_dir);
+ gSavedPerAccountSettings.setString("InstantMessageLogPath",chat_log_dir);
+ gSavedPerAccountSettings.setString("InstantMessageLogFolder",chat_log_top_folder);
}
else
{
@@ -897,7 +908,7 @@ bool idle_startup()
//For HTML parsing in text boxes.
- LLTextEditor::setLinkColor( gSavedSkinSettings.getColor4("HTMLLinkColor") );
+ LLTextEditor::setLinkColor( LLUIColorTable::instance().getColor("HTMLLinkColor") );
// Load URL History File
LLURLHistory::loadFile("url_history.xml");
@@ -1102,12 +1113,12 @@ bool idle_startup()
// Since we connected, save off the settings so the user doesn't have to
// type the name/password again if we crash.
gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE);
- gSavedSkinSettings.saveToFile(gSavedSettings.getString("SkinningSettingsFile"), TRUE);
+ LLUIColorTable::instance().saveUserSettings();
//
// Initialize classes w/graphics stuff.
//
- gImageList.doPrefetchImages();
+ gTextureList.doPrefetchImages();
LLSurface::initClasses();
LLFace::initClass();
@@ -1209,23 +1220,9 @@ bool idle_startup()
LLFloaterReg::showInitialVisibleInstances();
- if (gSavedSettings.getBOOL("ShowCameraControls"))
- {
- LLFloaterCamera::showInstance();
- }
- if (gSavedSettings.getBOOL("ShowMovementControls"))
- {
- LLFloaterMove::showInstance();
- }
-
- if (gSavedSettings.getBOOL("ShowActiveSpeakers"))
- {
- LLFloaterActiveSpeakers::showInstance();
- }
-
if (gSavedSettings.getBOOL("BeaconAlwaysOn"))
{
- LLFloaterBeacons::showInstance();
+ LLFloaterReg::showInstance("beacons");
}
if (!gNoRender)
@@ -1335,7 +1332,7 @@ bool idle_startup()
F32 frac = (F32)i / (F32)DECODE_TIME_SEC;
set_startup_status(0.45f + frac*0.1f, LLTrans::getString("LoginDecodingImages"), gAgent.mMOTD);
display_startup();
- gImageList.decodeAllImages(1.f);
+ gTextureList.decodeAllImages(1.f);
}
LLStartUp::setStartupState( STATE_WORLD_WAIT );
@@ -1479,7 +1476,7 @@ bool idle_startup()
LLSD id = inv_lib_root[0]["folder_id"];
if(id.isDefined())
{
- gInventoryLibraryRoot = id.asUUID();
+ gInventory.setLibraryRootFolderID(id.asUUID());
}
}
@@ -1490,14 +1487,14 @@ bool idle_startup()
LLSD id = inv_lib_owner[0]["agent_id"];
if(id.isDefined())
{
- gInventoryLibraryOwner = id.asUUID();
+ gInventory.setLibraryOwnerID( LLUUID(id.asUUID()));
}
}
LLSD inv_skel_lib = response["inventory-skel-lib"];
- if(inv_skel_lib.isDefined() && gInventoryLibraryOwner.notNull())
+ if(inv_skel_lib.isDefined() && gInventory.getLibraryOwnerID().notNull())
{
- if(!gInventory.loadSkeleton(inv_skel_lib, gInventoryLibraryOwner))
+ if(!gInventory.loadSkeleton(inv_skel_lib, gInventory.getLibraryOwnerID()))
{
LL_WARNS("AppInit") << "Problem loading inventory-skel-lib" << LL_ENDL;
}
@@ -1568,10 +1565,9 @@ bool idle_startup()
// Either we want to show tutorial because this is the first login
// to a Linden Help Island or the user quit with the tutorial
// visible. JC
- if (show_hud
- || gSavedSettings.getBOOL("ShowTutorial"))
+ if (show_hud || gSavedSettings.getBOOL("ShowTutorial"))
{
- LLFloaterHUD::showHUD();
+ LLFloaterReg::showInstance("hud", LLSD(), FALSE);
}
LLSD event_categories = response["event_categories"];
@@ -1682,7 +1678,7 @@ bool idle_startup()
// and make sure it's saved
gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile") , TRUE );
- gSavedSkinSettings.saveToFile( gSavedSettings.getString("SkinningSettingsFile") , TRUE );
+ LLUIColorTable::instance().saveUserSettings();
};
if (!gNoRender)
@@ -1935,9 +1931,11 @@ bool idle_startup()
// Let the map know about the inventory.
LLFloaterWorldMap* floater_world_map = LLFloaterWorldMap::getInstance();
- floater_world_map->observeInventory(&gInventory);
- floater_world_map->observeFriends();
-
+ if(floater_world_map)
+ {
+ floater_world_map->observeInventory(&gInventory);
+ floater_world_map->observeFriends();
+ }
gViewerWindow->showCursor();
gViewerWindow->getWindow()->resetBusyCount();
gViewerWindow->getWindow()->setCursor(UI_CURSOR_ARROW);
@@ -2001,6 +1999,8 @@ bool idle_startup()
// reset timers now that we are running "logged in" logic
LLFastTimer::reset();
+ LLLocationHistory::getInstance()->load();
+
return TRUE;
}
@@ -2059,7 +2059,7 @@ void login_callback(S32 option, void *userdata)
{
// turn off the setting and write out to disk
gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile") , TRUE );
- gSavedSkinSettings.saveToFile( gSavedSettings.getString("SkinningSettingsFile") , TRUE );
+ LLUIColorTable::instance().saveUserSettings();
}
// Next iteration through main loop should shut down the app cleanly.
@@ -2290,8 +2290,8 @@ void use_circuit_callback(void**, S32 result)
void register_viewer_callbacks(LLMessageSystem* msg)
{
msg->setHandlerFuncFast(_PREHASH_LayerData, process_layer_data );
- msg->setHandlerFuncFast(_PREHASH_ImageData, LLViewerImageList::receiveImageHeader );
- msg->setHandlerFuncFast(_PREHASH_ImagePacket, LLViewerImageList::receiveImagePacket );
+ msg->setHandlerFuncFast(_PREHASH_ImageData, LLViewerTextureList::receiveImageHeader );
+ msg->setHandlerFuncFast(_PREHASH_ImagePacket, LLViewerTextureList::receiveImagePacket );
msg->setHandlerFuncFast(_PREHASH_ObjectUpdate, process_object_update );
msg->setHandlerFunc("ObjectUpdateCompressed", process_compressed_object_update );
msg->setHandlerFunc("ObjectUpdateCached", process_cached_object_update );
@@ -2422,7 +2422,7 @@ void register_viewer_callbacks(LLMessageSystem* msg)
msg->setHandlerFunc("TeleportFailed", process_teleport_failed, NULL);
msg->setHandlerFunc("TeleportLocal", process_teleport_local, NULL);
- msg->setHandlerFunc("ImageNotInDatabase", LLViewerImageList::processImageNotInDatabase, NULL);
+ msg->setHandlerFunc("ImageNotInDatabase", LLViewerTextureList::processImageNotInDatabase, NULL);
msg->setHandlerFuncFast(_PREHASH_GroupMembersReply,
LLGroupMgr::processGroupMembersReply);
@@ -2553,9 +2553,9 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
// Loads a bitmap to display during load
void init_start_screen(S32 location_id)
{
- if (gStartImageGL.notNull())
+ if (gStartTexture.notNull())
{
- gStartImageGL = NULL;
+ gStartTexture = NULL;
LL_INFOS("AppInit") << "re-initializing start screen" << LL_ENDL;
}
@@ -2587,7 +2587,6 @@ void init_start_screen(S32 location_id)
return;
}
- gStartImageGL = new LLImageGL(FALSE);
gStartImageWidth = start_image_bmp->getWidth();
gStartImageHeight = start_image_bmp->getHeight();
@@ -2595,12 +2594,12 @@ void init_start_screen(S32 location_id)
if (!start_image_bmp->decode(raw, 0.0f))
{
LL_WARNS("AppInit") << "Bitmap decode failed" << LL_ENDL;
- gStartImageGL = NULL;
+ gStartTexture = NULL;
return;
}
raw->expandToPowerOfTwo();
- gStartImageGL->createGLTexture(0, raw);
+ gStartTexture = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE) ;
}
@@ -2608,7 +2607,7 @@ void init_start_screen(S32 location_id)
void release_start_screen()
{
LL_DEBUGS("AppInit") << "Releasing bitmap..." << LL_ENDL;
- gStartImageGL = NULL;
+ gStartTexture = NULL;
}
@@ -2916,7 +2915,7 @@ bool process_login_success_response()
LLUUID inv_root_folder_id = response["inventory-root"][0]["folder_id"];
if(inv_root_folder_id.notNull())
{
- gAgent.getInventoryRootID() = inv_root_folder_id;
+ gInventory.setRootFolderID(inv_root_folder_id);
//gInventory.mock(gAgent.getInventoryRootID());
}
@@ -3004,7 +3003,7 @@ bool process_login_success_response()
&& gAgentSessionID.notNull()
&& gMessageSystem->mOurCircuitCode
&& gFirstSim.isOk()
- && gAgent.getInventoryRootID().notNull())
+ && gInventory.getRootFolderID().notNull())
{
success = true;
}
diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h
index 5e89030a01..7f869d014f 100644
--- a/indra/newview/llstartup.h
+++ b/indra/newview/llstartup.h
@@ -33,7 +33,7 @@
#ifndef LL_LLSTARTUP_H
#define LL_LLSTARTUP_H
-#include "llimagegl.h"
+class LLViewerTexture ;
// functions
bool idle_startup();
@@ -70,7 +70,7 @@ typedef enum {
// exported symbols
extern bool gAgentMovementCompleted;
-extern LLPointer<LLImageGL> gStartImageGL;
+extern LLPointer<LLViewerTexture> gStartTexture;
class LLStartUp
{
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index 8c2372ee74..bc90fe7adc 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -47,7 +47,7 @@
#include "llfloaterregioninfo.h"
#include "llfloaterscriptdebug.h"
#include "llhudicon.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
#include "llkeyboard.h"
#include "lllineeditor.h"
#include "llmenugl.h"
@@ -237,7 +237,7 @@ void LLStatusBar::draw()
if (isBackgroundVisible())
{
static LLUICachedControl<S32> drop_shadow_floater ("DropShadowFloater", 0);
- static LLUICachedControl<LLColor4> color_drop_shadow ("ColorDropShadow");
+ static LLUIColor color_drop_shadow = LLUIColorTable::instance().getColor("ColorDropShadow");
gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0,
color_drop_shadow, drop_shadow_floater );
}
diff --git a/indra/newview/llstylemap.cpp b/indra/newview/llstylemap.cpp
index a1384c28ba..a422db1cc1 100644
--- a/indra/newview/llstylemap.cpp
+++ b/indra/newview/llstylemap.cpp
@@ -64,7 +64,7 @@ const LLStyleSP &LLStyleMap::lookupAgent(const LLUUID &source)
style->setFontName(LLStringUtil::null);
if (source != LLUUID::null && source != gAgent.getID() )
{
- style->setColor(gSavedSkinSettings.getColor4("HTMLLinkColor"));
+ style->setColor(LLUIColorTable::instance().getColor("HTMLLinkColor"));
std::string link = llformat("secondlife:///app/agent/%s/about",source.asString().c_str());
style->setLinkHREF(link);
}
@@ -90,7 +90,7 @@ const LLStyleSP &LLStyleMap::lookup(const LLUUID& id, const std::string& link)
style->setFontName(LLStringUtil::null);
if (id != LLUUID::null && !link.empty())
{
- style->setColor(gSavedSkinSettings.getColor4("HTMLLinkColor"));
+ style->setColor(LLUIColorTable::instance().getColor("HTMLLinkColor"));
style->setLinkHREF(link);
}
else
@@ -115,6 +115,6 @@ void LLStyleMap::update()
{
LLStyleSP &style = iter->second;
// Update the link color in case it has been changed.
- style->setColor(gSavedSkinSettings.getColor4("HTMLLinkColor"));
+ style->setColor(LLUIColorTable::instance().getColor("HTMLLinkColor"));
}
}
diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp
index 27a08e7d7b..de3d80f044 100644
--- a/indra/newview/llsurface.cpp
+++ b/indra/newview/llsurface.cpp
@@ -36,7 +36,7 @@
#include "llrender.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llpatchvertexarray.h"
#include "patch_dct.h"
#include "patch_code.h"
@@ -47,7 +47,7 @@
#include "llappviewer.h"
#include "llworld.h"
#include "llviewercontrol.h"
-#include "llviewerimage.h"
+#include "llviewertexture.h"
#include "llsurfacepatch.h"
#include "llvosurfacepatch.h"
#include "llvowater.h"
@@ -137,12 +137,10 @@ LLSurface::~LLSurface()
// Don't enable this until we blitz the draw pool for it as well. -- djs
if (mSTexturep)
{
- gImageList.deleteImage(mSTexturep);
mSTexturep = NULL;
}
if (mWaterTexturep)
{
- gImageList.deleteImage(mWaterTexturep);
mWaterTexturep = NULL;
}
}
@@ -214,18 +212,18 @@ void LLSurface::create(const S32 grids_per_edge,
createPatchData();
}
-LLViewerImage* LLSurface::getSTexture()
+LLViewerTexture* LLSurface::getSTexture()
{
- if (mSTexturep.notNull() && !mSTexturep->getHasGLTexture())
+ if (mSTexturep.notNull() && !mSTexturep->hasValidGLTexture())
{
createSTexture();
}
return mSTexturep;
}
-LLViewerImage* LLSurface::getWaterTexture()
+LLViewerTexture* LLSurface::getWaterTexture()
{
- if (mWaterTexturep.notNull() && !mWaterTexturep->getHasGLTexture())
+ if (mWaterTexturep.notNull() && !mWaterTexturep->hasValidGLTexture())
{
createWaterTexture();
}
@@ -249,11 +247,10 @@ void LLSurface::createSTexture()
}
}
- mSTexturep = new LLViewerImage(raw, FALSE);
+ mSTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE);
mSTexturep->dontDiscard();
- gGL.getTexUnit(0)->bind(mSTexturep.get());
- mSTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
- gImageList.addImage(mSTexturep);
+ gGL.getTexUnit(0)->bind(mSTexturep);
+ mSTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
}
}
@@ -274,11 +271,10 @@ void LLSurface::createWaterTexture()
*(default_texture + (i*sTextureSize/2 + j)*4 + 3) = MAX_WATER_COLOR.mV[3];
}
}
- mWaterTexturep = new LLViewerImage(raw, FALSE);
+ mWaterTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE);
mWaterTexturep->dontDiscard();
- gGL.getTexUnit(0)->bind(mWaterTexturep.get());
+ gGL.getTexUnit(0)->bind(mWaterTexturep);
mWaterTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
- gImageList.addImage(mWaterTexturep);
}
}
@@ -1193,7 +1189,7 @@ F32 LLSurface::getWaterHeight() const
BOOL LLSurface::generateWaterTexture(const F32 x, const F32 y,
const F32 width, const F32 height)
{
- if (!getWaterTexture())
+ if (!getWaterTexture() || !mWaterTexturep->hasGLTexture())
{
return FALSE;
}
diff --git a/indra/newview/llsurface.h b/indra/newview/llsurface.h
index 310ab5d2c3..1f672d2250 100644
--- a/indra/newview/llsurface.h
+++ b/indra/newview/llsurface.h
@@ -46,7 +46,7 @@
#include "llvowater.h"
#include "llpatchvertexarray.h"
-#include "llviewerimage.h"
+#include "llviewertexture.h"
class LLTimer;
class LLUUID;
@@ -133,8 +133,8 @@ public:
void setWaterHeight(F32 height);
F32 getWaterHeight() const;
- LLViewerImage *getSTexture();
- LLViewerImage *getWaterTexture();
+ LLViewerTexture *getSTexture();
+ LLViewerTexture *getWaterTexture();
BOOL hasZData() const { return mHasZData; }
void dirtyAllPatches(); // Use this to dirty all patches when changing terrain parameters
@@ -205,8 +205,8 @@ protected:
// The textures should never be directly initialized - use the setter methods!
- LLPointer<LLViewerImage> mSTexturep; // Texture for surface
- LLPointer<LLViewerImage> mWaterTexturep; // Water texture
+ LLPointer<LLViewerTexture> mSTexturep; // Texture for surface
+ LLPointer<LLViewerTexture> mWaterTexturep; // Water texture
LLPointer<LLVOWater> mWaterObjp;
diff --git a/indra/newview/llteleporthistory.cpp b/indra/newview/llteleporthistory.cpp
index 99389017cb..9754568f56 100644
--- a/indra/newview/llteleporthistory.cpp
+++ b/indra/newview/llteleporthistory.cpp
@@ -172,6 +172,14 @@ void LLTeleportHistory::onHistoryChanged()
mHistoryChangedSignal();
}
+void LLTeleportHistory::purgeItems()
+{
+ mItems.erase(mItems.begin(), mItems.end()-1);
+ // reset the count
+ mRequestedItem = -1;
+ mCurrentItem = 0;
+}
+
// static
std::string LLTeleportHistory::getCurrentLocationTitle()
{
diff --git a/indra/newview/llteleporthistory.h b/indra/newview/llteleporthistory.h
index c68aabe9a1..775b21e24c 100644
--- a/indra/newview/llteleporthistory.h
+++ b/indra/newview/llteleporthistory.h
@@ -106,7 +106,7 @@ public:
* @return history items.
*/
const slurl_list_t& getItems() const { return mItems; }
-
+ void purgeItems();
/**
* Is the history empty?
*
@@ -119,7 +119,6 @@ public:
* Get index of the current location in the history.
*/
int getCurrentItemIndex() const { return mCurrentItem; }
-
/**
* Set a callback to be called upon history changes.
*
diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp
index 716ab8eef4..5a5f187415 100644
--- a/indra/newview/lltexlayer.cpp
+++ b/indra/newview/lltexlayer.cpp
@@ -72,7 +72,7 @@ LLTexLayerSetBuffer::LLTexLayerSetBuffer(LLTexLayerSet* const owner,
S32 width, S32 height,
BOOL has_bump) :
// ORDER_LAST => must render these after the hints are created.
- LLDynamicTexture( width, height, 4, LLDynamicTexture::ORDER_LAST, TRUE ),
+ LLViewerDynamicTexture( width, height, 4, LLViewerDynamicTexture::ORDER_LAST, TRUE ),
mNeedsUpdate( TRUE ),
mNeedsUpload( FALSE ),
mUploadPending( FALSE ), // Not used for any logic here, just to sync sending of updates
@@ -91,8 +91,8 @@ LLTexLayerSetBuffer::~LLTexLayerSetBuffer()
if( mBumpTex.notNull())
{
mBumpTex = NULL ;
- LLImageGL::sGlobalTextureMemoryInBytes -= mWidth * mHeight * 4;
- LLTexLayerSetBuffer::sGLBumpByteCount -= mWidth * mHeight * 4;
+ LLImageGL::sGlobalTextureMemoryInBytes -= mFullWidth * mFullHeight * 4;
+ LLTexLayerSetBuffer::sGLBumpByteCount -= mFullWidth * mFullHeight * 4;
}
}
@@ -100,7 +100,7 @@ LLTexLayerSetBuffer::~LLTexLayerSetBuffer()
void LLTexLayerSetBuffer::restoreGLTexture()
{
createBumpTexture() ;
- LLDynamicTexture::restoreGLTexture() ;
+ LLViewerDynamicTexture::restoreGLTexture() ;
}
//virtual
@@ -109,11 +109,11 @@ void LLTexLayerSetBuffer::destroyGLTexture()
if( mBumpTex.notNull() )
{
mBumpTex = NULL ;
- LLImageGL::sGlobalTextureMemoryInBytes -= mWidth * mHeight * 4;
- LLTexLayerSetBuffer::sGLBumpByteCount -= mWidth * mHeight * 4;
+ LLImageGL::sGlobalTextureMemoryInBytes -= mFullWidth * mFullHeight * 4;
+ LLTexLayerSetBuffer::sGLBumpByteCount -= mFullWidth * mFullHeight * 4;
}
- LLDynamicTexture::destroyGLTexture() ;
+ LLViewerDynamicTexture::destroyGLTexture() ;
}
void LLTexLayerSetBuffer::createBumpTexture()
@@ -121,7 +121,7 @@ void LLTexLayerSetBuffer::createBumpTexture()
if( mHasBump )
{
LLGLSUIDefault gls_ui;
- mBumpTex = new LLImageGL(FALSE) ;
+ mBumpTex = LLViewerTextureManager::getLocalTexture(FALSE) ;
if(!mBumpTex->createGLTexture())
{
mBumpTex = NULL ;
@@ -135,13 +135,13 @@ void LLTexLayerSetBuffer::createBumpTexture()
gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- LLImageGL::setManualImage(GL_TEXTURE_2D, 0, GL_RGBA8, mWidth, mHeight, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+ LLImageGL::setManualImage(GL_TEXTURE_2D, 0, GL_RGBA8, mFullWidth, mFullHeight, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
stop_glerror();
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- LLImageGL::sGlobalTextureMemoryInBytes += mWidth * mHeight * 4;
- LLTexLayerSetBuffer::sGLBumpByteCount += mWidth * mHeight * 4;
+ LLImageGL::sGlobalTextureMemoryInBytes += mFullWidth * mFullHeight * 4;
+ LLTexLayerSetBuffer::sGLBumpByteCount += mFullWidth * mFullHeight * 4;
}
}
@@ -184,7 +184,7 @@ void LLTexLayerSetBuffer::pushProjection() const
glMatrixMode(GL_PROJECTION);
gGL.pushMatrix();
glLoadIdentity();
- glOrtho(0.0f, mWidth, 0.0f, mHeight, -1.0f, 1.0f);
+ glOrtho(0.0f, mFullWidth, 0.0f, mFullHeight, -1.0f, 1.0f);
glMatrixMode(GL_MODELVIEW);
gGL.pushMatrix();
@@ -230,14 +230,14 @@ void LLTexLayerSetBuffer::preRender(BOOL clear_depth)
pushProjection();
// keep depth buffer, we don't need to clear it
- LLDynamicTexture::preRender(FALSE);
+ LLViewerDynamicTexture::preRender(FALSE);
}
void LLTexLayerSetBuffer::postRender(BOOL success)
{
popProjection();
- LLDynamicTexture::postRender(success);
+ LLViewerDynamicTexture::postRender(success);
}
BOOL LLTexLayerSetBuffer::render()
@@ -256,7 +256,7 @@ BOOL LLTexLayerSetBuffer::render()
if( mBumpTex.notNull() )
{
// Composite the bump data
- success &= mTexLayerSet->renderBump( mOrigin.mX, mOrigin.mY, mWidth, mHeight );
+ success &= mTexLayerSet->renderBump( mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight );
stop_glerror();
if (success)
@@ -267,14 +267,14 @@ BOOL LLTexLayerSetBuffer::render()
gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mBumpTex->getTexName());
stop_glerror();
- glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, mOrigin.mX, mOrigin.mY, mWidth, mHeight);
+ glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight);
stop_glerror();
// if we need to upload the data, read it back into a buffer
if( upload_now )
{
- baked_bump_data = new U8[ mWidth * mHeight * 4 ];
- glReadPixels(mOrigin.mX, mOrigin.mY, mWidth, mHeight, GL_RGBA, GL_UNSIGNED_BYTE, baked_bump_data );
+ baked_bump_data = new U8[ mFullWidth * mFullHeight * 4 ];
+ glReadPixels(mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, GL_RGBA, GL_UNSIGNED_BYTE, baked_bump_data );
stop_glerror();
}
}
@@ -282,7 +282,7 @@ BOOL LLTexLayerSetBuffer::render()
// Composite the color data
LLGLSUIDefault gls_ui;
- success &= mTexLayerSet->render( mOrigin.mX, mOrigin.mY, mWidth, mHeight );
+ success &= mTexLayerSet->render( mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight );
gGL.flush();
if( upload_now )
@@ -303,7 +303,7 @@ BOOL LLTexLayerSetBuffer::render()
gGL.setSceneBlendType(LLRender::BT_ALPHA);
// we have valid texture data now
- mTexture->setGLTextureCreated(true);
+ mGLTexturep->setGLTextureCreated(true);
mNeedsUpdate = FALSE;
delete [] baked_bump_data;
@@ -312,7 +312,7 @@ BOOL LLTexLayerSetBuffer::render()
bool LLTexLayerSetBuffer::isInitialized(void) const
{
- return mTexture.notNull() && mTexture->isGLTextureCreated();
+ return mGLTexturep.notNull() && mGLTexturep->isGLTextureCreated();
}
BOOL LLTexLayerSetBuffer::updateImmediate()
@@ -333,9 +333,9 @@ BOOL LLTexLayerSetBuffer::updateImmediate()
void LLTexLayerSetBuffer::readBackAndUpload(const U8* baked_bump_data)
{
// pointers for storing data to upload
- U8* baked_color_data = new U8[ mWidth * mHeight * 4 ];
+ U8* baked_color_data = new U8[ mFullWidth * mFullHeight * 4 ];
- glReadPixels(mOrigin.mX, mOrigin.mY, mWidth, mHeight, GL_RGBA, GL_UNSIGNED_BYTE, baked_color_data );
+ glReadPixels(mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, GL_RGBA, GL_UNSIGNED_BYTE, baked_color_data );
stop_glerror();
llinfos << "Baked " << mTexLayerSet->getBodyRegion() << llendl;
@@ -350,16 +350,16 @@ void LLTexLayerSetBuffer::readBackAndUpload(const U8* baked_bump_data)
LLGLSUIDefault gls_ui;
- LLPointer<LLImageRaw> baked_mask_image = new LLImageRaw(mWidth, mHeight, 1 );
+ LLPointer<LLImageRaw> baked_mask_image = new LLImageRaw(mFullWidth, mFullHeight, 1 );
U8* baked_mask_data = baked_mask_image->getData();
- mTexLayerSet->gatherMorphMaskAlpha(baked_mask_data, mWidth, mHeight);
+ mTexLayerSet->gatherMorphMaskAlpha(baked_mask_data, mFullWidth, mFullHeight);
// writes into baked_color_data
const char* comment_text = NULL;
S32 baked_image_components = mBumpTex.notNull() ? 5 : 4; // red green blue [bump] clothing
- LLPointer<LLImageRaw> baked_image = new LLImageRaw( mWidth, mHeight, baked_image_components );
+ LLPointer<LLImageRaw> baked_image = new LLImageRaw( mFullWidth, mFullHeight, baked_image_components );
U8* baked_image_data = baked_image->getData();
@@ -368,9 +368,9 @@ void LLTexLayerSetBuffer::readBackAndUpload(const U8* baked_bump_data)
comment_text = LINDEN_J2C_COMMENT_PREFIX "RGBHM"; // 5 channels: rgb, heightfield/alpha, mask
S32 i = 0;
- for( S32 u = 0; u < mWidth; u++ )
+ for( S32 u = 0; u < mFullWidth; u++ )
{
- for( S32 v = 0; v < mHeight; v++ )
+ for( S32 v = 0; v < mFullHeight; v++ )
{
baked_image_data[5*i + 0] = baked_color_data[4*i + 0];
baked_image_data[5*i + 1] = baked_color_data[4*i + 1];
@@ -384,9 +384,9 @@ void LLTexLayerSetBuffer::readBackAndUpload(const U8* baked_bump_data)
else
{
S32 i = 0;
- for( S32 u = 0; u < mWidth; u++ )
+ for( S32 u = 0; u < mFullWidth; u++ )
{
- for( S32 v = 0; v < mHeight; v++ )
+ for( S32 v = 0; v < mFullHeight; v++ )
{
baked_image_data[4*i + 0] = baked_color_data[4*i + 0];
baked_image_data[4*i + 1] = baked_color_data[4*i + 1];
@@ -555,11 +555,7 @@ void LLTexLayerSetBuffer::bindBumpTexture( U32 stage )
gGL.getTexUnit(stage)->bindManual(LLTexUnit::TT_TEXTURE, mBumpTex->getTexName());
gGL.getTexUnit(0)->activate();
- if( mLastBindTime != LLImageGL::sLastFrameTime )
- {
- mLastBindTime = LLImageGL::sLastFrameTime;
- LLImageGL::updateBoundTexMem(mWidth * mHeight * 4);
- }
+ mGLTexturep->updateBindStats(mFullWidth * mFullHeight * 4);
}
else
{
@@ -673,7 +669,6 @@ LLTexLayerSet::~LLTexLayerSet()
deleteCaches();
std::for_each(mLayerList.begin(), mLayerList.end(), DeletePointer());
std::for_each(mMaskLayerList.begin(), mMaskLayerList.end(), DeletePointer());
- delete mComposite;
}
//-----------------------------------------------------------------------------
@@ -886,7 +881,6 @@ void LLTexLayerSet::destroyComposite()
{
if( mComposite )
{
- delete mComposite;
mComposite = NULL;
}
}
@@ -960,11 +954,11 @@ void LLTexLayerSet::renderAlphaMaskTextures(S32 width, S32 height, bool forceCle
LLGLSNoAlphaTest gls_no_alpha_test;
gGL.flush();
{
- LLImageGL* image_gl = LLTexLayerStaticImageList::getInstance()->getImageGL(info->mStaticAlphaFileName, TRUE);
- if( image_gl )
+ LLViewerTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture(info->mStaticAlphaFileName, TRUE);
+ if( tex )
{
LLGLSUIDefault gls_ui;
- gGL.getTexUnit(0)->bind(image_gl);
+ gGL.getTexUnit(0)->bind(tex);
gGL.getTexUnit(0)->setTextureBlendType( LLTexUnit::TB_REPLACE );
gl_rect_2d_simple_tex( width, height );
}
@@ -1243,6 +1237,16 @@ LLTexLayer::LLTexLayer(LLTexLayerSet* layer_set) :
{
}
+LLTexLayer::LLTexLayer(const LLTexLayer &layer) :
+ mTexLayerSet( layer.mTexLayerSet )
+{
+ setInfo(layer.getInfo());
+
+
+ mHasMorph = layer.mHasMorph;
+
+}
+
LLTexLayer::~LLTexLayer()
{
// mParamAlphaList and mParamColorList are LLViewerVisualParam's and get
@@ -1409,16 +1413,16 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, BOOL render_morph)
if( (getInfo()->mLocalTexture != -1) && !getInfo()->mUseLocalTextureAlphaOnly )
{
{
- LLImageGL* image_gl = NULL;
- if( mTexLayerSet->getAvatar()->getLocalTextureGL((ETextureIndex)getInfo()->mLocalTexture, &image_gl ) )
+ LLViewerTexture* tex = NULL;
+ if( mTexLayerSet->getAvatar()->getLocalTextureGL((ETextureIndex)getInfo()->mLocalTexture, &tex ) )
{
- if( image_gl )
+ if( tex )
{
LLGLDisable alpha_test(getInfo()->mWriteAllChannels ? GL_ALPHA_TEST : 0);
- LLTexUnit::eTextureAddressMode old_mode = image_gl->getAddressMode();
+ LLTexUnit::eTextureAddressMode old_mode = tex->getAddressMode();
- gGL.getTexUnit(0)->bind(image_gl);
+ gGL.getTexUnit(0)->bind(tex);
gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
gl_rect_2d_simple_tex( width, height );
@@ -1437,10 +1441,10 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, BOOL render_morph)
if( !getInfo()->mStaticImageFileName.empty() )
{
{
- LLImageGL* image_gl = LLTexLayerStaticImageList::getInstance()->getImageGL(getInfo()->mStaticImageFileName, getInfo()->mStaticImageIsMask);
- if( image_gl )
+ LLViewerTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture(getInfo()->mStaticImageFileName, getInfo()->mStaticImageIsMask);
+ if( tex )
{
- gGL.getTexUnit(0)->bind(image_gl);
+ gGL.getTexUnit(0)->bind(tex);
gl_rect_2d_simple_tex( width, height );
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
}
@@ -1548,11 +1552,11 @@ BOOL LLTexLayer::blendAlphaTexture(S32 width, S32 height)
if( !getInfo()->mStaticImageFileName.empty() )
{
- LLImageGL* image_gl = LLTexLayerStaticImageList::getInstance()->getImageGL( getInfo()->mStaticImageFileName, getInfo()->mStaticImageIsMask );
- if( image_gl )
+ LLViewerTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture( getInfo()->mStaticImageFileName, getInfo()->mStaticImageIsMask );
+ if( tex )
{
LLGLSNoAlphaTest gls_no_alpha_test;
- gGL.getTexUnit(0)->bind(image_gl);
+ gGL.getTexUnit(0)->bind(tex);
gl_rect_2d_simple_tex( width, height );
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
}
@@ -1565,13 +1569,13 @@ BOOL LLTexLayer::blendAlphaTexture(S32 width, S32 height)
{
if (getInfo()->mLocalTexture >=0 && getInfo()->mLocalTexture < TEX_NUM_INDICES)
{
- LLImageGL* image_gl = NULL;
- if (mTexLayerSet->getAvatar()->getLocalTextureGL((ETextureIndex)getInfo()->mLocalTexture, &image_gl))
+ LLViewerTexture* tex = NULL;
+ if (mTexLayerSet->getAvatar()->getLocalTextureGL((ETextureIndex)getInfo()->mLocalTexture, &tex))
{
- if (image_gl)
+ if (tex)
{
LLGLSNoAlphaTest gls_no_alpha_test;
- gGL.getTexUnit(0)->bind(image_gl);
+ gGL.getTexUnit(0)->bind(tex);
gl_rect_2d_simple_tex( width, height );
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
success = TRUE;
@@ -1623,16 +1627,16 @@ BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
// Accumulate the alpha component of the texture
if( getInfo()->mLocalTexture != -1 )
{
- LLImageGL* image_gl = NULL;
- if( mTexLayerSet->getAvatar()->getLocalTextureGL((ETextureIndex)getInfo()->mLocalTexture, &image_gl ) )
+ LLViewerTexture* tex = NULL;
+ if( mTexLayerSet->getAvatar()->getLocalTextureGL((ETextureIndex)getInfo()->mLocalTexture, &tex ) )
{
- if( image_gl && (image_gl->getComponents() == 4) )
+ if( tex && (tex->getComponents() == 4) )
{
LLGLSNoAlphaTest gls_no_alpha_test;
- LLTexUnit::eTextureAddressMode old_mode = image_gl->getAddressMode();
+ LLTexUnit::eTextureAddressMode old_mode = tex->getAddressMode();
- gGL.getTexUnit(0)->bind(image_gl);
+ gGL.getTexUnit(0)->bind(tex);
gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
gl_rect_2d_simple_tex( width, height );
@@ -1649,14 +1653,14 @@ BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
if( !getInfo()->mStaticImageFileName.empty() )
{
- LLImageGL* image_gl = LLTexLayerStaticImageList::getInstance()->getImageGL(getInfo()->mStaticImageFileName, getInfo()->mStaticImageIsMask);
- if( image_gl )
+ LLViewerTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture(getInfo()->mStaticImageFileName, getInfo()->mStaticImageIsMask);
+ if( tex )
{
- if( (image_gl->getComponents() == 4) ||
- ( (image_gl->getComponents() == 1) && getInfo()->mStaticImageIsMask ) )
+ if( (tex->getComponents() == 4) ||
+ ( (tex->getComponents() == 1) && getInfo()->mStaticImageIsMask ) )
{
LLGLSNoAlphaTest gls_no_alpha_test;
- gGL.getTexUnit(0)->bind(image_gl);
+ gGL.getTexUnit(0)->bind(tex);
gl_rect_2d_simple_tex( width, height );
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
}
@@ -1856,16 +1860,16 @@ void LLTexLayerStaticImageList::deleteCachedImages()
//mStaticImageLists uses LLPointers, clear() will cause deletion
mStaticImageListTGA.clear();
- mStaticImageListGL.clear();
+ mStaticImageList.clear();
mGLBytes = 0;
mTGABytes = 0;
}
}
-// Note: in general, for a given image image we'll call either getImageTga() or getImageGL().
+// Note: in general, for a given image image we'll call either getImageTga() or getTexture().
// We call getImageTga() if the image is used as an alpha gradient.
-// Otherwise, we call getImageGL()
+// Otherwise, we call getTexture()
// Returns an LLImageTGA that contains the encoded data from a tga file named file_name.
// Caches the result to speed identical subsequent requests.
@@ -1897,19 +1901,19 @@ LLImageTGA* LLTexLayerStaticImageList::getImageTGA(const std::string& file_name)
// Returns a GL Image (without a backing ImageRaw) that contains the decoded data from a tga file named file_name.
// Caches the result to speed identical subsequent requests.
-LLImageGL* LLTexLayerStaticImageList::getImageGL(const std::string& file_name, BOOL is_mask)
+LLViewerTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name, BOOL is_mask)
{
- LLPointer<LLImageGL> image_gl;
+ LLPointer<LLViewerTexture> tex;
const char *namekey = mImageNames.addString(file_name);
- image_gl_map_t::const_iterator iter = mStaticImageListGL.find(namekey);
- if( iter != mStaticImageListGL.end() )
+ texture_map_t::const_iterator iter = mStaticImageList.find(namekey);
+ if( iter != mStaticImageList.end() )
{
- image_gl = iter->second;
+ tex = iter->second;
}
else
{
- image_gl = new LLImageGL( FALSE );
+ tex = LLViewerTextureManager::getLocalTexture( FALSE );
LLPointer<LLImageRaw> image_raw = new LLImageRaw;
if( loadImageRaw( file_name, image_raw ) )
{
@@ -1917,23 +1921,23 @@ LLImageGL* LLTexLayerStaticImageList::getImageGL(const std::string& file_name, B
{
// Note: these are static, unchanging images so it's ok to assume
// that once an image is a mask it's always a mask.
- image_gl->setExplicitFormat( GL_ALPHA8, GL_ALPHA );
+ tex->setExplicitFormat( GL_ALPHA8, GL_ALPHA );
}
- image_gl->createGLTexture(0, image_raw);
+ tex->createGLTexture(0, image_raw);
- gGL.getTexUnit(0)->bind(image_gl);
- image_gl->setAddressMode(LLTexUnit::TAM_CLAMP);
+ gGL.getTexUnit(0)->bind(tex);
+ tex->setAddressMode(LLTexUnit::TAM_CLAMP);
- mStaticImageListGL [ namekey ] = image_gl;
- mGLBytes += (S32)image_gl->getWidth() * image_gl->getHeight() * image_gl->getComponents();
+ mStaticImageList [ namekey ] = tex;
+ mGLBytes += (S32)tex->getWidth() * tex->getHeight() * tex->getComponents();
}
else
{
- image_gl = NULL;
+ tex = NULL;
}
}
- return image_gl;
+ return tex;
}
// Reads a .tga file, decodes it, and puts the decoded data in image_raw.
diff --git a/indra/newview/lltexlayer.h b/indra/newview/lltexlayer.h
index 5890440108..b0ac13913e 100644
--- a/indra/newview/lltexlayer.h
+++ b/indra/newview/lltexlayer.h
@@ -40,7 +40,6 @@
class LLVOAvatar;
class LLVOAvatarSelf;
-class LLImageGL;
class LLImageTGA;
class LLImageRaw;
class LLXmlTreeNode;
@@ -54,6 +53,7 @@ class LLTexLayerParamColorInfo;
class LLTexLayerParamAlpha;
class LLTexLayerParamAlphaInfo;
+
typedef std::vector<LLTexLayerParamColor *> param_color_list_t;
typedef std::vector<LLTexLayerParamAlpha *> param_alpha_list_t;
typedef std::vector<LLTexLayerParamColorInfo *> param_color_info_list_t;
@@ -75,6 +75,7 @@ public:
};
LLTexLayer(LLTexLayerSet* const layer_set);
+ LLTexLayer(const LLTexLayer &layer);
~LLTexLayer();
const LLTexLayerInfo* getInfo() const { return mInfo; }
@@ -195,7 +196,7 @@ public:
LLVOAvatarSelf* getAvatar() const { return mAvatar; }
const std::string getBodyRegion() const;
- BOOL hasComposite() const { return (mComposite != NULL); }
+ BOOL hasComposite() const { return (mComposite.notNull()); }
void setBump(BOOL b) { mHasBump = b; }
BOOL hasBump() const { return mHasBump; }
LLVOAvatarDefines::EBakedTextureIndex getBakedTexIndex() { return mBakedTexIndex; }
@@ -208,7 +209,7 @@ private:
typedef std::vector<LLTexLayer *> layer_list_t;
layer_list_t mLayerList;
layer_list_t mMaskLayerList;
- LLTexLayerSetBuffer* mComposite;
+ LLPointer<LLTexLayerSetBuffer> mComposite;
LLVOAvatarSelf* const mAvatar; // Backlink only; don't make this an LLPointer.
BOOL mUpdatesEnabled;
BOOL mHasBump;
@@ -241,7 +242,7 @@ private:
};
// The composite image that a LLTexLayerSet writes to. Each LLTexLayerSet has one.
-class LLTexLayerSetBuffer : public LLDynamicTexture
+class LLTexLayerSetBuffer : public LLViewerDynamicTexture
{
public:
LLTexLayerSetBuffer(LLTexLayerSet* const owner, S32 width, S32 height, BOOL has_bump);
@@ -282,7 +283,7 @@ private:
BOOL mNeedsUpload;
BOOL mUploadPending;
LLUUID mUploadID; // Identifys the current upload process (null if none). Used to avoid overlaps (eg, when the user rapidly makes two changes outside of Face Edit)
- LLPointer<LLImageGL> mBumpTex; // zero if none
+ LLPointer<LLViewerTexture> mBumpTex; // zero if none
static S32 sGLByteCount;
static S32 sGLBumpByteCount;
@@ -302,7 +303,7 @@ public:
LLTexLayerStaticImageList();
~LLTexLayerStaticImageList();
- LLImageGL* getImageGL(const std::string& file_name, BOOL is_mask);
+ LLViewerTexture* getTexture(const std::string& file_name, BOOL is_mask);
LLImageTGA* getImageTGA(const std::string& file_name);
void deleteCachedImages();
@@ -314,8 +315,8 @@ private:
private:
LLStringTable mImageNames;
- typedef std::map< const char*, LLPointer<LLImageGL> > image_gl_map_t;
- image_gl_map_t mStaticImageListGL;
+ typedef std::map< const char*, LLPointer<LLViewerTexture> > texture_map_t;
+ texture_map_t mStaticImageList;
typedef std::map< const char*, LLPointer<LLImageTGA> > image_tga_map_t;
image_tga_map_t mStaticImageListTGA;
diff --git a/indra/newview/lltexlayerparams.cpp b/indra/newview/lltexlayerparams.cpp
index e00f6aeb04..c9117a84a5 100644
--- a/indra/newview/lltexlayerparams.cpp
+++ b/indra/newview/lltexlayerparams.cpp
@@ -89,12 +89,12 @@ void LLTexLayerParamAlpha::getCacheByteCount(S32* gl_bytes)
iter != sInstances.end(); iter++)
{
LLTexLayerParamAlpha* instance = *iter;
- LLImageGL* image_gl = instance->mCachedProcessedImageGL;
- if (image_gl)
+ LLViewerTexture* tex = instance->mCachedProcessedTexture;
+ if (tex)
{
- S32 bytes = (S32)image_gl->getWidth() * image_gl->getHeight() * image_gl->getComponents();
+ S32 bytes = (S32)tex->getWidth() * tex->getHeight() * tex->getComponents();
- if (image_gl->getHasGLTexture())
+ if (tex->hasValidGLTexture())
{
*gl_bytes += bytes;
}
@@ -104,7 +104,7 @@ void LLTexLayerParamAlpha::getCacheByteCount(S32* gl_bytes)
LLTexLayerParamAlpha::LLTexLayerParamAlpha(LLTexLayer* layer) :
LLTexLayerParam(layer),
- mCachedProcessedImageGL(NULL),
+ mCachedProcessedTexture(NULL),
mNeedsCreateTexture(FALSE),
mStaticImageInvalid(FALSE),
mAvgDistortionVec(1.f, 1.f, 1.f),
@@ -115,7 +115,7 @@ LLTexLayerParamAlpha::LLTexLayerParamAlpha(LLTexLayer* layer) :
LLTexLayerParamAlpha::LLTexLayerParamAlpha(LLVOAvatar* avatar) :
LLTexLayerParam(avatar),
- mCachedProcessedImageGL(NULL),
+ mCachedProcessedTexture(NULL),
mNeedsCreateTexture(FALSE),
mStaticImageInvalid(FALSE),
mAvgDistortionVec(1.f, 1.f, 1.f),
@@ -134,7 +134,7 @@ LLTexLayerParamAlpha::~LLTexLayerParamAlpha()
void LLTexLayerParamAlpha::deleteCaches()
{
mStaticImageTGA = NULL; // deletes image
- mCachedProcessedImageGL = NULL;
+ mCachedProcessedTexture = NULL;
mStaticImageRaw = NULL;
mNeedsCreateTexture = FALSE;
}
@@ -266,22 +266,22 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
const S32 image_tga_width = mStaticImageTGA->getWidth();
const S32 image_tga_height = mStaticImageTGA->getHeight();
- if (!mCachedProcessedImageGL ||
- (mCachedProcessedImageGL->getWidth() != image_tga_width) ||
- (mCachedProcessedImageGL->getHeight() != image_tga_height) ||
+ if (!mCachedProcessedTexture ||
+ (mCachedProcessedTexture->getWidth() != image_tga_width) ||
+ (mCachedProcessedTexture->getHeight() != image_tga_height) ||
(weight_changed))
{
// llinfos << "Building Cached Alpha: " << mName << ": (" << mStaticImageRaw->getWidth() << ", " << mStaticImageRaw->getHeight() << ") " << effective_weight << llendl;
mCachedEffectiveWeight = effective_weight;
- if (!mCachedProcessedImageGL)
+ if (!mCachedProcessedTexture)
{
- mCachedProcessedImageGL = new LLImageGL(image_tga_width, image_tga_height, 1, FALSE);
+ mCachedProcessedTexture = LLViewerTextureManager::getLocalTexture(image_tga_width, image_tga_height, 1, FALSE);
// We now have something in one of our caches
- LLTexLayerSet::sHasCaches |= mCachedProcessedImageGL ? TRUE : FALSE;
+ LLTexLayerSet::sHasCaches |= mCachedProcessedTexture ? TRUE : FALSE;
- mCachedProcessedImageGL->setExplicitFormat(GL_ALPHA8, GL_ALPHA);
+ mCachedProcessedTexture->setExplicitFormat(GL_ALPHA8, GL_ALPHA);
}
// Applies domain and effective weight to data as it is decoded. Also resizes the raw image if needed.
@@ -291,20 +291,20 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
mNeedsCreateTexture = TRUE;
}
- if (mCachedProcessedImageGL)
+ if (mCachedProcessedTexture)
{
{
// Create the GL texture, and then hang onto it for future use.
if (mNeedsCreateTexture)
{
- mCachedProcessedImageGL->createGLTexture(0, mStaticImageRaw);
+ mCachedProcessedTexture->createGLTexture(0, mStaticImageRaw);
mNeedsCreateTexture = FALSE;
- gGL.getTexUnit(0)->bind(mCachedProcessedImageGL);
- mCachedProcessedImageGL->setAddressMode(LLTexUnit::TAM_CLAMP);
+ gGL.getTexUnit(0)->bind(mCachedProcessedTexture);
+ mCachedProcessedTexture->setAddressMode(LLTexUnit::TAM_CLAMP);
}
LLGLSNoAlphaTest gls_no_alpha_test;
- gGL.getTexUnit(0)->bind(mCachedProcessedImageGL);
+ gGL.getTexUnit(0)->bind(mCachedProcessedTexture);
gl_rect_2d_simple_tex(width, height);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
stop_glerror();
@@ -315,7 +315,7 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height)
// (It's not really a "cache" in that case, but the logic is the same)
if (mAvatar->isSelf())
{
- mCachedProcessedImageGL = NULL;
+ mCachedProcessedTexture = NULL;
}
}
else
diff --git a/indra/newview/lltexlayerparams.h b/indra/newview/lltexlayerparams.h
index 8c01738317..49feb01b5e 100644
--- a/indra/newview/lltexlayerparams.h
+++ b/indra/newview/lltexlayerparams.h
@@ -80,7 +80,7 @@ public:
BOOL getMultiplyBlend() const;
private:
- LLPointer<LLImageGL> mCachedProcessedImageGL;
+ LLPointer<LLViewerTexture> mCachedProcessedTexture;
LLPointer<LLImageTGA> mStaticImageTGA;
LLPointer<LLImageRaw> mStaticImageRaw;
BOOL mNeedsCreateTexture;
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 3c9290acea..d792b972bb 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -37,17 +37,18 @@
#include "llrender.h"
#include "llagent.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llcheckboxctrl.h"
#include "llcombobox.h"
#include "llbutton.h"
#include "lldraghandle.h"
#include "llfocusmgr.h"
-#include "llviewerimage.h"
+#include "llviewertexture.h"
#include "llfolderview.h"
+#include "llfoldervieweventlistener.h"
#include "llinventory.h"
#include "llinventorymodel.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
#include "lllineeditor.h"
#include "llui.h"
#include "llviewerinventory.h"
@@ -59,7 +60,7 @@
#include "llscrollcontainer.h"
#include "lltoolmgr.h"
#include "lltoolpipette.h"
-#include "llsearcheditor.h"
+#include "llfiltereditor.h"
#include "lltool.h"
#include "llviewerwindow.h"
@@ -129,7 +130,7 @@ public:
void updateFilterPermMask();
void commitIfImmediateSet();
- void onSearchEdit(const std::string& search_string );
+ void onFilterEdit(const std::string& search_string );
static void onBtnSetToDefault( void* userdata );
static void onBtnSelect( void* userdata );
@@ -145,7 +146,7 @@ public:
void onTextureSelect( const LLTextureEntry& te );
protected:
- LLPointer<LLViewerImage> mTexturep;
+ LLPointer<LLViewerTexture> mTexturep;
LLTextureCtrl* mOwner;
LLUUID mImageAssetID; // Currently selected texture
@@ -163,7 +164,7 @@ protected:
std::string mPendingName;
BOOL mActive;
- LLSearchEditor* mSearchEdit;
+ LLFilterEditor* mFilterEdit;
LLInventoryPanel* mInventoryPanel;
PermissionMask mImmediateFilterPermMask;
PermissionMask mNonImmediateFilterPermMask;
@@ -190,7 +191,7 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
mTentativeLabel(NULL),
mResolutionLabel(NULL),
mActive( TRUE ),
- mSearchEdit(NULL),
+ mFilterEdit(NULL),
mImmediateFilterPermMask(immediate_filter_perm_mask),
mNonImmediateFilterPermMask(non_immediate_filter_perm_mask),
mContextConeOpacity(0.f)
@@ -262,9 +263,9 @@ void LLFloaterTexturePicker::updateImageStats()
if (mTexturep.notNull())
{
//RN: have we received header data for this image?
- if (mTexturep->getWidth(0) > 0 && mTexturep->getHeight(0) > 0)
+ if (mTexturep->getFullWidth() > 0 && mTexturep->getFullHeight() > 0)
{
- std::string formatted_dims = llformat("%d x %d", mTexturep->getWidth(0),mTexturep->getHeight(0));
+ std::string formatted_dims = llformat("%d x %d", mTexturep->getFullWidth(),mTexturep->getFullHeight());
mResolutionLabel->setTextArg("[DIMENSIONS]", formatted_dims);
}
else
@@ -334,15 +335,15 @@ BOOL LLFloaterTexturePicker::handleKeyHere(KEY key, MASK mask)
{
LLFolderView* root_folder = mInventoryPanel->getRootFolder();
- if (root_folder && mSearchEdit)
+ if (root_folder && mFilterEdit)
{
- if (mSearchEdit->hasFocus()
+ if (mFilterEdit->hasFocus()
&& (key == KEY_RETURN || key == KEY_DOWN)
&& mask == MASK_NONE)
{
if (!root_folder->getCurSelectedItem())
{
- LLFolderViewItem* itemp = root_folder->getItemByID(gAgent.getInventoryRootID());
+ LLFolderViewItem* itemp = root_folder->getItemByID(gInventory.getRootFolderID());
if (itemp)
{
root_folder->setSelection(itemp, FALSE, FALSE);
@@ -361,7 +362,7 @@ BOOL LLFloaterTexturePicker::handleKeyHere(KEY key, MASK mask)
if (mInventoryPanel->hasFocus() && key == KEY_UP)
{
- mSearchEdit->focusFirstItem(TRUE);
+ mFilterEdit->focusFirstItem(TRUE);
}
}
@@ -403,8 +404,8 @@ BOOL LLFloaterTexturePicker::postBuild()
childSetCommitCallback("show_folders_check", onShowFolders, this);
childSetVisible("show_folders_check", FALSE);
- mSearchEdit = getChild<LLSearchEditor>("inventory search editor");
- mSearchEdit->setSearchCallback(boost::bind(&LLFloaterTexturePicker::onSearchEdit, this, _1));
+ mFilterEdit = getChild<LLFilterEditor>("inventory search editor");
+ mFilterEdit->setCommitCallback(boost::bind(&LLFloaterTexturePicker::onFilterEdit, this, _2));
mInventoryPanel = getChild<LLInventoryPanel>("inventory panel");
@@ -523,7 +524,7 @@ void LLFloaterTexturePicker::draw()
childSetValue("Pipette", LLToolMgr::getInstance()->getCurrentTool() == LLToolPipette::getInstance());
//RN: reset search bar to reflect actual search query (all caps, for example)
- mSearchEdit->setText(mInventoryPanel->getFilterSubString());
+ mFilterEdit->setText(mInventoryPanel->getFilterSubString());
//BOOL allow_copy = FALSE;
if( mOwner )
@@ -531,13 +532,13 @@ void LLFloaterTexturePicker::draw()
mTexturep = NULL;
if(mImageAssetID.notNull())
{
- mTexturep = gImageList.getImage(mImageAssetID, MIPMAP_YES, IMMEDIATE_NO);
- mTexturep->setBoostLevel(LLViewerImage::BOOST_PREVIEW);
+ mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID, MIPMAP_YES, IMMEDIATE_NO);
+ mTexturep->setBoostLevel(LLViewerTexture::BOOST_PREVIEW);
}
else if (!mFallbackImageName.empty())
{
- mTexturep = gImageList.getImageFromFile(mFallbackImageName);
- mTexturep->setBoostLevel(LLViewerImage::BOOST_PREVIEW);
+ mTexturep = LLViewerTextureManager::getFetchedTextureFromFile(mFallbackImageName);
+ mTexturep->setBoostLevel(LLViewerTexture::BOOST_PREVIEW);
}
if (mTentativeLabel)
@@ -796,7 +797,7 @@ void LLFloaterTexturePicker::updateFilterPermMask()
//mInventoryPanel->setFilterPermMask( getFilterPermMask() ); Commented out due to no-copy texture loss.
}
-void LLFloaterTexturePicker::onSearchEdit(const std::string& search_string )
+void LLFloaterTexturePicker::onFilterEdit(const std::string& search_string )
{
std::string upper_case_search_string = search_string;
LLStringUtil::toUpper(upper_case_search_string);
@@ -858,7 +859,7 @@ void LLFloaterTexturePicker::onTextureSelect( const LLTextureEntry& te )
///////////////////////////////////////////////////////////////////////
// LLTextureCtrl
-static LLDefaultWidgetRegistry::Register<LLTextureCtrl> r("texture_picker");
+static LLDefaultChildRegistry::Register<LLTextureCtrl> r("texture_picker");
LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p)
: LLUICtrl(p),
@@ -1190,14 +1191,14 @@ void LLTextureCtrl::draw()
}
else if (!mImageAssetID.isNull())
{
- mTexturep = gImageList.getImage(mImageAssetID, MIPMAP_YES, IMMEDIATE_NO);
- mTexturep->setBoostLevel(LLViewerImage::BOOST_PREVIEW);
+ mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID, MIPMAP_YES, IMMEDIATE_NO);
+ mTexturep->setBoostLevel(LLViewerTexture::BOOST_PREVIEW);
}
else if (!mFallbackImageName.empty())
{
// Show fallback image.
- mTexturep = gImageList.getImageFromFile(mFallbackImageName);
- mTexturep->setBoostLevel(LLViewerImage::BOOST_PREVIEW);
+ mTexturep = LLViewerTextureManager::getFetchedTextureFromFile(mFallbackImageName);
+ mTexturep->setBoostLevel(LLViewerTexture::BOOST_PREVIEW);
}
// Border
diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h
index ebe2cd2e5f..0b232da62b 100644
--- a/indra/newview/lltexturectrl.h
+++ b/indra/newview/lltexturectrl.h
@@ -45,7 +45,7 @@
class LLButton;
class LLFloaterTexturePicker;
class LLInventoryItem;
-class LLViewerImage;
+class LLViewerTexture;
// used for setting drag & drop callbacks.
typedef boost::function<BOOL (LLUICtrl*, LLInventoryItem*)> drag_n_drop_callback;
@@ -84,7 +84,7 @@ public:
Params()
: image_id("image"),
- default_image_id("default_image"),
+ default_image_id("default_image_id"),
default_image_name("default_image_name"),
allow_no_texture("allow_no_texture"),
can_apply_immediately("can_apply_immediately"),
@@ -189,7 +189,7 @@ private:
drag_n_drop_callback mDropCallback;
commit_callback_t mOnCancelCallback;
commit_callback_t mOnSelectCallback;
- LLPointer<LLViewerImage> mTexturep;
+ LLPointer<LLViewerTexture> mTexturep;
LLUIColor mBorderColor;
LLUUID mImageItemID;
LLUUID mImageAssetID;
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index be535761fc..63af170fa9 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -44,8 +44,8 @@
#include "llagent.h"
#include "lltexturecache.h"
-#include "llviewerimagelist.h"
-#include "llviewerimage.h"
+#include "llviewertexturelist.h"
+#include "llviewertexture.h"
#include "llviewerregion.h"
//////////////////////////////////////////////////////////////////////////////
@@ -469,8 +469,8 @@ void LLTextureFetchWorker::clearPackets()
U32 LLTextureFetchWorker::calcWorkPriority()
{
-// llassert_always(mImagePriority >= 0 && mImagePriority <= LLViewerImage::maxDecodePriority());
- F32 priority_scale = (F32)LLWorkerThread::PRIORITY_LOWBITS / LLViewerImage::maxDecodePriority();
+// llassert_always(mImagePriority >= 0 && mImagePriority <= LLViewerTexture::maxDecodePriority());
+ F32 priority_scale = (F32)LLWorkerThread::PRIORITY_LOWBITS / LLViewerFetchedTexture::maxDecodePriority();
mWorkPriority = (U32)(mImagePriority * priority_scale);
return mWorkPriority;
}
@@ -512,7 +512,7 @@ void LLTextureFetchWorker::setDesiredDiscard(S32 discard, S32 size)
void LLTextureFetchWorker::setImagePriority(F32 priority)
{
-// llassert_always(priority >= 0 && priority <= LLViewerImage::maxDecodePriority());
+// llassert_always(priority >= 0 && priority <= LLViewerTexture::maxDecodePriority());
F32 delta = fabs(priority - mImagePriority);
if (delta > (mImagePriority * .05f) || mState == DONE)
{
@@ -542,7 +542,7 @@ void LLTextureFetchWorker::startWork(S32 param)
llassert(mFormattedImage.isNull());
}
-#include "llviewerimagelist.h" // debug
+#include "llviewertexturelist.h" // debug
// Called from LLWorkerThread::processRequest()
bool LLTextureFetchWorker::doWork(S32 param)
@@ -796,7 +796,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
mFormattedImage->deleteData();
#endif
mRequestedSize -= cur_size;
- // F32 priority = mImagePriority / (F32)LLViewerImage::maxDecodePriority(); // 0-1
+ // F32 priority = mImagePriority / (F32)LLViewerTexture::maxDecodePriority(); // 0-1
S32 offset = cur_size;
mBufferSize = cur_size; // This will get modified by callbackHttpGet()
std::string url;
diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h
index 282fbb6481..97719a9468 100644
--- a/indra/newview/lltexturefetch.h
+++ b/indra/newview/lltexturefetch.h
@@ -38,7 +38,7 @@
#include "lluuid.h"
#include "llworkerthread.h"
-class LLViewerImage;
+class LLViewerTexture;
class LLTextureFetchWorker;
class LLTextureCache;
class LLHost;
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index 50b73bfbc7..70a8ab9f61 100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -49,8 +49,8 @@
#include "lltexturecache.h"
#include "lltexturefetch.h"
#include "llviewerobject.h"
-#include "llviewerimage.h"
-#include "llviewerimagelist.h"
+#include "llviewertexture.h"
+#include "llviewertexturelist.h"
#include "llappviewer.h"
extern F32 texmem_lower_bound_scale;
@@ -58,18 +58,18 @@ extern F32 texmem_lower_bound_scale;
LLTextureView *gTextureView = NULL;
//static
-std::set<LLViewerImage*> LLTextureView::sDebugImages;
+std::set<LLViewerFetchedTexture*> LLTextureView::sDebugImages;
////////////////////////////////////////////////////////////////////////////
-static std::string title_string1a("Tex UUID Area DDis(Req) DecodePri(Fetch) [download] pk/max");
-static std::string title_string1b("Tex UUID Area DDis(Req) Fetch(DecodePri) [download] pk/max");
+static std::string title_string1a("Tex UUID Area DDis(Req) DecodePri(Fetch) [download] pk/max");
+static std::string title_string1b("Tex UUID Area DDis(Req) Fetch(DecodePri) [download] pk/max");
static std::string title_string2("State");
static std::string title_string3("Pkt Bnd");
static std::string title_string4(" W x H (Dis) Mem");
static S32 title_x1 = 0;
-static S32 title_x2 = 440;
+static S32 title_x2 = 460;
static S32 title_x3 = title_x2 + 40;
static S32 title_x4 = title_x3 + 50;
static S32 texture_bar_height = 8;
@@ -79,7 +79,7 @@ static S32 texture_bar_height = 8;
class LLTextureBar : public LLView
{
public:
- LLPointer<LLViewerImage> mImagep;
+ LLPointer<LLViewerFetchedTexture> mImagep;
S32 mHilite;
public:
@@ -109,8 +109,8 @@ public:
{
LLTextureBar* bar1p = (LLTextureBar*)i1;
LLTextureBar* bar2p = (LLTextureBar*)i2;
- LLViewerImage *i1p = bar1p->mImagep;
- LLViewerImage *i2p = bar2p->mImagep;
+ LLViewerFetchedTexture *i1p = bar1p->mImagep;
+ LLViewerFetchedTexture *i2p = bar2p->mImagep;
F32 pri1 = i1p->getDecodePriority(); // i1p->mRequestedDownloadPriority
F32 pri2 = i2p->getDecodePriority(); // i2p->mRequestedDownloadPriority
if (pri1 > pri2)
@@ -128,10 +128,10 @@ public:
{
LLTextureBar* bar1p = (LLTextureBar*)i1;
LLTextureBar* bar2p = (LLTextureBar*)i2;
- LLViewerImage *i1p = bar1p->mImagep;
- LLViewerImage *i2p = bar2p->mImagep;
- U32 pri1 = i1p->mFetchPriority;
- U32 pri2 = i2p->mFetchPriority;
+ LLViewerFetchedTexture *i1p = bar1p->mImagep;
+ LLViewerFetchedTexture *i2p = bar2p->mImagep;
+ U32 pri1 = i1p->getFetchPriority() ;
+ U32 pri2 = i2p->getFetchPriority() ;
if (pri1 > pri2)
return true;
else if (pri2 > pri1)
@@ -315,10 +315,10 @@ void LLTextureBar::draw()
pip_x += pip_width + pip_space;
// we don't want to show bind/resident pips for textures using the default texture
- if (mImagep->getHasGLTexture())
+ if (mImagep->hasValidGLTexture())
{
// Draw the bound pip
- last_event = mImagep->sLastFrameTime - mImagep->mLastBindTime;
+ last_event = mImagep->getTimePassedSinceLastBound();
if (last_event < 1.f)
{
clr = mImagep->getMissed() ? LLColor4::red : LLColor4::magenta1;
@@ -342,7 +342,7 @@ void LLTextureBar::draw()
// draw the image size at the end
{
std::string num_str = llformat("%3dx%3d (%d) %7d", mImagep->getWidth(), mImagep->getHeight(),
- mImagep->getDiscardLevel(), mImagep->mTextureMemory);
+ mImagep->getDiscardLevel(), mImagep->hasGLTexture() ? mImagep->getTextureMemory() : 0);
LLFontGL::getFontMonospace()->renderUTF8(num_str, 0, title_x4, getRect().getHeight(), color,
LLFontGL::LEFT, LLFontGL::TOP);
}
@@ -400,13 +400,13 @@ private:
void LLGLTexMemBar::draw()
{
- S32 bound_mem = BYTES_TO_MEGA_BYTES(LLViewerImage::sBoundTextureMemoryInBytes);
- S32 max_bound_mem = LLViewerImage::sMaxBoundTextureMemInMegaBytes;
- S32 total_mem = BYTES_TO_MEGA_BYTES(LLViewerImage::sTotalTextureMemoryInBytes);
- S32 max_total_mem = LLViewerImage::sMaxTotalTextureMemInMegaBytes;
- F32 discard_bias = LLViewerImage::sDesiredDiscardBias;
+ S32 bound_mem = BYTES_TO_MEGA_BYTES(LLViewerTexture::sBoundTextureMemoryInBytes);
+ S32 max_bound_mem = LLViewerTexture::sMaxBoundTextureMemInMegaBytes;
+ S32 total_mem = BYTES_TO_MEGA_BYTES(LLViewerTexture::sTotalTextureMemoryInBytes);
+ S32 max_total_mem = LLViewerTexture::sMaxTotalTextureMemInMegaBytes;
+ F32 discard_bias = LLViewerTexture::sDesiredDiscardBias;
S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f);
-
+ S32 h_offset = (S32)((texture_bar_height + 2.5f) * mTextureView->mNumTextureBars + 2.5f);
//----------------------------------------------------------------------------
LLGLSUIDefault gls_ui;
F32 text_color[] = {1.f, 1.f, 1.f, 0.75f};
@@ -419,13 +419,13 @@ void LLGLTexMemBar::draw()
max_bound_mem,
discard_bias);
- LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, line_height*3,
+ LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, h_offset + line_height*3,
text_color, LLFontGL::LEFT, LLFontGL::TOP);
//----------------------------------------------------------------------------
S32 bar_left = 380;
S32 bar_width = 200;
- S32 top = line_height*3 - 2;
+ S32 top = line_height*3 - 2 + h_offset;
S32 bottom = top - 6;
S32 left = bar_left;
S32 right = left + bar_width;
@@ -477,49 +477,49 @@ void LLGLTexMemBar::draw()
//----------------------------------------------------------------------------
text = llformat("Textures: Count: %d Fetch: %d(%d) Pkts:%d(%d) Cache R/W: %d/%d LFS:%d IW:%d(%d) RAW:%d mRaw:%d mAux:%d CB:%d",
- gImageList.getNumImages(),
+ gTextureList.getNumImages(),
LLAppViewer::getTextureFetch()->getNumRequests(), LLAppViewer::getTextureFetch()->getNumDeletes(),
LLAppViewer::getTextureFetch()->mPacketCount, LLAppViewer::getTextureFetch()->mBadPacketCount,
LLAppViewer::getTextureCache()->getNumReads(), LLAppViewer::getTextureCache()->getNumWrites(),
LLLFSThread::sLocal->getPending(),
LLImageWorker::sCount, LLImageWorker::getWorkerThread()->getNumDeletes(),
- LLImageRaw::sRawImageCount, LLViewerImage::sRawCount, LLViewerImage::sAuxCount,
- gImageList.mCallbackList.size());
+ LLImageRaw::sRawImageCount, LLViewerFetchedTexture::sRawCount, LLViewerFetchedTexture::sAuxCount,
+ gTextureList.mCallbackList.size());
- LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, line_height*2,
+ LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, h_offset + line_height*2,
text_color, LLFontGL::LEFT, LLFontGL::TOP);
S32 dx1 = 0;
if (LLAppViewer::getTextureFetch()->mDebugPause)
{
- LLFontGL::getFontMonospace()->renderUTF8(std::string("!"), 0, title_x1, line_height,
+ LLFontGL::getFontMonospace()->renderUTF8(std::string("!"), 0, title_x1, h_offset + line_height,
text_color, LLFontGL::LEFT, LLFontGL::TOP);
dx1 += 8;
}
if (mTextureView->mFreezeView)
{
- LLFontGL::getFontMonospace()->renderUTF8(std::string("*"), 0, title_x1, line_height,
+ LLFontGL::getFontMonospace()->renderUTF8(std::string("*"), 0, title_x1, h_offset + line_height,
text_color, LLFontGL::LEFT, LLFontGL::TOP);
dx1 += 8;
}
if (mTextureView->mOrderFetch)
{
- LLFontGL::getFontMonospace()->renderUTF8(title_string1b, 0, title_x1+dx1, line_height,
+ LLFontGL::getFontMonospace()->renderUTF8(title_string1b, 0, title_x1+dx1, h_offset + line_height,
text_color, LLFontGL::LEFT, LLFontGL::TOP);
}
else
{
- LLFontGL::getFontMonospace()->renderUTF8(title_string1a, 0, title_x1+dx1, line_height,
+ LLFontGL::getFontMonospace()->renderUTF8(title_string1a, 0, title_x1+dx1, h_offset + line_height,
text_color, LLFontGL::LEFT, LLFontGL::TOP);
}
- LLFontGL::getFontMonospace()->renderUTF8(title_string2, 0, title_x2, line_height,
+ LLFontGL::getFontMonospace()->renderUTF8(title_string2, 0, title_x2, h_offset + line_height,
text_color, LLFontGL::LEFT, LLFontGL::TOP);
- LLFontGL::getFontMonospace()->renderUTF8(title_string3, 0, title_x3, line_height,
+ LLFontGL::getFontMonospace()->renderUTF8(title_string3, 0, title_x3, h_offset + line_height,
text_color, LLFontGL::LEFT, LLFontGL::TOP);
- LLFontGL::getFontMonospace()->renderUTF8(title_string4, 0, title_x4, line_height,
+ LLFontGL::getFontMonospace()->renderUTF8(title_string4, 0, title_x4, h_offset + line_height,
text_color, LLFontGL::LEFT, LLFontGL::TOP);
}
@@ -557,7 +557,7 @@ LLTextureView::~LLTextureView()
mGLTexMemBar = 0;
}
-typedef std::pair<F32,LLViewerImage*> decode_pair_t;
+typedef std::pair<F32,LLViewerFetchedTexture*> decode_pair_t;
struct compare_decode_pair
{
bool operator()(const decode_pair_t& a, const decode_pair_t& b)
@@ -587,18 +587,19 @@ void LLTextureView::draw()
llinfos << "ID\tMEM\tBOOST\tPRI\tWIDTH\tHEIGHT\tDISCARD" << llendl;
}
- for (LLViewerImageList::image_priority_list_t::iterator iter = gImageList.mImageList.begin();
- iter != gImageList.mImageList.end(); )
+ for (LLViewerTextureList::image_priority_list_t::iterator iter = gTextureList.mImageList.begin();
+ iter != gTextureList.mImageList.end(); )
{
- LLPointer<LLViewerImage> imagep = *iter++;
+ LLPointer<LLViewerFetchedTexture> imagep = *iter++;
S32 cur_discard = imagep->getDiscardLevel();
S32 desired_discard = imagep->mDesiredDiscardLevel;
if (mPrintList)
{
+ S32 tex_mem = imagep->hasGLTexture() ? imagep->getTextureMemory() : 0 ;
llinfos << imagep->getID()
- << "\t" << imagep->mTextureMemory
+ << "\t" << tex_mem
<< "\t" << imagep->getBoostLevel()
<< "\t" << imagep->getDecodePriority()
<< "\t" << imagep->getWidth()
@@ -643,8 +644,8 @@ void LLTextureView::draw()
{
struct f : public LLSelectedTEFunctor
{
- LLViewerImage* mImage;
- f(LLViewerImage* image) : mImage(image) {}
+ LLViewerFetchedTexture* mImage;
+ f(LLViewerFetchedTexture* image) : mImage(image) {}
virtual bool apply(LLViewerObject* object, S32 te)
{
return (mImage == object->getTEImage(te));
@@ -701,10 +702,11 @@ void LLTextureView::draw()
static S32 max_count = 50;
S32 count = 0;
+ mNumTextureBars = 0 ;
for (display_list_t::iterator iter = display_image_list.begin();
iter != display_image_list.end(); iter++)
{
- LLViewerImage* imagep = iter->second;
+ LLViewerFetchedTexture* imagep = iter->second;
S32 hilite = 0;
F32 pri = iter->first;
if (pri >= 1 * HIGH_PRIORITY)
@@ -734,7 +736,7 @@ void LLTextureView::draw()
reshape(getRect().getWidth(), getRect().getHeight(), TRUE);
/*
- count = gImageList.getNumImages();
+ count = gTextureList.getNumImages();
std::string info_string;
info_string = llformat("Global Info:\nTexture Count: %d", count);
mInfoTextp->setText(info_string);
@@ -756,7 +758,7 @@ void LLTextureView::draw()
}
-BOOL LLTextureView::addBar(LLViewerImage *imagep, S32 hilite)
+BOOL LLTextureView::addBar(LLViewerFetchedTexture *imagep, S32 hilite)
{
llassert(imagep);
diff --git a/indra/newview/lltextureview.h b/indra/newview/lltextureview.h
index 99b6db9662..20be17aef4 100644
--- a/indra/newview/lltextureview.h
+++ b/indra/newview/lltextureview.h
@@ -35,7 +35,7 @@
#include "llcontainerview.h"
-class LLViewerImage;
+class LLViewerFetchedTexture;
class LLTextureBar;
class LLGLTexMemBar;
@@ -54,12 +54,12 @@ public:
/*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent);
- static void addDebugImage(LLViewerImage* image) { sDebugImages.insert(image); }
- static void removeDebugImage(LLViewerImage* image) { sDebugImages.insert(image); }
+ static void addDebugImage(LLViewerFetchedTexture* image) { sDebugImages.insert(image); }
+ static void removeDebugImage(LLViewerFetchedTexture* image) { sDebugImages.insert(image); }
static void clearDebugImages() { sDebugImages.clear(); }
private:
- BOOL addBar(LLViewerImage *image, BOOL hilight = FALSE);
+ BOOL addBar(LLViewerFetchedTexture *image, BOOL hilight = FALSE);
void removeAllBars();
private:
@@ -75,7 +75,7 @@ private:
LLGLTexMemBar* mGLTexMemBar;
public:
- static std::set<LLViewerImage*> sDebugImages;
+ static std::set<LLViewerFetchedTexture*> sDebugImages;
};
extern LLTextureView *gTextureView;
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
new file mode 100644
index 0000000000..6f5b25214e
--- /dev/null
+++ b/indra/newview/lltoast.cpp
@@ -0,0 +1,239 @@
+/**
+ * @file lltoast.cpp
+ * @brief This class implements a placeholder for any notification panel.
+ *
+ * $LicenseInfo:firstyear=2000&license=viewergpl$
+ *
+ * Copyright (c) 2000-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h" // must be first include
+
+#include "lltoast.h"
+
+#include "llbutton.h"
+#include "llfocusmgr.h"
+
+using namespace LLNotificationsUI;
+
+//--------------------------------------------------------------------------
+LLToast::LLToast(LLPanel* panel) :
+ LLFloater(),
+ mTimerValue(5),
+ mIsViewed(false),
+ mPanel(panel),
+ mCanFade(true),
+ mHideBtn(NULL),
+ mIsModal(false),
+ mCanBeStored(true)
+{
+ LLUICtrlFactory::getInstance()->buildPanel(this, "panel_toast.xml");
+
+ mHideBtn = getChild<LLButton>("hide_btn");
+ if(mHideBtn)
+ {
+ mHideBtn->setClickedCallback(boost::bind(&LLToast::hide,this));
+ }
+ if(mPanel)
+ {
+ arrange(mPanel);
+ }
+
+ // disable unnecessary Floater's functionality
+ setTitleVisible(FALSE);
+ setCanMinimize(FALSE);
+ setCanClose(FALSE);
+ setCanTearOff(FALSE);
+ setCanResize(FALSE);
+ setCanDrag(FALSE);
+}
+
+//--------------------------------------------------------------------------
+void LLToast::setHideButtonEnabled(bool enabled)
+{
+ if(mHideBtn)
+ mHideBtn->setEnabled(enabled);
+}
+
+//--------------------------------------------------------------------------
+LLToast::~LLToast()
+{
+ if(mIsModal)
+ {
+ gFocusMgr.unlockFocus();
+ gFocusMgr.releaseFocusIfNeeded( this );
+ }
+}
+
+//--------------------------------------------------------------------------
+void LLToast::setAndStartTimer(F32 period)
+{
+ if(mCanFade)
+ {
+ mTimerValue = period;
+ mTimer.start();
+ }
+}
+
+//--------------------------------------------------------------------------
+bool LLToast::timerHasExpired()
+{
+ if (mTimer.getStarted())
+ {
+ F32 elapsed_time = mTimer.getElapsedTimeF32();
+ // after 4 seconds a toast should start fade
+ if (elapsed_time > 4)
+ {
+ setBackgroundOpaque(FALSE);
+ }
+ if (elapsed_time > mTimerValue)
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+//--------------------------------------------------------------------------
+void LLToast::hide()
+{
+ setVisible(FALSE);
+ mIsViewed = false;
+ mTimer.stop();
+ mOnFade(this, LLSD());
+}
+
+//--------------------------------------------------------------------------
+void LLToast::setCanFade(bool can_fade)
+{
+ mCanFade = can_fade;
+ if(!mCanFade)
+ mTimer.stop();
+}
+
+//--------------------------------------------------------------------------
+void LLToast::tick()
+{
+ if(mCanFade)
+ {
+ setVisible(FALSE);
+ mTimer.stop();
+ mOnFade(this, LLSD());
+ }
+}
+
+//--------------------------------------------------------------------------
+void LLToast::arrange(LLPanel* panel)
+{
+ LLRect panel_rect, toast_rect;
+
+ panel_rect = panel->getRect();
+ reshape(panel_rect.getWidth(), panel_rect.getHeight());
+ panel_rect.setLeftTopAndSize(0, panel_rect.getHeight(), panel_rect.getWidth(), panel_rect.getHeight());
+ panel->setRect(panel_rect);
+ addChild(panel);
+}
+
+//--------------------------------------------------------------------------
+void LLToast::draw()
+{
+ if(timerHasExpired())
+ {
+ tick();
+ }
+
+ LLFloater::draw();
+}
+
+//--------------------------------------------------------------------------
+void LLToast::setModal(bool modal)
+{
+ mIsModal = modal;
+ if(mIsModal)
+ {
+ gFocusMgr.setMouseCapture( this );
+ gFocusMgr.setTopCtrl( this );
+ setFocus(TRUE);
+ }
+}
+
+//--------------------------------------------------------------------------
+void LLToast::setVisible(BOOL show)
+{
+ if(show)
+ {
+ setBackgroundOpaque(TRUE);
+ }
+ LLPanel::setVisible(show);
+ if(mPanel)
+ {
+ if(!mPanel->isDead())
+ {
+ mPanel->setVisible(show);
+ }
+ }
+}
+
+//--------------------------------------------------------------------------
+void LLToast::onMouseEnter(S32 x, S32 y, MASK mask)
+{
+ mOnToastHover(this, MOUSE_ENTER);
+
+ setVisibleAndFrontmost();
+ setBackgroundOpaque(TRUE);
+ if(mCanFade && !mIsViewed)
+ {
+ mTimer.stop();
+ }
+
+ sendChildToFront(mHideBtn);
+ if(mHideBtn && mHideBtn->getEnabled())
+ mHideBtn->setVisible(TRUE);
+ mOnMousEnter(this, LLSD());
+}
+
+//--------------------------------------------------------------------------
+void LLToast::onMouseLeave(S32 x, S32 y, MASK mask)
+{
+ mOnToastHover(this, MOUSE_LEAVE);
+
+ if(mCanFade && !mIsViewed)
+ {
+ mTimer.start();
+ }
+ if(mHideBtn && mHideBtn->getEnabled())
+ {
+ if( mHideBtn->getRect().pointInRect(x, y) )
+ return;
+ mHideBtn->setVisible(FALSE);
+ }
+}
+
+//--------------------------------------------------------------------------
+
+
+
+
diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h
new file mode 100644
index 0000000000..018664f3d1
--- /dev/null
+++ b/indra/newview/lltoast.h
@@ -0,0 +1,115 @@
+/**
+ * @file lltoast.h
+ * @brief This class implements a placeholder for any notification panel.
+ *
+ * $LicenseInfo:firstyear=2003&license=viewergpl$
+ *
+ * Copyright (c) 2003-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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_LLTOAST_H
+#define LL_LLTOAST_H
+
+
+#include "llpanel.h"
+#include "llfloater.h"
+#include "lltimer.h"
+#include "lldate.h"
+
+#define MOUSE_LEAVE false
+#define MOUSE_ENTER true
+
+namespace LLNotificationsUI
+{
+
+/**
+ * Represents toast pop-up.
+ * This is a parent view for all toast panels.
+ */
+class LLToast : public LLFloater
+{
+public:
+ LLToast(LLPanel* panel);
+ virtual ~LLToast();
+
+ //
+ bool isViewed() { return mIsViewed; }
+
+ void setCanFade(bool can_fade);
+
+ void setHideButtonEnabled(bool enabled);
+
+ void setCanBeStored(bool can_be_stored) { mCanBeStored = can_be_stored; }
+ bool getCanBeStored() { return mCanBeStored; }
+ //
+ void setAndStartTimer(F32 period);
+ //
+ void resetTimer() { mTimer.start(); }
+ void stopTimer() { mTimer.stop(); }
+ void close() { die(); }
+ virtual void draw();
+ virtual void setVisible(BOOL show);
+ virtual void onMouseEnter(S32 x, S32 y, MASK mask);
+ virtual void onMouseLeave(S32 x, S32 y, MASK mask);
+ virtual void hide();
+ LLPanel* getPanel() { return mPanel; }
+ void arrange(LLPanel* panel);
+ void setModal(bool modal);
+
+
+ // Registers callbacks for events
+ boost::signals2::connection setOnFadeCallback(commit_callback_t cb) { return mOnFade.connect(cb); }
+ boost::signals2::connection setOnMouseEnterCallback(commit_callback_t cb) { return mOnMousEnter.connect(cb); }
+ boost::signals2::connection setOnToastDestroyCallback(commit_callback_t cb) { return mOnToastDestroy.connect(cb); }
+ typedef boost::function<void (LLToast* toast, bool mouse_enter)> toast_hover_check_callback_t;
+ typedef boost::signals2::signal<void (LLToast* toast, bool mouse_enter)> toast_hover_check_signal_t;
+ toast_hover_check_signal_t mOnToastHover;
+ boost::signals2::connection setOnToastHoverCallback(toast_hover_check_callback_t cb) { return mOnToastHover.connect(cb); }
+
+ commit_signal_t mOnFade;
+ commit_signal_t mOnMousEnter;
+ commit_signal_t mOnToastDestroy;
+
+private:
+
+ bool timerHasExpired();
+ void tick();
+
+ LLTimer mTimer;
+ F32 mTimerValue;
+
+ LLPanel* mPanel;
+ LLButton* mHideBtn;
+
+ LLColor4 mBgColor;
+ bool mIsViewed;
+ bool mCanFade;
+ bool mIsModal;
+ bool mCanBeStored;
+};
+
+}
+#endif
diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp
new file mode 100644
index 0000000000..afaa01a77a
--- /dev/null
+++ b/indra/newview/lltoastalertpanel.cpp
@@ -0,0 +1,474 @@
+/**
+ * @file lltoastalertpanel.cpp
+ * @brief Panel for alert toasts.
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ *
+ * Copyright (c) 2001-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h" // must be first include
+
+#include "linden_common.h"
+
+#include "llboost.h"
+
+#include "lltoastalertpanel.h"
+#include "llfontgl.h"
+#include "lltextbox.h"
+#include "llbutton.h"
+#include "llcheckboxctrl.h"
+#include "llkeyboard.h"
+#include "llfocusmgr.h"
+#include "lliconctrl.h"
+#include "llui.h"
+#include "lllineeditor.h"
+#include "lluictrlfactory.h"
+#include "llnotifications.h"
+#include "llfunctorregistry.h"
+
+const S32 MAX_ALLOWED_MSG_WIDTH = 400;
+const F32 DEFAULT_BUTTON_DELAY = 0.5f;
+const S32 MSG_PAD = 8;
+
+/*static*/ LLControlGroup* LLToastAlertPanel::sSettings = NULL;
+/*static*/ LLToastAlertPanel::URLLoader* LLToastAlertPanel::sURLLoader;
+
+//-----------------------------------------------------------------------------
+// Private methods
+
+static const S32 VPAD = 16;
+static const S32 HPAD = 25;
+static const S32 BTN_HPAD = 8;
+
+LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal)
+ : LLToastPanel(notification),
+ mDefaultOption( 0 ),
+ mCheck(NULL),
+ mCaution(notification->getPriority() >= NOTIFICATION_PRIORITY_HIGH),
+ mLabel(notification->getName()),
+ mLineEditor(NULL)
+{
+ const LLFontGL* font = LLFontGL::getFontSansSerif();
+ const S32 LINE_HEIGHT = llfloor(font->getLineHeight() + 0.99f);
+ const S32 EDITOR_HEIGHT = 20;
+
+ LLNotificationFormPtr form = mNotification->getForm();
+ std::string edit_text_name;
+ std::string edit_text_contents;
+ bool is_password = false;
+
+ LLToastPanel::setBackgroundVisible(FALSE);
+ LLToastPanel::setBackgroundOpaque(TRUE);
+
+
+ typedef std::vector<std::pair<std::string, std::string> > options_t;
+ options_t supplied_options;
+
+ // for now, get LLSD to iterator over form elements
+ LLSD form_sd = form->asLLSD();
+
+ S32 option_index = 0;
+ for (LLSD::array_const_iterator it = form_sd.beginArray(); it != form_sd.endArray(); ++it)
+ {
+ std::string type = (*it)["type"].asString();
+ if (type == "button")
+ {
+ if((*it)["default"])
+ {
+ mDefaultOption = option_index;
+ }
+
+ supplied_options.push_back(std::make_pair((*it)["name"].asString(), (*it)["text"].asString()));
+
+ ButtonData data;
+ if (option_index == mNotification->getURLOption())
+ {
+ data.mURL = mNotification->getURL();
+ data.mURLExternal = mNotification->getURLOpenExternally();
+ }
+
+ mButtonData.push_back(data);
+ option_index++;
+ }
+ else if (type == "text")
+ {
+ edit_text_contents = (*it)["value"].asString();
+ edit_text_name = (*it)["name"].asString();
+ }
+ else if (type == "password")
+ {
+ edit_text_contents = (*it)["value"].asString();
+ edit_text_name = (*it)["name"].asString();
+ is_password = true;
+ }
+ }
+
+ // Buttons
+ options_t options;
+ if (supplied_options.empty())
+ {
+ options.push_back(std::make_pair(std::string("close"), LLNotifications::instance().getGlobalString("implicitclosebutton")));
+
+ // add data for ok button.
+ ButtonData ok_button;
+ mButtonData.push_back(ok_button);
+ mDefaultOption = 0;
+ }
+ else
+ {
+ options = supplied_options;
+ }
+
+ S32 num_options = options.size();
+
+ // Calc total width of buttons
+ S32 button_width = 0;
+ S32 sp = font->getWidth(std::string("OO"));
+ for( S32 i = 0; i < num_options; i++ )
+ {
+ S32 w = S32(font->getWidth( options[i].second ) + 0.99f) + sp + 2 * LLBUTTON_H_PAD;
+ button_width = llmax( w, button_width );
+ }
+ S32 btn_total_width = button_width;
+ if( num_options > 1 )
+ {
+ btn_total_width = (num_options * button_width) + ((num_options - 1) * BTN_HPAD);
+ }
+
+ // Message: create text box using raw string, as text has been structure deliberately
+ // Use size of created text box to generate dialog box size
+ std::string msg = mNotification->getMessage();
+ llwarns << "Alert: " << msg << llendl;
+ LLTextBox::Params params;
+ params.name("Alert message");
+ params.font(font);
+ params.tab_stop(false);
+ params.follows.flags(FOLLOWS_LEFT | FOLLOWS_TOP);
+
+ LLTextBox * msg_box = LLUICtrlFactory::create<LLTextBox> (params);
+ // Compute max allowable height for the dialog text, so we can allocate
+ // space before wrapping the text to fit.
+ S32 max_allowed_msg_height =
+ gFloaterView->getRect().getHeight()
+ - LINE_HEIGHT // title bar
+ - 3*VPAD - BTN_HEIGHT;
+ msg_box->reshape( MAX_ALLOWED_MSG_WIDTH, max_allowed_msg_height );
+ msg_box->setWrappedText(msg, (F32)MAX_ALLOWED_MSG_WIDTH);
+ msg_box->reshapeToFitText();
+
+ const LLRect& text_rect = msg_box->getRect();
+ S32 dialog_width = llmax( btn_total_width, text_rect.getWidth() ) + 2 * HPAD;
+ S32 dialog_height = text_rect.getHeight() + 3 * VPAD + BTN_HEIGHT;
+
+ if (hasTitleBar())
+ {
+ dialog_height += LINE_HEIGHT; // room for title bar
+ }
+
+ // it's ok for the edit text body to be empty, but we want the name to exist if we're going to draw it
+ if (!edit_text_name.empty())
+ {
+ dialog_height += EDITOR_HEIGHT + VPAD;
+ dialog_width = llmax(dialog_width, (S32)(font->getWidth( edit_text_contents ) + 0.99f));
+ }
+
+ if (mCaution)
+ {
+ // Make room for the caution icon.
+ dialog_width += 32 + HPAD;
+ }
+
+ LLToastPanel::reshape( dialog_width, dialog_height, FALSE );
+
+ S32 msg_y = LLToastPanel::getRect().getHeight() - VPAD;
+ S32 msg_x = HPAD;
+ if (hasTitleBar())
+ {
+ msg_y -= LINE_HEIGHT; // room for title
+ }
+
+ static LLUIColor alert_caution_text_color = LLUIColorTable::instance().getColor("AlertCautionTextColor");
+ static LLUIColor alert_text_color = LLUIColorTable::instance().getColor("AlertTextColor");
+ if (mCaution)
+ {
+ LLIconCtrl::Params params;
+ params.name("icon");
+ params.rect(LLRect(msg_x, msg_y, msg_x+32, msg_y-32));
+ params.mouse_opaque(false);
+ params.follows.flags(FOLLOWS_LEFT | FOLLOWS_TOP);
+ params.tab_stop(false);
+ LLIconCtrl * icon = LLUICtrlFactory::create<LLIconCtrl> (params);
+ icon->setValue ("notify_caution_icon.tga");
+ icon->setMouseOpaque(FALSE);
+ LLToastPanel::addChild(icon);
+ msg_x += 32 + HPAD;
+ msg_box->setColor( alert_caution_text_color );
+ }
+ else
+ {
+ msg_box->setColor( alert_text_color );
+ }
+
+ LLRect rect;
+ rect.setLeftTopAndSize( msg_x, msg_y, text_rect.getWidth(), text_rect.getHeight() );
+ msg_box->setRect( rect );
+ LLToastPanel::addChild(msg_box);
+
+ // Buttons
+ S32 button_left = (LLToastPanel::getRect().getWidth() - btn_total_width) / 2;
+
+ for( S32 i = 0; i < num_options; i++ )
+ {
+ LLRect button_rect;
+ button_rect.setOriginAndSize( button_left, VPAD, button_width, BTN_HEIGHT );
+
+ LLButton::Params p;
+ p.name(options[i].first);
+ p.rect(button_rect);
+ p.click_callback.function(boost::bind(&LLToastAlertPanel::onButtonPressed, this, _2, i));
+ p.font(font);
+ p.label(options[i].second);
+
+ LLButton* btn = LLUICtrlFactory::create<LLButton>(p);
+ mButtonData[i].mButton = btn;
+
+ LLToastPanel::addChild(btn);
+
+ if( i == mDefaultOption )
+ {
+ btn->setFocus(TRUE);
+ }
+
+ button_left += button_width + BTN_HPAD;
+ }
+
+ // (Optional) Edit Box
+ if (!edit_text_name.empty())
+ {
+ S32 y = VPAD + BTN_HEIGHT + VPAD/2;
+
+ LLLineEditor::Params params;
+ params.name(edit_text_name);
+ params.rect(LLRect( HPAD, y+EDITOR_HEIGHT, dialog_width-HPAD, y));
+ params.default_text(edit_text_contents);
+ params.max_length_bytes(STD_STRING_STR_LEN);
+ mLineEditor = LLUICtrlFactory::create<LLLineEditor> (params);
+
+ // make sure all edit keys get handled properly (DEV-22396)
+ mLineEditor->setHandleEditKeysDirectly(TRUE);
+
+ LLToastPanel::addChild(mLineEditor);
+ }
+
+ if (mLineEditor)
+ {
+ mLineEditor->setDrawAsterixes(is_password);
+
+ setEditTextArgs(notification->getSubstitutions());
+ }
+
+ std::string ignore_label;
+
+ if (form->getIgnoreType() == LLNotificationForm::IGNORE_WITH_DEFAULT_RESPONSE)
+ {
+ setCheckBox(LLNotifications::instance().getGlobalString("skipnexttime"), ignore_label);
+ }
+ else if (form->getIgnoreType() == LLNotificationForm::IGNORE_WITH_LAST_RESPONSE)
+ {
+ setCheckBox(LLNotifications::instance().getGlobalString("alwayschoose"), ignore_label);
+ }
+
+ gFloaterView->adjustToFitScreen(this, FALSE);
+ LLFloater::setFocus(TRUE);
+ if (mLineEditor)
+ {
+ mLineEditor->setFocus(TRUE);
+ mLineEditor->selectAll();
+ }
+ if(mDefaultOption >= 0)
+ {
+ // delay before enabling default button
+ mDefaultBtnTimer.start();
+ mDefaultBtnTimer.setTimerExpirySec(DEFAULT_BUTTON_DELAY);
+ }
+}
+
+bool LLToastAlertPanel::setCheckBox( const std::string& check_title, const std::string& check_control )
+{
+ const LLFontGL* font = LLFontGL::getFontSansSerif();
+ const S32 LINE_HEIGHT = llfloor(font->getLineHeight() + 0.99f);
+
+ // Extend dialog for "check next time"
+ S32 max_msg_width = LLToastPanel::getRect().getWidth() - 2 * HPAD;
+ S32 check_width = S32(font->getWidth(check_title) + 0.99f) + 16;
+ max_msg_width = llmax(max_msg_width, check_width);
+ S32 dialog_width = max_msg_width + 2 * HPAD;
+
+ S32 dialog_height = LLToastPanel::getRect().getHeight();
+ dialog_height += LINE_HEIGHT;
+ dialog_height += LINE_HEIGHT / 2;
+
+ LLToastPanel::reshape( dialog_width, dialog_height, FALSE );
+
+ S32 msg_x = (LLToastPanel::getRect().getWidth() - max_msg_width) / 2;
+
+ LLCheckBoxCtrl::Params p;
+ p.name("check");
+ p.rect.left(msg_x).bottom(VPAD+BTN_HEIGHT+LINE_HEIGHT/2).width(max_msg_width).height(LINE_HEIGHT);
+ p.label(check_title);
+ p.font(font);
+ p.commit_callback.function(boost::bind(&LLToastAlertPanel::onClickIgnore, this, _1));
+ mCheck = LLUICtrlFactory::create<LLCheckBoxCtrl>(p);
+ LLToastPanel::addChild(mCheck);
+
+ return true;
+}
+
+void LLToastAlertPanel::setVisible( BOOL visible )
+{
+ LLToastPanel::setVisible( visible );
+
+ if( visible )
+ {
+ make_ui_sound("UISndAlert");
+ }
+}
+
+void LLToastAlertPanel::onClose(bool app_quitting)
+{
+ LLFloater::onClose(app_quitting);
+}
+
+LLToastAlertPanel::~LLToastAlertPanel()
+{
+}
+
+BOOL LLToastAlertPanel::hasTitleBar() const
+{
+ return (getCurrentTitle() != "" && getCurrentTitle() != " ") // has title
+ || isMinimizeable()
+ || isCloseable();
+}
+
+BOOL LLToastAlertPanel::handleKeyHere(KEY key, MASK mask )
+{
+ if( KEY_RETURN == key && mask == MASK_NONE )
+ {
+ return TRUE;
+ }
+ else if (KEY_RIGHT == key)
+ {
+ LLToastPanel::focusNextItem(FALSE);
+ return TRUE;
+ }
+ else if (KEY_LEFT == key)
+ {
+ LLToastPanel::focusPrevItem(FALSE);
+ return TRUE;
+ }
+ else if (KEY_TAB == key && mask == MASK_NONE)
+ {
+ LLToastPanel::focusNextItem(FALSE);
+ return TRUE;
+ }
+ else if (KEY_TAB == key && mask == MASK_SHIFT)
+ {
+ LLToastPanel::focusPrevItem(FALSE);
+ return TRUE;
+ }
+ else
+ {
+ return TRUE;
+ }
+}
+
+// virtual
+void LLToastAlertPanel::draw()
+{
+ // if the default button timer has just expired, activate the default button
+ if(mDefaultBtnTimer.hasExpired() && mDefaultBtnTimer.getStarted())
+ {
+ mDefaultBtnTimer.stop(); // prevent this block from being run more than once
+ LLToastPanel::setDefaultBtn(mButtonData[mDefaultOption].mButton);
+ }
+
+ static LLUIColor shadow_color = LLUIColorTable::instance().getColor("ColorDropShadow");
+ static LLUICachedControl<S32> shadow_lines ("DropShadowFloater");
+
+ gl_drop_shadow( 0, LLToastPanel::getRect().getHeight(), LLToastPanel::getRect().getWidth(), 0,
+ shadow_color, shadow_lines);
+
+ LLToastPanel::draw();
+}
+
+void LLToastAlertPanel::setEditTextArgs(const LLSD& edit_args)
+{
+ if (mLineEditor)
+ {
+ std::string msg = mLineEditor->getText();
+ mLineEditor->setText(msg);
+ }
+ else
+ {
+ llwarns << "LLToastAlertPanel::setEditTextArgs called on dialog with no line editor" << llendl;
+ }
+}
+
+void LLToastAlertPanel::onButtonPressed( const LLSD& data, S32 button )
+{
+ ButtonData* button_data = &mButtonData[button];
+
+ LLSD response = mNotification->getResponseTemplate();
+ if (mLineEditor)
+ {
+ response[mLineEditor->getName()] = mLineEditor->getValue();
+ }
+ response[button_data->mButton->getName()] = true;
+
+ // If we declared a URL and chose the URL option, go to the url
+ if (!button_data->mURL.empty() && sURLLoader != NULL)
+ {
+ sURLLoader->load(button_data->mURL, button_data->mURLExternal);
+ }
+
+ mNotification->respond(response); // new notification reponse
+ closeFloater(); // deletes self
+}
+
+void LLToastAlertPanel::onClickIgnore(LLUICtrl* ctrl)
+{
+ // checkbox sometimes means "hide and do the default" and
+ // other times means "warn me again". Yuck. JC
+ BOOL check = ctrl->getValue().asBoolean();
+ if (mNotification->getForm()->getIgnoreType() == LLNotificationForm::IGNORE_SHOW_AGAIN)
+ {
+ // question was "show again" so invert value to get "ignore"
+ check = !check;
+ }
+ mNotification->setIgnored(check);
+}
diff --git a/indra/newview/lltoastalertpanel.h b/indra/newview/lltoastalertpanel.h
new file mode 100644
index 0000000000..f714630c77
--- /dev/null
+++ b/indra/newview/lltoastalertpanel.h
@@ -0,0 +1,124 @@
+/**
+ * @file lltoastalertpanel.h
+ * @brief Panel for alert toasts.
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ *
+ * Copyright (c) 2001-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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_TOASTALERTPANEL_H
+#define LL_TOASTALERTPANEL_H
+
+#include "lltoastpanel.h"
+#include "llfloater.h"
+#include "llui.h"
+#include "llnotifications.h"
+
+class LLButton;
+class LLCheckBoxCtrl;
+class LLAlertDialogTemplate;
+class LLLineEditor;
+
+/**
+ * Toast panel for alert notification.
+ * Alerts notifications doesn't require user interaction.
+ *
+ * Replaces class LLAlertDialog.
+ * https://wiki.lindenlab.com/mediawiki/index.php?title=LLAlertDialog&oldid=81388
+ */
+
+class LLToastAlertPanel
+ : public LLToastPanel,
+ public LLFloater
+{
+public:
+ typedef bool (*display_callback_t)(S32 modal);
+
+ class URLLoader
+ {
+ public:
+ virtual void load(const std::string& url, bool force_open_externally = 0 ) = 0;
+ virtual ~URLLoader() {}
+ };
+
+ static void setURLLoader(URLLoader* loader)
+ {
+ sURLLoader = loader;
+ }
+
+public:
+ // User's responsibility to call show() after creating these.
+ LLToastAlertPanel( LLNotificationPtr notep, bool is_modal );
+
+ virtual BOOL handleKeyHere(KEY key, MASK mask );
+
+ virtual void draw();
+ virtual void setVisible( BOOL visible );
+ virtual void onClose(bool app_quitting);
+
+ bool setCheckBox( const std::string&, const std::string& );
+ void setCaution(BOOL val = TRUE) { mCaution = val; }
+ // If mUnique==TRUE only one copy of this message should exist
+ void setUnique(BOOL val = TRUE) { mUnique = val; }
+ void setEditTextArgs(const LLSD& edit_args);
+
+ void onClickIgnore(LLUICtrl* ctrl);
+ void onButtonPressed(const LLSD& data, S32 button);
+
+private:
+ static std::map<std::string, LLToastAlertPanel*> sUniqueActiveMap;
+
+ virtual ~LLToastAlertPanel();
+ // No you can't kill it. It can only kill itself.
+
+ // Does it have a readable title label, or minimize or close buttons?
+ BOOL hasTitleBar() const;
+
+private:
+ static URLLoader* sURLLoader;
+ static LLControlGroup* sSettings;
+
+ struct ButtonData
+ {
+ LLButton* mButton;
+ std::string mURL;
+ U32 mURLExternal;
+ };
+ std::vector<ButtonData> mButtonData;
+
+ S32 mDefaultOption;
+ LLCheckBoxCtrl* mCheck;
+ BOOL mCaution;
+ BOOL mUnique;
+ LLUIString mLabel;
+ LLFrameTimer mDefaultBtnTimer;
+ // For Dialogs that take a line as text as input:
+ LLLineEditor* mLineEditor;
+
+};
+
+#endif // LL_TOASTALERTPANEL_H
diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp
new file mode 100644
index 0000000000..f5ed7f8710
--- /dev/null
+++ b/indra/newview/lltoastgroupnotifypanel.cpp
@@ -0,0 +1,206 @@
+/**
+ * @file lltoastgroupnotifypanel.cpp
+ * @brief Panel for group notify toasts.
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ *
+ * Copyright (c) 2001-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h"
+
+#include "lltoastgroupnotifypanel.h"
+
+#include "llfocusmgr.h"
+
+#include "llbutton.h"
+#include "lliconctrl.h"
+#include "llnotify.h"
+#include "lltextbox.h"
+#include "llviewertexteditor.h"
+#include "lluiconstants.h"
+#include "llui.h"
+#include "llviewercontrol.h"
+#include "llfloatergroupinfo.h"
+#include "lltrans.h"
+#include "llinitparam.h"
+
+#include "llglheaders.h"
+#include "llagent.h"
+#include "llavatariconctrl.h"
+#include "llfloaterinventory.h"
+#include "llinventorytype.h"
+
+LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(LLNotificationPtr& notification)
+: LLToastPanel(notification),
+ mInventoryOffer(NULL)
+{
+ LLUICtrlFactory::getInstance()->buildPanel(this, "panel_group_notify.xml");
+ const LLSD& payload = notification->getPayload();
+ LLGroupData groupData;
+ if (!gAgent.getGroupData(payload["group_id"].asUUID(),groupData))
+ {
+ llwarns << "Group notice for unkown group: " << payload["group_id"].asUUID() << llendl;
+ }
+
+ static const LLUIColor textColor = LLUIColorTable::instance().getColor("GroupNotifyTextColor");
+
+ //group icon
+ LLIconCtrl* pGroupIcon = getChild<LLIconCtrl>("group_icon", TRUE);
+ pGroupIcon->setValue(groupData.mInsigniaID);
+
+ //header title
+ const std::string& from_name = payload["sender_name"].asString();
+ std::stringstream from;
+ from << from_name << "/" << groupData.mName;
+ LLTextBox* pTitleText = this->getChild<LLTextBox>("title", TRUE, FALSE);
+ pTitleText->setValue(from.str());
+
+ //message body
+ const std::string& subject = payload["subject"].asString();
+ const std::string& message = payload["message"].asString();
+
+ LLTextEditor* pMessageText = getChild< LLTextEditor>("message", TRUE, FALSE);
+ pMessageText->setValue("");
+ pMessageText->setEnabled(FALSE);
+ pMessageText->setTakesFocus(FALSE);
+
+ static const LLStyleSP headerstyle(new LLStyle(true, textColor,
+ "SansSerifBig"));
+ static const LLStyleSP datestyle(new LLStyle(true, textColor, "serif"));
+
+ pMessageText->appendStyledText(subject + "\n",false,false,headerstyle);
+
+ std::string timeStr = "["+LLTrans::getString("UTCTimeWeek")+"],["
+ +LLTrans::getString("UTCTimeDay")+"] ["
+ +LLTrans::getString("UTCTimeMth")+"] ["
+ +LLTrans::getString("UTCTimeYr")+"] ["
+ +LLTrans::getString("UTCTimeHr")+"]:["
+ +LLTrans::getString("UTCTimeMin")+"]:["
+ +LLTrans::getString("UTCTimeSec")+"] ["
+ +LLTrans::getString("UTCTimeTimezone")+"]";
+ const LLDate timeStamp = notification->getDate();
+ LLDate notice_date = timeStamp.notNull() ? timeStamp : LLDate::now();
+ LLSD substitution;
+ substitution["datetime"] = (S32) notice_date.secondsSinceEpoch();
+ LLStringUtil::format(timeStr, substitution);
+ pMessageText->appendStyledText(timeStr, false, false, datestyle);
+ pMessageText->appendColoredText(std::string("\n\n") + message, false,
+ false, textColor);
+
+ //attachment
+ BOOL hasInventory = payload["inventory_offer"].isDefined();
+ LLTextBox * pAttachLink = getChild<LLTextBox>("attachment", TRUE, FALSE);
+ pAttachLink->setVisible(hasInventory);
+ if (hasInventory) {
+ pAttachLink->setValue(payload["inventory_name"]);
+ mInventoryOffer = new LLOfferInfo(payload["inventory_offer"]);
+ childSetActionTextbox("attachment", boost::bind(
+ &LLToastGroupNotifyPanel::onClickAttachment, this));
+
+ //attachment icon
+ LLIconCtrl* pAttachIcon = getChild<LLIconCtrl>("attachment_icon", TRUE);
+ LLUIImagePtr attachIconImg = get_item_icon(mInventoryOffer->mType,
+ LLInventoryType::IT_TEXTURE,
+ 0, FALSE);
+ pAttachIcon->setValue(attachIconImg->getName());
+ }
+
+ //ok button
+ LLButton* pOkBtn = getChild<LLButton>("btn_ok", TRUE, FALSE);
+ pOkBtn->setClickedCallback((boost::bind(&LLToastGroupNotifyPanel::onClickOk, this)));
+ setDefaultBtn(pOkBtn);
+}
+
+
+// virtual
+LLToastGroupNotifyPanel::~LLToastGroupNotifyPanel()
+{
+}
+
+void LLToastGroupNotifyPanel::close()
+{
+ // The group notice dialog may be an inventory offer.
+ // If it has an inventory save button and that button is still enabled
+ // Then we need to send the inventory declined message
+ if(mInventoryOffer != NULL)
+ {
+ mInventoryOffer->forceResponse(IOR_DECLINE);
+ mInventoryOffer = NULL;
+ }
+
+ die();
+}
+
+void LLToastGroupNotifyPanel::onClickOk()
+{
+ LLSD response = mNotification->getResponseTemplate();
+ mNotification->respond(response);
+ close();
+}
+
+void LLToastGroupNotifyPanel::onClickAttachment()
+{
+ if (mInventoryOffer != NULL) {
+ mInventoryOffer->forceResponse(IOR_ACCEPT);
+
+ LLTextBox * pAttachLink = getChild<LLTextBox> ("attachment", TRUE,
+ FALSE);
+ static const LLUIColor textColor = LLUIColorTable::instance().getColor(
+ "GroupNotifyDimmedTextColor");
+ pAttachLink->setColor(textColor);
+
+ LLIconCtrl* pAttachIcon =
+ getChild<LLIconCtrl> ("attachment_icon", TRUE);
+ pAttachIcon->setEnabled(FALSE);
+
+ //if attachment isn't openable - notify about saving
+ if (!isAttachmentOpenable(mInventoryOffer->mType)) {
+ LLNotifications::instance().add("AttachmentSaved");
+ }
+
+ mInventoryOffer = NULL;
+ }
+}
+
+//static
+bool LLToastGroupNotifyPanel::isAttachmentOpenable(LLAssetType::EType type)
+{
+ switch(type)
+ {
+ case LLAssetType::AT_LANDMARK:
+ case LLAssetType::AT_FAVORITE:
+ case LLAssetType::AT_NOTECARD:
+ case LLAssetType::AT_IMAGE_JPEG:
+ case LLAssetType::AT_IMAGE_TGA:
+ case LLAssetType::AT_TEXTURE:
+ case LLAssetType::AT_TEXTURE_TGA:
+ return true;
+ default:
+ return false;
+ }
+}
+
diff --git a/indra/newview/lltoastgroupnotifypanel.h b/indra/newview/lltoastgroupnotifypanel.h
new file mode 100644
index 0000000000..ba98531251
--- /dev/null
+++ b/indra/newview/lltoastgroupnotifypanel.h
@@ -0,0 +1,83 @@
+/**
+ * @file lltoastgroupnotifypanel.h
+ * @brief Panel for group notify toasts.
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ *
+ * Copyright (c) 2001-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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_LLGROUPNOTIFY_H
+#define LL_LLGROUPNOTIFY_H
+
+#include "llfontgl.h"
+#include "lltoastpanel.h"
+#include "lldarray.h"
+#include "lltimer.h"
+#include "llviewermessage.h"
+#include "llnotifications.h"
+
+class LLButton;
+
+/**
+ * Toast panel for group notification.
+ *
+ * Replaces class LLGroupNotifyBox.
+ */
+class LLToastGroupNotifyPanel
+: public LLToastPanel
+{
+public:
+ void close();
+
+ static bool onNewNotification(const LLSD& notification);
+
+
+ // Non-transient messages. You can specify non-default button
+ // layouts (like one for script dialogs) by passing various
+ // numbers in for "layout".
+ LLToastGroupNotifyPanel(LLNotificationPtr& notification);
+
+ /*virtual*/ ~LLToastGroupNotifyPanel();
+protected:
+ void onClickOk();
+ void onClickAttachment();
+private:
+ static bool isAttachmentOpenable(LLAssetType::EType);
+
+ LLButton* mSaveInventoryBtn;
+
+ LLUUID mGroupID;
+ LLOfferInfo* mInventoryOffer;
+};
+
+// This view contains the stack of notification windows.
+//extern LLView* gGroupNotifyBoxView;
+
+const S32 GROUP_LAYOUT_DEFAULT = 0;
+const S32 GROUP_LAYOUT_SCRIPT_DIALOG = 1;
+
+#endif
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp
new file mode 100644
index 0000000000..a7b57802c1
--- /dev/null
+++ b/indra/newview/lltoastnotifypanel.cpp
@@ -0,0 +1,435 @@
+/**
+ * @file lltoastnotifypanel.cpp
+ * @brief Panel for notify toasts.
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ *
+ * Copyright (c) 2001-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h"
+
+#include "lltoastnotifypanel.h"
+#include "llviewercontrol.h"
+#include "lluiconstants.h"
+#include "llrect.h"
+#include "lliconctrl.h"
+#include "lltexteditor.h"
+#include "lltextbox.h"
+#include "lldbstrings.h"
+#include "llchat.h"
+#include "llfloaterchat.h"
+#include "lltrans.h"
+#include "lloverlaybar.h"
+
+
+const S32 BOTTOM_PAD = VPAD * 3;
+
+//static
+const LLFontGL* LLToastNotifyPanel::sFont = NULL;
+const LLFontGL* LLToastNotifyPanel::sFontSmall = NULL;
+
+LLToastNotifyPanel::LLToastNotifyPanel(LLNotificationPtr& notification) : LLToastPanel(notification) {
+ mIsTip = notification->getType() == "notifytip";
+ mNumOptions = 0;
+ mNumButtons = 0;
+ mIsScriptDialog = (notification->getName() == "ScriptDialog"
+ || notification->getName() == "ScriptDialogGroup");
+ mAddedDefaultBtn = false;
+
+ // clicking on a button does not steal current focus
+ setIsChrome(TRUE);
+
+ // class init
+ if (!sFont)
+ {
+ sFont = LLFontGL::getFontSansSerif();
+ sFontSmall = LLFontGL::getFontSansSerifSmall();
+ }
+
+ // setup paramaters
+ mMessage = notification->getMessage();
+
+ // initialize
+ setFocusRoot(!mIsTip);
+
+ // caution flag can be set explicitly by specifying it in the
+ // notification payload, or it can be set implicitly if the
+ // notify xml template specifies that it is a caution
+ //
+ // tip-style notification handle 'caution' differently -
+ // they display the tip in a different color
+ mIsCaution = notification->getPriority() >= NOTIFICATION_PRIORITY_HIGH;
+
+ LLNotificationFormPtr form(notification->getForm());
+
+ mNumOptions = form->getNumElements();
+
+ LLRect rect = mIsTip ? getNotifyTipRect(mMessage)
+ : getNotifyRect(mNumOptions, mIsScriptDialog, mIsCaution);
+ setRect(rect);
+ setFollows(mIsTip ? (FOLLOWS_BOTTOM|FOLLOWS_RIGHT) : (FOLLOWS_TOP|FOLLOWS_RIGHT));
+ setBackgroundVisible(FALSE);
+ setBackgroundOpaque(TRUE);
+
+ LLIconCtrl* icon;
+ LLTextEditor* text;
+
+ const S32 TOP = getRect().getHeight() - (mIsTip ? (S32)sFont->getLineHeight() : 32);
+ const S32 BOTTOM = (S32)sFont->getLineHeight();
+ S32 x = HPAD + HPAD;
+ S32 y = TOP;
+
+ LLIconCtrl::Params common_params;
+ common_params.rect(LLRect(x, y, x+32, TOP-32));
+ common_params.mouse_opaque(false);
+ common_params.follows.flags(FOLLOWS_LEFT | FOLLOWS_TOP);
+ common_params.tab_stop(false);
+
+ if (mIsTip)
+ {
+ // use the tip notification icon
+ common_params.image(LLUI::getUIImage("notify_tip_icon.tga"));
+ icon = LLUICtrlFactory::create<LLIconCtrl> (common_params);
+ }
+ else if (mIsCaution)
+ {
+ // use the caution notification icon
+ common_params.image(LLUI::getUIImage("notify_caution_icon.tga"));
+ icon = LLUICtrlFactory::create<LLIconCtrl> (common_params);
+ }
+ else
+ {
+ // use the default notification icon
+ common_params.image(LLUI::getUIImage("notify_box_icon.tga"));
+ icon = LLUICtrlFactory::create<LLIconCtrl> (common_params);
+ }
+
+ icon->setMouseOpaque(FALSE);
+ addChild(icon);
+
+ x += HPAD + HPAD + 32;
+
+ // add a caution textbox at the top of a caution notification
+ LLTextBox* caution_box = NULL;
+ if (mIsCaution && !mIsTip)
+ {
+ S32 caution_height = ((S32)sFont->getLineHeight() * 2) + VPAD;
+ LLTextBox::Params params;
+ params.name("caution_box");
+ params.rect(LLRect(x, y, getRect().getWidth() - 2, caution_height));
+ params.font(sFont);
+ params.mouse_opaque(false);
+ params.font.style("BOLD");
+ params.text_color(LLUIColorTable::instance().getColor("NotifyCautionWarnColor"));
+ params.background_color(LLUIColorTable::instance().getColor("NotifyCautionBoxColor"));
+ params.border_visible(false);
+ caution_box = LLUICtrlFactory::create<LLTextBox> (params);
+ caution_box->setWrappedText(notification->getMessage());
+
+ addChild(caution_box);
+
+ // adjust the vertical position of the next control so that
+ // it appears below the caution textbox
+ y = y - caution_height;
+ }
+ else
+ {
+
+ const S32 BTN_TOP = BOTTOM_PAD + (((mNumOptions-1+2)/3)) * (BTN_HEIGHT+VPAD);
+
+ // Tokenization on \n is handled by LLTextBox
+
+ const S32 MAX_LENGTH = 512 + 20 +
+ DB_FIRST_NAME_BUF_SIZE +
+ DB_LAST_NAME_BUF_SIZE +
+ DB_INV_ITEM_NAME_BUF_SIZE; // For script dialogs: add space for title.
+
+ LLTextEditor::Params params;
+ params.name("box");
+ params.rect(LLRect(x, y, getRect().getWidth()-2, mIsTip ? BOTTOM : BTN_TOP+16));
+ params.max_text_length(MAX_LENGTH);
+ params.default_text(mMessage);
+ params.font(sFont);
+ params.embedded_items(false);
+ params.word_wrap(true);
+ params.tab_stop(false);
+ params.mouse_opaque(false);
+ params.bg_readonly_color(LLColor4::transparent);
+ params.text_readonly_color(LLUIColorTable::instance().getColor("NotifyTextColor"));
+ params.takes_non_scroll_clicks(false);
+ params.hide_scrollbar(true);
+ params.enabled(false);
+ params.hide_border(true);
+ text = LLUICtrlFactory::create<LLTextEditor> (params);
+ addChild(text);
+ }
+
+ if (mIsTip)
+ {
+ // TODO: Make a separate archive for these.
+ LLChat chat(mMessage);
+ chat.mSourceType = CHAT_SOURCE_SYSTEM;
+ LLFloaterChat::addChatHistory(chat);
+ }
+ else
+ {
+ LLButton::Params p;
+ p.name(std::string("next"));
+ p.rect(LLRect(getRect().getWidth()-26, BOTTOM_PAD + 20, getRect().getWidth()-2, BOTTOM_PAD));
+ p.image_selected.name("notify_next.png");
+ p.image_unselected.name("notify_next.png");
+ p.font(sFont);
+ p.scale_image(true);
+ p.tool_tip(LLTrans::getString("next").c_str());
+
+ for (S32 i = 0; i < mNumOptions; i++)
+ {
+
+ LLSD form_element = form->getElement(i);
+ if (form_element["type"].asString() != "button")
+ {
+ continue;
+ }
+
+ addButton(form_element["name"].asString(), form_element["text"].asString(), TRUE, form_element["default"].asBoolean());
+ }
+
+ if (mNumButtons == 0)
+ {
+ addButton("OK", LLTrans::getString("ok"), FALSE, TRUE);
+ mAddedDefaultBtn = true;
+ }
+
+
+ }
+}
+
+LLToastNotifyPanel::~LLToastNotifyPanel() {
+ std::for_each(mBtnCallbackData.begin(), mBtnCallbackData.end(), DeletePointer());
+}
+
+
+LLRect LLToastNotifyPanel::getNotifyRect(S32 num_options, BOOL mIsScriptDialog, BOOL is_caution)
+{
+ S32 notify_height = gSavedSettings.getS32("NotifyBoxHeight");
+ if (is_caution)
+ {
+ // make caution-style dialog taller to accomodate extra text,
+ // as well as causing the accept/decline buttons to be drawn
+ // in a different position, to help prevent "quick-click-through"
+ // of many permissions prompts
+ notify_height = gSavedSettings.getS32("PermissionsCautionNotifyBoxHeight");
+ }
+ const S32 NOTIFY_WIDTH = gSavedSettings.getS32("NotifyBoxWidth");
+
+ const S32 TOP = getRect().getHeight();
+ const S32 RIGHT =getRect().getWidth();
+ const S32 LEFT = RIGHT - NOTIFY_WIDTH;
+
+ if (num_options < 1)
+ {
+ num_options = 1;
+ }
+
+ // Add two "blank" option spaces.
+ if (mIsScriptDialog)
+ {
+ num_options += 2;
+ }
+
+ S32 additional_lines = (num_options-1) / 3;
+
+ notify_height += additional_lines * (BTN_HEIGHT + VPAD);
+
+ return LLRect(LEFT, TOP, RIGHT, TOP-notify_height);
+}
+
+// static
+LLRect LLToastNotifyPanel::getNotifyTipRect(const std::string &utf8message)
+{
+ S32 line_count = 1;
+ LLWString message = utf8str_to_wstring(utf8message);
+ S32 message_len = message.length();
+
+ const S32 NOTIFY_WIDTH = gSavedSettings.getS32("NotifyBoxWidth");
+ // Make room for the icon area.
+ const S32 text_area_width = NOTIFY_WIDTH - HPAD * 4 - 32;
+
+ const llwchar* wchars = message.c_str();
+ const llwchar* start = wchars;
+ const llwchar* end;
+ S32 total_drawn = 0;
+ BOOL done = FALSE;
+
+ do
+ {
+ line_count++;
+
+ for (end=start; *end != 0 && *end != '\n'; end++)
+ ;
+
+ if( *end == 0 )
+ {
+ end = wchars + message_len;
+ done = TRUE;
+ }
+
+ S32 remaining = end - start;
+ while( remaining )
+ {
+ S32 drawn = sFont->maxDrawableChars( start, (F32)text_area_width, remaining, TRUE );
+
+ if( 0 == drawn )
+ {
+ drawn = 1; // Draw at least one character, even if it doesn't all fit. (avoids an infinite loop)
+ }
+
+ total_drawn += drawn;
+ start += drawn;
+ remaining -= drawn;
+
+ if( total_drawn < message_len )
+ {
+ if( (wchars[ total_drawn ] != '\n') )
+ {
+ // wrap because line was too long
+ line_count++;
+ }
+ }
+ else
+ {
+ done = TRUE;
+ }
+ }
+
+ total_drawn++; // for '\n'
+ end++;
+ start = end;
+ } while( !done );
+
+ const S32 MIN_NOTIFY_HEIGHT = 72;
+ const S32 MAX_NOTIFY_HEIGHT = 600;
+ S32 notify_height = llceil((F32) (line_count+1) * sFont->getLineHeight());
+ if(gOverlayBar)
+ {
+ notify_height += gOverlayBar->getBoundingRect().mTop;
+ }
+ else
+ {
+ // *FIX: this is derived from the padding caused by the
+ // rounded rects, shouldn't be a const here.
+ notify_height += 10;
+ }
+ notify_height += VPAD;
+ notify_height = llclamp(notify_height, MIN_NOTIFY_HEIGHT, MAX_NOTIFY_HEIGHT);
+
+ const S32 RIGHT = getRect().getWidth();
+ const S32 LEFT = RIGHT - NOTIFY_WIDTH;
+
+ return LLRect(LEFT, notify_height, RIGHT, 0);
+}
+
+
+// static
+void LLToastNotifyPanel::onClickButton(void* data)
+{
+ InstanceAndS32* self_and_button = (InstanceAndS32*)data;
+ LLToastNotifyPanel* self = self_and_button->mSelf;
+ std::string button_name = self_and_button->mButtonName;
+
+ LLSD response = self->mNotification->getResponseTemplate();
+ if (!self->mAddedDefaultBtn && !button_name.empty())
+ {
+ response[button_name] = true;
+ }
+ self->mNotification->respond(response);
+}
+
+// virtual
+LLButton* LLToastNotifyPanel::addButton(const std::string& name, const std::string& label, BOOL is_option, BOOL is_default)
+{
+ // make caution notification buttons slightly narrower
+ // so that 3 of them can fit without overlapping the "next" button
+ S32 btn_width = mIsCaution? 84 : 90;
+
+ LLRect btn_rect;
+ LLButton* btn;
+ S32 btn_height= BTN_HEIGHT;
+ const LLFontGL* font = sFont;
+ S32 ignore_pad = 0;
+ S32 button_index = mNumButtons;
+ S32 index = button_index;
+ S32 x = (HPAD * 4) + 32;
+
+ if (mIsScriptDialog)
+ {
+ // Add two "blank" option spaces, before the "Ignore" button
+ index = button_index + 2;
+ if (button_index == 0)
+ {
+ // Ignore button is smaller, less wide
+ btn_height = BTN_HEIGHT_SMALL;
+ font = sFontSmall;
+ ignore_pad = 10;
+ }
+ }
+
+ btn_rect.setOriginAndSize(x + (index % 3) * (btn_width+HPAD+HPAD) + ignore_pad,
+ BOTTOM_PAD + (index / 3) * (BTN_HEIGHT+VPAD),
+ btn_width - 2*ignore_pad,
+ btn_height);
+
+ InstanceAndS32* userdata = new InstanceAndS32;
+ userdata->mSelf = this;
+ userdata->mButtonName = is_option ? name : "";
+
+ mBtnCallbackData.push_back(userdata);
+
+ LLButton::Params p;
+ p.name(name);
+ p.label(label);
+ p.rect(btn_rect);
+ p.click_callback.function(boost::bind(&LLToastNotifyPanel::onClickButton, userdata));
+ p.font(font);
+ if (mIsCaution)
+ {
+ p.image_color(LLUIColorTable::instance().getColor("ButtonCautionImageColor"));
+ p.image_color_disabled(LLUIColorTable::instance().getColor("ButtonCautionImageColor"));
+ }
+ btn = LLUICtrlFactory::create<LLButton>(p);
+
+
+ addChild(btn, -1);
+
+ if (is_default)
+ {
+ setDefaultBtn(btn);
+ }
+
+ mNumButtons++;
+ return btn;
+}
diff --git a/indra/newview/lltoastnotifypanel.h b/indra/newview/lltoastnotifypanel.h
new file mode 100644
index 0000000000..df58c06f25
--- /dev/null
+++ b/indra/newview/lltoastnotifypanel.h
@@ -0,0 +1,86 @@
+/**
+ * @file lltoastnotifypanel.h
+ * @brief Panel for notify toasts.
+ *
+ * $LicenseInfo:firstyear=2001&license=viewergpl$
+ *
+ * Copyright (c) 2001-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 LLTOASTNOTIFYPANEL_H_
+#define LLTOASTNOTIFYPANEL_H_
+
+#include "llpanel.h"
+#include "llfontgl.h"
+#include "llnotifications.h"
+#include "llbutton.h"
+#include "lltoastpanel.h"
+
+
+/**
+ * Toast panel for notification.
+ * Notification panel should be used for notifications that require a response from the user.
+ *
+ * Replaces class LLNotifyBox.
+ */
+class LLToastNotifyPanel: public LLToastPanel {
+public:
+ LLToastNotifyPanel(LLNotificationPtr&);
+ virtual ~LLToastNotifyPanel();
+ bool isTip() {return mIsTip;}
+ static LLToastNotifyPanel * buildNotifyPanel(LLNotificationPtr notification);
+
+protected:
+ LLButton* addButton(std::string const &name, const std::string& label, BOOL is_option, BOOL is_default);
+ // Used for callbacks
+ struct InstanceAndS32
+ {
+ LLToastNotifyPanel* mSelf;
+ std::string mButtonName;
+ };
+ std::vector<InstanceAndS32*> mBtnCallbackData;
+
+private:
+
+ // Returns the rect, relative to gNotifyView, where this
+ // notify box should be placed.
+ LLRect getNotifyRect(S32 num_options, BOOL layout_script_dialog, BOOL is_caution);
+ LLRect getNotifyTipRect(const std::string &message);
+ // internal handler for button being clicked
+ static void onClickButton(void* data);
+ bool mIsTip;
+ bool mAddedDefaultBtn;
+ bool mIsScriptDialog;
+ bool mIsCaution; // is this a caution notification?
+ std::string mMessage;
+ S32 mNumOptions;
+ S32 mNumButtons;
+
+ static const LLFontGL* sFont;
+ static const LLFontGL* sFontSmall;
+};
+
+#endif /* LLTOASTNOTIFYPANEL_H_ */
diff --git a/indra/newview/lltoastpanel.cpp b/indra/newview/lltoastpanel.cpp
new file mode 100644
index 0000000000..79a7d45bbf
--- /dev/null
+++ b/indra/newview/lltoastpanel.cpp
@@ -0,0 +1,42 @@
+/**
+ * @file lltoastpanel.cpp
+ * @brief Creates a panel of a specific kind for a toast
+ *
+ * $LicenseInfo:firstyear=2000&license=viewergpl$
+ *
+ * Copyright (c) 2000-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h"
+
+#include "lltoastpanel.h"
+
+LLToastPanel::LLToastPanel(LLNotificationPtr& notification) {
+ mNotification = notification;
+}
+
+LLToastPanel::~LLToastPanel() {
+}
diff --git a/indra/newview/lltoastpanel.h b/indra/newview/lltoastpanel.h
new file mode 100644
index 0000000000..82e2a74672
--- /dev/null
+++ b/indra/newview/lltoastpanel.h
@@ -0,0 +1,53 @@
+/**
+ * @file lltoastpanel.h
+ * @brief Creates a panel of a specific kind for a toast.
+ *
+ * $LicenseInfo:firstyear=2003&license=viewergpl$
+ *
+ * Copyright (c) 2003-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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_LLTOASTPANEL_H
+#define LL_LLTOASTPANEL_H
+
+#include "llpanel.h"
+#include "llnotifications.h"
+
+/**
+ * Base class for all panels that can be added to the toast.
+ * All toast panels should contain necessary logic for representing certain notification
+ * but shouldn't contain logic related to this panel lifetime control and positioning
+ * on the parent view.
+ */
+class LLToastPanel: public LLPanel {
+public:
+ LLToastPanel(LLNotificationPtr&);
+ virtual ~LLToastPanel() = 0;
+protected:
+ LLNotificationPtr mNotification;
+};
+
+#endif /* LL_TOASTPANEL_H */
diff --git a/indra/newview/lltoolbar.cpp b/indra/newview/lltoolbar.cpp
index d27958c2ac..477e452907 100644
--- a/indra/newview/lltoolbar.cpp
+++ b/indra/newview/lltoolbar.cpp
@@ -52,7 +52,7 @@
#include "lluiconstants.h"
#include "llvoavatarself.h"
#include "lltooldraganddrop.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
#include "llfloaterchatterbox.h"
#include "llfloaterfriends.h"
#include "llfloatersnapshot.h"
@@ -157,7 +157,7 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
LLButton* inventory_btn = getChild<LLButton>("inventory_btn");
if (!inventory_btn) return FALSE;
- LLInventoryView* active_inventory = LLInventoryView::getActiveInventory();
+ LLFloaterInventory* active_inventory = LLFloaterInventory::getActiveInventory();
LLRect button_screen_rect;
inventory_btn->localRectToScreen(inventory_btn->getRect(),&button_screen_rect);
@@ -173,7 +173,7 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
if (!(active_inventory && active_inventory->getVisible()) &&
mInventoryAutoOpenTimer.getElapsedTimeF32() > sInventoryAutoOpenTime)
{
- LLInventoryView::showAgentInventory();
+ LLFloaterInventory::showAgentInventory();
}
}
else
@@ -332,8 +332,11 @@ void LLToolBar::updateCommunicateList()
communicate_button->addSeparator(ADD_TOP);
communicate_button->add(getString("Redock Windows"), LLSD("redock"), ADD_TOP);
communicate_button->addSeparator(ADD_TOP);
- communicate_button->add(LLFloaterReg::getTypedInstance<LLFloaterMute>("mute")->getShortTitle(), LLSD("mute list"), ADD_TOP);
-
+ LLFloaterMute* mute_instance = LLFloaterReg::getTypedInstance<LLFloaterMute>("mute");
+ if(mute_instance)
+ {
+ communicate_button->add(mute_instance->getShortTitle(), LLSD("mute list"), ADD_TOP);
+ }
std::set<LLHandle<LLFloater> >::const_iterator floater_handle_it;
if (gIMMgr->getIMFloaterHandles().size() > 0)
@@ -385,25 +388,29 @@ void LLToolBar::onClickCommunicate(LLUICtrl* ctrl, const LLSD& user_data)
}
else if (selected_option.asString() == "redock")
{
- LLFloaterChatterBox::getInstance()->addFloater(LLFloaterMyFriends::getInstance(), FALSE);
- LLFloaterChatterBox::getInstance()->addFloater(LLFloaterChat::getInstance(), FALSE);
- LLUUID session_to_show;
-
- std::set<LLHandle<LLFloater> >::const_iterator floater_handle_it;
- for(floater_handle_it = gIMMgr->getIMFloaterHandles().begin(); floater_handle_it != gIMMgr->getIMFloaterHandles().end(); ++floater_handle_it)
+ LLFloaterChatterBox* chatterbox_instance = LLFloaterChatterBox::getInstance();
+ if(chatterbox_instance)
{
- LLFloater* im_floaterp = floater_handle_it->get();
- if (im_floaterp)
+ chatterbox_instance->addFloater(LLFloaterMyFriends::getInstance(), FALSE);
+ chatterbox_instance->addFloater(LLFloaterChat::getInstance(), FALSE);
+
+ LLUUID session_to_show;
+
+ std::set<LLHandle<LLFloater> >::const_iterator floater_handle_it;
+ for(floater_handle_it = gIMMgr->getIMFloaterHandles().begin(); floater_handle_it != gIMMgr->getIMFloaterHandles().end(); ++floater_handle_it)
{
- if (im_floaterp->isFrontmost())
+ LLFloater* im_floaterp = floater_handle_it->get();
+ if (im_floaterp)
{
- session_to_show = ((LLFloaterIMPanel*)im_floaterp)->getSessionID();
+ if (im_floaterp->isFrontmost())
+ {
+ session_to_show = ((LLFloaterIMPanel*)im_floaterp)->getSessionID();
+ }
+ chatterbox_instance->addFloater(im_floaterp, FALSE);
}
- LLFloaterChatterBox::getInstance()->addFloater(im_floaterp, FALSE);
}
+ LLFloaterReg::showInstance("communicate", session_to_show);
}
-
- LLFloaterReg::showInstance("communicate", session_to_show);
}
else if (selected_option.asString() == "mute list")
{
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 0c0253a76a..72812d0bb9 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -51,7 +51,7 @@
#include "llhudmanager.h"
#include "llinventorybridge.h"
#include "llinventorymodel.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
#include "llmutelist.h"
#include "llnotify.h"
#include "llpreviewnotecard.h"
@@ -59,7 +59,7 @@
#include "lltoolmgr.h"
#include "lltrans.h"
#include "llui.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerinventory.h"
#include "llviewerobject.h"
#include "llviewerobjectlist.h"
@@ -387,8 +387,8 @@ LLToolDragAndDrop::dragOrDrop3dImpl LLToolDragAndDrop::sDragAndDrop3d[DAD_COUNT]
{
&LLToolDragAndDrop::dad3dNULL, // Dest: DT_NONE
&LLToolDragAndDrop::dad3dNULL, // Dest: DT_SELF
- &LLToolDragAndDrop::dad3dNULL, // Dest: DT_AVATAR
- &LLToolDragAndDrop::dad3dNULL, // Dest: DT_OBJECT
+ &LLToolDragAndDrop::dad3dGiveInventory, // Dest: DT_AVATAR
+ &LLToolDragAndDrop::dad3dUpdateInventory, // Dest: DT_OBJECT
&LLToolDragAndDrop::dad3dNULL, // Dest: DT_LAND
},
// Source: DAD_LANDMARK
@@ -473,6 +473,14 @@ LLToolDragAndDrop::dragOrDrop3dImpl LLToolDragAndDrop::sDragAndDrop3d[DAD_COUNT]
&LLToolDragAndDrop::dad3dUpdateInventory, // Dest: DT_OBJECT
&LLToolDragAndDrop::dad3dNULL,//dad3dAssetOnLand, // Dest: DT_LAND
},
+ // Source: DAD_LINK
+ {
+ &LLToolDragAndDrop::dad3dNULL, // Dest: DT_NONE
+ &LLToolDragAndDrop::dad3dNULL, // Dest: DT_SELF
+ &LLToolDragAndDrop::dad3dNULL, // Dest: DT_AVATAR
+ &LLToolDragAndDrop::dad3dNULL, // Dest: DT_OBJECT
+ &LLToolDragAndDrop::dad3dNULL,//dad3dAssetOnLand, // Dest: DT_LAND
+ },
};
LLToolDragAndDrop::LLToolDragAndDrop()
@@ -1146,7 +1154,7 @@ void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj,
{
return;
}
- LLViewerImage* image = gImageList.getImage(asset_id);
+ LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(asset_id);
LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT );
S32 num_faces = hit_obj->getNumTEs();
for( S32 face = 0; face < num_faces; face++ )
@@ -1164,7 +1172,7 @@ void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj,
void LLToolDragAndDrop::dropTextureOneFaceAvatar(LLVOAvatar* avatar, S32 hit_face, LLInventoryItem* item)
{
if (hit_face == -1) return;
- LLViewerImage* image = gImageList.getImage(item->getAssetUUID());
+ LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(item->getAssetUUID());
avatar->userSetOptionalTE( hit_face, image);
}
@@ -1189,7 +1197,7 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj,
return;
}
// update viewer side image in anticipation of update from simulator
- LLViewerImage* image = gImageList.getImage(asset_id);
+ LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(asset_id);
LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT );
hit_obj->setTEImage(hit_face, image);
dialog_refresh_all();
@@ -1598,6 +1606,8 @@ void LLToolDragAndDrop::commitGiveInventoryItem(const LLUUID& to_agent,
gIMMgr->addSystemMessage(im_session_id, "inventory_item_offered", args);
}
+ // add buddy to recent people list
+ LLRecentPeople::instance().add(to_agent);
}
void LLToolDragAndDrop::giveInventoryCategory(const LLUUID& to_agent,
@@ -1722,6 +1732,9 @@ void LLToolDragAndDrop::commitGiveInventoryCategory(const LLUUID& to_agent,
llinfos << "LLToolDragAndDrop::commitGiveInventoryCategory() - "
<< cat->getUUID() << llendl;
+ // add buddy to recent people list
+ LLRecentPeople::instance().add(to_agent);
+
// Test out how many items are being given.
LLViewerInventoryCategory::cat_array_t cats;
LLViewerInventoryItem::item_array_t items;
@@ -1840,9 +1853,6 @@ BOOL LLToolDragAndDrop::isInventoryGiveAcceptable(LLInventoryItem* item)
BOOL acceptable = TRUE;
switch(item->getType())
{
- case LLAssetType::AT_CALLINGCARD:
- acceptable = FALSE;
- break;
case LLAssetType::AT_OBJECT:
if(my_avatar->isWearingAttachment(item->getUUID()))
{
@@ -1890,11 +1900,8 @@ BOOL LLToolDragAndDrop::isInventoryGroupGiveAcceptable(LLInventoryItem* item)
BOOL acceptable = TRUE;
switch(item->getType())
{
- case LLAssetType::AT_CALLINGCARD:
- acceptable = FALSE;
- break;
case LLAssetType::AT_OBJECT:
- if(my_avatar->isWearingAttachment(item->getUUID()))
+ if(my_avatar->isWearingAttachment(item->getUUID(), TRUE))
{
acceptable = FALSE;
}
@@ -1995,6 +2002,7 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_
case DAD_BODYPART:
case DAD_ANIMATION:
case DAD_GESTURE:
+ case DAD_CALLINGCARD:
{
LLViewerInventoryItem* inv_item = (LLViewerInventoryItem*)cargo_data;
if(gInventory.getItem(inv_item->getUUID())
@@ -2039,7 +2047,6 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_
}
break;
}
- case DAD_CALLINGCARD:
default:
*accept = ACCEPT_NO;
break;
diff --git a/indra/newview/lltoolfocus.cpp b/indra/newview/lltoolfocus.cpp
index ca78073575..ee6e36518f 100644
--- a/indra/newview/lltoolfocus.cpp
+++ b/indra/newview/lltoolfocus.cpp
@@ -359,7 +359,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
// Orbit tool
if (hasMouseCapture())
{
- const F32 RADIANS_PER_PIXEL = 360.f * DEG_TO_RAD / gViewerWindow->getWindowWidth();
+ const F32 RADIANS_PER_PIXEL = 360.f * DEG_TO_RAD / gViewerWindow->getWorldViewWidth();
if (dx != 0)
{
@@ -387,7 +387,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
F32 dist = (F32) camera_to_focus.normVec();
// Fudge factor for pan
- F32 meters_per_pixel = 3.f * dist / gViewerWindow->getWindowWidth();
+ F32 meters_per_pixel = 3.f * dist / gViewerWindow->getWorldViewWidth();
if (dx != 0)
{
@@ -409,7 +409,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
if (hasMouseCapture())
{
- const F32 RADIANS_PER_PIXEL = 360.f * DEG_TO_RAD / gViewerWindow->getWindowWidth();
+ const F32 RADIANS_PER_PIXEL = 360.f * DEG_TO_RAD / gViewerWindow->getWorldViewWidth();
if (dx != 0)
{
diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp
index 409549a66b..abadd251c1 100644
--- a/indra/newview/lltoolgrab.cpp
+++ b/indra/newview/lltoolgrab.cpp
@@ -46,7 +46,6 @@
// newview headers
#include "llagent.h"
-//#include "llfloateravatarinfo.h"
#include "lldrawable.h"
#include "llfloatertools.h"
#include "llhudeffect.h"
@@ -511,8 +510,8 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask)
const F32 RADIANS_PER_PIXEL_X = 0.01f;
const F32 RADIANS_PER_PIXEL_Y = 0.01f;
- S32 dx = x - (gViewerWindow->getWindowWidth() / 2);
- S32 dy = y - (gViewerWindow->getWindowHeight() / 2);
+ S32 dx = x - (gViewerWindow->getWorldViewWidth() / 2);
+ S32 dy = y - (gViewerWindow->getWorldViewHeight() / 2);
if (dx != 0 || dy != 0)
{
@@ -632,10 +631,10 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask)
// Handle auto-rotation at screen edge.
LLVector3 grab_pos_agent = gAgent.getPosAgentFromGlobal( grab_point_global );
- LLCoordGL grab_center_gl( gViewerWindow->getWindowWidth() / 2, gViewerWindow->getWindowHeight() / 2);
+ LLCoordGL grab_center_gl( gViewerWindow->getWorldViewWidth() / 2, gViewerWindow->getWorldViewHeight() / 2);
LLViewerCamera::getInstance()->projectPosAgentToScreen(grab_pos_agent, grab_center_gl);
- const S32 ROTATE_H_MARGIN = gViewerWindow->getWindowWidth() / 20;
+ const S32 ROTATE_H_MARGIN = gViewerWindow->getWorldViewWidth() / 20;
const F32 ROTATE_ANGLE_PER_SECOND = 30.f * DEG_TO_RAD;
const F32 rotate_angle = ROTATE_ANGLE_PER_SECOND / gFPSClamped;
// ...build mode moves camera about focus point
@@ -650,7 +649,7 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask)
gAgent.cameraOrbitAround(rotate_angle);
}
}
- else if (grab_center_gl.mX > gViewerWindow->getWindowWidth() - ROTATE_H_MARGIN)
+ else if (grab_center_gl.mX > gViewerWindow->getWorldViewWidth() - ROTATE_H_MARGIN)
{
if (gAgent.getFocusOnAvatar())
{
@@ -663,7 +662,7 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask)
}
// Don't move above top of screen or below bottom
- if ((grab_center_gl.mY < gViewerWindow->getWindowHeight() - 6)
+ if ((grab_center_gl.mY < gViewerWindow->getWorldViewHeight() - 6)
&& (grab_center_gl.mY > 24))
{
// Transmit update to simulator
@@ -885,7 +884,7 @@ void LLToolGrab::handleHoverInactive(S32 x, S32 y, MASK mask)
// Look for cursor against the edge of the screen
// Only works in fullscreen
- if (!gSavedSettings.getBOOL("NotFullScreen"))
+ if (gSavedSettings.getBOOL("WindowFullScreen"))
{
if (gAgent.cameraThirdPerson() )
{
@@ -894,7 +893,7 @@ void LLToolGrab::handleHoverInactive(S32 x, S32 y, MASK mask)
gAgent.yaw(rotate_angle);
//gAgent.setControlFlags(AGENT_CONTROL_YAW_POS);
}
- else if (x == (gViewerWindow->getWindowWidth() - 1) )
+ else if (x == (gViewerWindow->getWorldViewWidth() - 1) )
{
gAgent.yaw(-rotate_angle);
//gAgent.setControlFlags(AGENT_CONTROL_YAW_NEG);
diff --git a/indra/newview/lltoolgun.cpp b/indra/newview/lltoolgun.cpp
index 72fd8b3bac..b70cff3869 100644
--- a/indra/newview/lltoolgun.cpp
+++ b/indra/newview/lltoolgun.cpp
@@ -42,7 +42,7 @@
#include "llresmgr.h"
#include "llfontgl.h"
#include "llui.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewercamera.h"
#include "llhudmanager.h"
#include "lltoolmgr.h"
@@ -137,7 +137,7 @@ void LLToolGun::draw()
{
LLUIImagePtr crosshair = LLUI::getUIImage("crosshairs.tga");
crosshair->draw(
- ( gViewerWindow->getWindowWidth() - crosshair->getWidth() ) / 2,
- ( gViewerWindow->getWindowHeight() - crosshair->getHeight() ) / 2);
+ ( gViewerWindow->getWorldViewWidth() - crosshair->getWidth() ) / 2,
+ ( gViewerWindow->getWorldViewHeight() - crosshair->getHeight() ) / 2);
}
}
diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp
index e3ee209030..cf3d15a12a 100644
--- a/indra/newview/lltoolmgr.cpp
+++ b/indra/newview/lltoolmgr.cpp
@@ -180,6 +180,8 @@ void LLToolMgr::setCurrentTool( LLTool* tool )
mBaseTool = tool;
updateToolStatus();
+
+ mSavedTool = NULL;
}
LLTool* LLToolMgr::getCurrentTool()
diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp
index af0d784a3e..ae3f2f55de 100644
--- a/indra/newview/lltoolmorph.cpp
+++ b/indra/newview/lltoolmorph.cpp
@@ -58,7 +58,7 @@
#include "lltoolmgr.h"
#include "llui.h"
#include "llviewercamera.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerobject.h"
#include "llviewerwindow.h"
#include "llvoavatarself.h"
@@ -81,7 +81,7 @@ LLVisualParamHint::LLVisualParamHint(
LLViewerVisualParam *param,
F32 param_weight)
:
- LLDynamicTexture(width, height, 3, LLDynamicTexture::ORDER_MIDDLE, TRUE ),
+ LLViewerDynamicTexture(width, height, 3, LLViewerDynamicTexture::ORDER_MIDDLE, TRUE ),
mNeedsUpdate( TRUE ),
mIsVisible( FALSE ),
mJointMesh( mesh ),
@@ -155,7 +155,7 @@ void LLVisualParamHint::preRender(BOOL clear_depth)
avatarp->updateGeometry(avatarp->mDrawable);
avatarp->updateLOD();
- LLDynamicTexture::preRender(clear_depth);
+ LLViewerDynamicTexture::preRender(clear_depth);
}
//-----------------------------------------------------------------------------
@@ -169,7 +169,7 @@ BOOL LLVisualParamHint::render()
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
- glOrtho(0.0f, mWidth, 0.0f, mHeight, -1.0f, 1.0f);
+ glOrtho(0.0f, mFullWidth, 0.0f, mFullHeight, -1.0f, 1.0f);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
@@ -177,7 +177,7 @@ BOOL LLVisualParamHint::render()
LLGLSUIDefault gls_ui;
//LLGLState::verify(TRUE);
- mBackgroundp->draw(0, 0, mWidth, mHeight);
+ mBackgroundp->draw(0, 0, mFullWidth, mFullHeight);
glMatrixMode(GL_PROJECTION);
glPopMatrix();
@@ -224,13 +224,13 @@ BOOL LLVisualParamHint::render()
gGL.flush();
- LLViewerCamera::getInstance()->setAspect((F32)mWidth / (F32)mHeight);
+ LLViewerCamera::getInstance()->setAspect((F32)mFullWidth / (F32)mFullHeight);
LLViewerCamera::getInstance()->setOriginAndLookAt(
camera_pos, // camera
LLVector3(0.f, 0.f, 1.f), // up
target_pos ); // point of interest
- LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mWidth, mHeight, FALSE);
+ LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, FALSE);
if (avatarp->mDrawable.notNull())
{
@@ -244,7 +244,7 @@ BOOL LLVisualParamHint::render()
}
avatarp->setVisualParamWeight(mVisualParam, mLastParamWeight);
gGL.color4f(1,1,1,1);
- mTexture->setGLTextureCreated(true);
+ mGLTexturep->setGLTextureCreated(true);
return TRUE;
}
@@ -256,7 +256,7 @@ void LLVisualParamHint::draw()
{
if (!mIsVisible) return;
- gGL.getTexUnit(0)->bind(getTexture());
+ gGL.getTexUnit(0)->bind(this);
gGL.color4f(1.f, 1.f, 1.f, 1.f);
@@ -264,13 +264,13 @@ void LLVisualParamHint::draw()
gGL.begin(LLRender::QUADS);
{
gGL.texCoord2i(0, 1);
- gGL.vertex2i(0, mHeight);
+ gGL.vertex2i(0, mFullHeight);
gGL.texCoord2i(0, 0);
gGL.vertex2i(0, 0);
gGL.texCoord2i(1, 0);
- gGL.vertex2i(mWidth, 0);
+ gGL.vertex2i(mFullWidth, 0);
gGL.texCoord2i(1, 1);
- gGL.vertex2i(mWidth, mHeight);
+ gGL.vertex2i(mFullWidth, mFullHeight);
}
gGL.end();
@@ -280,7 +280,7 @@ void LLVisualParamHint::draw()
//-----------------------------------------------------------------------------
// LLVisualParamReset()
//-----------------------------------------------------------------------------
-LLVisualParamReset::LLVisualParamReset() : LLDynamicTexture(1, 1, 1, ORDER_RESET, FALSE)
+LLVisualParamReset::LLVisualParamReset() : LLViewerDynamicTexture(1, 1, 1, ORDER_RESET, FALSE)
{
}
diff --git a/indra/newview/lltoolmorph.h b/indra/newview/lltoolmorph.h
index 11de8160eb..b7df718ba2 100644
--- a/indra/newview/lltoolmorph.h
+++ b/indra/newview/lltoolmorph.h
@@ -42,7 +42,7 @@
#include "llstrider.h"
#include "llviewervisualparam.h"
#include "llframetimer.h"
-#include "llviewerimage.h"
+#include "llviewertexture.h"
class LLViewerJointMesh;
class LLPolyMesh;
@@ -51,17 +51,18 @@ class LLViewerObject;
//-----------------------------------------------------------------------------
// LLVisualParamHint
//-----------------------------------------------------------------------------
-class LLVisualParamHint
-: public LLDynamicTexture
+class LLVisualParamHint : public LLViewerDynamicTexture
{
+protected:
+ virtual ~LLVisualParamHint();
+
public:
LLVisualParamHint(
S32 pos_x, S32 pos_y,
S32 width, S32 height,
LLViewerJointMesh *mesh,
LLViewerVisualParam *param,
- F32 param_weight);
- virtual ~LLVisualParamHint();
+ F32 param_weight);
BOOL needsRender();
void preRender(BOOL clear_depth);
@@ -94,13 +95,15 @@ protected:
LLUIImagePtr mBackgroundp;
- typedef std::set<LLVisualParamHint*> instance_list_t;
+ typedef std::set< LLVisualParamHint* > instance_list_t;
static instance_list_t sInstances;
};
// this class resets avatar data at the end of an update cycle
-class LLVisualParamReset : public LLDynamicTexture
+class LLVisualParamReset : public LLViewerDynamicTexture
{
+protected:
+ /*virtual */ ~LLVisualParamReset(){}
public:
LLVisualParamReset();
/*virtual */ BOOL render();
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index a6dcebc3b5..350657538b 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -44,10 +44,12 @@
#include "llfirstuse.h"
#include "llfloateravatarinfo.h"
#include "llfloaterland.h"
+#include "llfloaterreg.h"
#include "llfloaterscriptdebug.h"
#include "llhoverview.h"
#include "llhudeffecttrail.h"
#include "llhudmanager.h"
+#include "llmediamanager.h"
#include "llmenugl.h"
#include "llmutelist.h"
#include "llselectmgr.h"
@@ -100,15 +102,19 @@ void LLToolPie::leftMouseCallback(const LLPickInfo& pick_info)
LLToolPie::getInstance()->pickLeftMouseDownCallback();
}
+// Spawn context menus on right mouse down so you can drag over and select
+// an item.
BOOL LLToolPie::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
+ // don't pick transparent so users can't "pay" transparent objects
+ gViewerWindow->pickAsync(x, y, mask, rightMouseCallback, FALSE, TRUE);
+ // claim not handled so UI focus stays same
return FALSE;
}
BOOL LLToolPie::handleRightMouseUp(S32 x, S32 y, MASK mask)
{
LLToolMgr::getInstance()->clearTransientTool();
- gViewerWindow->pickAsync(x, y, mask, rightMouseCallback, FALSE, TRUE);
return LLTool::handleRightMouseUp(x, y, mask);
}
@@ -116,7 +122,7 @@ BOOL LLToolPie::handleRightMouseUp(S32 x, S32 y, MASK mask)
void LLToolPie::rightMouseCallback(const LLPickInfo& pick_info)
{
LLToolPie::getInstance()->mPick = pick_info;
- LLToolPie::getInstance()->pickRightMouseUpCallback();
+ LLToolPie::getInstance()->pickRightMouseDownCallback();
}
// True if you selected an object.
@@ -141,7 +147,7 @@ BOOL LLToolPie::pickLeftMouseDownCallback()
else
{
// not selling passes, get info
- LLFloaterLand::showInstance();
+ LLFloaterReg::showInstance("about_land");
}
}
@@ -286,9 +292,11 @@ BOOL LLToolPie::pickLeftMouseDownCallback()
return TRUE;
}
- // Could be first left-click on nothing
- LLFirstUse::useLeftClickNoHit();
-
+ //////////
+ // // Could be first left-click on nothing
+ // LLFirstUse::useLeftClickNoHit();
+ /////////
+
// Eat the event
return LLTool::handleMouseDown(x, y, mask);
}
@@ -424,7 +432,7 @@ void LLToolPie::selectionPropertiesReceived()
handle_give_money_dialog();
break;
case CLICK_ACTION_OPEN:
- handle_object_open();
+ LLFloaterReg::showInstance("openobject");
break;
default:
break;
@@ -727,8 +735,8 @@ static ECursorType cursor_from_parcel_media(U8 click_action)
}
-// True if you selected an object.
-BOOL LLToolPie::pickRightMouseUpCallback()
+// True if we handled the event.
+BOOL LLToolPie::pickRightMouseDownCallback()
{
S32 x = mPick.mMousePt.mX;
S32 y = mPick.mMousePt.mY;
@@ -824,7 +832,7 @@ BOOL LLToolPie::pickRightMouseUpCallback()
}
}
- LLTool::handleRightMouseUp(x, y, mask);
+ LLTool::handleRightMouseDown(x, y, mask);
// We handled the event.
return TRUE;
}
diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h
index 82de2b363e..d2437e813d 100644
--- a/indra/newview/lltoolpie.h
+++ b/indra/newview/lltoolpie.h
@@ -75,7 +75,7 @@ public:
private:
BOOL outsideSlop (S32 x, S32 y, S32 start_x, S32 start_y);
BOOL pickLeftMouseDownCallback();
- BOOL pickRightMouseUpCallback();
+ BOOL pickRightMouseDownCallback();
BOOL useClickAction (MASK mask, LLViewerObject* object,LLViewerObject* parent);
void showVisualContextMenuEffect();
diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp
index 8e4f637832..5929ecd928 100644
--- a/indra/newview/lltracker.cpp
+++ b/indra/newview/lltracker.cpp
@@ -112,7 +112,7 @@ void LLTracker::stopTracking(void* userdata)
// static virtual
void LLTracker::drawHUDArrow()
{
- static LLCachedControl<LLColor4> map_track_color(gSavedSkinSettings, "MapTrackColor", LLColor4::white);
+ static LLUIColor map_track_color = LLUIColorTable::instance().getColor("MapTrackColor", LLColor4::white);
/* tracking autopilot destination has been disabled
-- 2004.01.09, Leviathan
@@ -163,7 +163,7 @@ void LLTracker::render3D()
return;
}
- static LLCachedControl<LLColor4> map_track_color(gSavedSkinSettings, "MapTrackColor", LLColor4::white);
+ static LLUIColor map_track_color = LLUIColorTable::instance().getColor("MapTrackColor", LLColor4::white);
// Arbitary location beacon
if( instance()->mIsTrackingLocation )
diff --git a/indra/newview/lluploaddialog.cpp b/indra/newview/lluploaddialog.cpp
index f5160fd26c..153e3e7382 100644
--- a/indra/newview/lluploaddialog.cpp
+++ b/indra/newview/lluploaddialog.cpp
@@ -144,7 +144,7 @@ void LLUploadDialog::setMessage( const std::string& msg)
msg_rect.setOriginAndSize( msg_x, msg_y, max_msg_width, line_height );
mLabelBox[line_num]->setRect(msg_rect);
mLabelBox[line_num]->setText(cur_line);
- mLabelBox[line_num]->setColor( gSavedSkinSettings.getColor( "LabelTextColor" ) );
+ mLabelBox[line_num]->setColor( LLUIColorTable::instance().getColor( "LabelTextColor" ) );
mLabelBox[line_num]->setVisible(TRUE);
msg_y -= line_height;
++line_num;
diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp
index 6c8e7e1f69..9fb6d1c874 100644
--- a/indra/newview/llurldispatcher.cpp
+++ b/indra/newview/llurldispatcher.cpp
@@ -36,12 +36,14 @@
// viewer includes
#include "llagent.h" // teleportViaLocation()
#include "llcommandhandler.h"
-#include "llfloaterurldisplay.h"
#include "llfloaterdirectory.h"
#include "llfloaterhtml.h"
-#include "llfloaterworldmap.h"
#include "llfloaterhtmlhelp.h"
+#include "llfloaterreg.h"
+#include "llfloaterurldisplay.h"
+#include "llfloaterworldmap.h"
#include "llpanellogin.h"
+#include "llsidetray.h"
#include "llslurl.h"
#include "llstartup.h" // gStartupState
#include "llurlsimstring.h"
@@ -201,8 +203,9 @@ bool LLURLDispatcherImpl::dispatchRegion(const std::string& url, bool right_mous
S32 z = 0;
LLURLSimString::parse(sim_string, &region_name, &x, &y, &z);
- LLFloaterURLDisplay* url_displayp = LLFloaterURLDisplay::getInstance(LLSD());
- url_displayp->setName(region_name);
+ // LLFloaterURLDisplay functionality moved to LLPanelPlaces in Side Tray.
+ //LLFloaterURLDisplay* url_displayp = LLFloaterReg::getTypedInstance<LLFloaterURLDisplay>("preview_url",LLSD());
+ //if(url_displayp) url_displayp->setName(region_name);
// Request a region handle by name
LLWorldMap::getInstance()->sendNamedRegionRequest(region_name,
@@ -273,28 +276,42 @@ void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const std::str
local_pos.mV[VY] = (F32)local_y;
local_pos.mV[VZ] = (F32)z;
-
+ LLVector3d global_pos = from_region_handle(region_handle);
+ global_pos += LLVector3d(local_pos);
if (teleport)
- {
- LLVector3d global_pos = from_region_handle(region_handle);
- global_pos += LLVector3d(local_pos);
+ {
gAgent.teleportViaLocation(global_pos);
- LLFloaterWorldMap::getInstance()->trackLocation(global_pos);
+ LLFloaterWorldMap* instance = LLFloaterWorldMap::getInstance();
+ if(instance)
+ {
+ instance->trackLocation(global_pos);
+ }
}
else
{
- // display informational floater, allow user to click teleport btn
- LLFloaterURLDisplay* url_displayp = LLFloaterURLDisplay::getInstance(LLSD());
-
-
- url_displayp->displayParcelInfo(region_handle, local_pos);
- if(snapshot_id.notNull())
- {
- url_displayp->setSnapshotDisplay(snapshot_id);
- }
- std::string locationString = llformat("%s %d, %d, %d", region_name.c_str(), x, y, z);
- url_displayp->setLocationString(locationString);
+ LLSD key;
+ key["type"] = "remote_place";
+ key["x"] = global_pos.mdV[VX];
+ key["y"] = global_pos.mdV[VY];
+ key["z"] = global_pos.mdV[VZ];
+
+ LLSideTray::getInstance()->showPanel("panel_places", key);
+
+ // LLFloaterURLDisplay functionality moved to LLPanelPlaces in Side Tray.
+
+// // display informational floater, allow user to click teleport btn
+// LLFloaterURLDisplay* url_displayp = LLFloaterReg::getTypedInstance<LLFloaterURLDisplay>("preview_url",LLSD());
+// if(url_displayp)
+// {
+// url_displayp->displayParcelInfo(region_handle, local_pos);
+// if(snapshot_id.notNull())
+// {
+// url_displayp->setSnapshotDisplay(snapshot_id);
+// }
+// std::string locationString = llformat("%s %d, %d, %d", region_name.c_str(), x, y, z);
+// url_displayp->setLocationString(locationString);
+// }
}
}
diff --git a/indra/newview/llviewerassetstorage.h b/indra/newview/llviewerassetstorage.h
index 15c11c7025..512b590a1b 100644
--- a/indra/newview/llviewerassetstorage.h
+++ b/indra/newview/llviewerassetstorage.h
@@ -47,6 +47,7 @@ public:
LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer,
LLVFS *vfs);
+ using LLAssetStorage::storeAssetData;
virtual void storeAssetData(
const LLTransactionID& tid,
LLAssetType::EType atype,
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 320b950649..30c97cdfa3 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -49,7 +49,7 @@
#include "llsky.h"
#include "llvieweraudio.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerthrottle.h"
#include "llviewerwindow.h"
#include "llvoavatarself.h"
@@ -78,7 +78,6 @@ BOOL gHackGodmode = FALSE;
LLControlGroup gSavedSettings("Global"); // saved at end of session
-LLControlGroup gSavedSkinSettings("Skinning"); // saved at end of session
LLControlGroup gSavedPerAccountSettings("PerAccount"); // saved at end of session
LLControlGroup gCrashSettings("CrashSettings"); // saved at end of session
LLControlGroup gWarningSettings("Warnings"); // persists ignored dialogs/warnings
@@ -213,7 +212,7 @@ static bool handleMaxPartCountChanged(const LLSD& newvalue)
static bool handleVideoMemoryChanged(const LLSD& newvalue)
{
- gImageList.updateMaxResidentTexMem(newvalue.asInteger());
+ gTextureList.updateMaxResidentTexMem(newvalue.asInteger());
return true;
}
@@ -585,7 +584,6 @@ void settings_setup_listeners()
gSavedSettings.getControl("DebugViews")->getSignal()->connect(boost::bind(&handleDebugViewsChanged, _2));
gSavedSettings.getControl("UserLogFile")->getSignal()->connect(boost::bind(&handleLogFileChanged, _2));
gSavedSettings.getControl("RenderHideGroupTitle")->getSignal()->connect(boost::bind(handleHideGroupTitleChanged, _2));
- gSavedSkinSettings.getControl("EffectColor")->getSignal()->connect(boost::bind(handleEffectColorChanged, _2));
gSavedSettings.getControl("HighResSnapshot")->getSignal()->connect(boost::bind(handleHighResSnapshotChanged, _2));
gSavedSettings.getControl("VectorizePerfTest")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _2));
gSavedSettings.getControl("VectorizeEnable")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _2));
@@ -603,7 +601,6 @@ void settings_setup_listeners()
gSavedSettings.getControl("VelocityInterpolate")->getSignal()->connect(boost::bind(&handleVelocityInterpolate, _2));
}
-
#if TEST_CACHED_CONTROL
#define DECL_LLCC(T, V) static LLCachedControl<T> mySetting_##T("TestCachedControl"#T, V)
diff --git a/indra/newview/llviewercontrol.h b/indra/newview/llviewercontrol.h
index 3271e5fe9b..b1f14eca7b 100644
--- a/indra/newview/llviewercontrol.h
+++ b/indra/newview/llviewercontrol.h
@@ -52,7 +52,6 @@ void create_graphics_group(LLControlGroup& group);
// saved at end of session
extern LLControlGroup gSavedSettings;
-extern LLControlGroup gSavedSkinSettings;
extern LLControlGroup gSavedPerAccountSettings;
extern LLControlGroup gWarningSettings;
diff --git a/indra/newview/llviewercontrollistener.cpp b/indra/newview/llviewercontrollistener.cpp
index 57426f2af0..ecba1b8eb0 100644
--- a/indra/newview/llviewercontrollistener.cpp
+++ b/indra/newview/llviewercontrollistener.cpp
@@ -21,20 +21,17 @@ LLViewerControlListener::LLViewerControlListener()
: LLDispatchListener("LLViewerControl", "group")
{
add("Global", boost::bind(&LLViewerControlListener::set, &gSavedSettings, _1));
- add("Skin", boost::bind(&LLViewerControlListener::set, &gSavedSkinSettings, _1));
add("PerAccount", boost::bind(&LLViewerControlListener::set, &gSavedPerAccountSettings, _1));
add("Warning", boost::bind(&LLViewerControlListener::set, &gWarningSettings, _1));
add("Crash", boost::bind(&LLViewerControlListener::set, &gCrashSettings, _1));
#if 0
add(/*"toggleControl",*/ "Global", boost::bind(&LLViewerControlListener::toggleControl, &gSavedSettings, _1));
- add(/*"toggleControl",*/ "Skin", boost::bind(&LLViewerControlListener::toggleControl, &gSavedSkinSettings, _1));
add(/*"toggleControl",*/ "PerAccount", boost::bind(&LLViewerControlListener::toggleControl, &gSavedPerAccountSettings, _1));
add(/*"toggleControl",*/ "Warning", boost::bind(&LLViewerControlListener::toggleControl, &gWarningSettings, _1));
add(/*"toggleControl",*/ "Crash", boost::bind(&LLViewerControlListener::toggleControl, &gCrashSettings, _1));
add(/*"setDefault",*/ "Global", boost::bind(&LLViewerControlListener::setDefault, &gSavedSettings, _1));
- add(/*"setDefault",*/ "Skin", boost::bind(&LLViewerControlListener::setDefault, &gSavedSkinSettings, _1));
add(/*"setDefault",*/ "PerAccount", boost::bind(&LLViewerControlListener::setDefault, &gSavedPerAccountSettings, _1));
add(/*"setDefault",*/ "Warning", boost::bind(&LLViewerControlListener::setDefault, &gWarningSettings, _1));
add(/*"setDefault",*/ "Crash", boost::bind(&LLViewerControlListener::setDefault, &gCrashSettings, _1));
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index a340514e3b..f08c287529 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -48,7 +48,6 @@
#include "llfirstuse.h"
#include "llhudmanager.h"
#include "llimagebmp.h"
-#include "llimagegl.h"
#include "llmemory.h"
#include "llselectmgr.h"
#include "llsky.h"
@@ -74,7 +73,7 @@
#include "llviewershadermgr.h"
#include "llfasttimer.h"
#include "llfloatertools.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llfocusmgr.h"
#include "llcubemap.h"
#include "llviewerregion.h"
@@ -84,9 +83,9 @@
#include "llwaterparammanager.h"
#include "llpostprocess.h"
-extern LLPointer<LLImageGL> gStartImageGL;
+extern LLPointer<LLViewerTexture> gStartTexture;
-LLPointer<LLImageGL> gDisconnectedImagep = NULL;
+LLPointer<LLViewerTexture> gDisconnectedImagep = NULL;
// used to toggle renderer back on after teleport
const F32 TELEPORT_RENDER_DELAY = 20.f; // Max time a teleport is allowed to take before we raise the curtain
@@ -136,7 +135,7 @@ void display_startup()
if (frame_count++ > 1) // make sure we have rendered a frame first
{
- LLDynamicTexture::updateAllInstances();
+ LLViewerDynamicTexture::updateAllInstances();
}
LLGLState::checkStates();
@@ -313,8 +312,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLImageGL::updateStats(gFrameTimeSeconds);
- LLVOAvatar::sRenderName = gSavedSettings.getS32("RenderName");
- LLVOAvatar::sRenderGroupTitles = !gSavedSettings.getBOOL("RenderHideGroupTitleAll");
+ LLVOAvatar::sRenderName = gSavedSettings.getS32("AvatarNameTagMode");
+ LLVOAvatar::sRenderGroupTitles = (gSavedSettings.getBOOL("RenderShowGroupTitleAll") && gSavedSettings.getS32("AvatarNameTagMode"));
gPipeline.mBackfaceCull = TRUE;
gFrameCount++;
@@ -383,7 +382,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
gAgent.setTeleportState( LLAgent::TELEPORT_ARRIVING );
gAgent.setTeleportMessage(
LLAgent::sTeleportProgressMessages["arriving"]);
- gImageList.mForceResetTextureStats = TRUE;
+ gTextureList.mForceResetTextureStats = TRUE;
gAgent.resetView(TRUE, TRUE);
break;
@@ -506,7 +505,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
{
LLAppViewer::instance()->pingMainloopTimeout("Display:DynamicTextures");
LLFastTimer t(LLFastTimer::FTM_UPDATE_TEXTURES);
- if (LLDynamicTexture::updateAllInstances())
+ if (LLViewerDynamicTexture::updateAllInstances())
{
gGL.setColorMask(true, true);
glClear(GL_DEPTH_BUFFER_BIT);
@@ -690,13 +689,13 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLMemType mt_iu(LLMemType::MTYPE_DISPLAY_IMAGE_UPDATE);
LLFastTimer t(LLFastTimer::FTM_IMAGE_UPDATE);
- LLViewerImage::updateClass(LLViewerCamera::getInstance()->getVelocityStat()->getMean(),
+ LLViewerTexture::updateClass(LLViewerCamera::getInstance()->getVelocityStat()->getMean(),
LLViewerCamera::getInstance()->getAngularVelocityStat()->getMean());
- gBumpImageList.updateImages(); // must be called before gImageList version so that it's textures are thrown out first.
+ gBumpImageList.updateImages(); // must be called before gTextureList version so that it's textures are thrown out first.
const F32 max_image_decode_time = llmin(0.005f, 0.005f*10.f*gFrameIntervalSeconds); // 50 ms/second decode time (no more than 5ms/frame)
- gImageList.updateImages(max_image_decode_time);
+ gTextureList.updateImages(max_image_decode_time);
stop_glerror();
}
llpushcallstacks ;
@@ -1279,8 +1278,7 @@ void render_disconnected_background()
//llinfos << "Bitmap load failed" << llendl;
return;
}
-
- gDisconnectedImagep = new LLImageGL( FALSE );
+
LLPointer<LLImageRaw> raw = new LLImageRaw;
if (!image_bmp->decode(raw, 0.0f))
{
@@ -1306,8 +1304,8 @@ void render_disconnected_background()
raw->expandToPowerOfTwo();
- gDisconnectedImagep->createGLTexture(0, raw);
- gStartImageGL = gDisconnectedImagep;
+ gDisconnectedImagep = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE );
+ gStartTexture = gDisconnectedImagep;
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
}
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 03c4915e66..5c38be86d5 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -39,29 +39,49 @@
#include "llcompilequeue.h"
#include "llfloaterabout.h"
+#include "llfloateractivespeakers.h"
#include "llfloaterauction.h"
#include "llfloateraddlandmark.h"
#include "llfloateravatarinfo.h"
+#include "llfloaterbeacons.h"
+#include "llfloaterbulkpermission.h"
#include "llfloaterbuildoptions.h"
#include "llfloaterbump.h"
+#include "llfloatercamera.h"
#include "llfloaterchat.h"
#include "llfloaterchatterbox.h"
#include "llfloaterdirectory.h"
+#include "llfloaterfonttest.h"
+#include "llfloatergodtools.h"
+#include "llfloaterhtmlcurrency.h"
+#include "llfloaterhtmlhelp.h"
+#include "llfloaterhud.h"
+#include "llfloaterinspect.h"
#include "llfloaterjoystick.h"
#include "llfloaternotificationsconsole.h"
#include "llfloaterlagmeter.h"
+#include "llfloaterland.h"
#include "llfloatermap.h"
#include "llfloatermemleak.h"
#include "llfloatermute.h"
+#include "llfloaterobjectiminfo.h"
+#include "llfloateropenobject.h"
+#include "llfloaterperms.h"
#include "llfloaterpreference.h"
+#include "llfloaterregioninfo.h"
#include "llfloatersnapshot.h"
#include "llfloatersettingsdebug.h"
+#include "llfloatertestlistview.h"
+#include "llfloatertopobjects.h"
#include "llfloatertools.h"
#include "llfloateruipreview.h"
+#include "llfloaterurldisplay.h"
#include "llfloatervoicedevicesettings.h"
#include "llfloaterworldmap.h"
-#include "llinventoryview.h"
-#include "llnearbychathistory.h"
+#include "llfloaterinventory.h"
+#include "llmediaremotectrl.h"
+#include "llmoveview.h"
+#include "llnearbychat.h"
#include "llpreviewanim.h"
#include "llpreviewgesture.h"
@@ -72,46 +92,59 @@
#include "llpreviewtexture.h"
#include "llfloaterminiinspector.h"
+//class LLLLFloaterObjectIMInfo;
+
void LLViewerFloaterReg::registerFloaters()
{
- LLFloaterReg::add("mini_inspector", "panel_mini_inspector.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMiniInspector>);
- LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreference>);
- LLFloaterReg::add("sl_about", "floater_about.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAbout>);
- LLFloaterReg::add("snapshot", "floater_snapshot.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSnapshot>);
- LLFloaterReg::add("search", "floater_directory.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterDirectory>);
- LLFloaterReg::add("build", "floater_tools.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterTools>);
- LLFloaterReg::add("world_map", "floater_world_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWorldMap>);
- LLFloaterReg::add("mini_map", "floater_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMap>);
- LLFloaterReg::add("inventory", "floater_inventory.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLInventoryView>);
+ LLFloaterReg::add("about_land", "floater_about_land.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLand>);
+ LLFloaterReg::add("active_speakers", "floater_active_speakers.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterActiveSpeakers>);
LLFloaterReg::add("add_landmark", "floater_add_landmark.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAddLandmark>);
- LLFloaterReg::add("mute", "floater_mute.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMute>);
-
LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAuction>);
+
+ LLFloaterReg::add("beacons", "floater_beacons.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBeacons>);
+ LLFloaterReg::add("bulk_perms", "floater_bulk_perms.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBulkPermission>);
+ LLFloaterReg::add("build", "floater_tools.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterTools>);
LLFloaterReg::add("build_options", "floater_build_options.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBuildOptions>);
LLFloaterReg::add("bumps", "floater_bumps.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBump>);
- LLFloaterReg::add("notifications_console", "floater_notifications_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotificationConsole>);
- LLFloaterReg::add("settings_debug", "floater_settings_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSettingsDebug>);
- LLFloaterReg::add("lagmeter", "floater_lagmeter.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLagMeter>);
- LLFloaterReg::add("ui_preview", "floater_ui_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterUIPreview>);
- LLFloaterReg::add("test_widgets", "floater_test_widgets.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloater>);
-
- LLFloaterReg::add("pref_joystick", "floater_joystick.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterJoystick>);
- LLFloaterReg::add("pref_voicedevicesettings", "floater_device_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterVoiceDeviceSettings>);
-
- LLFloaterReg::add("communicate", "floater_chatterbox.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterChatterBox>);
+ LLFloaterReg::add("camera", "floater_camera.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCamera>);
LLFloaterReg::add("chat", "floater_chat_history.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterChat>);
- LLFloaterReg::add("nearby_chat", "floater_nearby_chat.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNearbyChatHistory>);
- LLFloaterReg::add("contacts", "floater_my_friends.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMyFriends>);
-
+ LLFloaterReg::add("nearby_chat", "floater_nearby_chat.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNearbyChat>);
+ LLFloaterReg::add("communicate", "floater_chatterbox.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterChatterBox>);
LLFloaterReg::add("compile_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCompileQueue>);
- LLFloaterReg::add("reset_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterResetQueue>);
- LLFloaterReg::add("start_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterRunQueue>);
- LLFloaterReg::add("stop_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotRunQueue>);
+ LLFloaterReg::add("contacts", "floater_my_friends.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMyFriends>);
+
+ LLFloaterReg::add("font_test", "floater_font_test.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterFontTest>);
+
+ LLFloaterReg::add("god_tools", "floater_god_tools.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterGodTools>);
+
+ LLFloaterReg::add("html_currency", "floater_html_simple.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHtmlCurrency>);
+ LLFloaterReg::add("hud", "floater_hud.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHUD>);
- LLFloaterReg::add("preview_avatar", "floater_profile.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarInfo>);
+ LLFloaterReg::add("inventory", "floater_inventory.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterInventory>);
+ LLFloaterReg::add("inspect", "floater_inspect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterInspect>);
+
+ LLFloaterReg::add("lagmeter", "floater_lagmeter.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLagMeter>);
+
+ LLFloaterReg::add("mem_leaking", "floater_mem_leaking.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMemLeak>);
LLFloaterReg::add("me_profile", "floater_me.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarInfo>);
+ LLFloaterReg::add("media_browser", "floater_media_browser.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMediaBrowser>);
+ LLFloaterReg::add("moveview", "floater_moveview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMove>);
+ LLFloaterReg::add("mute", "floater_mute.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMute>);
+ LLFloaterReg::add("mini_map", "floater_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMap>);
+ LLFloaterReg::add("mini_inspector", "panel_mini_inspector.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMiniInspector>);
+ LLFloaterReg::add("notifications_console", "floater_notifications_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotificationConsole>);
+ LLFloaterReg::add("nearby_chat", "floater_nearby_chat.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNearbyChat>);
+
+ LLFloaterReg::add("openobject", "floater_openobject.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterOpenObject>);
+
+ LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreference>);
+ LLFloaterReg::add("perm_prefs", "floater_perm_prefs.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPerms>);
+ LLFloaterReg::add("preview_url", "floater_preview_url.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterURLDisplay>);
+ LLFloaterReg::add("pref_joystick", "floater_joystick.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterJoystick>);
+ LLFloaterReg::add("pref_voicedevicesettings", "floater_device_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterVoiceDeviceSettings>);
+ LLFloaterReg::add("preview_avatar", "floater_profile.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarInfo>);
LLFloaterReg::add("preview_anim", "floater_preview_animation.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewAnim>, "preview");
LLFloaterReg::add("preview_gesture", "floater_preview_gesture.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewGesture>, "preview");
LLFloaterReg::add("preview_landmark", "floater_preview_existing_landmark.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewLandmark>, "preview");
@@ -121,5 +154,30 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("preview_sound", "floater_preview_sound.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewSound>, "preview");
LLFloaterReg::add("preview_texture", "floater_preview_texture.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLPreviewTexture>, "preview");
+ LLFloaterReg::add("test_list_view", "floater_test_list_view.xml",&LLFloaterReg::build<LLFloaterTestListView>);
+ LLFloaterReg::add("test_widgets", "floater_test_widgets.xml", &LLFloaterReg::build<LLFloater>);
+ LLFloaterReg::add("top_objects", "floater_top_objects.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterTopObjects>);
+
+ LLFloaterReg::add("reset_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterResetQueue>);
+ LLFloaterReg::add("region_info", "floater_region_info.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterRegionInfo>);
+
+ LLFloaterReg::add("settings_debug", "floater_settings_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSettingsDebug>);
LLFloaterReg::add("stats", "floater_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloater>);
+ LLFloaterReg::add("start_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterRunQueue>);
+ LLFloaterReg::add("stop_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotRunQueue>);
+ LLFloaterReg::add("sl_about", "floater_about.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAbout>);
+ LLFloaterReg::add("snapshot", "floater_snapshot.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSnapshot>);
+ LLFloaterReg::add("search", "floater_directory.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterDirectory>);
+
+ LLFloaterReg::add("ui_preview", "floater_ui_preview.xml", &LLFloaterReg::build<LLFloaterUIPreview>);
+
+ LLFloaterReg::add("world_map", "floater_world_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWorldMap>);
+
+ LLObjectIMInfo::register_floater();
+ // debug use only
+ LLFloaterReg::add("media_remote_ctrl", "floater_media_remote.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMediaRemoteCtrl>);
+
+ // *NOTE: Please keep these alphabetized for easier merges
+
+ LLFloaterReg::registerControlVariables(); // Make sure visibility and rect controls get preserved when saving
}
diff --git a/indra/newview/llviewergesture.cpp b/indra/newview/llviewergesture.cpp
index 2fb56fbcb8..4155a87e14 100644
--- a/indra/newview/llviewergesture.cpp
+++ b/indra/newview/llviewergesture.cpp
@@ -39,7 +39,6 @@
#include "llviewerinventory.h"
#include "sound_ids.h" // for testing
-#include "llchatbar.h"
#include "llkeyboard.h" // for key shortcuts for testing
#include "llinventorymodel.h"
#include "llvoavatar.h"
@@ -47,7 +46,7 @@
#include "llviewermessage.h" // send_guid_sound_trigger
#include "llviewernetwork.h"
#include "llagent.h"
-#include "llbottomtray.h"
+#include "llnearbychatbar.h"
// Globals
LLViewerGestureList gGestureList;
@@ -133,11 +132,11 @@ void LLViewerGesture::doTrigger( BOOL send_chat )
}
}
- if ( send_chat && !mOutputString.empty())
+ if (send_chat && !mOutputString.empty())
{
// Don't play nodding animation, since that might not blend
// with the gesture animation.
- LLBottomTray::getInstance()->sendChatFromViewer(mOutputString, CHAT_TYPE_NORMAL, FALSE);
+ LLNearbyChatBar::getInstance()->sendChatFromViewer(mOutputString, CHAT_TYPE_NORMAL, FALSE);
}
}
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 2c79e67ebc..66da7d89fb 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -45,7 +45,7 @@
#include "llgesturemgr.h"
#include "llinventorybridge.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
#include "llviewerregion.h"
#include "llviewerobjectlist.h"
@@ -403,7 +403,8 @@ void LLViewerInventoryCategory::updateParentOnServer(BOOL restamp) const
void LLViewerInventoryCategory::updateServer(BOOL is_new) const
{
// communicate that change with the server.
- if(LLAssetType::AT_NONE != mPreferredType)
+
+ if (LLAssetType::lookupIsProtectedCategoryType(mPreferredType))
{
LLNotifications::instance().add("CannotModifyProtectedCategories");
return;
@@ -427,7 +428,7 @@ void LLViewerInventoryCategory::removeFromServer( void )
llinfos << "Removing inventory category " << mUUID << " from server."
<< llendl;
// communicate that change with the server.
- if(LLAssetType::AT_NONE != mPreferredType)
+ if(LLAssetType::lookupIsProtectedCategoryType(mPreferredType))
{
LLNotifications::instance().add("CannotRemoveProtectedCategories");
return;
@@ -870,7 +871,7 @@ void menu_create_inventory_item(LLFolderView* folder, LLFolderBridge *bridge, co
}
else
{
- category = gInventory.createNewCategory(gAgent.getInventoryRootID(), LLAssetType::AT_NONE, LLStringUtil::null);
+ category = gInventory.createNewCategory(gInventory.getRootFolderID(), LLAssetType::AT_NONE, LLStringUtil::null);
}
gInventory.notifyObservers();
folder->setSelectionByID(category, TRUE);
@@ -977,7 +978,10 @@ LLAssetType::EType LLViewerInventoryItem::getType() const
{
return linked_item->getType();
}
-
+ if (const LLViewerInventoryCategory *linked_category = getLinkedCategory())
+ {
+ return linked_category->getType();
+ }
return LLInventoryItem::getType();
}
@@ -997,6 +1001,10 @@ const std::string& LLViewerInventoryItem::getName() const
{
return linked_item->getName();
}
+ if (const LLViewerInventoryCategory *linked_category = getLinkedCategory())
+ {
+ return linked_category->getName();
+ }
return LLInventoryItem::getName();
}
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index 7084c9f37a..5198f5efc7 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -141,7 +141,6 @@ public:
};
LLTransactionID getTransactionID() const { return mTransactionID; }
-protected:
const LLViewerInventoryItem *getLinkedItem() const;
const LLViewerInventoryCategory *getLinkedCategory() const;
diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp
index b6f0dafae6..8fbb59bc74 100644
--- a/indra/newview/llviewerjointmesh.cpp
+++ b/indra/newview/llviewerjointmesh.cpp
@@ -52,7 +52,7 @@
#include "lltexlayer.h"
#include "llviewercamera.h"
#include "llviewercontrol.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerjointmesh.h"
#include "llvoavatar.h"
#include "llsky.h"
@@ -230,7 +230,7 @@ void LLViewerJointMesh::setColor( F32 red, F32 green, F32 blue, F32 alpha )
//--------------------------------------------------------------------
// LLViewerJointMesh::getTexture()
//--------------------------------------------------------------------
-//LLViewerImage *LLViewerJointMesh::getTexture()
+//LLViewerTexture *LLViewerJointMesh::getTexture()
//{
// return mTexture;
//}
@@ -238,7 +238,7 @@ void LLViewerJointMesh::setColor( F32 red, F32 green, F32 blue, F32 alpha )
//--------------------------------------------------------------------
// LLViewerJointMesh::setTexture()
//--------------------------------------------------------------------
-void LLViewerJointMesh::setTexture( LLViewerImage *texture )
+void LLViewerJointMesh::setTexture( LLViewerTexture *texture )
{
mTexture = texture;
@@ -557,7 +557,7 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy)
{
if( mLayerSet->hasComposite() )
{
- gGL.getTexUnit(0)->bind(mLayerSet->getComposite()->getTexture());
+ gGL.getTexUnit(0)->bind(mLayerSet->getComposite());
}
else
{
@@ -567,19 +567,22 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy)
{
llwarns << "Layerset without composite" << llendl;
}
- gGL.getTexUnit(0)->bind(gImageList.getImage(IMG_DEFAULT));
+ gGL.getTexUnit(0)->bind(LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT));
}
}
else
if ( !is_dummy && mTexture.notNull() )
{
- old_mode = mTexture->getAddressMode();
- gGL.getTexUnit(0)->bind(mTexture.get());
+ if(mTexture->hasGLTexture())
+ {
+ old_mode = mTexture->getAddressMode();
+ }
+ gGL.getTexUnit(0)->bind(mTexture);
gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
}
else
{
- gGL.getTexUnit(0)->bind(gImageList.getImage(IMG_DEFAULT_AVATAR));
+ gGL.getTexUnit(0)->bind(LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT_AVATAR));
}
if (gRenderForSelect)
@@ -633,7 +636,7 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy)
if (mTexture.notNull() && !is_dummy)
{
- gGL.getTexUnit(0)->bind(mTexture.get());
+ gGL.getTexUnit(0)->bind(mTexture);
gGL.getTexUnit(0)->setTextureAddressMode(old_mode);
}
diff --git a/indra/newview/llviewerjointmesh.h b/indra/newview/llviewerjointmesh.h
index 0cae48df93..543679c44b 100644
--- a/indra/newview/llviewerjointmesh.h
+++ b/indra/newview/llviewerjointmesh.h
@@ -34,7 +34,7 @@
#define LL_LLVIEWERJOINTMESH_H
#include "llviewerjoint.h"
-#include "llviewerimage.h"
+#include "llviewertexture.h"
#include "llpolymesh.h"
#include "v4color.h"
#include "llapr.h"
@@ -72,7 +72,7 @@ protected:
LLColor4 mColor; // color value
// LLColor4 mSpecular; // specular color (always white for now)
F32 mShiny; // shiny value
- LLPointer<LLViewerImage> mTexture; // ptr to a global texture
+ LLPointer<LLViewerTexture> mTexture; // ptr to a global texture
LLTexLayerSet* mLayerSet; // ptr to a layer set owned by the avatar
U32 mTestImageName; // handle to a temporary texture for previewing uploads
LLPolyMesh* mMesh; // ptr to a global polymesh
@@ -110,7 +110,7 @@ public:
void setSpecular( const LLColor4& color, F32 shiny ) { /*mSpecular = color;*/ mShiny = shiny; };
// Sets the shape texture
- void setTexture( LLViewerImage *texture );
+ void setTexture( LLViewerTexture *texture );
void setTestTexture( U32 name ) { mTestImageName = name; }
@@ -148,7 +148,7 @@ public:
void setIsTransparent(BOOL is_transparent) { mIsTransparent = is_transparent; }
- /*virtual*/ BOOL isAnimatable() { return FALSE; }
+ /*virtual*/ BOOL isAnimatable() const { return FALSE; }
static void updateVectorize(); // Update globals when settings variables change
diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp
index ab5cdeba44..4e0c4023fd 100644
--- a/indra/newview/llviewerkeyboard.cpp
+++ b/indra/newview/llviewerkeyboard.cpp
@@ -36,7 +36,7 @@
#include "llviewerkeyboard.h"
#include "llmath.h"
#include "llagent.h"
-#include "llchatbar.h"
+#include "llnearbychatbar.h"
#include "llviewercontrol.h"
#include "llfocusmgr.h"
#include "llmorphview.h"
@@ -500,8 +500,7 @@ void stop_moving( EKeystate s )
void start_chat( EKeystate s )
{
// start chat
- LLChatBar::startChat(NULL);
-// gChatBar->startChat(NULL);
+ LLNearbyChatBar::startChat(NULL);
}
void start_gesture( EKeystate s )
@@ -509,18 +508,16 @@ void start_gesture( EKeystate s )
if (KEYSTATE_UP == s &&
!(gFocusMgr.getKeyboardFocus() && gFocusMgr.getKeyboardFocus()->acceptsTextInput()))
{
- //TODO* remove DUMMY chatbar
- LLChatBar::startChat(NULL);
-// if (gChatBar->getCurrentChat().empty())
-// {
-// // No existing chat in chat editor, insert '/'
-// gChatBar->startChat("/");
-// }
-// else
-// {
-// // Don't overwrite existing text in chat editor
-// gChatBar->startChat(NULL);
-// }
+ if (LLNearbyChatBar::getInstance()->getCurrentChat().empty())
+ {
+ // No existing chat in chat editor, insert '/'
+ LLNearbyChatBar::startChat("/");
+ }
+ else
+ {
+ // Don't overwrite existing text in chat editor
+ LLNearbyChatBar::startChat(NULL);
+ }
}
}
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 085d6d47e5..21d686a250 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -34,12 +34,20 @@
#include "llviewermedia.h"
+#include "audioengine.h"
+
+#include "llparcel.h"
+
#include "llmimetypes.h"
#include "llviewercontrol.h"
-#include "llviewerimage.h"
+#include "llviewertexture.h"
+#include "llviewerparcelmedia.h"
+#include "llviewerparcelmgr.h"
+#include "llviewerparcelmedia.h"
+#include "llviewerparcelmgr.h"
#include "llviewerwindow.h"
#include "llversionviewer.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llevent.h" // LLSimpleListener
#include "llmediamanager.h"
@@ -53,58 +61,58 @@
class LLViewerMediaImpl
: public LLMediaObserver
{
- public:
- LLViewerMediaImpl()
- : mMediaSource( NULL ),
- mMovieImageID(),
- mMovieImageHasMips(false)
- { }
-
- void destroyMediaSource();
-
- void play(const std::string& media_url,
- const std::string& mime_type,
- const LLUUID& placeholder_texture_id,
- S32 media_width, S32 media_height, U8 media_auto_scale,
- U8 media_loop);
-
- void stop();
- void pause();
- void start();
- void seek(F32 time);
- void setVolume(F32 volume);
- LLMediaBase::EStatus getStatus();
-
- /*virtual*/ void onMediaSizeChange(const EventType& event_in);
- /*virtual*/ void onMediaContentsChange(const EventType& event_in);
-
- void updateMovieImage(const LLUUID& image_id, BOOL active);
- void updateImagesMediaStreams();
- LLUUID getMediaTextureID();
-
- // Internally set our desired browser user agent string, including
- // the Second Life version and skin name. Used because we can
- // switch skins without restarting the app.
- static void updateBrowserUserAgent();
-
- // Callback for when the SkinCurrent control is changed to
- // switch the user agent string to indicate the new skin.
- static bool handleSkinCurrentChanged(const LLSD& newvalue);
-
- public:
-
- // a single media url with some data and an impl.
- LLMediaBase* mMediaSource;
- LLUUID mMovieImageID;
- bool mMovieImageHasMips;
- std::string mMediaURL;
- std::string mMimeType;
- private:
- void initializePlaceholderImage(LLViewerImage *placeholder_image, LLMediaBase *media_source);
+public:
+ LLViewerMediaImpl()
+ : mMediaSource( NULL ),
+ mMovieImageID(),
+ mMovieImageHasMips(false)
+ { }
+
+ void destroyMediaSource();
+
+ void play(const std::string& media_url,
+ const std::string& mime_type,
+ const LLUUID& placeholder_texture_id,
+ S32 media_width, S32 media_height, U8 media_auto_scale,
+ U8 media_loop);
+
+ void stop();
+ void pause();
+ void start();
+ void seek(F32 time);
+ void setVolume(F32 volume);
+ LLMediaBase::EStatus getStatus();
+
+ /*virtual*/ void onMediaSizeChange(const EventType& event_in);
+ /*virtual*/ void onMediaContentsChange(const EventType& event_in);
+
+ void restoreMovieImage();
+ void updateImagesMediaStreams();
+ LLUUID getMediaTextureID();
+
+ // Internally set our desired browser user agent string, including
+ // the Second Life version and skin name. Used because we can
+ // switch skins without restarting the app.
+ static void updateBrowserUserAgent();
+
+ // Callback for when the SkinCurrent control is changed to
+ // switch the user agent string to indicate the new skin.
+ static bool handleSkinCurrentChanged(const LLSD& newvalue);
+
+public:
+
+ // a single media url with some data and an impl.
+ LLMediaBase* mMediaSource;
+ LLUUID mMovieImageID;
+ bool mMovieImageHasMips;
+ std::string mMediaURL;
+ std::string mMimeType;
+
+private:
+ void initializePlaceholderImage(LLViewerMediaTexture *placeholder_image, LLMediaBase *media_source);
};
static LLViewerMediaImpl sViewerMediaImpl;
-
//////////////////////////////////////////////////////////////////////////////////////////
void LLViewerMediaImpl::destroyMediaSource()
@@ -112,12 +120,11 @@ void LLViewerMediaImpl::destroyMediaSource()
LLMediaManager* mgr = LLMediaManager::getInstance();
if ( mMediaSource )
{
- bool was_playing = LLViewerMedia::isMediaPlaying();
mMediaSource->remObserver(this);
mgr->destroySource( mMediaSource );
// Restore the texture
- updateMovieImage(LLUUID::null, was_playing);
+ restoreMovieImage();
}
mMediaSource = NULL;
@@ -223,49 +230,36 @@ LLMediaBase::EStatus LLViewerMediaImpl::getStatus()
}
//////////////////////////////////////////////////////////////////////////////////////////
-// static
-void LLViewerMediaImpl::updateMovieImage(const LLUUID& uuid, BOOL active)
+void LLViewerMediaImpl::restoreMovieImage()
{
// IF the media image hasn't changed, do nothing
- if (mMovieImageID == uuid)
+ if (mMovieImageID.isNull())
{
return;
}
- // If we have changed media uuid, restore the old one
- if (!mMovieImageID.isNull())
- {
- LLViewerImage* oldImage = LLViewerImage::getImage( mMovieImageID );
- if (oldImage)
- {
- oldImage->reinit(mMovieImageHasMips);
- oldImage->mIsMediaTexture = FALSE;
- }
- mMovieImageID.setNull();
- }
- // If the movie is playing, set the new media image
- if (active && !uuid.isNull())
+
+ //restore the movie image to the old one
+ LLViewerMediaTexture* media = LLViewerTextureManager::findMediaTexture( mMovieImageID ) ;
+ if (media)
{
- LLViewerImage* viewerImage = LLViewerImage::getImage( uuid );
- if( viewerImage )
+ if(media->getOldTexture())//set back to the old texture if it exists
{
- mMovieImageID = uuid;
- // Can't use mipmaps for movies because they don't update the full image
- mMovieImageHasMips = viewerImage->getUseMipMaps();
- viewerImage->reinit(FALSE);
- viewerImage->mIsMediaTexture = TRUE;
+ media->switchToTexture(media->getOldTexture()) ;
+ media->setPlaying(FALSE) ;
}
+ media->reinit(mMovieImageHasMips);
}
+ mMovieImageID.setNull();
}
//////////////////////////////////////////////////////////////////////////////////////////
-// static
void LLViewerMediaImpl::updateImagesMediaStreams()
{
LLMediaManager::updateClass();
}
-void LLViewerMediaImpl::initializePlaceholderImage(LLViewerImage *placeholder_image, LLMediaBase *media_source)
+void LLViewerMediaImpl::initializePlaceholderImage(LLViewerMediaTexture *placeholder_image, LLMediaBase *media_source)
{
int media_width = media_source->getMediaWidth();
int media_height = media_source->getMediaHeight();
@@ -302,19 +296,14 @@ void LLViewerMediaImpl::initializePlaceholderImage(LLViewerImage *placeholder_im
// placeholder_image->setExplicitFormat()
placeholder_image->setUseMipMaps(FALSE);
-
- // MEDIAOPT: set this dynamically on play/stop
- placeholder_image->mIsMediaTexture = true;
}
-
-
// virtual
void LLViewerMediaImpl::onMediaContentsChange(const EventType& event_in)
{
LLMediaBase* media_source = event_in.getSubject();
- LLViewerImage* placeholder_image = gImageList.getImage( mMovieImageID );
- if ((placeholder_image) && (placeholder_image->getHasGLTexture()))
+ LLViewerMediaTexture* placeholder_image = LLViewerTextureManager::getMediaTexture( mMovieImageID ) ;
+ if (placeholder_image && placeholder_image->hasValidGLTexture())
{
if (placeholder_image->getUseMipMaps())
{
@@ -339,7 +328,7 @@ void LLViewerMediaImpl::onMediaContentsChange(const EventType& event_in)
void LLViewerMediaImpl::onMediaSizeChange(const EventType& event_in)
{
LLMediaBase* media_source = event_in.getSubject();
- LLViewerImage* placeholder_image = gImageList.getImage( mMovieImageID );
+ LLViewerMediaTexture* placeholder_image = LLViewerTextureManager::getMediaTexture( mMovieImageID ) ;
if (placeholder_image)
{
initializePlaceholderImage(placeholder_image, media_source);
@@ -350,75 +339,6 @@ void LLViewerMediaImpl::onMediaSizeChange(const EventType& event_in)
}
}
-
- // Get the image we're using
-
- /*
- // update media stream if required
- LLMediaEngine* media_engine = LLMediaEngine::getInstance();
- if (media_engine)
- {
- if ( media_engine->update() )
- {
- LLUUID media_uuid = media_engine->getImageUUID();
- updateMovieImage(media_uuid, TRUE);
- if (!media_uuid.isNull())
- {
- LLViewerImage* viewerImage = getImage( media_uuid );
- if( viewerImage )
- {
- LLMediaBase* renderer = media_engine->getMediaRenderer();
- if ((renderer->getTextureWidth() != viewerImage->getWidth()) ||
- (renderer->getTextureHeight() != viewerImage->getHeight()) ||
- (renderer->getTextureDepth() != viewerImage->getComponents()) ||
- (viewerImage->getHasGLTexture() == FALSE))
- {
- // destroy existing GL image
- viewerImage->destroyGLTexture();
-
- // set new size
- viewerImage->setSize( renderer->getTextureWidth(),
- renderer->getTextureHeight(),
- renderer->getTextureDepth() );
-
- LLPointer<LLImageRaw> raw = new LLImageRaw(renderer->getTextureWidth(),
- renderer->getTextureHeight(),
- renderer->getTextureDepth());
- raw->clear(0x7f,0x7f,0x7f,0xff);
- viewerImage->createGLTexture(0, raw);
- }
-
- // Set the explicit format the instance wants
- viewerImage->setExplicitFormat(renderer->getTextureFormatInternal(),
- renderer->getTextureFormatPrimary(),
- renderer->getTextureFormatType(),
- renderer->getTextureFormatSwapBytes());
- // This should be redundant, but just in case:
- viewerImage->setUseMipMaps(FALSE);
-
- LLImageRaw* rawImage = media_engine->getImageRaw();
- if ( rawImage )
- {
- viewerImage->setSubImage(rawImage, 0, 0,
- renderer->getMediaWidth(),
- renderer->getMediaHeight());
- }
- }
- else
- {
- llwarns << "MediaEngine update unable to get viewer image for GL texture" << llendl;
- }
- }
- }
- else
- {
- LLUUID media_uuid = media_engine->getImageUUID();
- updateMovieImage(media_uuid, FALSE);
- }
- }
- */
-
-
LLUUID LLViewerMediaImpl::getMediaTextureID()
{
return mMovieImageID;
@@ -461,7 +381,7 @@ bool LLViewerMediaImpl::handleSkinCurrentChanged(const LLSD& /*newvalue*/)
// Wrapper class
//////////////////////////////////////////////////////////////////////////////////////////
-
+S32 LLViewerMedia::mMusicState = LLViewerMedia::STOPPED;
//////////////////////////////////////////////////////////////////////////////////////////
// The viewer takes a long time to load the start screen. Part of the problem
// is media initialization -- in particular, QuickTime loads many DLLs and
@@ -692,6 +612,13 @@ bool LLViewerMedia::isActiveMediaTexture(const LLUUID& id)
}
//////////////////////////////////////////////////////////////////////////////////////////
+//static
+bool LLViewerMedia::isMusicPlaying()
+{
+ return mMusicState == PLAYING;
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////
// static
std::string LLViewerMedia::getMediaURL()
{
@@ -709,3 +636,58 @@ void LLViewerMedia::setMimeType(std::string mime_type)
{
sViewerMediaImpl.mMimeType = mime_type;
}
+
+//////////////////////////////////////////////////////////////////////////////////////////
+//static
+void LLViewerMedia::toggleMusicPlay(void*)
+{
+ if (mMusicState != PLAYING)
+ {
+ mMusicState = PLAYING; // desired state
+ if (gAudiop)
+ {
+ LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
+ if ( parcel )
+ {
+ gAudiop->startInternetStream(parcel->getMusicURL());
+ }
+ }
+ }
+ else
+ {
+ mMusicState = STOPPED; // desired state
+ if (gAudiop)
+ {
+ gAudiop->stopInternetStream();
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////
+//static
+void LLViewerMedia::toggleMediaPlay(void*)
+{
+ if (LLViewerMedia::isMediaPaused())
+ {
+ LLViewerParcelMedia::start();
+ }
+ else if(LLViewerMedia::isMediaPlaying())
+ {
+ LLViewerParcelMedia::pause();
+ }
+ else
+ {
+ LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
+ if (parcel)
+ {
+ LLViewerParcelMedia::play(parcel);
+ }
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////
+//static
+void LLViewerMedia::mediaStop(void*)
+{
+ LLViewerParcelMedia::stop();
+}
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index 600d7409e2..b3fb2c9031 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -67,6 +67,7 @@ class LLViewerMedia
static bool isMediaPaused();
static bool hasMedia();
static bool isActiveMediaTexture(const LLUUID& id);
+ static bool isMusicPlaying();
static std::string getMediaURL();
static std::string getMimeType();
@@ -74,9 +75,16 @@ class LLViewerMedia
static void updateImagesMediaStreams();
+ static void toggleMusicPlay(void*);
+ static void toggleMediaPlay(void*);
+ static void mediaStop(void*);
+
private:
// Fill in initialization data for LLMediaManager::initClass()
static void buildMediaManagerData( LLMediaManagerData* init_data );
+
+ enum { STOPPED=0, PLAYING=1, PAUSED=2 };
+ static S32 mMusicState;
};
#endif // LLVIEWERMEDIA_H
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 1ab10b2f27..96ebe49354 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -87,14 +87,12 @@
#include "llfloateractivespeakers.h"
#include "llfloateranimpreview.h"
#include "llfloateravatartextures.h"
-#include "llfloaterbeacons.h"
#include "llfloaterbuildoptions.h"
#include "llfloaterbump.h"
#include "llfloaterbuy.h"
#include "llfloaterbuycontents.h"
#include "llfloaterbuycurrency.h"
#include "llfloaterbuyland.h"
-#include "llfloatercamera.h"
#include "llfloaterchat.h"
#include "llfloatercustomize.h"
#include "llfloaterdaycycle.h"
@@ -133,7 +131,8 @@
#include "llfloaterworldmap.h"
#include "llfloatermemleak.h"
#include "llfasttimerview.h"
-#include "llfriendactions.h"
+#include "llavataractions.h"
+#include "lllandmarkactions.h"
#include "llmemoryview.h"
#include "llgivemoney.h"
#include "llgroupmgr.h"
@@ -146,7 +145,7 @@
#include "llimagetga.h"
#include "llinventorybridge.h"
#include "llinventorymodel.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
#include "llkeyboard.h"
#include "llpanellogin.h"
#include "llmenucommands.h"
@@ -161,6 +160,7 @@
#include "llresmgr.h"
#include "llrootview.h"
#include "llselectmgr.h"
+#include "llsidetray.h"
#include "llsky.h"
#include "llstatusbar.h"
#include "llstatview.h"
@@ -184,7 +184,7 @@
#include "llviewercamera.h"
#include "llviewergenericmessage.h"
#include "llviewergesture.h"
-#include "llviewerimagelist.h" // gImageList
+#include "llviewertexturelist.h" // gTextureList
#include "llviewerinventory.h"
#include "llviewermenufile.h" // init_menu_file()
#include "llviewermessage.h"
@@ -500,30 +500,30 @@ void init_menus()
///
/// Pie menus
///
- gPieSelf = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_pie_self.xml", gMenuHolder);
+ gPieSelf = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_pie_self.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
// TomY TODO: what shall we do about these?
gDetachScreenPieMenu = gMenuHolder->getChild<LLContextMenu>("Object Detach HUD", true);
gDetachPieMenu = gMenuHolder->getChild<LLContextMenu>("Object Detach", true);
- gPieAvatar = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_pie_avatar.xml", gMenuHolder);
+ gPieAvatar = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_pie_avatar.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
- gPieObject = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_pie_object.xml", gMenuHolder);
+ gPieObject = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_pie_object.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
gAttachScreenPieMenu = gMenuHolder->getChild<LLContextMenu>("Object Attach HUD");
gAttachPieMenu = gMenuHolder->getChild<LLContextMenu>("Object Attach");
gPieRate = gMenuHolder->getChild<LLContextMenu>("Rate Menu");
- gPieAttachment = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_pie_attachment.xml", gMenuHolder);
+ gPieAttachment = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_pie_attachment.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
- gPieLand = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_pie_land.xml", gMenuHolder);
+ gPieLand = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_pie_land.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
///
/// set up the colors
///
LLColor4 color;
- LLColor4 context_menu_color = gSavedSkinSettings.getColor("MenuPopupBgColor");
+ LLColor4 context_menu_color = LLUIColorTable::instance().getColor("MenuPopupBgColor");
gPieSelf->setBackgroundColor( context_menu_color );
gPieAvatar->setBackgroundColor( context_menu_color );
@@ -532,19 +532,19 @@ void init_menus()
gPieLand->setBackgroundColor( context_menu_color );
- color = gSavedSkinSettings.getColor( "MenuPopupBgColor" );
+ color = LLUIColorTable::instance().getColor( "MenuPopupBgColor" );
gPopupMenuView->setBackgroundColor( color );
// If we are not in production, use a different color to make it apparent.
if (LLViewerLogin::getInstance()->isInProductionGrid())
{
- color = gSavedSkinSettings.getColor( "MenuBarBgColor" );
+ color = LLUIColorTable::instance().getColor( "MenuBarBgColor" );
}
else
{
- color = gSavedSkinSettings.getColor( "MenuNonProductionBgColor" );
+ color = LLUIColorTable::instance().getColor( "MenuNonProductionBgColor" );
}
- gMenuBarView = LLUICtrlFactory::getInstance()->createFromFile<LLMenuBarGL>("menu_viewer.xml", gMenuHolder);
+ gMenuBarView = LLUICtrlFactory::getInstance()->createFromFile<LLMenuBarGL>("menu_viewer.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
gMenuBarView->setRect(LLRect(0, top, 0, top - MENU_BAR_HEIGHT));
gMenuBarView->setBackgroundColor( color );
@@ -575,7 +575,7 @@ void init_menus()
// Let land based option enable when parcel changes
gMenuParcelObserver = new LLMenuParcelObserver();
- gLoginMenuBarView = LLUICtrlFactory::getInstance()->createFromFile<LLMenuBarGL>("menu_login.xml", gMenuHolder);
+ gLoginMenuBarView = LLUICtrlFactory::getInstance()->createFromFile<LLMenuBarGL>("menu_login.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
gLoginMenuBarView->arrangeAndClear();
LLRect menuBarRect = gLoginMenuBarView->getRect();
gLoginMenuBarView->setRect(LLRect(menuBarRect.mLeft, menuBarRect.mTop, gViewerWindow->getRootView()->getRect().getWidth() - menuBarRect.mLeft, menuBarRect.mBottom));
@@ -612,11 +612,6 @@ class LLAdvancedToggleConsole : public view_listener_t
toggle_visibility( (void*)gDebugView->mMemoryView );
}
#endif
- else if ("notifications" == console_type)
- {
- //LLFloaterNotificationConsole::showInstance();
- LLFloaterReg::showInstance("notifications_console");
- }
return true;
}
};
@@ -1117,30 +1112,6 @@ class LLAdvancedCheckFrameTest : public view_listener_t
};
- //
-/////////////////////////////
-//// HIDE SELECTED OBJECTS //
-/////////////////////////////
-//
-//
-//class LLAdvancedToggleHideSelectedObjects : public view_listener_t
-//{
-// bool handleEvent(const LLSD& userdata)
-// {
-// LLSelectMgr::sHideSelectedObjects = !(LLSelectMgr::sHideSelectedObjects);
-// return true;
-// }
-//};
- //
-//class LLAdvancedCheckHideSelectedObjects : public view_listener_t
-//{
-// bool handleEvent(const LLSD& userdata)
-// {
-// bool new_value = gHideSelectedObjects;
-// return new_value;
-// }
-//};
-
///////////////////////////
// SELECTED TEXTURE INFO //
///////////////////////////
@@ -1185,7 +1156,7 @@ class LLAdvancedToggleDisableTextures : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- LLViewerImage::sDontLoadVolumeTextures = !LLViewerImage::sDontLoadVolumeTextures;
+ LLViewerTexture::sDontLoadVolumeTextures = !LLViewerTexture::sDontLoadVolumeTextures;
return true;
}
};
@@ -1194,7 +1165,7 @@ class LLAdvancedCheckDisableTextures : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- bool new_value = LLViewerImage::sDontLoadVolumeTextures; // <-- make this using LLCacheControl
+ bool new_value = LLViewerTexture::sDontLoadVolumeTextures; // <-- make this using LLCacheControl
return new_value;
}
};
@@ -1506,16 +1477,6 @@ class LLAdvancedCheckDebugWindowProc : public view_listener_t
// ------------------------------XUI MENU ---------------------------
-
-class LLAdvancedShowFontTest : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- LLFloaterFontTest::show(NULL);
- return true;
- }
-};
-
//////////////////////
// LOAD UI FROM XML //
//////////////////////
@@ -1547,6 +1508,15 @@ class LLAdvancedSaveUIToXML : public view_listener_t
};
+class LLAdvancedSendTestIms : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ LLIMModel::instance().testMessages();
+ return true;
+}
+};
+
///////////////
// XUI NAMES //
@@ -1987,18 +1957,6 @@ class LLAdvancedDumpAvatarLocalTextures : public view_listener_t
}
};
-////////////////////////////////
-// Memory Leaking Simulation //
-////////////////////////////////
-class LLAdvancedMemoryLeakingSimulation : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- LLFloaterMemLeak::show(NULL);
- return true;
- }
-};
-
#endif
/////////////////
@@ -2147,7 +2105,6 @@ class LLAdvancedShowDebugSettings : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- // LLFloaterSettingsDebug::showInstance(userdata);
LLFloaterReg::showInstance("settings_debug",userdata);
return true;
}
@@ -2414,14 +2371,6 @@ class LLAdminHandleRegionDumpTempAssetData: public view_listener_t
}
};
//Admin (Top Level)
-class LLAdminShowGodTools: public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- LLFloaterGodTools::showInstance(LLSD());
- return true;
- }
-};
class LLAdminOnSaveState: public view_listener_t
{
@@ -2581,7 +2530,7 @@ class LLObjectEnableTouch : public view_listener_t
// label.assign("Touch");
// }
//}
-
+/*
bool handle_object_open()
{
LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
@@ -2598,7 +2547,7 @@ class LLObjectOpen : public view_listener_t
return handle_object_open();
}
};
-
+*/
class LLObjectEnableOpen : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -2715,16 +2664,6 @@ class LLObjectEdit : public view_listener_t
}
};
-class LLObjectInspect : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- LLFloaterInspect::show();
- return true;
- }
-};
-
-
//---------------------------------------------------------------------------
// Land pie menu
//---------------------------------------------------------------------------
@@ -3514,6 +3453,26 @@ class LLSelfEnableStandUp : public view_listener_t
}
};
+class LLSelfFriends : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ // Open "Friends" tab of the "People" panel in side tray.
+ LLSideTray::getInstance()->showPanel("panel_people", "friends_panel");
+ return true;
+ }
+};
+
+class LLSelfGroups : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ // Open "Groups" tab of the "People" panel in side tray.
+ LLSideTray::getInstance()->showPanel("panel_people", "groups_panel");
+ return true;
+ }
+};
+
BOOL check_admin_override(void*)
{
return gAgent.getAdminOverride();
@@ -3647,14 +3606,9 @@ bool LLHaveCallingcard::operator()(LLInventoryCategory* cat,
}
*/
-BOOL is_agent_friend(const LLUUID& agent_id)
-{
- return (LLAvatarTracker::instance().getBuddyInfo(agent_id) != NULL);
-}
-
BOOL is_agent_mappable(const LLUUID& agent_id)
{
- return (is_agent_friend(agent_id) &&
+ return (LLAvatarActions::isFriend(agent_id) &&
LLAvatarTracker::instance().getBuddyInfo(agent_id)->isOnline() &&
LLAvatarTracker::instance().getBuddyInfo(agent_id)->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION)
);
@@ -3667,7 +3621,7 @@ class LLAvatarEnableAddFriend : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject());
- bool new_value = avatar && !is_agent_friend(avatar->getID());
+ bool new_value = avatar && !LLAvatarActions::isFriend(avatar->getID());
return new_value;
}
};
@@ -3691,7 +3645,7 @@ void request_friendship(const LLUUID& dest_id)
}
if (!fullname.empty())
{
- LLFriendActions::requestFriendshipDialog(dest_id, fullname);
+ LLAvatarActions::requestFriendshipDialog(dest_id, fullname);
}
else
{
@@ -4382,7 +4336,7 @@ void handle_take()
}
// check library
- if(gInventory.isObjectDescendentOf(category_id, gInventoryLibraryRoot))
+ if(gInventory.isObjectDescendentOf(category_id, gInventory.getLibraryRootFolderID()))
{
category_id.setNull();
}
@@ -5317,24 +5271,6 @@ class LLWorldSetBusy : public view_listener_t
}
};
-bool can_create_landmark()
-{
- BOOL can = FALSE;
-
- LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
- if (agent_parcel)
-{
-
- if (agent_parcel->getAllowLandmark()
- || LLViewerParcelMgr::isParcelOwnedByAgent(agent_parcel, GP_LAND_ALLOW_LANDMARK))
- {
- can = TRUE;
- }
- }
-
- return can;
-}
-
class LLWorldCreateLandmark : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -5423,7 +5359,7 @@ class LLAvatarAddFriend : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
- if(avatar && !is_agent_friend(avatar->getID()))
+ if(avatar && !LLAvatarActions::isFriend(avatar->getID()))
{
request_friendship(avatar->getID());
}
@@ -5612,35 +5548,10 @@ class LLShowFloater : public view_listener_t
{
LLToolBar::toggle(NULL);
}
- else if (floater_name == "mute list")
- {
- LLFloaterReg::toggleInstance("mute");
- }
- else if (floater_name == "camera controls")
- {
- LLFloaterCamera::toggleInstance();
- }
- else if (floater_name == "movement controls")
- {
- LLFloaterMove::toggleInstance();
- }
else if (floater_name == "my land")
{
LLFloaterLandHoldings::show(NULL);
}
- else if (floater_name == "about land")
- {
- if (LLViewerParcelMgr::getInstance()->selectionEmpty())
- {
- LLViewerParcelMgr::getInstance()->selectParcelAt(gAgent.getPositionGlobal());
- }
-
- LLFloaterLand::showInstance();
- }
- else if (floater_name == "about region")
- {
- LLFloaterRegionInfo::showInstance();
- }
else if (floater_name == "buy land")
{
if (LLViewerParcelMgr::getInstance()->selectionEmpty())
@@ -5650,10 +5561,6 @@ class LLShowFloater : public view_listener_t
LLViewerParcelMgr::getInstance()->startBuyLand();
}
- else if (floater_name == "grid options")
- {
- LLFloaterReg::showInstance("build_options");
- }
else if (floater_name == "script errors")
{
LLFloaterScriptDebug::show(LLUUID::null);
@@ -5662,48 +5569,16 @@ class LLShowFloater : public view_listener_t
{
gViewerHtmlHelp.show();
}
- else if (floater_name == "help tutorial")
- {
- LLFloaterHUD::showHUD();
- }
else if (floater_name == "complaint reporter")
{
// Prevent menu from appearing in screen shot.
gMenuHolder->hideMenus();
LLFloaterReporter::showFromMenu(COMPLAINT_REPORT);
}
- else if (floater_name == "mean events")
- {
- if (!gNoRender)
- {
- //LLFloaterBump::showInstance();
- LLFloaterReg::showInstance("bumps");
- }
- }
- else if (floater_name == "lag meter")
- {
- LLFloaterReg::showInstance("lagmeter");
- }
else if (floater_name == "buy currency")
{
LLFloaterBuyCurrency::buyCurrency();
}
- else if (floater_name == "about")
- {
- LLFloaterReg::showInstance("sl_about");
- }
- else if (floater_name == "active speakers")
- {
- LLFloaterActiveSpeakers::toggleInstance(LLSD());
- }
- else if (floater_name == "beacons")
- {
- LLFloaterBeacons::toggleInstance(LLSD());
- }
- else if (floater_name == "perm prefs")
- {
- LLFloaterPerms::toggleInstance(LLSD());
- }
else
{
LLFloaterReg::toggleInstance(floater_name);
@@ -5722,30 +5597,6 @@ class LLFloaterVisible : public view_listener_t
{
new_value = LLToolBar::visible(NULL);
}
- else if (floater_name == "mute list")
- {
- new_value = LLFloaterReg::instanceVisible("mute");
- }
- else if (floater_name == "camera controls")
- {
- new_value = LLFloaterCamera::instanceVisible();
- }
- else if (floater_name == "movement controls")
- {
- new_value = LLFloaterMove::instanceVisible();
- }
- else if (floater_name == "stat bar")
- {
- new_value = gSavedSettings.getBOOL("ShowDebugStats");
- }
- else if (floater_name == "active speakers")
- {
- new_value = LLFloaterActiveSpeakers::instanceVisible(LLSD());
- }
- else if (floater_name == "beacons")
- {
- new_value = LLFloaterBeacons::instanceVisible(LLSD());
- }
else
{
new_value = LLFloaterReg::instanceVisible(floater_name);
@@ -5852,7 +5703,7 @@ class LLShowAgentProfile : public view_listener_t
LLVOAvatar* avatar = find_avatar_from_object(agent_id);
if (avatar)
{
- LLFriendActions::showProfile(avatar->getID());
+ LLAvatarActions::showProfile(avatar->getID());
}
return true;
}
@@ -6440,8 +6291,8 @@ class LLToolsSelectedScriptAction : public view_listener_t
msg = "RunningNot";
}
LLUUID id; id.generate();
- LLFloater* floater = LLFloaterReg::getInstance(name, LLSD(id));
- LLFloaterScriptQueue* queue = dynamic_cast<LLFloaterScriptQueue*>(floater);
+
+ LLFloaterScriptQueue* queue =LLFloaterReg::getTypedInstance<LLFloaterScriptQueue>(name, LLSD(id));
if (queue)
{
queue->setMono(mono);
@@ -6450,7 +6301,7 @@ class LLToolsSelectedScriptAction : public view_listener_t
else
{
llwarns << "Failed to generate LLFloaterScriptQueue with action: " << action << llendl;
- delete floater;
+ delete queue;
}
return true;
}
@@ -6477,7 +6328,7 @@ void handle_selected_texture_info(void*)
{
if (!node->isTESelected(i)) continue;
- LLViewerImage* img = node->getObject()->getTEImage(i);
+ LLViewerTexture* img = node->getObject()->getTEImage(i);
LLUUID image_id = img->getID();
faces_per_texture[image_id].push_back(i);
}
@@ -6487,7 +6338,7 @@ void handle_selected_texture_info(void*)
{
LLUUID image_id = it->first;
U8 te = it->second[0];
- LLViewerImage* img = node->getObject()->getTEImage(te);
+ LLViewerTexture* img = node->getObject()->getTEImage(te);
S32 height = img->getHeight();
S32 width = img->getWidth();
S32 components = img->getComponents();
@@ -6807,9 +6658,7 @@ class LLWorldEnableCreateLandmark : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- bool new_value = can_create_landmark();
-
- return new_value;
+ return !LLLandmarkActions::landmarkAlreadyExists();
}
};
@@ -7016,7 +6865,7 @@ void handle_grab_texture(void* data)
gInventory.updateItem(item);
gInventory.notifyObservers();
- LLInventoryView* view = LLInventoryView::getActiveInventory();
+ LLFloaterInventory* view = LLFloaterInventory::getActiveInventory();
// Show the preview panel for textures to let
// user know that the image is now in inventory.
@@ -7026,7 +6875,7 @@ void handle_grab_texture(void* data)
view->getPanel()->setSelection(item_id, TAKE_FOCUS_NO);
view->getPanel()->openSelected();
- //LLInventoryView::dumpSelectionInformation((void*)view);
+ //LLFloaterInventory::dumpSelectionInformation((void*)view);
// restore keyboard focus
gFocusMgr.setKeyboardFocus(focus_ctrl);
}
@@ -7261,10 +7110,14 @@ void handle_buy_currency_test(void*)
llinfos << "buy currency url " << url << llendl;
- LLFloaterHtmlCurrency* floater = LLFloaterHtmlCurrency::showInstance(url);
- // Needed so we can use secondlife:///app/floater/self/close SLURLs
- floater->setTrusted(true);
- floater->center();
+ LLFloaterHtmlCurrency* floater =LLFloaterReg::getTypedInstance<LLFloaterHtmlCurrency>("html_currency", LLSD(url));
+ if(floater)
+ {
+ LLFloaterReg::showInstance("html_currency", LLSD(url));
+ // Needed so we can use secondlife:///app/floater/self/close SLURLs
+ floater->setTrusted(true);
+ floater->center();
+ }
}
void handle_rebake_textures(void*)
@@ -7521,47 +7374,47 @@ class LLEditEnableTakeOff : public view_listener_t
bool new_value = false;
if (clothing == "shirt")
{
- new_value = LLAgentWearables::selfHasWearable((void *)WT_SHIRT);
+ new_value = LLAgentWearables::selfHasWearable(WT_SHIRT);
}
if (clothing == "pants")
{
- new_value = LLAgentWearables::selfHasWearable((void *)WT_PANTS);
+ new_value = LLAgentWearables::selfHasWearable(WT_PANTS);
}
if (clothing == "shoes")
{
- new_value = LLAgentWearables::selfHasWearable((void *)WT_SHOES);
+ new_value = LLAgentWearables::selfHasWearable(WT_SHOES);
}
if (clothing == "socks")
{
- new_value = LLAgentWearables::selfHasWearable((void *)WT_SOCKS);
+ new_value = LLAgentWearables::selfHasWearable(WT_SOCKS);
}
if (clothing == "jacket")
{
- new_value = LLAgentWearables::selfHasWearable((void *)WT_JACKET);
+ new_value = LLAgentWearables::selfHasWearable(WT_JACKET);
}
if (clothing == "gloves")
{
- new_value = LLAgentWearables::selfHasWearable((void *)WT_GLOVES);
+ new_value = LLAgentWearables::selfHasWearable(WT_GLOVES);
}
if (clothing == "undershirt")
{
- new_value = LLAgentWearables::selfHasWearable((void *)WT_UNDERSHIRT);
+ new_value = LLAgentWearables::selfHasWearable(WT_UNDERSHIRT);
}
if (clothing == "underpants")
{
- new_value = LLAgentWearables::selfHasWearable((void *)WT_UNDERPANTS);
+ new_value = LLAgentWearables::selfHasWearable(WT_UNDERPANTS);
}
if (clothing == "skirt")
{
- new_value = LLAgentWearables::selfHasWearable((void *)WT_SKIRT);
+ new_value = LLAgentWearables::selfHasWearable(WT_SKIRT);
}
if (clothing == "alpha")
{
- new_value = LLAgentWearables::selfHasWearable((void *)WT_ALPHA);
+ new_value = LLAgentWearables::selfHasWearable(WT_ALPHA);
}
if (clothing == "tattoo")
{
- new_value = LLAgentWearables::selfHasWearable((void *)WT_TATTOO);
+ new_value = LLAgentWearables::selfHasWearable(WT_TATTOO);
}
return new_value;
}
@@ -7983,11 +7836,12 @@ void initialize_menus()
// Advanced > XUI
- view_listener_t::addMenu(new LLAdvancedShowFontTest(), "Advanced.ShowFontTest");
+ commit.add("Advanced.ReloadColorSettings", boost::bind(&LLUIColorTable::loadFromSettings, LLUIColorTable::getInstance()));
view_listener_t::addMenu(new LLAdvancedLoadUIFromXML(), "Advanced.LoadUIFromXML");
view_listener_t::addMenu(new LLAdvancedSaveUIToXML(), "Advanced.SaveUIToXML");
view_listener_t::addMenu(new LLAdvancedToggleXUINames(), "Advanced.ToggleXUINames");
view_listener_t::addMenu(new LLAdvancedCheckXUINames(), "Advanced.CheckXUINames");
+ view_listener_t::addMenu(new LLAdvancedSendTestIms(), "Advanced.SendTestIMs");
// Advanced > Character > Grab Baked Texture
view_listener_t::addMenu(new LLAdvancedGrabBakedTexture(), "Advanced.GrabBakedTexture");
@@ -8023,7 +7877,6 @@ void initialize_menus()
#ifndef LL_RELEASE_FOR_DOWNLOAD
view_listener_t::addMenu(new LLAdvancedDebugAvatarTextures(), "Advanced.DebugAvatarTextures");
view_listener_t::addMenu(new LLAdvancedDumpAvatarLocalTextures(), "Advanced.DumpAvatarLocalTextures");
- view_listener_t::addMenu(new LLAdvancedMemoryLeakingSimulation(), "Advanced.MemoryLeakingSimulation");
#endif
// Advanced > Network
view_listener_t::addMenu(new LLAdvancedEnableMessageLog(), "Advanced.EnableMessageLog");
@@ -8071,7 +7924,6 @@ void initialize_menus()
// Admin >Region
view_listener_t::addMenu(new LLAdminHandleRegionDumpTempAssetData(), "Admin.HandleRegionDumpTempAssetData");
// Admin top level
- view_listener_t::addMenu(new LLAdminShowGodTools(), "Admin.ShowGodTools");
view_listener_t::addMenu(new LLAdminOnSaveState(), "Admin.OnSaveState");
// Self pie menu
@@ -8081,6 +7933,10 @@ void initialize_menus()
view_listener_t::addMenu(new LLSelfEnableStandUp(), "Self.EnableStandUp");
view_listener_t::addMenu(new LLSelfEnableRemoveAllAttachments(), "Self.EnableRemoveAllAttachments");
+ // we don't use boost::bind directly to delay side tray construction
+ view_listener_t::addMenu(new LLSelfFriends(), "Self.Friends");
+ view_listener_t::addMenu(new LLSelfGroups(), "Self.Groups");
+
// Avatar pie menu
view_listener_t::addMenu(new LLObjectMute(), "Avatar.Mute");
view_listener_t::addMenu(new LLAvatarAddFriend(), "Avatar.AddFriend");
@@ -8099,7 +7955,6 @@ void initialize_menus()
view_listener_t::addMenu(new LLAvatarEnableFreezeEject(), "Avatar.EnableFreezeEject");
// Object pie menu
- view_listener_t::addMenu(new LLObjectOpen(), "Object.Open");
view_listener_t::addMenu(new LLObjectBuild(), "Object.Build");
view_listener_t::addMenu(new LLObjectTouch(), "Object.Touch");
view_listener_t::addMenu(new LLObjectSitOrStand(), "Object.SitOrStand");
@@ -8110,7 +7965,6 @@ void initialize_menus()
view_listener_t::addMenu(new LLObjectMute(), "Object.Mute");
view_listener_t::addMenu(new LLObjectBuy(), "Object.Buy");
view_listener_t::addMenu(new LLObjectEdit(), "Object.Edit");
- view_listener_t::addMenu(new LLObjectInspect(), "Object.Inspect");
view_listener_t::addMenu(new LLObjectEnableOpen(), "Object.EnableOpen");
view_listener_t::addMenu(new LLObjectEnableTouch(), "Object.EnableTouch");
diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h
index 99994bdf5b..e8d350b0b6 100644
--- a/indra/newview/llviewermenu.h
+++ b/indra/newview/llviewermenu.h
@@ -75,8 +75,6 @@ BOOL enable_deselect(void*);
BOOL enable_undo(void*);
BOOL enable_redo(void*);
-// returns TRUE if we have a friend relationship with agent_id
-BOOL is_agent_friend(const LLUUID& agent_id);
BOOL is_agent_mappable(const LLUUID& agent_id);
void confirm_replace_attachment(S32 option, void* user_data);
@@ -101,7 +99,6 @@ void handle_toggle_flycam();
bool handle_sit_or_stand();
bool handle_give_money_dialog();
-bool handle_object_open();
bool handle_go_to();
// Export to XML or Collada
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 6576ea81ed..e34c47368c 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -47,7 +47,7 @@
#include "llfloaterperms.h"
#include "llstatusbar.h"
#include "llviewercontrol.h" // gSavedSettings
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "lluictrlfactory.h"
#include "llviewerinventory.h"
#include "llviewermenu.h" // gMenuHolder
@@ -481,7 +481,7 @@ void handle_compress_image(void*)
BOOL success;
- success = LLViewerImageList::createUploadFile(infile, outfile, IMG_CODEC_TGA);
+ success = LLViewerTextureList::createUploadFile(infile, outfile, IMG_CODEC_TGA);
if (success)
{
@@ -537,7 +537,7 @@ void upload_new_resource(const std::string& src_filename, std::string name,
else if( exten == "bmp")
{
asset_type = LLAssetType::AT_TEXTURE;
- if (!LLViewerImageList::createUploadFile(src_filename,
+ if (!LLViewerTextureList::createUploadFile(src_filename,
filename,
IMG_CODEC_BMP ))
{
@@ -552,7 +552,7 @@ void upload_new_resource(const std::string& src_filename, std::string name,
else if( exten == "tga")
{
asset_type = LLAssetType::AT_TEXTURE;
- if (!LLViewerImageList::createUploadFile(src_filename,
+ if (!LLViewerTextureList::createUploadFile(src_filename,
filename,
IMG_CODEC_TGA ))
{
@@ -567,7 +567,7 @@ void upload_new_resource(const std::string& src_filename, std::string name,
else if( exten == "jpg" || exten == "jpeg")
{
asset_type = LLAssetType::AT_TEXTURE;
- if (!LLViewerImageList::createUploadFile(src_filename,
+ if (!LLViewerTextureList::createUploadFile(src_filename,
filename,
IMG_CODEC_JPEG ))
{
@@ -582,7 +582,7 @@ void upload_new_resource(const std::string& src_filename, std::string name,
else if( exten == "png")
{
asset_type = LLAssetType::AT_TEXTURE;
- if (!LLViewerImageList::createUploadFile(src_filename,
+ if (!LLViewerTextureList::createUploadFile(src_filename,
filename,
IMG_CODEC_PNG ))
{
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index a05bd30600..25c00bb816 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -94,7 +94,7 @@
#include "llhudmanager.h"
#include "llimpanel.h"
#include "llinventorymodel.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
#include "llmenugl.h"
#include "llmutelist.h"
#include "llnotifications.h"
@@ -143,6 +143,9 @@
#include "llwindebug.h" // For the invalid message handler
#endif
+//#include "llnearbychathistory.h"
+#include "llnotificationmanager.h"
+
//
// Constants
//
@@ -206,6 +209,10 @@ bool friendship_offer_callback(const LLSD& notification, const LLSD& response)
LLUUID fid;
LLMessageSystem* msg = gMessageSystem;
const LLSD& payload = notification["payload"];
+
+ // add friend to recent people list
+ LLRecentPeople::instance().add(payload["from_id"]);
+
switch(option)
{
case 0:
@@ -912,17 +919,17 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name)
//highlight item, if it's not in the trash or lost+found
// Don't auto-open the inventory floater
- LLInventoryView* view = NULL;
+ LLFloaterInventory* view = NULL;
if(gSavedSettings.getBOOL("ShowInInventory") &&
asset_type != LLAssetType::AT_CALLINGCARD &&
item->getInventoryType() != LLInventoryType::IT_ATTACHMENT &&
!from_name.empty())
{
- view = LLInventoryView::showAgentInventory();
+ view = LLFloaterInventory::showAgentInventory();
}
else
{
- view = LLInventoryView::getActiveInventory();
+ view = LLFloaterInventory::getActiveInventory();
}
if(!view)
{
@@ -986,7 +993,8 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id,
if (LLMuteList::getInstance()->add(mute))
{
LLFloaterReg::showInstance("mute");
- LLFloaterReg::getTypedInstance<LLFloaterMute>("mute")->selectMute(blocked_id);
+ LLFloaterMute* mute_instance = LLFloaterReg::getTypedInstance<LLFloaterMute>("mute");
+ if(mute_instance) mute_instance->selectMute(blocked_id);
}
// purge the message queue of any previously queued inventory offers from the same source.
@@ -1176,6 +1184,9 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
{
opener = open_agent_offer;
}
+
+ // add buddy to recent people list
+ LLRecentPeople::instance().add(mFromID);
}
break;
case IM_TASK_INVENTORY_OFFERED:
@@ -1527,7 +1538,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
// now store incoming IM in chat history
- buffer = separator_string + message.substr(message_offset);
+ buffer = message.substr(message_offset);
LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL;
@@ -1577,7 +1588,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
{
saved = llformat("(Saved %s) ", formatted_time(timestamp).c_str());
}
- buffer = separator_string + saved + message.substr(message_offset);
+ buffer = saved + message.substr(message_offset);
LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL;
@@ -1715,7 +1726,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
LLSD args;
args["SUBJECT"] = subj;
args["MESSAGE"] = mes;
- LLNotifications::instance().add(LLNotification::Params("GroupNotice").substitutions(args).payload(payload).timestamp(timestamp));
+ LLNotifications::instance().add(LLNotification::Params("GroupNotice").substitutions(args).payload(payload).time_stamp(timestamp));
}
// Also send down the old path for now.
@@ -1876,7 +1887,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
{
saved = llformat("(Saved %s) ", formatted_time(timestamp).c_str());
}
- buffer = separator_string + saved + message.substr(message_offset);
+ buffer = saved + message.substr(message_offset);
BOOL is_this_agent = FALSE;
if(from_id == gAgentID)
{
@@ -2369,15 +2380,15 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
switch(chat.mChatType)
{
case CHAT_TYPE_WHISPER:
- verb = " " + LLTrans::getString("whisper") + " ";
+ verb = "(" + LLTrans::getString("whisper") + ")";
break;
case CHAT_TYPE_DEBUG_MSG:
case CHAT_TYPE_OWNER:
case CHAT_TYPE_NORMAL:
- verb = ": ";
+ verb = "";
break;
case CHAT_TYPE_SHOUT:
- verb = " " + LLTrans::getString("shout") + " ";
+ verb = "(" + LLTrans::getString("shout") + ")";
break;
case CHAT_TYPE_START:
case CHAT_TYPE_STOP:
@@ -2385,12 +2396,12 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
break;
default:
LL_WARNS("Messaging") << "Unknown type " << chat.mChatType << " in chat!" << LL_ENDL;
- verb = " say, ";
+ verb = "";
break;
}
- chat.mText = from_name;
+ chat.mText = "";
chat.mText += verb;
chat.mText += mesg;
}
@@ -2418,12 +2429,14 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
&& (is_linden || !is_busy || is_owned_by_me))
{
// show on screen and add to history
- LLFloaterChat::addChat(chat, FALSE, FALSE);
+ LLNotificationsUI::LLNotificationManager::instance().onChat(
+ chat, LLNotificationsUI::NT_NEARBYCHAT);
}
else
{
+ LLNotificationsUI::LLNotificationManager::instance().onChat(
+ chat, LLNotificationsUI::NT_NEARBYCHAT);
// just add to chat history
- LLFloaterChat::addChatHistory(chat);
}
}
}
@@ -4793,13 +4806,13 @@ void container_inventory_arrived(LLViewerObject* object,
gAgent.changeCameraToDefault();
}
- LLInventoryView* view = LLInventoryView::getActiveInventory();
+ LLFloaterInventory* view = LLFloaterInventory::getActiveInventory();
if (inventory->size() > 2)
{
// create a new inventory category to put this in
LLUUID cat_id;
- cat_id = gInventory.createNewCategory(gAgent.getInventoryRootID(),
+ cat_id = gInventory.createNewCategory(gInventory.getRootFolderID(),
LLAssetType::AT_NONE,
LLTrans::getString("AcquiredItems"));
@@ -5494,10 +5507,14 @@ void process_script_teleport_request(LLMessageSystem* msg, void**)
msg->getVector3("Data", "SimPosition", pos);
msg->getVector3("Data", "LookAt", look_at);
- LLFloaterWorldMap::getInstance()->trackURL(
- sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]);
- LLFloaterReg::showInstance("world_map", "center");
-
+ LLFloaterWorldMap* instance = LLFloaterWorldMap::getInstance();
+ if(instance)
+ {
+ instance->trackURL(
+ sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]);
+ LLFloaterReg::showInstance("world_map", "center");
+ }
+
// remove above two lines and replace with below line
// to re-enable parcel browser for llMapDestination()
// LLURLDispatcher::dispatch(LLSLURL::buildSLURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]), FALSE);
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index a96ccfd848..cf3491ef03 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -70,7 +70,7 @@
#include "llrendersphere.h"
#include "lltooldraganddrop.h"
#include "llviewercamera.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerinventory.h"
#include "llviewerobjectlist.h"
#include "llviewerparceloverlay.h"
@@ -2919,14 +2919,14 @@ void LLViewerObject::boostTexturePriority(BOOL boost_children /* = TRUE */)
S32 tex_count = getNumTEs();
for (i = 0; i < tex_count; i++)
{
- getTEImage(i)->setBoostLevel(LLViewerImage::BOOST_SELECTED);
+ getTEImage(i)->setBoostLevel(LLViewerTexture::BOOST_SELECTED);
}
if (isSculpted())
{
LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT);
LLUUID sculpt_id = sculpt_params->getSculptTexture();
- gImageList.getImage(sculpt_id)->setBoostLevel(LLViewerImage::BOOST_SELECTED);
+ LLViewerTextureManager::getFetchedTexture(sculpt_id, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE)->setBoostLevel(LLViewerTexture::BOOST_SELECTED);
}
if (boost_children)
@@ -3554,8 +3554,8 @@ void LLViewerObject::setNumTEs(const U8 num_tes)
{
if (num_tes)
{
- LLPointer<LLViewerImage> *new_images;
- new_images = new LLPointer<LLViewerImage>[num_tes];
+ LLPointer<LLViewerTexture> *new_images;
+ new_images = new LLPointer<LLViewerTexture>[num_tes];
for (i = 0; i < num_tes; i++)
{
if (i < getNumTEs())
@@ -3689,11 +3689,11 @@ void LLViewerObject::setTE(const U8 te, const LLTextureEntry &texture_entry)
// if (mDrawable.notNull() && mDrawable->isVisible())
// {
const LLUUID& image_id = getTE(te)->getID();
- mTEImages[te] = gImageList.getImage(image_id);
+ mTEImages[te] = LLViewerTextureManager::getFetchedTexture(image_id, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE);
// }
}
-void LLViewerObject::setTEImage(const U8 te, LLViewerImage *imagep)
+void LLViewerObject::setTEImage(const U8 te, LLViewerTexture *imagep)
{
if (mTEImages[te] != imagep)
{
@@ -3715,7 +3715,7 @@ S32 LLViewerObject::setTETextureCore(const U8 te, const LLUUID& uuid, LLHost hos
uuid == LLUUID::null)
{
retval = LLPrimitive::setTETexture(te, uuid);
- mTEImages[te] = gImageList.getImageFromHost(uuid, host);
+ mTEImages[te] = LLViewerTextureManager::getFetchedTexture(uuid, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE, 0, 0, host);
setChanged(TEXTURE);
if (mDrawable.notNull())
{
@@ -3726,6 +3726,18 @@ S32 LLViewerObject::setTETextureCore(const U8 te, const LLUUID& uuid, LLHost hos
}
+void LLViewerObject::changeTEImage(const LLViewerTexture* old_image, LLViewerTexture* new_image)
+{
+ U32 end = getNumTEs() ;
+ for (U32 face = 0 ; face < end ; face++)
+ {
+ if(old_image == mTEImages[face])
+ {
+ mTEImages[face] = new_image ;
+ }
+ }
+}
+
S32 LLViewerObject::setTETexture(const U8 te, const LLUUID& uuid)
{
// Invalid host == get from the agent's sim
@@ -3970,20 +3982,20 @@ S32 LLViewerObject::setTERotation(const U8 te, const F32 r)
}
-LLViewerImage *LLViewerObject::getTEImage(const U8 face) const
+LLViewerTexture *LLViewerObject::getTEImage(const U8 face) const
{
// llassert(mTEImages);
if (face < getNumTEs())
{
- LLViewerImage* image = mTEImages[face];
+ LLViewerTexture* image = mTEImages[face];
if (image)
{
return image;
}
else
{
- return (LLViewerImage*)((LLImageGL*)LLViewerImage::sDefaultImagep);
+ return (LLViewerTexture*)(LLViewerFetchedTexture::sDefaultImagep);
}
}
@@ -4104,7 +4116,7 @@ void LLViewerObject::setDebugText(const std::string &utf8text)
updateText();
}
-void LLViewerObject::setIcon(LLViewerImage* icon_image)
+void LLViewerObject::setIcon(LLViewerTexture* icon_image)
{
if (!mIcon)
{
@@ -4194,14 +4206,14 @@ void LLViewerObject::setParticleSource(const LLPartSysData& particle_parameters,
if (mPartSourcep->getImage()->getID() != mPartSourcep->mPartSysData.mPartImageID)
{
- LLViewerImage* image;
+ LLViewerTexture* image;
if (mPartSourcep->mPartSysData.mPartImageID == LLUUID::null)
{
- image = gImageList.getImageFromFile("pixiesmall.tga");
+ image = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.tga");
}
else
{
- image = gImageList.getImage(mPartSourcep->mPartSysData.mPartImageID);
+ image = LLViewerTextureManager::getFetchedTexture(mPartSourcep->mPartSysData.mPartImageID);
}
mPartSourcep->setImage(image);
}
@@ -4243,14 +4255,14 @@ void LLViewerObject::unpackParticleSource(const S32 block_num, const LLUUID& own
{
if (mPartSourcep->getImage()->getID() != mPartSourcep->mPartSysData.mPartImageID)
{
- LLViewerImage* image;
+ LLViewerTexture* image;
if (mPartSourcep->mPartSysData.mPartImageID == LLUUID::null)
{
- image = gImageList.getImageFromFile("pixiesmall.j2c");
+ image = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
}
else
{
- image = gImageList.getImage(mPartSourcep->mPartSysData.mPartImageID);
+ image = LLViewerTextureManager::getFetchedTexture(mPartSourcep->mPartSysData.mPartImageID);
}
mPartSourcep->setImage(image);
}
@@ -4290,14 +4302,14 @@ void LLViewerObject::unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_
{
if (mPartSourcep->getImage()->getID() != mPartSourcep->mPartSysData.mPartImageID)
{
- LLViewerImage* image;
+ LLViewerTexture* image;
if (mPartSourcep->mPartSysData.mPartImageID == LLUUID::null)
{
- image = gImageList.getImageFromFile("pixiesmall.j2c");
+ image = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
}
else
{
- image = gImageList.getImage(mPartSourcep->mPartSysData.mPartImageID);
+ image = LLViewerTextureManager::getFetchedTexture(mPartSourcep->mPartSysData.mPartImageID);
}
mPartSourcep->setImage(image);
}
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 2b2c2d5a95..cda2c5114f 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -68,7 +68,7 @@ class LLPartSysData;
class LLPrimitive;
class LLPipeline;
class LLTextureEntry;
-class LLViewerImage;
+class LLViewerTexture;
class LLViewerInventoryItem;
class LLViewerObject;
class LLViewerPartSourceScript;
@@ -312,8 +312,9 @@ public:
/*virtual*/ S32 setTEMediaFlags(const U8 te, const U8 media_flags );
/*virtual*/ S32 setTEGlow(const U8 te, const F32 glow);
/*virtual*/ BOOL setMaterial(const U8 material);
- virtual void setTEImage(const U8 te, LLViewerImage *imagep); // Not derived from LLPrimitive
- LLViewerImage *getTEImage(const U8 te) const;
+ virtual void setTEImage(const U8 te, LLViewerTexture *imagep); // Not derived from LLPrimitive
+ void changeTEImage(const LLViewerTexture* old_image, LLViewerTexture* new_image) ;
+ LLViewerTexture *getTEImage(const U8 te) const;
void fitFaceTexture(const U8 face);
void sendTEUpdate() const; // Sends packed representation of all texture entry information
@@ -354,7 +355,7 @@ public:
void setCanSelect(BOOL canSelect);
void setDebugText(const std::string &utf8text);
- void setIcon(LLViewerImage* icon_image);
+ void setIcon(LLViewerTexture* icon_image);
void clearIcon();
void markForUpdate(BOOL priority);
@@ -527,7 +528,7 @@ public:
// Last total CRC received from sim, used for caching
U32 mTotalCRC;
- LLPointer<LLViewerImage> *mTEImages;
+ LLPointer<LLViewerTexture> *mTEImages;
// Selection, picking and rendering variables
U32 mGLName; // GL "name" used by selection code
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 8e9c798aca..8939faeb91 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -66,7 +66,7 @@
#include "lltoolpie.h"
#include "llkeyboard.h"
#include "u64.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "lldatapacker.h"
#ifdef LL_STANDALONE
#include <zlib.h>
@@ -558,7 +558,7 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent)
{
num_updates = mObjects.count() - mCurLazyUpdateIndex;
max_value = mObjects.count();
- gImageList.setUpdateStats(TRUE);
+ gTextureList.setUpdateStats(TRUE);
}
else
{
@@ -1020,16 +1020,16 @@ void LLViewerObjectList::shiftObjects(const LLVector3 &offset)
void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
{
- LLColor4 above_water_color = gSavedSkinSettings.getColor( "NetMapOtherOwnAboveWater" );
- LLColor4 below_water_color = gSavedSkinSettings.getColor( "NetMapOtherOwnBelowWater" );
+ LLColor4 above_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnAboveWater" );
+ LLColor4 below_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnBelowWater" );
LLColor4 you_own_above_water_color =
- gSavedSkinSettings.getColor( "NetMapYouOwnAboveWater" );
+ LLUIColorTable::instance().getColor( "NetMapYouOwnAboveWater" );
LLColor4 you_own_below_water_color =
- gSavedSkinSettings.getColor( "NetMapYouOwnBelowWater" );
+ LLUIColorTable::instance().getColor( "NetMapYouOwnBelowWater" );
LLColor4 group_own_above_water_color =
- gSavedSkinSettings.getColor( "NetMapGroupOwnAboveWater" );
+ LLUIColorTable::instance().getColor( "NetMapGroupOwnAboveWater" );
LLColor4 group_own_below_water_color =
- gSavedSkinSettings.getColor( "NetMapGroupOwnBelowWater" );
+ LLUIColorTable::instance().getColor( "NetMapGroupOwnBelowWater" );
for (S32 i = 0; i < mMapObjects.count(); i++)
diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp
index 08e03c97f2..26e21133ac 100644
--- a/indra/newview/llviewerparcelmedia.cpp
+++ b/indra/newview/llviewerparcelmedia.cpp
@@ -208,7 +208,7 @@ void LLViewerParcelMedia::play(LLParcel* parcel)
if (!parcel) return;
- if (!gSavedSettings.getBOOL("AudioStreamingVideo"))
+ if (!gSavedSettings.getBOOL("AudioSteamingMedia") || !gSavedSettings.getBOOL("AudioStreamingVideo"))
return;
std::string media_url = parcel->getMediaURL();
@@ -389,6 +389,8 @@ bool callback_play_media(const LLSD& notification, const LLSD& response, LLParce
if (option == 0)
{
gSavedSettings.setBOOL("AudioStreamingVideo", TRUE);
+ if(!gSavedSettings.getBOOL("AudioSteamingMedia"))
+ gSavedSettings.setBOOL("AudioSteamingMedia", TRUE);
LLViewerParcelMedia::play(parcel);
}
else
diff --git a/indra/newview/llviewerparcelmediaautoplay.cpp b/indra/newview/llviewerparcelmediaautoplay.cpp
index dbb9c32008..7ba2172c3f 100644
--- a/indra/newview/llviewerparcelmediaautoplay.cpp
+++ b/indra/newview/llviewerparcelmediaautoplay.cpp
@@ -39,7 +39,7 @@
#include "llviewerparcelmgr.h"
#include "lluuid.h"
#include "message.h"
-#include "llviewerimagelist.h" // for texture stats
+#include "llviewertexturelist.h" // for texture stats
#include "llagent.h"
const F32 AUTOPLAY_TIME = 5; // how many seconds before we autoplay
@@ -113,13 +113,13 @@ BOOL LLViewerParcelMediaAutoPlay::tick()
{
if (this_media_texture_id.notNull()) // and if the media texture is good
{
- LLViewerImage *image = gImageList.getImage(this_media_texture_id, FALSE);
+ LLViewerMediaTexture *image = LLViewerTextureManager::getMediaTexture(this_media_texture_id, FALSE) ;
F32 image_size = 0;
if (image)
{
- image_size = image->mMaxVirtualSize;
+ image_size = image->getMaxVirtualSize() ;
}
if (gAgent.getVelocity().magVec() < AUTOPLAY_SPEED) // and if the agent is stopped (slow enough)
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 1b669dbaf6..ae3b50abe4 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -61,8 +61,8 @@
#include "llsdutil_math.h"
#include "llstatusbar.h"
#include "llui.h"
-#include "llviewerimage.h"
-#include "llviewerimagelist.h"
+#include "llviewertexture.h"
+#include "llviewertexturelist.h"
#include "llviewermenu.h"
#include "llviewerparcelmedia.h"
#include "llviewerparceloverlay.h"
@@ -81,8 +81,8 @@ U8* LLViewerParcelMgr::sPackedOverlay = NULL;
LLUUID gCurrentMovieID = LLUUID::null;
-LLPointer<LLViewerImage> sBlockedImage;
-LLPointer<LLViewerImage> sPassImage;
+LLPointer<LLViewerTexture> sBlockedImage;
+LLPointer<LLViewerTexture> sPassImage;
// Local functions
void optionally_start_music(const std::string& music_url);
@@ -144,8 +144,11 @@ LLViewerParcelMgr::LLViewerParcelMgr()
mCollisionSegments = new U8[(mParcelsPerEdge+1)*(mParcelsPerEdge+1)];
resetSegments(mCollisionSegments);
- mBlockedImage = gImageList.getImageFromFile("noentrylines.j2c");
- mPassImage = gImageList.getImageFromFile("noentrypasslines.j2c");
+ // JC: Resolved a merge conflict here, eliminated
+ // mBlockedImage->setAddressMode(LLTexUnit::TAM_WRAP);
+ // because it is done in llviewertexturelist.cpp
+ mBlockedImage = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryLines.png");
+ mPassImage = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryPassLines.png");
S32 overlay_size = mParcelsPerEdge * mParcelsPerEdge / PARCEL_OVERLAY_CHUNKS;
sPackedOverlay = new U8[overlay_size];
@@ -763,13 +766,17 @@ BOOL LLViewerParcelMgr::canHearSound(const LLVector3d &pos_global) const
BOOL LLViewerParcelMgr::inAgentParcel(const LLVector3d &pos_global) const
{
LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal(pos_global);
- if (region != gAgent.getRegion())
+ LLViewerRegion* agent_region = gAgent.getRegion();
+ if (!region || !agent_region)
+ return FALSE;
+
+ if (region != agent_region)
{
// Can't be in the agent parcel if you're not in the same region.
return FALSE;
}
- LLVector3 pos_region = gAgent.getRegion()->getPosRegionFromGlobal(pos_global);
+ LLVector3 pos_region = agent_region->getPosRegionFromGlobal(pos_global);
S32 row = S32(pos_region.mV[VY] / PARCEL_GRID_STEP_METERS);
S32 column = S32(pos_region.mV[VX] / PARCEL_GRID_STEP_METERS);
@@ -1711,7 +1718,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
void optionally_start_music(const std::string& music_url)
{
- if (gSavedSettings.getBOOL("AudioStreamingMusic"))
+ if (gSavedSettings.getBOOL("AudioStreamingMusic") && gSavedSettings.getBOOL("AudioSteamingMedia"))
{
// Make the user click the start button on the overlay bar. JC
// llinfos << "Starting parcel music " << music_url << llendl;
@@ -2383,12 +2390,12 @@ void LLViewerParcelMgr::cleanupGlobals()
LLParcelSelection::sNullSelection = NULL;
}
-LLViewerImage* LLViewerParcelMgr::getBlockedImage() const
+LLViewerTexture* LLViewerParcelMgr::getBlockedImage() const
{
return sBlockedImage;
}
-LLViewerImage* LLViewerParcelMgr::getPassImage() const
+LLViewerTexture* LLViewerParcelMgr::getPassImage() const
{
return sPassImage;
}
diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h
index dc6c2a6287..427ed4a6f2 100644
--- a/indra/newview/llviewerparcelmgr.h
+++ b/indra/newview/llviewerparcelmgr.h
@@ -46,7 +46,7 @@
class LLUUID;
class LLMessageSystem;
class LLParcel;
-class LLViewerImage;
+class LLViewerTexture;
class LLViewerRegion;
// Constants for sendLandOwner
@@ -291,8 +291,8 @@ private:
static bool callbackJoinLand(const LLSD& notification, const LLSD& response);
//void finishClaim(BOOL user_to_user_sale, U32 join);
- LLViewerImage* getBlockedImage() const;
- LLViewerImage* getPassImage() const;
+ LLViewerTexture* getBlockedImage() const;
+ LLViewerTexture* getPassImage() const;
private:
BOOL mSelected;
@@ -341,8 +341,8 @@ private:
BOOL mRenderSelection;
S32 mCollisionBanned;
LLFrameTimer mCollisionTimer;
- LLImageGL* mBlockedImage;
- LLImageGL* mPassImage;
+ LLViewerTexture* mBlockedImage;
+ LLViewerTexture* mPassImage;
// Media
S32 mMediaParcelId;
diff --git a/indra/newview/llviewerparceloverlay.cpp b/indra/newview/llviewerparceloverlay.cpp
index 5b60ed5a27..1a91240abb 100644
--- a/indra/newview/llviewerparceloverlay.cpp
+++ b/indra/newview/llviewerparceloverlay.cpp
@@ -43,13 +43,13 @@
#include "v2math.h"
// newview includes
-#include "llviewerimage.h"
+#include "llviewertexture.h"
#include "llviewercontrol.h"
#include "llsurface.h"
#include "llviewerregion.h"
#include "llagent.h"
#include "llviewercamera.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llselectmgr.h"
#include "llfloatertools.h"
#include "llglheaders.h"
@@ -69,10 +69,9 @@ LLViewerParcelOverlay::LLViewerParcelOverlay(LLViewerRegion* region, F32 region_
{
// Create a texture to hold color information.
// 4 components
- // Use mipmaps = FALSE, clamped, NEAREST filter, for sharp edges
- mTexture = new LLImageGL(FALSE);
+ // Use mipmaps = FALSE, clamped, NEAREST filter, for sharp edges
mImageRaw = new LLImageRaw(mParcelGridsPerEdge, mParcelGridsPerEdge, OVERLAY_IMG_COMPONENTS);
- mTexture->createGLTexture(0, mImageRaw);
+ mTexture = LLViewerTextureManager::getLocalTexture(mImageRaw.get(), FALSE);
gGL.getTexUnit(0)->activate();
gGL.getTexUnit(0)->bind(mTexture);
mTexture->setAddressMode(LLTexUnit::TAM_CLAMP);
@@ -206,12 +205,12 @@ void LLViewerParcelOverlay::updateOverlayTexture()
{
return;
}
- const LLColor4U avail = gSavedSkinSettings.getColor4("PropertyColorAvail");
- const LLColor4U owned = gSavedSkinSettings.getColor4("PropertyColorOther");
- const LLColor4U group = gSavedSkinSettings.getColor4("PropertyColorGroup");
- const LLColor4U self = gSavedSkinSettings.getColor4("PropertyColorSelf");
- const LLColor4U for_sale = gSavedSkinSettings.getColor4("PropertyColorForSale");
- const LLColor4U auction = gSavedSkinSettings.getColor4("PropertyColorAuction");
+ const LLColor4U avail = LLUIColorTable::instance().getColor("PropertyColorAvail").get();
+ const LLColor4U owned = LLUIColorTable::instance().getColor("PropertyColorOther").get();
+ const LLColor4U group = LLUIColorTable::instance().getColor("PropertyColorGroup").get();
+ const LLColor4U self = LLUIColorTable::instance().getColor("PropertyColorSelf").get();
+ const LLColor4U for_sale = LLUIColorTable::instance().getColor("PropertyColorForSale").get();
+ const LLColor4U auction = LLUIColorTable::instance().getColor("PropertyColorAuction").get();
// Create the base texture.
U8 *raw = mImageRaw->getData();
@@ -314,11 +313,11 @@ void LLViewerParcelOverlay::updatePropertyLines()
S32 row, col;
- const LLColor4U self_coloru = gSavedSkinSettings.getColor4("PropertyColorSelf");
- const LLColor4U other_coloru = gSavedSkinSettings.getColor4("PropertyColorOther");
- const LLColor4U group_coloru = gSavedSkinSettings.getColor4("PropertyColorGroup");
- const LLColor4U for_sale_coloru = gSavedSkinSettings.getColor4("PropertyColorForSale");
- const LLColor4U auction_coloru = gSavedSkinSettings.getColor4("PropertyColorAuction");
+ const LLColor4U self_coloru = LLUIColorTable::instance().getColor("PropertyColorSelf").get();
+ const LLColor4U other_coloru = LLUIColorTable::instance().getColor("PropertyColorOther").get();
+ const LLColor4U group_coloru = LLUIColorTable::instance().getColor("PropertyColorGroup").get();
+ const LLColor4U for_sale_coloru = LLUIColorTable::instance().getColor("PropertyColorForSale").get();
+ const LLColor4U auction_coloru = LLUIColorTable::instance().getColor("PropertyColorAuction").get();
// Build into dynamic arrays, then copy into static arrays.
LLDynamicArray<LLVector3, 256> new_vertex_array;
diff --git a/indra/newview/llviewerparceloverlay.h b/indra/newview/llviewerparceloverlay.h
index 9bed1dde34..e673b811ed 100644
--- a/indra/newview/llviewerparceloverlay.h
+++ b/indra/newview/llviewerparceloverlay.h
@@ -39,7 +39,7 @@
#include "lldarray.h"
#include "llframetimer.h"
#include "lluuid.h"
-#include "llviewerimage.h"
+#include "llviewertexture.h"
class LLViewerRegion;
class LLVector3;
@@ -53,7 +53,7 @@ public:
~LLViewerParcelOverlay();
// ACCESS
- LLImageGL* getTexture() const { return mTexture; }
+ LLViewerTexture* getTexture() const { return mTexture; }
BOOL isOwned(const LLVector3& pos) const;
BOOL isOwnedSelf(const LLVector3& pos) const;
@@ -99,7 +99,7 @@ private:
S32 mParcelGridsPerEdge;
- LLPointer<LLImageGL> mTexture;
+ LLPointer<LLViewerTexture> mTexture;
LLPointer<LLImageRaw> mImageRaw;
// Size: mParcelGridsPerEdge * mParcelGridsPerEdge
diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp
index b74f9e9f2c..ec39819bc8 100644
--- a/indra/newview/llviewerpartsim.cpp
+++ b/indra/newview/llviewerpartsim.cpp
@@ -98,7 +98,7 @@ LLViewerPart::~LLViewerPart()
--LLViewerPartSim::sParticleCount2 ;
}
-void LLViewerPart::init(LLPointer<LLViewerPartSource> sourcep, LLViewerImage *imagep, LLVPCallback cb)
+void LLViewerPart::init(LLPointer<LLViewerPartSource> sourcep, LLViewerTexture *imagep, LLVPCallback cb)
{
LLMemType mt(LLMemType::MTYPE_PARTICLES);
mPartID = LLViewerPart::sNextPartID;
diff --git a/indra/newview/llviewerpartsim.h b/indra/newview/llviewerpartsim.h
index 208675e7bf..8f1f72518a 100644
--- a/indra/newview/llviewerpartsim.h
+++ b/indra/newview/llviewerpartsim.h
@@ -39,10 +39,10 @@
#include "llpartdata.h"
#include "llviewerpartsource.h"
-class LLViewerImage;
+class LLViewerTexture;
class LLViewerPart;
class LLViewerRegion;
-class LLViewerImage;
+class LLViewerTexture;
class LLVOPartGroup;
typedef void (*LLVPCallback)(LLViewerPart &part, const F32 dt);
@@ -60,7 +60,7 @@ public:
public:
LLViewerPart();
- void init(LLPointer<LLViewerPartSource> sourcep, LLViewerImage *imagep, LLVPCallback cb);
+ void init(LLPointer<LLViewerPartSource> sourcep, LLViewerTexture *imagep, LLVPCallback cb);
U32 mPartID; // Particle ID used primarily for moving between groups
@@ -72,7 +72,7 @@ public:
// Current particle state (possibly used for rendering)
- LLPointer<LLViewerImage> mImagep;
+ LLPointer<LLViewerTexture> mImagep;
LLVector3 mPosAgent;
LLVector3 mVelocity;
LLVector3 mAccel;
diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp
index 38c75a84d1..a8cbcd86c6 100644
--- a/indra/newview/llviewerpartsource.cpp
+++ b/indra/newview/llviewerpartsource.cpp
@@ -39,7 +39,7 @@
#include "llagent.h"
#include "lldrawable.h"
#include "llviewercamera.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerobject.h"
#include "llviewerobjectlist.h"
#include "llvoavatar.h"
@@ -78,7 +78,7 @@ void LLViewerPartSource::update(const F32 dt)
LLUUID LLViewerPartSource::getImageUUID() const
{
- LLViewerImage* imagep = mImagep;
+ LLViewerTexture* imagep = mImagep;
if(imagep)
{
return imagep->getID();
@@ -100,8 +100,8 @@ LLViewerPartSourceScript::LLViewerPartSourceScript(LLViewerObject *source_objp)
llassert(source_objp);
mSourceObjectp = source_objp;
mPosAgent = mSourceObjectp->getPositionAgent();
- mImagep = gImageList.getImageFromFile("pixiesmall.j2c");
- gGL.getTexUnit(0)->bind(mImagep.get());
+ mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
+ gGL.getTexUnit(0)->bind(mImagep);
mImagep->setAddressMode(LLTexUnit::TAM_CLAMP);
}
@@ -491,7 +491,7 @@ LLPointer<LLViewerPartSourceScript> LLViewerPartSourceScript::createPSS(LLViewer
}
-void LLViewerPartSourceScript::setImage(LLViewerImage *imagep)
+void LLViewerPartSourceScript::setImage(LLViewerTexture *imagep)
{
LLMemType mt(LLMemType::MTYPE_PARTICLES);
mImagep = imagep;
@@ -551,7 +551,7 @@ void LLViewerPartSourceSpiral::update(const F32 dt)
LLMemType mt(LLMemType::MTYPE_PARTICLES);
if (!mImagep)
{
- mImagep = gImageList.getImageFromFile("pixiesmall.j2c");
+ mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
}
const F32 RATE = 0.025f;
@@ -720,7 +720,7 @@ void LLViewerPartSourceBeam::update(const F32 dt)
if (!mImagep)
{
- mImagep = gImageList.getImageFromFile("pixiesmall.j2c");
+ mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
}
LLViewerPart* part = new LLViewerPart();
@@ -806,7 +806,7 @@ void LLViewerPartSourceChat::update(const F32 dt)
LLMemType mt(LLMemType::MTYPE_PARTICLES);
if (!mImagep)
{
- mImagep = gImageList.getImageFromFile("pixiesmall.j2c");
+ mImagep = LLViewerTextureManager::getFetchedTextureFromFile("pixiesmall.j2c");
}
diff --git a/indra/newview/llviewerpartsource.h b/indra/newview/llviewerpartsource.h
index 31e671af3a..540e30eb19 100644
--- a/indra/newview/llviewerpartsource.h
+++ b/indra/newview/llviewerpartsource.h
@@ -45,7 +45,7 @@
//
//
-class LLViewerImage;
+class LLViewerTexture;
class LLViewerObject;
class LLViewerPart;
@@ -90,7 +90,7 @@ protected:
F32 mLastUpdateTime;
F32 mLastPartTime;
LLUUID mOwnerUUID;
- LLPointer<LLViewerImage> mImagep;
+ LLPointer<LLViewerTexture> mImagep;
// Particle information
U32 mPartFlags; // Flags for the particle
@@ -123,8 +123,8 @@ public:
static LLPointer<LLViewerPartSourceScript> unpackPSS(LLViewerObject *source_objp, LLPointer<LLViewerPartSourceScript> pssp, LLDataPacker &dp);
static LLPointer<LLViewerPartSourceScript> createPSS(LLViewerObject *source_objp, const LLPartSysData& particle_parameters);
- LLViewerImage *getImage() const { return mImagep; }
- void setImage(LLViewerImage *imagep);
+ LLViewerTexture *getImage() const { return mImagep; }
+ void setImage(LLViewerTexture *imagep);
LLPartSysData mPartSysData;
void setTargetObject(LLViewerObject *objp);
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index c79ded1dce..709fcdcf01 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -45,7 +45,7 @@
#include "pipeline.h"
#include "lltexturefetch.h"
#include "llviewerobjectlist.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "lltexlayer.h"
#include "lltexlayerparams.h"
#include "llsurface.h"
@@ -424,7 +424,7 @@ void output_statistics(void*)
{
llinfos << "Number of orphans: " << gObjectList.getOrphanCount() << llendl;
llinfos << "Number of dead objects: " << gObjectList.mNumDeadObjects << llendl;
- llinfos << "Num images: " << gImageList.getNumImages() << llendl;
+ llinfos << "Num images: " << gTextureList.getNumImages() << llendl;
llinfos << "Texture usage: " << LLImageGL::sGlobalTextureMemoryInBytes << llendl;
llinfos << "Texture working set: " << LLImageGL::sBoundTextureMemoryInBytes << llendl;
llinfos << "Raw usage: " << LLImageRaw::sGlobalRawMemory << llendl;
@@ -567,7 +567,7 @@ void update_statistics(U32 frame_count)
{
gTotalWorldBytes += gVLManager.getTotalBytes();
gTotalObjectBytes += gObjectBits / 8;
- gTotalTextureBytes += gImageList.mTextureBits / 8;
+ gTotalTextureBytes += gTextureList.mTextureBits / 8;
// make sure we have a valid time delta for this frame
if (gFrameIntervalSeconds > 0.f)
@@ -619,7 +619,7 @@ void update_statistics(U32 frame_count)
F32 layer_bits = (F32)(gVLManager.getLandBits() + gVLManager.getWindBits() + gVLManager.getCloudBits());
LLViewerStats::getInstance()->mLayersKBitStat.addValue(layer_bits/1024.f);
LLViewerStats::getInstance()->mObjectKBitStat.addValue(gObjectBits/1024.f);
- LLViewerStats::getInstance()->mTextureKBitStat.addValue(gImageList.mTextureBits/1024.f);
+ LLViewerStats::getInstance()->mTextureKBitStat.addValue(gTextureList.mTextureBits/1024.f);
LLViewerStats::getInstance()->mVFSPendingOperations.addValue(LLVFile::getVFSThread()->getPending());
LLViewerStats::getInstance()->mAssetKBitStat.addValue(gTransferManager.getTransferBitsIn(LLTCT_ASSET)/1024.f);
gTransferManager.resetTransferBitsIn(LLTCT_ASSET);
@@ -633,7 +633,7 @@ void update_statistics(U32 frame_count)
gDebugTimers[0].unpause();
}
- LLViewerStats::getInstance()->mTexturePacketsStat.addValue(gImageList.mTexturePackets);
+ LLViewerStats::getInstance()->mTexturePacketsStat.addValue(gTextureList.mTexturePackets);
{
static F32 visible_avatar_frames = 0.f;
@@ -654,8 +654,8 @@ void update_statistics(U32 frame_count)
gObjectBits = 0;
// gDecodedBits = 0;
- gImageList.mTextureBits = 0;
- gImageList.mTexturePackets = 0;
+ gTextureList.mTextureBits = 0;
+ gTextureList.mTexturePackets = 0;
}
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index f4989ec4fe..0fadba1364 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -39,22 +39,25 @@
#include "llinventory.h"
#include "llinventorybridge.h"
#include "llinventorymodel.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
#include "llviewertexteditor.h"
#include "llfloaterchat.h"
+#include "llfloateravatarinfo.h"
#include "llfloaterworldmap.h"
#include "llnotify.h"
+#include "llpanelplaces.h"
#include "llpreview.h"
#include "llpreviewtexture.h"
#include "llpreviewnotecard.h"
#include "llpreviewlandmark.h"
#include "llscrollbar.h"
+#include "llsidetray.h"
#include "lltooldraganddrop.h"
#include "lltrans.h"
#include "llviewercontrol.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerwindow.h"
#include "llviewerinventory.h"
#include "lluictrlfactory.h"
@@ -64,7 +67,7 @@
#include "llappviewer.h" // for gPacificDaylightTime
-static LLDefaultWidgetRegistry::Register<LLViewerTextEditor> r("text_editor");
+static LLDefaultChildRegistry::Register<LLViewerTextEditor> r("text_editor");
///----------------------------------------------------------------------------
/// Class LLEmbeddedNotecardOpener
@@ -372,47 +375,61 @@ void LLEmbeddedItems::bindEmbeddedChars( const LLFontGL* font ) const
const char* img_name;
switch( item->getType() )
{
- case LLAssetType::AT_TEXTURE:
- if(item->getInventoryType() == LLInventoryType::IT_SNAPSHOT)
- {
- img_name = "inv_item_snapshot.tga";
- }
- else
- {
- img_name = "inv_item_texture.tga";
- }
+ case LLAssetType::AT_TEXTURE:
+ if(item->getInventoryType() == LLInventoryType::IT_SNAPSHOT)
+ {
+ img_name = "inv_item_snapshot.tga";
+ }
+ else
+ {
+ img_name = "inv_item_texture.tga";
+ }
- break;
- case LLAssetType::AT_SOUND: img_name = "inv_item_sound.tga"; break;
- case LLAssetType::AT_LANDMARK:
- if (item->getFlags() & LLInventoryItem::II_FLAGS_LANDMARK_VISITED)
- {
- img_name = "inv_item_landmark_visited.tga";
- }
- else
- {
- img_name = "inv_item_landmark.tga";
- }
- break;
- case LLAssetType::AT_CLOTHING: img_name = "inv_item_clothing.tga"; break;
- case LLAssetType::AT_OBJECT:
- if (item->getFlags() & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS)
- {
- img_name = "inv_item_object_multi.tga";
- }
- else
+ break;
+ case LLAssetType::AT_SOUND: img_name = "inv_item_sound.tga"; break;
+ case LLAssetType::AT_LANDMARK:
+ if (item->getFlags() & LLInventoryItem::II_FLAGS_LANDMARK_VISITED)
+ {
+ img_name = "inv_item_landmark_visited.tga";
+ }
+ else
+ {
+ img_name = "inv_item_landmark.tga";
+ }
+ break;
+ case LLAssetType::AT_CALLINGCARD:
{
- img_name = "inv_item_object.tga";
+ BOOL online;
+ online = LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID());
+ if (online)
+ {
+ img_name = "inv_item_callingcard_online.tga"; break;
+ }
+ else
+ {
+ img_name = "inv_item_callingcard_offline.tga"; break;
+ }
+ break;
}
- break;
- case LLAssetType::AT_NOTECARD: img_name = "inv_item_notecard.tga"; break;
- case LLAssetType::AT_LSL_TEXT: img_name = "inv_item_script.tga"; break;
- case LLAssetType::AT_BODYPART: img_name = "inv_item_skin.tga"; break;
- case LLAssetType::AT_ANIMATION: img_name = "inv_item_animation.tga";break;
- case LLAssetType::AT_GESTURE: img_name = "inv_item_gesture.tga"; break;
- //TODO need img_name
- case LLAssetType::AT_FAVORITE: img_name = "inv_item_landmark.tga"; break;
- default: llassert(0); continue;
+ case LLAssetType::AT_CLOTHING: img_name = "inv_item_clothing.tga"; break;
+ case LLAssetType::AT_OBJECT:
+ if (item->getFlags() & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS)
+ {
+ img_name = "inv_item_object_multi.tga";
+ }
+ else
+ {
+ img_name = "inv_item_object.tga";
+ }
+ break;
+ case LLAssetType::AT_NOTECARD: img_name = "inv_item_notecard.tga"; break;
+ case LLAssetType::AT_LSL_TEXT: img_name = "inv_item_script.tga"; break;
+ case LLAssetType::AT_BODYPART: img_name = "inv_item_skin.tga"; break;
+ case LLAssetType::AT_ANIMATION: img_name = "inv_item_animation.tga";break;
+ case LLAssetType::AT_GESTURE: img_name = "inv_item_gesture.tga"; break;
+ //TODO need img_name
+ case LLAssetType::AT_FAVORITE: img_name = "inv_item_landmark.tga"; break;
+ default: llassert(0); continue;
}
LLUIImagePtr image = LLUI::getUIImage(img_name);
@@ -1019,8 +1036,6 @@ BOOL LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask)
}
-// Allow calling cards to be dropped onto text fields. Append the name and
-// a carriage return.
// virtual
BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask,
BOOL drop, EDragAndDropType cargo_type, void *cargo_data,
@@ -1043,33 +1058,17 @@ BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask,
{
switch( cargo_type )
{
- case DAD_CALLINGCARD:
- if(acceptsCallingCardNames())
- {
- if (drop)
- {
- LLInventoryItem *item = (LLInventoryItem *)cargo_data;
- std::string name = item->getName();
- appendText(name, true, true);
- }
- *accept = ACCEPT_YES_COPY_SINGLE;
- }
- else
- {
- *accept = ACCEPT_NO;
- }
- break;
-
- case DAD_TEXTURE:
- case DAD_SOUND:
- case DAD_LANDMARK:
- case DAD_SCRIPT:
- case DAD_CLOTHING:
- case DAD_OBJECT:
- case DAD_NOTECARD:
- case DAD_BODYPART:
- case DAD_ANIMATION:
- case DAD_GESTURE:
+ case DAD_CALLINGCARD:
+ case DAD_TEXTURE:
+ case DAD_SOUND:
+ case DAD_LANDMARK:
+ case DAD_SCRIPT:
+ case DAD_CLOTHING:
+ case DAD_OBJECT:
+ case DAD_NOTECARD:
+ case DAD_BODYPART:
+ case DAD_ANIMATION:
+ case DAD_GESTURE:
{
LLInventoryItem *item = (LLInventoryItem *)cargo_data;
if( item && allowsEmbeddedItems() )
@@ -1101,8 +1100,8 @@ BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask,
{
// *TODO: Translate
tooltip_msg.assign("Only items with unrestricted\n"
- "'next owner' permissions \n"
- "can be attached to notecards.");
+ "'next owner' permissions \n"
+ "can be attached to notecards.");
}
}
}
@@ -1113,9 +1112,9 @@ BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask,
break;
}
- default:
- *accept = ACCEPT_NO;
- break;
+ default:
+ *accept = ACCEPT_NO;
+ break;
}
}
else
@@ -1301,32 +1300,36 @@ BOOL LLViewerTextEditor::openEmbeddedItem(LLInventoryItem* item, llwchar wc)
switch( item->getType() )
{
- case LLAssetType::AT_TEXTURE:
- openEmbeddedTexture( item, wc );
- return TRUE;
+ case LLAssetType::AT_TEXTURE:
+ openEmbeddedTexture( item, wc );
+ return TRUE;
- case LLAssetType::AT_SOUND:
- openEmbeddedSound( item, wc );
- return TRUE;
+ case LLAssetType::AT_SOUND:
+ openEmbeddedSound( item, wc );
+ return TRUE;
- case LLAssetType::AT_NOTECARD:
- openEmbeddedNotecard( item, wc );
- return TRUE;
+ case LLAssetType::AT_NOTECARD:
+ openEmbeddedNotecard( item, wc );
+ return TRUE;
- case LLAssetType::AT_LANDMARK:
- openEmbeddedLandmark( item, wc );
- return TRUE;
+ case LLAssetType::AT_LANDMARK:
+ openEmbeddedLandmark( item, wc );
+ return TRUE;
- case LLAssetType::AT_LSL_TEXT:
- case LLAssetType::AT_CLOTHING:
- case LLAssetType::AT_OBJECT:
- case LLAssetType::AT_BODYPART:
- case LLAssetType::AT_ANIMATION:
- case LLAssetType::AT_GESTURE:
- showCopyToInvDialog( item, wc );
- return TRUE;
- default:
- return FALSE;
+ case LLAssetType::AT_CALLINGCARD:
+ openEmbeddedCallingcard( item, wc );
+ return TRUE;
+
+ case LLAssetType::AT_LSL_TEXT:
+ case LLAssetType::AT_CLOTHING:
+ case LLAssetType::AT_OBJECT:
+ case LLAssetType::AT_BODYPART:
+ case LLAssetType::AT_ANIMATION:
+ case LLAssetType::AT_GESTURE:
+ showCopyToInvDialog( item, wc );
+ return TRUE;
+ default:
+ return FALSE;
}
}
@@ -1364,11 +1367,22 @@ void LLViewerTextEditor::openEmbeddedLandmark( LLInventoryItem* item, llwchar wc
{
if (!item)
return;
- LLPreviewLandmark* preview = LLFloaterReg::showTypedInstance<LLPreviewLandmark>("preview_landmark", LLSD(item->getUUID()), TAKE_FOCUS_YES);
- if (preview)
+
+ LLSD key;
+ key["type"] = "landmark";
+ key["id"] = item->getUUID();
+
+ LLPanelPlaces *panel = dynamic_cast<LLPanelPlaces*>(LLSideTray::getInstance()->showPanel("panel_places", key));
+ if (panel)
{
- preview->setItem( item );
+ panel->setItem(item);
}
+
+// LLPreviewLandmark* preview = LLFloaterReg::showTypedInstance<LLPreviewLandmark>("preview_landmark", LLSD(item->getUUID()), TAKE_FOCUS_YES);
+// if (preview)
+// {
+// preview->setItem( item );
+// }
}
void LLViewerTextEditor::openEmbeddedNotecard( LLInventoryItem* item, llwchar wc )
@@ -1376,6 +1390,16 @@ void LLViewerTextEditor::openEmbeddedNotecard( LLInventoryItem* item, llwchar wc
copyInventory(item, gInventoryCallbacks.registerCB(mInventoryCallback));
}
+void LLViewerTextEditor::openEmbeddedCallingcard( LLInventoryItem* item, llwchar wc )
+{
+ if(item && !item->getCreatorUUID().isNull())
+ {
+ BOOL online;
+ online = LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID());
+ LLFloaterAvatarInfo::showFromFriend(item->getCreatorUUID(), online);
+ }
+}
+
void LLViewerTextEditor::showUnsavedAlertDialog( LLInventoryItem* item )
{
LLSD payload;
diff --git a/indra/newview/llviewertexteditor.h b/indra/newview/llviewertexteditor.h
index bc373c858a..1a69c6869d 100644
--- a/indra/newview/llviewertexteditor.h
+++ b/indra/newview/llviewertexteditor.h
@@ -120,6 +120,7 @@ private:
void openEmbeddedSound( LLInventoryItem* item, llwchar wc );
void openEmbeddedLandmark( LLInventoryItem* item, llwchar wc );
void openEmbeddedNotecard( LLInventoryItem* item, llwchar wc);
+ void openEmbeddedCallingcard( LLInventoryItem* item, llwchar wc);
void showCopyToInvDialog( LLInventoryItem* item, llwchar wc );
void showUnsavedAlertDialog( LLInventoryItem* item );
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
new file mode 100644
index 0000000000..533889b2f7
--- /dev/null
+++ b/indra/newview/llviewertexture.cpp
@@ -0,0 +1,2383 @@
+/**
+ * @file llviewertexture.cpp
+ * @brief Object which handles a received image (and associated texture(s))
+ *
+ * $LicenseInfo:firstyear=2000&license=viewergpl$
+ *
+ * Copyright (c) 2000-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h"
+
+#include "llviewertexture.h"
+
+// Library includes
+#include "imageids.h"
+#include "llmath.h"
+#include "llerror.h"
+#include "llgl.h"
+#include "llglheaders.h"
+#include "llhost.h"
+#include "llimage.h"
+#include "llimagebmp.h"
+#include "llimagej2c.h"
+#include "llimagetga.h"
+#include "llmemtype.h"
+#include "llstl.h"
+#include "llvfile.h"
+#include "llvfs.h"
+#include "message.h"
+#include "lltimer.h"
+
+// viewer includes
+#include "llimagegl.h"
+#include "lldrawpool.h"
+#include "lltexturefetch.h"
+#include "llviewertexturelist.h"
+#include "llviewercontrol.h"
+#include "pipeline.h"
+#include "llappviewer.h"
+///////////////////////////////////////////////////////////////////////////////
+
+// statics
+LLPointer<LLViewerTexture> LLViewerTexture::sNullImagep = NULL;
+LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sMissingAssetImagep = NULL;
+LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sWhiteImagep = NULL;
+LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sDefaultImagep = NULL;
+LLPointer<LLViewerFetchedTexture> LLViewerFetchedTexture::sSmokeImagep = NULL;
+LLViewerMediaTexture::media_map_t LLViewerMediaTexture::sMediaMap ;
+LLTexturePipelineTester* LLViewerTextureManager::sTesterp = NULL ;
+
+S32 LLViewerTexture::sImageCount = 0;
+S32 LLViewerTexture::sRawCount = 0;
+S32 LLViewerTexture::sAuxCount = 0;
+LLTimer LLViewerTexture::sEvaluationTimer;
+F32 LLViewerTexture::sDesiredDiscardBias = 0.f;
+F32 LLViewerTexture::sDesiredDiscardScale = 1.1f;
+S32 LLViewerTexture::sBoundTextureMemoryInBytes = 0;
+S32 LLViewerTexture::sTotalTextureMemoryInBytes = 0;
+S32 LLViewerTexture::sMaxBoundTextureMemInMegaBytes = 0;
+S32 LLViewerTexture::sMaxTotalTextureMemInMegaBytes = 0;
+S32 LLViewerTexture::sMaxDesiredTextureMemInBytes = 0 ;
+BOOL LLViewerTexture::sDontLoadVolumeTextures = FALSE;
+
+const F32 desired_discard_bias_min = -2.0f; // -max number of levels to improve image quality by
+const F32 desired_discard_bias_max = 1.5f; // max number of levels to reduce image quality by
+
+//----------------------------------------------------------------------------------------------
+//namespace: LLViewerTextureAccess
+//----------------------------------------------------------------------------------------------
+LLViewerMediaTexture* LLViewerTextureManager::createMediaTexture(const LLUUID &media_id, BOOL usemipmaps, LLImageGL* gl_image)
+{
+ return new LLViewerMediaTexture(media_id, usemipmaps, gl_image) ;
+}
+
+LLViewerTexture* LLViewerTextureManager::findTexture(const LLUUID& id)
+{
+ LLViewerTexture* tex ;
+ //search fetched texture list
+ tex = gTextureList.findImage(id) ;
+
+ //search media texture list
+ if(!tex)
+ {
+ tex = LLViewerTextureManager::findMediaTexture(id) ;
+ }
+ return tex ;
+}
+
+LLViewerMediaTexture* LLViewerTextureManager::findMediaTexture(const LLUUID &media_id)
+{
+ LLViewerMediaTexture::media_map_t::iterator iter = LLViewerMediaTexture::sMediaMap.find(media_id);
+ if(iter == LLViewerMediaTexture::sMediaMap.end())
+ return NULL;
+
+ ((LLViewerMediaTexture*)(iter->second))->getLastReferencedTimer()->reset() ;
+ return iter->second;
+}
+
+LLViewerMediaTexture* LLViewerTextureManager::getMediaTexture(const LLUUID& id, BOOL usemipmaps, LLImageGL* gl_image)
+{
+ LLViewerMediaTexture* tex = LLViewerTextureManager::findMediaTexture(id) ;
+ if(!tex)
+ {
+ tex = LLViewerTextureManager::createMediaTexture(id, usemipmaps, gl_image) ;
+ }
+
+ LLViewerTexture* old_tex = tex->getOldTexture() ;
+ if(!old_tex)
+ {
+ //if there is a fetched texture with the same id, replace it by this media texture
+ old_tex = gTextureList.findImage(id) ;
+ if(old_tex)
+ {
+ tex->setOldTexture(old_tex) ;
+ }
+ }
+
+ if (gSavedSettings.getBOOL("ParcelMediaAutoPlayEnable") && gSavedSettings.getBOOL("AudioStreamingVideo"))
+ {
+ if(!tex->isPlaying())
+ {
+ if(old_tex)
+ {
+ old_tex->switchToTexture(tex) ;
+ }
+ tex->setPlaying(TRUE) ;
+ }
+ }
+ tex->getLastReferencedTimer()->reset() ;
+
+ return tex ;
+}
+
+LLViewerFetchedTexture* LLViewerTextureManager::staticCastToFetchedTexture(LLViewerTexture* tex, BOOL report_error)
+{
+ if(!tex)
+ {
+ return NULL ;
+ }
+
+ S8 type = tex->getType() ;
+ if(type == LLViewerTexture::FETCHED_TEXTURE || type == LLViewerTexture::LOD_TEXTURE)
+ {
+ return static_cast<LLViewerFetchedTexture*>(tex) ;
+ }
+
+ if(report_error)
+ {
+ llerrs << "not a fetched texture type: " << type << llendl ;
+ }
+
+ return NULL ;
+}
+
+LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(BOOL usemipmaps, BOOL generate_gl_tex)
+{
+ LLPointer<LLViewerTexture> tex = new LLViewerTexture(usemipmaps) ;
+ if(generate_gl_tex)
+ {
+ tex->generateGLTexture() ;
+ }
+ return tex ;
+}
+LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(const LLUUID& id, BOOL usemipmaps, BOOL generate_gl_tex)
+{
+ LLPointer<LLViewerTexture> tex = new LLViewerTexture(id, usemipmaps) ;
+ if(generate_gl_tex)
+ {
+ tex->generateGLTexture() ;
+ }
+ return tex ;
+}
+LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(const LLImageRaw* raw, BOOL usemipmaps)
+{
+ LLPointer<LLViewerTexture> tex = new LLViewerTexture(raw, usemipmaps) ;
+ return tex ;
+}
+LLPointer<LLViewerTexture> LLViewerTextureManager::getLocalTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps, BOOL generate_gl_tex)
+{
+ LLPointer<LLViewerTexture> tex = new LLViewerTexture(width, height, components, usemipmaps) ;
+ if(generate_gl_tex)
+ {
+ tex->generateGLTexture() ;
+ }
+ return tex ;
+}
+
+LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTexture(
+ const LLUUID &image_id,
+ BOOL usemipmaps,
+ BOOL level_immediate,
+ S8 texture_type,
+ LLGLint internal_format,
+ LLGLenum primary_format,
+ LLHost request_from_host)
+{
+ return gTextureList.getImage(image_id, usemipmaps, level_immediate, texture_type, internal_format, primary_format, request_from_host) ;
+}
+
+LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromFile(
+ const std::string& filename,
+ BOOL usemipmaps,
+ BOOL level_immediate,
+ S8 texture_type,
+ LLGLint internal_format,
+ LLGLenum primary_format,
+ const LLUUID& force_id)
+{
+ return gTextureList.getImageFromFile(filename, usemipmaps, level_immediate, texture_type, internal_format, primary_format, force_id) ;
+}
+
+LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromHost(const LLUUID& image_id, LLHost host)
+{
+ return gTextureList.getImageFromHost(image_id, host) ;
+}
+
+void LLViewerTextureManager::init()
+{
+ LLPointer<LLImageRaw> raw = new LLImageRaw(1,1,3);
+ raw->clear(0x77, 0x77, 0x77, 0xFF);
+ LLViewerTexture::sNullImagep = LLViewerTextureManager::getLocalTexture(raw.get(), TRUE) ;
+
+#if 1
+ LLPointer<LLViewerFetchedTexture> imagep = new LLViewerFetchedTexture(IMG_DEFAULT, TRUE);
+ LLViewerFetchedTexture::sDefaultImagep = imagep;
+
+ const S32 dim = 128;
+ LLPointer<LLImageRaw> image_raw = new LLImageRaw(dim,dim,3);
+ U8* data = image_raw->getData();
+ for (S32 i = 0; i<dim; i++)
+ {
+ for (S32 j = 0; j<dim; j++)
+ {
+#if 0
+ const S32 border = 2;
+ if (i<border || j<border || i>=(dim-border) || j>=(dim-border))
+ {
+ *data++ = 0xff;
+ *data++ = 0xff;
+ *data++ = 0xff;
+ }
+ else
+#endif
+ {
+ *data++ = 0x7f;
+ *data++ = 0x7f;
+ *data++ = 0x7f;
+ }
+ }
+ }
+ imagep->createGLTexture(0, image_raw);
+ image_raw = NULL;
+ gTextureList.addImage(imagep);
+ LLViewerFetchedTexture::sDefaultImagep->dontDiscard();
+#else
+ LLViewerFetchedTexture::sDefaultImagep = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, TRUE);
+#endif
+
+ LLViewerFetchedTexture::sSmokeImagep = LLViewerTextureManager::getFetchedTexture(IMG_SMOKE, TRUE, TRUE);
+ LLViewerFetchedTexture::sSmokeImagep->setNoDelete() ;
+
+ LLViewerTexture::initClass() ;
+
+ if(LLFastTimer::sMetricLog)
+ {
+ LLViewerTextureManager::sTesterp = new LLTexturePipelineTester() ;
+ }
+}
+
+void LLViewerTextureManager::cleanup()
+{
+ stop_glerror();
+
+ LLImageGL::sDefaultGLTexture = NULL ;
+ LLViewerTexture::sNullImagep = NULL;
+ LLViewerFetchedTexture::sDefaultImagep = NULL;
+ LLViewerFetchedTexture::sSmokeImagep = NULL;
+ LLViewerFetchedTexture::sMissingAssetImagep = NULL;
+ LLViewerFetchedTexture::sWhiteImagep = NULL;
+
+ LLViewerMediaTexture::sMediaMap.clear() ;
+}
+
+//----------------------------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------
+//start of LLViewerTexture
+//----------------------------------------------------------------------------------------------
+// static
+void LLViewerTexture::initClass()
+{
+ LLImageGL::sDefaultGLTexture = LLViewerFetchedTexture::sDefaultImagep->getGLTexture() ;
+}
+
+// static
+void LLViewerTexture::cleanupClass()
+{
+}
+
+// tuning params
+const F32 discard_bias_delta = .05f;
+const F32 discard_delta_time = 0.5f;
+const S32 min_non_tex_system_mem = (128<<20); // 128 MB
+// non-const (used externally
+F32 texmem_lower_bound_scale = 0.85f;
+F32 texmem_middle_bound_scale = 0.925f;
+
+//static
+void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity)
+{
+ if(LLViewerTextureManager::sTesterp)
+ {
+ LLViewerTextureManager::sTesterp->update() ;
+ }
+ LLViewerMediaTexture::updateClass() ;
+
+ sBoundTextureMemoryInBytes = LLImageGL::sBoundTextureMemoryInBytes;//in bytes
+ sTotalTextureMemoryInBytes = LLImageGL::sGlobalTextureMemoryInBytes;//in bytes
+ sMaxBoundTextureMemInMegaBytes = gTextureList.getMaxResidentTexMem();//in MB
+ sMaxTotalTextureMemInMegaBytes = gTextureList.getMaxTotalTextureMem() ;//in MB
+ sMaxDesiredTextureMemInBytes = MEGA_BYTES_TO_BYTES(sMaxTotalTextureMemInMegaBytes) ; //in Bytes, by default and when total used texture memory is small.
+
+ if (BYTES_TO_MEGA_BYTES(sBoundTextureMemoryInBytes) >= sMaxBoundTextureMemInMegaBytes ||
+ BYTES_TO_MEGA_BYTES(sTotalTextureMemoryInBytes) >= sMaxTotalTextureMemInMegaBytes)
+ {
+ //when texture memory overflows, lower down the threashold to release the textures more aggressively.
+ sMaxDesiredTextureMemInBytes = llmin((S32)(sMaxDesiredTextureMemInBytes * 0.75f) , MEGA_BYTES_TO_BYTES(MAX_VIDEO_RAM_IN_MEGA_BYTES)) ;//512 MB
+
+ // If we are using more texture memory than we should,
+ // scale up the desired discard level
+ if (sEvaluationTimer.getElapsedTimeF32() > discard_delta_time)
+ {
+ sDesiredDiscardBias += discard_bias_delta;
+ sEvaluationTimer.reset();
+ }
+ }
+ else if (sDesiredDiscardBias > 0.0f &&
+ BYTES_TO_MEGA_BYTES(sBoundTextureMemoryInBytes) < sMaxBoundTextureMemInMegaBytes * texmem_lower_bound_scale &&
+ BYTES_TO_MEGA_BYTES(sTotalTextureMemoryInBytes) < sMaxTotalTextureMemInMegaBytes * texmem_lower_bound_scale)
+ {
+ // If we are using less texture memory than we should,
+ // scale down the desired discard level
+ if (sEvaluationTimer.getElapsedTimeF32() > discard_delta_time)
+ {
+ sDesiredDiscardBias -= discard_bias_delta;
+ sEvaluationTimer.reset();
+ }
+ }
+ sDesiredDiscardBias = llclamp(sDesiredDiscardBias, desired_discard_bias_min, desired_discard_bias_max);
+}
+
+//end of static functions
+//-------------------------------------------------------------------------------------------
+const U32 LLViewerTexture::sCurrentFileVersion = 1;
+
+LLViewerTexture::LLViewerTexture(BOOL usemipmaps)
+{
+ init(true);
+ mUseMipMaps = usemipmaps ;
+
+ mID.generate();
+ sImageCount++;
+}
+
+LLViewerTexture::LLViewerTexture(const LLUUID& id, BOOL usemipmaps)
+ : mID(id)
+{
+ init(true);
+ mUseMipMaps = usemipmaps ;
+
+ sImageCount++;
+}
+
+LLViewerTexture::LLViewerTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps)
+{
+ init(true);
+
+ mFullWidth = width ;
+ mFullHeight = height ;
+ mUseMipMaps = usemipmaps ;
+ mComponents = components ;
+
+ mID.generate();
+ sImageCount++;
+}
+
+LLViewerTexture::LLViewerTexture(const LLImageRaw* raw, BOOL usemipmaps)
+{
+ init(true);
+ mUseMipMaps = usemipmaps ;
+ mGLTexturep = new LLImageGL(raw, usemipmaps) ;
+
+ // Create an empty image of the specified size and width
+ mID.generate();
+ sImageCount++;
+}
+
+LLViewerTexture::~LLViewerTexture()
+{
+ sImageCount--;
+}
+
+void LLViewerTexture::init(bool firstinit)
+{
+ mBoostLevel = LLViewerTexture::BOOST_NONE;
+
+ mFullWidth = 0;
+ mFullHeight = 0;
+ mUseMipMaps = FALSE ;
+ mComponents = 0 ;
+
+ mTextureState = NO_DELETE ;
+ mDontDiscard = FALSE;
+ mMaxVirtualSize = 0.f;
+}
+
+//virtual
+S8 LLViewerTexture::getType() const
+{
+ return LLViewerTexture::LOCAL_TEXTURE ;
+}
+
+void LLViewerTexture::cleanup()
+{
+ mFaceList.clear() ;
+
+ if(mGLTexturep)
+ {
+ mGLTexturep->cleanup();
+ }
+}
+
+// virtual
+void LLViewerTexture::dump()
+{
+ if(mGLTexturep)
+ {
+ mGLTexturep->dump();
+ }
+
+ llinfos << "LLViewerTexture"
+ << " mID " << mID
+ << llendl;
+}
+
+void LLViewerTexture::setBoostLevel(S32 level)
+{
+ if(mBoostLevel != level)
+ {
+ mBoostLevel = level ;
+ if(mBoostLevel != LLViewerTexture::BOOST_NONE)
+ {
+ setNoDelete() ;
+ }
+ }
+}
+
+
+bool LLViewerTexture::bindDefaultImage(S32 stage) const
+{
+ if (stage < 0) return false;
+
+ bool res = true;
+ if (LLViewerFetchedTexture::sDefaultImagep.notNull() && (this != LLViewerFetchedTexture::sDefaultImagep.get()))
+ {
+ // use default if we've got it
+ res = gGL.getTexUnit(stage)->bind(LLViewerFetchedTexture::sDefaultImagep);
+ }
+ if (!res && LLViewerTexture::sNullImagep.notNull() && (this != LLViewerTexture::sNullImagep))
+ {
+ res = gGL.getTexUnit(stage)->bind(LLViewerTexture::sNullImagep) ;
+ }
+ if (!res)
+ {
+ llwarns << "LLViewerTexture::bindDefaultImage failed." << llendl;
+ }
+ stop_glerror();
+ if(LLViewerTextureManager::sTesterp)
+ {
+ LLViewerTextureManager::sTesterp->updateGrayTextureBinding() ;
+ }
+ return res;
+}
+
+//virtual
+BOOL LLViewerTexture::isMissingAsset()const
+{
+ return FALSE;
+}
+
+//virtual
+void LLViewerTexture::forceImmediateUpdate()
+{
+}
+
+void LLViewerTexture::addTextureStats(F32 virtual_size) const
+{
+ if (virtual_size > mMaxVirtualSize)
+ {
+ mMaxVirtualSize = virtual_size;
+ }
+}
+
+void LLViewerTexture::resetTextureStats(BOOL zero)
+{
+ if (zero)
+ {
+ mMaxVirtualSize = 0.0f;
+ }
+ else
+ {
+ mMaxVirtualSize -= mMaxVirtualSize * .10f; // decay by 5%/update
+ }
+}
+
+void LLViewerTexture::addFace(LLFace* facep)
+{
+ mFaceList.push_back(facep) ;
+}
+void LLViewerTexture::removeFace(LLFace* facep)
+{
+ mFaceList.remove(facep) ;
+}
+
+void LLViewerTexture::switchToTexture(LLViewerTexture* new_texture)
+{
+ if(this == new_texture)
+ {
+ return ;
+ }
+
+ new_texture->addTextureStats(getMaxVirtualSize()) ;
+
+ for(ll_face_list_t::iterator iter = mFaceList.begin(); iter != mFaceList.end(); )
+ {
+ LLFace* facep = *iter++ ;
+ facep->setTexture(new_texture) ;
+ facep->getViewerObject()->changeTEImage(this, new_texture) ;
+ gPipeline.markTextured(facep->getDrawable());
+ }
+}
+
+void LLViewerTexture::forceActive()
+{
+ mTextureState = ACTIVE ;
+}
+
+void LLViewerTexture::setActive()
+{
+ if(mTextureState != NO_DELETE)
+ {
+ mTextureState = ACTIVE ;
+ }
+}
+
+//set the texture to stay in memory
+void LLViewerTexture::setNoDelete()
+{
+ mTextureState = NO_DELETE ;
+}
+
+void LLViewerTexture::generateGLTexture()
+{
+ if(mGLTexturep.isNull())
+ {
+ mGLTexturep = new LLImageGL(mFullWidth, mFullHeight, mComponents, mUseMipMaps) ;
+ }
+}
+
+LLImageGL* LLViewerTexture::getGLTexture() const
+{
+ llassert_always(mGLTexturep.notNull()) ;
+
+ return mGLTexturep ;
+}
+
+BOOL LLViewerTexture::createGLTexture()
+{
+ if(mGLTexturep.isNull())
+ {
+ generateGLTexture() ;
+ }
+
+ return mGLTexturep->createGLTexture() ;
+}
+
+BOOL LLViewerTexture::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S32 usename)
+{
+ llassert_always(mGLTexturep.notNull()) ;
+
+ return mGLTexturep->createGLTexture(discard_level, imageraw, usename) ;
+}
+
+void LLViewerTexture::setExplicitFormat(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format, BOOL swap_bytes)
+{
+ llassert_always(mGLTexturep.notNull()) ;
+
+ mGLTexturep->setExplicitFormat(internal_format, primary_format, type_format, swap_bytes) ;
+}
+void LLViewerTexture::setAddressMode(LLTexUnit::eTextureAddressMode mode)
+{
+ llassert_always(mGLTexturep.notNull()) ;
+ mGLTexturep->setAddressMode(mode) ;
+}
+void LLViewerTexture::setFilteringOption(LLTexUnit::eTextureFilterOptions option)
+{
+ llassert_always(mGLTexturep.notNull()) ;
+ mGLTexturep->setFilteringOption(option) ;
+}
+
+//virtual
+S32 LLViewerTexture::getWidth(S32 discard_level) const
+{
+ llassert_always(mGLTexturep.notNull()) ;
+ return mGLTexturep->getWidth(discard_level) ;
+}
+
+//virtual
+S32 LLViewerTexture::getHeight(S32 discard_level) const
+{
+ llassert_always(mGLTexturep.notNull()) ;
+ return mGLTexturep->getHeight(discard_level) ;
+}
+
+S32 LLViewerTexture::getMaxDiscardLevel() const
+{
+ llassert_always(mGLTexturep.notNull()) ;
+ return mGLTexturep->getMaxDiscardLevel() ;
+}
+S32 LLViewerTexture::getDiscardLevel() const
+{
+ llassert_always(mGLTexturep.notNull()) ;
+ return mGLTexturep->getDiscardLevel() ;
+}
+S8 LLViewerTexture::getComponents() const
+{
+ llassert_always(mGLTexturep.notNull()) ;
+
+ return mGLTexturep->getComponents() ;
+}
+
+LLGLuint LLViewerTexture::getTexName() const
+{
+ llassert_always(mGLTexturep.notNull()) ;
+
+ return mGLTexturep->getTexName() ;
+}
+
+BOOL LLViewerTexture::hasValidGLTexture() const
+{
+ if(mGLTexturep.notNull())
+ {
+ return mGLTexturep->getHasGLTexture() ;
+ }
+ return FALSE ;
+}
+
+BOOL LLViewerTexture::hasGLTexture() const
+{
+ return mGLTexturep.notNull() ;
+}
+
+BOOL LLViewerTexture::getBoundRecently() const
+{
+ if(mGLTexturep.notNull())
+ {
+ return mGLTexturep->getBoundRecently() ;
+ }
+ return FALSE ;
+}
+
+LLTexUnit::eTextureType LLViewerTexture::getTarget(void) const
+{
+ llassert_always(mGLTexturep.notNull()) ;
+ return mGLTexturep->getTarget() ;
+}
+
+BOOL LLViewerTexture::setSubImage(const LLImageRaw* imageraw, S32 x_pos, S32 y_pos, S32 width, S32 height)
+{
+ llassert_always(mGLTexturep.notNull()) ;
+
+ return mGLTexturep->setSubImage(imageraw, x_pos, y_pos, width, height) ;
+}
+
+BOOL LLViewerTexture::setSubImage(const U8* datap, S32 data_width, S32 data_height, S32 x_pos, S32 y_pos, S32 width, S32 height)
+{
+ llassert_always(mGLTexturep.notNull()) ;
+
+ return mGLTexturep->setSubImage(datap, data_width, data_height, x_pos, y_pos, width, height) ;
+}
+
+void LLViewerTexture::setGLTextureCreated (bool initialized)
+{
+ llassert_always(mGLTexturep.notNull()) ;
+
+ mGLTexturep->setGLTextureCreated (initialized) ;
+}
+
+LLTexUnit::eTextureAddressMode LLViewerTexture::getAddressMode(void) const
+{
+ llassert_always(mGLTexturep.notNull()) ;
+
+ return mGLTexturep->getAddressMode() ;
+}
+
+S32 LLViewerTexture::getTextureMemory() const
+{
+ llassert_always(mGLTexturep.notNull()) ;
+
+ return mGLTexturep->mTextureMemory ;
+}
+
+LLGLenum LLViewerTexture::getPrimaryFormat() const
+{
+ llassert_always(mGLTexturep.notNull()) ;
+
+ return mGLTexturep->getPrimaryFormat() ;
+}
+
+BOOL LLViewerTexture::getIsAlphaMask() const
+{
+ llassert_always(mGLTexturep.notNull()) ;
+
+ return mGLTexturep->getIsAlphaMask() ;
+}
+
+BOOL LLViewerTexture::getMask(const LLVector2 &tc)
+{
+ llassert_always(mGLTexturep.notNull()) ;
+
+ return mGLTexturep->getMask(tc) ;
+}
+
+F32 LLViewerTexture::getTimePassedSinceLastBound()
+{
+ llassert_always(mGLTexturep.notNull()) ;
+
+ return mGLTexturep->getTimePassedSinceLastBound() ;
+}
+BOOL LLViewerTexture::getMissed() const
+{
+ llassert_always(mGLTexturep.notNull()) ;
+
+ return mGLTexturep->getMissed() ;
+}
+
+BOOL LLViewerTexture::isValidForSculpt(S32 discard_level, S32 image_width, S32 image_height, S32 ncomponents)
+{
+ llassert_always(mGLTexturep.notNull()) ;
+
+ return mGLTexturep->isValidForSculpt(discard_level, image_width, image_height, ncomponents) ;
+}
+
+BOOL LLViewerTexture::readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compressed_ok) const
+{
+ llassert_always(mGLTexturep.notNull()) ;
+
+ return mGLTexturep->readBackRaw(discard_level, imageraw, compressed_ok) ;
+}
+
+void LLViewerTexture::destroyGLTexture()
+{
+ if(mGLTexturep.notNull() && mGLTexturep->getHasGLTexture())
+ {
+ mGLTexturep->destroyGLTexture() ;
+ mTextureState = DELETED ;
+ }
+}
+
+//virtual
+void LLViewerTexture::updateBindStatsForTester()
+{
+ if(LLViewerTextureManager::sTesterp)
+ {
+ LLViewerTextureManager::sTesterp->updateTextureBindingStats(this) ;
+ }
+}
+//----------------------------------------------------------------------------------------------
+//end of LLViewerTexture
+//----------------------------------------------------------------------------------------------
+
+//----------------------------------------------------------------------------------------------
+//start of LLViewerFetchedTexture
+//----------------------------------------------------------------------------------------------
+
+//static
+F32 LLViewerFetchedTexture::maxDecodePriority()
+{
+ return 2000000.f;
+}
+
+LLViewerFetchedTexture::LLViewerFetchedTexture(const LLUUID& id, BOOL usemipmaps)
+ : LLViewerTexture(id, usemipmaps)
+{
+ init(TRUE) ;
+ generateGLTexture() ;
+}
+
+LLViewerFetchedTexture::LLViewerFetchedTexture(const LLImageRaw* raw, BOOL usemipmaps)
+ : LLViewerTexture(raw, usemipmaps)
+{
+ init(TRUE) ;
+}
+
+LLViewerFetchedTexture::LLViewerFetchedTexture(const std::string& full_path, const LLUUID& id, BOOL usemipmaps)
+ : LLViewerTexture(id, usemipmaps),
+ mLocalFileName(full_path)
+{
+ init(TRUE) ;
+ generateGLTexture() ;
+}
+
+void LLViewerFetchedTexture::init(bool firstinit)
+{
+ mOrigWidth = 0;
+ mOrigHeight = 0;
+ mNeedsAux = FALSE;
+ mRequestedDiscardLevel = -1;
+ mRequestedDownloadPriority = 0.f;
+ mFullyLoaded = FALSE;
+ mDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1;
+ mMinDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1;
+
+ mDecodingAux = FALSE;
+
+ mKnownDrawWidth = 0;
+ mKnownDrawHeight = 0;
+
+ if (firstinit)
+ {
+ mDecodePriority = 0.f;
+ mInImageList = 0;
+ }
+
+ // Only set mIsMissingAsset true when we know for certain that the database
+ // does not contain this image.
+ mIsMissingAsset = FALSE;
+
+ mNeedsCreateTexture = FALSE;
+
+ mIsRawImageValid = FALSE;
+ mRawDiscardLevel = INVALID_DISCARD_LEVEL;
+ mMinDiscardLevel = 0;
+
+ mHasFetcher = FALSE;
+ mIsFetching = FALSE;
+ mFetchState = 0;
+ mFetchPriority = 0;
+ mDownloadProgress = 0.f;
+ mFetchDeltaTime = 999999.f;
+ mDecodeFrame = 0;
+ mVisibleFrame = 0;
+ mForSculpt = FALSE ;
+ mIsFetched = FALSE ;
+}
+
+LLViewerFetchedTexture::~LLViewerFetchedTexture()
+{
+ //*NOTE getTextureFetch can return NULL when Viewer is shutting down.
+ // This is due to LLWearableList is singleton and is destroyed after
+ // LLAppViewer::cleanup() was called. (see ticket EXT-177)
+ if (mHasFetcher && LLAppViewer::getTextureFetch())
+ {
+ LLAppViewer::getTextureFetch()->deleteRequest(getID(), true);
+ }
+ cleanup();
+}
+
+//virtual
+S8 LLViewerFetchedTexture::getType() const
+{
+ return LLViewerTexture::FETCHED_TEXTURE ;
+}
+
+void LLViewerFetchedTexture::cleanup()
+{
+ for(callback_list_t::iterator iter = mLoadedCallbackList.begin();
+ iter != mLoadedCallbackList.end(); )
+ {
+ LLLoadedCallbackEntry *entryp = *iter++;
+ // We never finished loading the image. Indicate failure.
+ // Note: this allows mLoadedCallbackUserData to be cleaned up.
+ entryp->mCallback( FALSE, this, NULL, NULL, 0, TRUE, entryp->mUserData );
+ delete entryp;
+ }
+ mLoadedCallbackList.clear();
+ mNeedsAux = FALSE;
+
+ // Clean up image data
+ destroyRawImage();
+}
+
+void LLViewerFetchedTexture::setForSculpt()
+{
+ mForSculpt = TRUE ;
+}
+
+BOOL LLViewerFetchedTexture::isDeleted()
+{
+ return mTextureState == DELETED ;
+}
+
+BOOL LLViewerFetchedTexture::isInactive()
+{
+ return mTextureState == INACTIVE ;
+}
+
+BOOL LLViewerFetchedTexture::isDeletionCandidate()
+{
+ return mTextureState == DELETION_CANDIDATE ;
+}
+
+void LLViewerFetchedTexture::setDeletionCandidate()
+{
+ if(mGLTexturep.notNull() && mGLTexturep->getTexName() && (mTextureState == INACTIVE))
+ {
+ mTextureState = DELETION_CANDIDATE ;
+ }
+}
+
+//set the texture inactive
+void LLViewerFetchedTexture::setInactive()
+{
+ if(mTextureState == ACTIVE && mGLTexturep.notNull() && mGLTexturep->getTexName() && !mGLTexturep->getBoundRecently())
+ {
+ mTextureState = INACTIVE ;
+ }
+}
+
+// virtual
+void LLViewerFetchedTexture::dump()
+{
+ LLViewerTexture::dump();
+
+ llinfos << "LLViewerFetchedTexture"
+ << " mIsMissingAsset " << (S32)mIsMissingAsset
+ << " mFullWidth " << mFullWidth
+ << " mFullHeight " << mFullHeight
+ << " mOrigWidth" << mOrigWidth
+ << " mOrigHeight" << mOrigHeight
+ << llendl;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// ONLY called from LLViewerFetchedTextureList
+void LLViewerFetchedTexture::destroyTexture()
+{
+ if(LLImageGL::sGlobalTextureMemoryInBytes < sMaxDesiredTextureMemInBytes)//not ready to release unused memory.
+ {
+ return ;
+ }
+ if (mNeedsCreateTexture)//return if in the process of generating a new texture.
+ {
+ return ;
+ }
+
+ destroyGLTexture() ;
+ mFullyLoaded = FALSE ;
+}
+
+// ONLY called from LLViewerTextureList
+BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/)
+{
+ if (!mNeedsCreateTexture)
+ {
+ destroyRawImage();
+ return FALSE;
+ }
+ mNeedsCreateTexture = FALSE;
+ if (mRawImage.isNull())
+ {
+ llerrs << "LLViewerTexture trying to create texture with no Raw Image" << llendl;
+ }
+// llinfos << llformat("IMAGE Creating (%d) [%d x %d] Bytes: %d ",
+// mRawDiscardLevel,
+// mRawImage->getWidth(), mRawImage->getHeight(),mRawImage->getDataSize())
+// << mID.getString() << llendl;
+ BOOL res = TRUE;
+ if (!gNoRender)
+ {
+ // store original size only for locally-sourced images
+ if (!mLocalFileName.empty())
+ {
+ mOrigWidth = mRawImage->getWidth();
+ mOrigHeight = mRawImage->getHeight();
+
+ // leave black border, do not scale image content
+ mRawImage->expandToPowerOfTwo(MAX_IMAGE_SIZE, FALSE);
+
+ mFullWidth = mRawImage->getWidth();
+ mFullHeight = mRawImage->getHeight();
+ }
+ else
+ {
+ mOrigWidth = mFullWidth;
+ mOrigHeight = mFullHeight;
+ }
+
+ bool size_okay = true;
+
+ U32 raw_width = mRawImage->getWidth() << mRawDiscardLevel;
+ U32 raw_height = mRawImage->getHeight() << mRawDiscardLevel;
+ if( raw_width > MAX_IMAGE_SIZE || raw_height > MAX_IMAGE_SIZE )
+ {
+ llinfos << "Width or height is greater than " << MAX_IMAGE_SIZE << ": (" << raw_width << "," << raw_height << ")" << llendl;
+ size_okay = false;
+ }
+
+ if (!LLImageGL::checkSize(mRawImage->getWidth(), mRawImage->getHeight()))
+ {
+ // A non power-of-two image was uploaded (through a non standard client)
+ llinfos << "Non power of two width or height: (" << mRawImage->getWidth() << "," << mRawImage->getHeight() << ")" << llendl;
+ size_okay = false;
+ }
+
+ if( !size_okay )
+ {
+ // An inappropriately-sized image was uploaded (through a non standard client)
+ // We treat these images as missing assets which causes them to
+ // be renderd as 'missing image' and to stop requesting data
+ setIsMissingAsset();
+ destroyRawImage();
+ return FALSE;
+ }
+
+ res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename);
+ setActive() ;
+ }
+
+ //
+ // Iterate through the list of image loading callbacks to see
+ // what sort of data they need.
+ //
+ // *TODO: Fix image callback code
+ BOOL imageraw_callbacks = FALSE;
+ for(callback_list_t::iterator iter = mLoadedCallbackList.begin();
+ iter != mLoadedCallbackList.end(); )
+ {
+ LLLoadedCallbackEntry *entryp = *iter++;
+ if (entryp->mNeedsImageRaw)
+ {
+ imageraw_callbacks = TRUE;
+ break;
+ }
+ }
+
+ if (!imageraw_callbacks)
+ {
+ mNeedsAux = FALSE;
+ destroyRawImage();
+ }
+ return res;
+}
+
+// Call with 0,0 to turn this feature off.
+void LLViewerFetchedTexture::setKnownDrawSize(S32 width, S32 height)
+{
+ mKnownDrawWidth = width;
+ mKnownDrawHeight = height;
+ addTextureStats((F32)(width * height));
+}
+
+//virtual
+void LLViewerFetchedTexture::processTextureStats()
+{
+ if(mFullyLoaded)//already loaded
+ {
+ return ;
+ }
+
+ if(!mFullWidth || !mFullHeight)
+ {
+ mDesiredDiscardLevel = getMaxDiscardLevel() ;
+ }
+ else
+ {
+ mDesiredDiscardLevel = 0;
+ if (mFullWidth > MAX_IMAGE_SIZE_DEFAULT || mFullHeight > MAX_IMAGE_SIZE_DEFAULT)
+ {
+ mDesiredDiscardLevel = 1; // MAX_IMAGE_SIZE_DEFAULT = 1024 and max size ever is 2048
+ }
+
+ if(getDiscardLevel() >= 0 && (getDiscardLevel() <= mDesiredDiscardLevel))
+ {
+ mFullyLoaded = TRUE ;
+ }
+ }
+}
+
+//texture does not have any data, so we don't know the size of the image, treat it like 32 * 32.
+F32 LLViewerFetchedTexture::calcDecodePriorityForUnknownTexture(F32 pixel_priority)
+{
+ static const F64 log_2 = log(2.0);
+
+ F32 desired = (F32)(log(32.0/pixel_priority) / log_2);
+ S32 ddiscard = MAX_DISCARD_LEVEL - (S32)desired + 1;
+ ddiscard = llclamp(ddiscard, 1, 9);
+
+ return ddiscard*100000.f;
+}
+
+F32 LLViewerFetchedTexture::calcDecodePriority()
+{
+#ifndef LL_RELEASE_FOR_DOWNLOAD
+ if (mID == LLAppViewer::getTextureFetch()->mDebugID)
+ {
+ LLAppViewer::getTextureFetch()->mDebugCount++; // for setting breakpoints
+ }
+#endif
+
+ if(mFullyLoaded)//already loaded for static texture
+ {
+ return -4.0f ; //alreay fetched
+ }
+
+ if (mNeedsCreateTexture)
+ {
+ return mDecodePriority; // no change while waiting to create
+ }
+
+ F32 priority;
+ S32 cur_discard = getDiscardLevel();
+ bool have_all_data = (cur_discard >= 0 && (cur_discard <= mDesiredDiscardLevel));
+ F32 pixel_priority = fsqrtf(mMaxVirtualSize);
+ const S32 MIN_NOT_VISIBLE_FRAMES = 30; // NOTE: this function is not called every frame
+ mDecodeFrame++;
+ if (pixel_priority > 0.f)
+ {
+ mVisibleFrame = mDecodeFrame;
+ }
+
+ if (mIsMissingAsset)
+ {
+ priority = 0.0f;
+ }
+ else if (mDesiredDiscardLevel > getMaxDiscardLevel())
+ {
+ // Don't decode anything we don't need
+ priority = -1.0f;
+ }
+ else if (mBoostLevel == LLViewerTexture::BOOST_UI && !have_all_data)
+ {
+ priority = 1.f;
+ }
+ else if (pixel_priority <= 0.f && !have_all_data)
+ {
+ // Not on screen but we might want some data
+ if (mBoostLevel > BOOST_HIGH)
+ {
+ // Always want high boosted images
+ priority = 1.f;
+ }
+ else if (mVisibleFrame == 0 || (mDecodeFrame - mVisibleFrame > MIN_NOT_VISIBLE_FRAMES))
+ {
+ // Don't decode anything that isn't visible unless it's important
+ priority = -2.0f;
+ }
+ else
+ {
+ // Leave the priority as-is
+ return mDecodePriority;
+ }
+ }
+ else if (cur_discard < 0)
+ {
+ priority = calcDecodePriorityForUnknownTexture(pixel_priority) ;
+ }
+ else if ((mMinDiscardLevel > 0) && (cur_discard <= mMinDiscardLevel))
+ {
+ // larger mips are corrupted
+ priority = -3.0f;
+ }
+ else if (cur_discard <= mDesiredDiscardLevel)
+ {
+ priority = -4.0f;
+ }
+ else
+ {
+ // priority range = 100000-400000
+ S32 ddiscard = cur_discard - mDesiredDiscardLevel;
+ if (getDontDiscard())
+ {
+ ddiscard+=2;
+ }
+ else if (mGLTexturep.notNull() && !mGLTexturep->getBoundRecently() && mBoostLevel == 0)
+ {
+ ddiscard-=2;
+ }
+ ddiscard = llclamp(ddiscard, 0, 4);
+ priority = ddiscard*100000.f;
+ }
+ if (priority > 0.0f)
+ {
+ pixel_priority = llclamp(pixel_priority, 0.0f, priority-1.f); // priority range = 100000-900000
+ if ( mBoostLevel > BOOST_HIGH)
+ {
+ priority = 1000000.f + pixel_priority + 1000.f * mBoostLevel;
+ }
+ else
+ {
+ priority += 0.f + pixel_priority + 1000.f * mBoostLevel;
+ }
+ }
+ return priority;
+}
+//============================================================================
+
+void LLViewerFetchedTexture::setDecodePriority(F32 priority)
+{
+ llassert(!mInImageList);
+ mDecodePriority = priority;
+}
+
+bool LLViewerFetchedTexture::updateFetch()
+{
+ mFetchState = 0;
+ mFetchPriority = 0;
+ mFetchDeltaTime = 999999.f;
+ mRequestDeltaTime = 999999.f;
+
+#ifndef LL_RELEASE_FOR_DOWNLOAD
+ if (mID == LLAppViewer::getTextureFetch()->mDebugID)
+ {
+ LLAppViewer::getTextureFetch()->mDebugCount++; // for setting breakpoints
+ }
+#endif
+
+ if (mNeedsCreateTexture)
+ {
+ // We may be fetching still (e.g. waiting on write)
+ // but don't check until we've processed the raw data we have
+ return false;
+ }
+ if (mIsMissingAsset)
+ {
+ llassert_always(!mHasFetcher);
+ return false; // skip
+ }
+ if (!mLoadedCallbackList.empty() && mRawImage.notNull())
+ {
+ return false; // process any raw image data in callbacks before replacing
+ }
+
+ S32 current_discard = getDiscardLevel() ;
+ S32 desired_discard = getDesiredDiscardLevel();
+ F32 decode_priority = getDecodePriority();
+ decode_priority = llmax(decode_priority, 0.0f);
+
+ if (mIsFetching)
+ {
+ // Sets mRawDiscardLevel, mRawImage, mAuxRawImage
+ S32 fetch_discard = current_discard;
+ if (mRawImage.notNull()) sRawCount--;
+ if (mAuxRawImage.notNull()) sAuxCount--;
+ bool finished = LLAppViewer::getTextureFetch()->getRequestFinished(getID(), fetch_discard, mRawImage, mAuxRawImage);
+ if (mRawImage.notNull()) sRawCount++;
+ if (mAuxRawImage.notNull()) sAuxCount++;
+ if (finished)
+ {
+ mIsFetching = FALSE;
+ }
+ else
+ {
+ mFetchState = LLAppViewer::getTextureFetch()->getFetchState(mID, mDownloadProgress, mRequestedDownloadPriority,
+ mFetchPriority, mFetchDeltaTime, mRequestDeltaTime);
+ }
+
+ // We may have data ready regardless of whether or not we are finished (e.g. waiting on write)
+ if (mRawImage.notNull())
+ {
+ if(LLViewerTextureManager::sTesterp)
+ {
+ mIsFetched = TRUE ;
+ LLViewerTextureManager::sTesterp->updateTextureLoadingStats(this, mRawImage, LLAppViewer::getTextureFetch()->isFromLocalCache(mID)) ;
+ }
+ mRawDiscardLevel = fetch_discard;
+ if ((mRawImage->getDataSize() > 0 && mRawDiscardLevel >= 0) &&
+ (current_discard < 0 || mRawDiscardLevel < current_discard))
+ {
+ if (getComponents() != mRawImage->getComponents())
+ {
+ // We've changed the number of components, so we need to move any
+ // objects using this pool to a different pool.
+ mComponents = mRawImage->getComponents();
+ mGLTexturep->setComponents(mComponents) ;
+
+ gTextureList.dirtyImage(this);
+ }
+ mIsRawImageValid = TRUE;
+ gTextureList.mCreateTextureList.insert(this);
+ mNeedsCreateTexture = TRUE;
+ mFullWidth = mRawImage->getWidth() << mRawDiscardLevel;
+ mFullHeight = mRawImage->getHeight() << mRawDiscardLevel;
+ }
+ else
+ {
+ // Data is ready but we don't need it
+ // (received it already while fetcher was writing to disk)
+ destroyRawImage();
+ return false; // done
+ }
+ }
+
+ if (!mIsFetching)
+ {
+ if ((decode_priority > 0) && (mRawDiscardLevel < 0 || mRawDiscardLevel == INVALID_DISCARD_LEVEL))
+ {
+ // We finished but received no data
+ if (current_discard < 0)
+ {
+ setIsMissingAsset();
+ desired_discard = -1;
+ }
+ else
+ {
+ llwarns << mID << ": Setting min discard to " << current_discard << llendl;
+ mMinDiscardLevel = current_discard;
+ desired_discard = current_discard;
+ }
+ destroyRawImage();
+ }
+ else if (mRawImage.isNull())
+ {
+ // We have data, but our fetch failed to return raw data
+ // *TODO: FIgure out why this is happening and fix it
+ destroyRawImage();
+ }
+ }
+ else
+ {
+ LLAppViewer::getTextureFetch()->updateRequestPriority(mID, decode_priority);
+ }
+ }
+
+ bool make_request = true;
+
+ if (decode_priority <= 0)
+ {
+ make_request = false;
+ }
+ else if (mNeedsCreateTexture || mIsMissingAsset)
+ {
+ make_request = false;
+ }
+ else if (current_discard >= 0 && current_discard <= mMinDiscardLevel)
+ {
+ make_request = false;
+ }
+ else
+ {
+ if (mIsFetching)
+ {
+ if (mRequestedDiscardLevel <= desired_discard)
+ {
+ make_request = false;
+ }
+ }
+ else
+ {
+ if (current_discard >= 0 && current_discard <= desired_discard)
+ {
+ make_request = false;
+ }
+ }
+ }
+
+ if (make_request)
+ {
+ S32 w=0, h=0, c=0;
+ if (current_discard >= 0)
+ {
+ w = mGLTexturep->getWidth(0);
+ h = mGLTexturep->getHeight(0);
+ c = mComponents;
+ }
+ if (!mDontDiscard)
+ {
+ if (mBoostLevel == 0)
+ {
+ desired_discard = llmax(desired_discard, current_discard-1);
+ }
+ else
+ {
+ desired_discard = llmax(desired_discard, current_discard-2);
+ }
+ }
+
+ // bypass texturefetch directly by pulling from LLTextureCache
+ bool fetch_request_created = false;
+ if (mLocalFileName.empty())
+ {
+ fetch_request_created = LLAppViewer::getTextureFetch()->createRequest(getID(), getTargetHost(), decode_priority,
+ w, h, c, desired_discard,
+ needsAux());
+ }
+ else
+ {
+ fetch_request_created = LLAppViewer::getTextureFetch()->createRequest(mLocalFileName, getID(),getTargetHost(), decode_priority,
+ w, h, c, desired_discard,
+ needsAux());
+ }
+
+ if (fetch_request_created)
+ {
+ mHasFetcher = TRUE;
+ mIsFetching = TRUE;
+ mRequestedDiscardLevel = desired_discard;
+ mFetchState = LLAppViewer::getTextureFetch()->getFetchState(mID, mDownloadProgress, mRequestedDownloadPriority,
+ mFetchPriority, mFetchDeltaTime, mRequestDeltaTime);
+ }
+
+ // if createRequest() failed, we're finishing up a request for this UUID,
+ // wait for it to complete
+ }
+ else if (mHasFetcher && !mIsFetching)
+ {
+ // Only delete requests that haven't receeived any network data for a while
+ const F32 FETCH_IDLE_TIME = 5.f;
+ if (mLastPacketTimer.getElapsedTimeF32() > FETCH_IDLE_TIME)
+ {
+// llinfos << "Deleting request: " << getID() << " Discard: " << current_discard << " <= min:" << mMinDiscardLevel << " or priority == 0: " << decode_priority << llendl;
+ LLAppViewer::getTextureFetch()->deleteRequest(getID(), true);
+ mHasFetcher = FALSE;
+ }
+ }
+
+ llassert_always(mRawImage.notNull() || (!mNeedsCreateTexture && !mIsRawImageValid));
+
+ return mIsFetching ? true : false;
+}
+
+void LLViewerFetchedTexture::setIsMissingAsset()
+{
+ llwarns << mLocalFileName << " " << mID << ": Marking image as missing" << llendl;
+ if (mHasFetcher)
+ {
+ LLAppViewer::getTextureFetch()->deleteRequest(getID(), true);
+ mHasFetcher = FALSE;
+ mIsFetching = FALSE;
+ mFetchState = 0;
+ mFetchPriority = 0;
+ }
+ mIsMissingAsset = TRUE;
+}
+
+void LLViewerFetchedTexture::setLoadedCallback( loaded_callback_func loaded_callback,
+ S32 discard_level, BOOL keep_imageraw, BOOL needs_aux, void* userdata)
+{
+ //
+ // Don't do ANYTHING here, just add it to the global callback list
+ //
+ if (mLoadedCallbackList.empty())
+ {
+ // Put in list to call this->doLoadedCallbacks() periodically
+ gTextureList.mCallbackList.insert(this);
+ }
+ LLLoadedCallbackEntry* entryp = new LLLoadedCallbackEntry(loaded_callback, discard_level, keep_imageraw, userdata);
+ mLoadedCallbackList.push_back(entryp);
+ mNeedsAux |= needs_aux;
+ if (mNeedsAux && mAuxRawImage.isNull() && getDiscardLevel() >= 0)
+ {
+ // We need aux data, but we've already loaded the image, and it didn't have any
+ llwarns << "No aux data available for callback for image:" << getID() << llendl;
+ }
+}
+
+bool LLViewerFetchedTexture::doLoadedCallbacks()
+{
+ if (mNeedsCreateTexture)
+ {
+ return false;
+ }
+
+ bool res = false;
+
+ if (isMissingAsset())
+ {
+ for(callback_list_t::iterator iter = mLoadedCallbackList.begin();
+ iter != mLoadedCallbackList.end(); )
+ {
+ LLLoadedCallbackEntry *entryp = *iter++;
+ // We never finished loading the image. Indicate failure.
+ // Note: this allows mLoadedCallbackUserData to be cleaned up.
+ entryp->mCallback(FALSE, this, NULL, NULL, 0, TRUE, entryp->mUserData);
+ delete entryp;
+ }
+ mLoadedCallbackList.clear();
+
+ // Remove ourself from the global list of textures with callbacks
+ gTextureList.mCallbackList.erase(this);
+ }
+
+ S32 gl_discard = getDiscardLevel();
+
+ // If we don't have a legit GL image, set it to be lower than the worst discard level
+ if (gl_discard == -1)
+ {
+ gl_discard = MAX_DISCARD_LEVEL + 1;
+ }
+
+ //
+ // Determine the quality levels of textures that we can provide to callbacks
+ // and whether we need to do decompression/readback to get it
+ //
+ S32 current_raw_discard = MAX_DISCARD_LEVEL + 1; // We can always do a readback to get a raw discard
+ S32 best_raw_discard = gl_discard; // Current GL quality level
+ S32 current_aux_discard = MAX_DISCARD_LEVEL + 1;
+ S32 best_aux_discard = MAX_DISCARD_LEVEL + 1;
+
+ if (mIsRawImageValid)
+ {
+ // If we have an existing raw image, we have a baseline for the raw and auxiliary quality levels.
+ best_raw_discard = llmin(best_raw_discard, mRawDiscardLevel);
+ best_aux_discard = llmin(best_aux_discard, mRawDiscardLevel); // We always decode the aux when we decode the base raw
+ current_aux_discard = llmin(current_aux_discard, best_aux_discard);
+ }
+ else
+ {
+ // We have no data at all, we need to get it
+ // Do this by forcing the best aux discard to be 0.
+ best_aux_discard = 0;
+ }
+
+
+ //
+ // See if any of the callbacks would actually run using the data that we can provide,
+ // and also determine if we need to perform any readbacks or decodes.
+ //
+ bool run_gl_callbacks = false;
+ bool run_raw_callbacks = false;
+ bool need_readback = false;
+
+ for(callback_list_t::iterator iter = mLoadedCallbackList.begin();
+ iter != mLoadedCallbackList.end(); )
+ {
+ LLLoadedCallbackEntry *entryp = *iter++;
+ if (entryp->mNeedsImageRaw)
+ {
+ if (mNeedsAux)
+ {
+ //
+ // Need raw and auxiliary channels
+ //
+ if (entryp->mLastUsedDiscard > current_aux_discard)
+ {
+ // We have useful data, run the callbacks
+ run_raw_callbacks = true;
+ }
+ }
+ else
+ {
+ if (entryp->mLastUsedDiscard > current_raw_discard)
+ {
+ // We have useful data, just run the callbacks
+ run_raw_callbacks = true;
+ }
+ else if (entryp->mLastUsedDiscard > best_raw_discard)
+ {
+ // We can readback data, and then run the callbacks
+ need_readback = true;
+ run_raw_callbacks = true;
+ }
+ }
+ }
+ else
+ {
+ // Needs just GL
+ if (entryp->mLastUsedDiscard > gl_discard)
+ {
+ // We have enough data, run this callback requiring GL data
+ run_gl_callbacks = true;
+ }
+ }
+ }
+
+ //
+ // Do a readback if required, OR start off a texture decode
+ //
+ if (need_readback && (getMaxDiscardLevel() > gl_discard))
+ {
+ // Do a readback to get the GL data into the raw image
+ // We have GL data.
+
+ destroyRawImage();
+ readBackRawImage(gl_discard);
+ llassert_always(mRawImage.notNull());
+ llassert_always(!mNeedsAux || mAuxRawImage.notNull());
+ }
+
+ //
+ // Run raw/auxiliary data callbacks
+ //
+ if (run_raw_callbacks && mIsRawImageValid && (mRawDiscardLevel <= getMaxDiscardLevel()))
+ {
+ // Do callbacks which require raw image data.
+ //llinfos << "doLoadedCallbacks raw for " << getID() << llendl;
+
+ // Call each party interested in the raw data.
+ for(callback_list_t::iterator iter = mLoadedCallbackList.begin();
+ iter != mLoadedCallbackList.end(); )
+ {
+ callback_list_t::iterator curiter = iter++;
+ LLLoadedCallbackEntry *entryp = *curiter;
+ if (entryp->mNeedsImageRaw && (entryp->mLastUsedDiscard > mRawDiscardLevel))
+ {
+ // If we've loaded all the data there is to load or we've loaded enough
+ // to satisfy the interested party, then this is the last time that
+ // we're going to call them.
+
+ llassert_always(mRawImage.notNull());
+ if(mNeedsAux && mAuxRawImage.isNull())
+ {
+ llwarns << "Raw Image with no Aux Data for callback" << llendl;
+ }
+ BOOL final = mRawDiscardLevel <= entryp->mDesiredDiscard ? TRUE : FALSE;
+ //llinfos << "Running callback for " << getID() << llendl;
+ //llinfos << mRawImage->getWidth() << "x" << mRawImage->getHeight() << llendl;
+ if (final)
+ {
+ //llinfos << "Final!" << llendl;
+ }
+ entryp->mLastUsedDiscard = mRawDiscardLevel;
+ entryp->mCallback(TRUE, this, mRawImage, mAuxRawImage, mRawDiscardLevel, final, entryp->mUserData);
+ if (final)
+ {
+ iter = mLoadedCallbackList.erase(curiter);
+ delete entryp;
+ }
+ res = true;
+ }
+ }
+ }
+
+ //
+ // Run GL callbacks
+ //
+ if (run_gl_callbacks && (gl_discard <= getMaxDiscardLevel()))
+ {
+ //llinfos << "doLoadedCallbacks GL for " << getID() << llendl;
+
+ // Call the callbacks interested in GL data.
+ for(callback_list_t::iterator iter = mLoadedCallbackList.begin();
+ iter != mLoadedCallbackList.end(); )
+ {
+ callback_list_t::iterator curiter = iter++;
+ LLLoadedCallbackEntry *entryp = *curiter;
+ if (!entryp->mNeedsImageRaw && (entryp->mLastUsedDiscard > gl_discard))
+ {
+ BOOL final = gl_discard <= entryp->mDesiredDiscard ? TRUE : FALSE;
+ entryp->mLastUsedDiscard = gl_discard;
+ entryp->mCallback(TRUE, this, NULL, NULL, gl_discard, final, entryp->mUserData);
+ if (final)
+ {
+ iter = mLoadedCallbackList.erase(curiter);
+ delete entryp;
+ }
+ res = true;
+ }
+ }
+ }
+
+ //
+ // If we have no callbacks, take us off of the image callback list.
+ //
+ if (mLoadedCallbackList.empty())
+ {
+ gTextureList.mCallbackList.erase(this);
+ }
+
+ // Done with any raw image data at this point (will be re-created if we still have callbacks)
+ destroyRawImage();
+
+ return res;
+}
+
+//virtual
+void LLViewerFetchedTexture::forceImmediateUpdate()
+{
+ //only immediately update a deleted texture which is now being re-used.
+ if(!isDeleted())
+ {
+ return ;
+ }
+ //if already called forceImmediateUpdate()
+ if(mInImageList && mDecodePriority == LLViewerFetchedTexture::maxDecodePriority())
+ {
+ return ;
+ }
+
+ gTextureList.forceImmediateUpdate(this) ;
+ return ;
+}
+
+// Was in LLImageGL
+LLImageRaw* LLViewerFetchedTexture::readBackRawImage(S8 discard_level)
+{
+ llassert_always(mGLTexturep.notNull()) ;
+ llassert_always(discard_level >= 0);
+ llassert_always(mComponents > 0);
+ if (mRawImage.notNull())
+ {
+ llerrs << "called with existing mRawImage" << llendl;
+ mRawImage = NULL;
+ }
+ mRawImage = new LLImageRaw(mGLTexturep->getWidth(discard_level), mGLTexturep->getHeight(discard_level), mComponents);
+ sRawCount++;
+ mRawDiscardLevel = discard_level;
+ mGLTexturep->readBackRaw(mRawDiscardLevel, mRawImage, false);
+ mIsRawImageValid = TRUE;
+
+ return mRawImage;
+}
+
+void LLViewerFetchedTexture::destroyRawImage()
+{
+ if (mRawImage.notNull()) sRawCount--;
+ if (mAuxRawImage.notNull()) sAuxCount--;
+ mRawImage = NULL;
+ mAuxRawImage = NULL;
+ mIsRawImageValid = FALSE;
+ mRawDiscardLevel = INVALID_DISCARD_LEVEL;
+}
+//----------------------------------------------------------------------------------------------
+//end of LLViewerFetchedTexture
+//----------------------------------------------------------------------------------------------
+
+//----------------------------------------------------------------------------------------------
+//start of LLViewerLODTexture
+//----------------------------------------------------------------------------------------------
+LLViewerLODTexture::LLViewerLODTexture(const LLUUID& id, BOOL usemipmaps)
+ : LLViewerFetchedTexture(id, usemipmaps)
+{
+ init(TRUE) ;
+}
+
+LLViewerLODTexture::LLViewerLODTexture(const std::string& full_path, const LLUUID& id, BOOL usemipmaps)
+ : LLViewerFetchedTexture(full_path, id, usemipmaps)
+{
+ init(TRUE) ;
+}
+
+void LLViewerLODTexture::init(bool firstinit)
+{
+ mTexelsPerImage = 64.f*64.f;
+ mDiscardVirtualSize = 0.f;
+ mCalculatedDiscardLevel = -1.f;
+}
+
+//virtual
+S8 LLViewerLODTexture::getType() const
+{
+ return LLViewerTexture::LOD_TEXTURE ;
+}
+
+// This is gauranteed to get called periodically for every texture
+//virtual
+void LLViewerLODTexture::processTextureStats()
+{
+ // Generate the request priority and render priority
+ if (mDontDiscard || !mUseMipMaps)
+ {
+ mDesiredDiscardLevel = 0;
+ if (mFullWidth > MAX_IMAGE_SIZE_DEFAULT || mFullHeight > MAX_IMAGE_SIZE_DEFAULT)
+ mDesiredDiscardLevel = 1; // MAX_IMAGE_SIZE_DEFAULT = 1024 and max size ever is 2048
+ }
+ else if (mBoostLevel < LLViewerTexture::BOOST_HIGH && mMaxVirtualSize <= 10.f)
+ {
+ // If the image has not been significantly visible in a while, we don't want it
+ mDesiredDiscardLevel = llmin(mMinDesiredDiscardLevel, (S8)(MAX_DISCARD_LEVEL + 1));
+ }
+ else if (!mFullWidth || !mFullHeight)
+ {
+ mDesiredDiscardLevel = getMaxDiscardLevel() ;
+ }
+ else
+ {
+ //static const F64 log_2 = log(2.0);
+ static const F64 log_4 = log(4.0);
+
+ S32 fullwidth = llmin(mFullWidth,(S32)MAX_IMAGE_SIZE_DEFAULT);
+ S32 fullheight = llmin(mFullHeight,(S32)MAX_IMAGE_SIZE_DEFAULT);
+ mTexelsPerImage = (F32)fullwidth * fullheight;
+
+ F32 discard_level = 0.f;
+
+ // If we know the output width and height, we can force the discard
+ // level to the correct value, and thus not decode more texture
+ // data than we need to.
+ /*if (mBoostLevel == LLViewerTexture::BOOST_UI ||
+ mBoostLevel == LLViewerTexture::BOOST_PREVIEW ||
+ mBoostLevel == LLViewerTexture::BOOST_AVATAR_SELF) // JAMESDEBUG what about AVATAR_BAKED_SELF?
+ {
+ discard_level = 0; // full res
+ }
+ else*/ if (mKnownDrawWidth && mKnownDrawHeight)
+ {
+ S32 draw_texels = mKnownDrawWidth * mKnownDrawHeight;
+
+ // Use log_4 because we're in square-pixel space, so an image
+ // with twice the width and twice the height will have mTexelsPerImage
+ // 4 * draw_size
+ discard_level = (F32)(log(mTexelsPerImage/draw_texels) / log_4);
+ }
+ else
+ {
+ if ((mCalculatedDiscardLevel >= 0.f) &&
+ (llabs(mMaxVirtualSize - mDiscardVirtualSize) < mMaxVirtualSize*.20f))
+ {
+ // < 20% change in virtual size = no change in desired discard
+ discard_level = mCalculatedDiscardLevel;
+ }
+ else
+ {
+ // Calculate the required scale factor of the image using pixels per texel
+ discard_level = (F32)(log(mTexelsPerImage/mMaxVirtualSize) / log_4);
+ mDiscardVirtualSize = mMaxVirtualSize;
+ mCalculatedDiscardLevel = discard_level;
+ }
+ }
+ if (mBoostLevel < LLViewerTexture::BOOST_HIGH)
+ {
+ static const F32 discard_bias = -.5f; // Must be < 1 or highest discard will never load!
+ discard_level += discard_bias;
+ discard_level += sDesiredDiscardBias;
+ discard_level *= sDesiredDiscardScale; // scale
+ }
+ discard_level = floorf(discard_level);
+// discard_level -= (gTextureList.mVideoMemorySetting>>1); // more video ram = higher detail
+
+ F32 min_discard = 0.f;
+ if (mFullWidth > MAX_IMAGE_SIZE_DEFAULT || mFullHeight > MAX_IMAGE_SIZE_DEFAULT)
+ min_discard = 1.f; // MAX_IMAGE_SIZE_DEFAULT = 1024 and max size ever is 2048
+
+ discard_level = llclamp(discard_level, min_discard, (F32)MAX_DISCARD_LEVEL);
+
+ // Can't go higher than the max discard level
+ mDesiredDiscardLevel = llmin(getMaxDiscardLevel() + 1, (S32)discard_level);
+ // Clamp to min desired discard
+ mDesiredDiscardLevel = llmin(mMinDesiredDiscardLevel, mDesiredDiscardLevel);
+
+ //
+ // At this point we've calculated the quality level that we want,
+ // if possible. Now we check to see if we have it, and take the
+ // proper action if we don't.
+ //
+
+ BOOL increase_discard = FALSE;
+ S32 current_discard = getDiscardLevel();
+ if ((sDesiredDiscardBias > 0.0f) &&
+ (current_discard >= 0 && mDesiredDiscardLevel >= current_discard))
+ {
+ if ( BYTES_TO_MEGA_BYTES(sBoundTextureMemoryInBytes) > sMaxBoundTextureMemInMegaBytes * texmem_middle_bound_scale)
+ {
+ // Limit the amount of GL memory bound each frame
+ if (mDesiredDiscardLevel > current_discard)
+ {
+ increase_discard = TRUE;
+ }
+ }
+ if ( BYTES_TO_MEGA_BYTES(sTotalTextureMemoryInBytes) > sMaxTotalTextureMemInMegaBytes*texmem_middle_bound_scale)
+ {
+ // Only allow GL to have 2x the video card memory
+ if (!mGLTexturep->getBoundRecently())
+ {
+ increase_discard = TRUE;
+ }
+ }
+ if (increase_discard)
+ {
+ // llinfos << "DISCARDED: " << mID << " Discard: " << current_discard << llendl;
+ sBoundTextureMemoryInBytes -= mGLTexturep->mTextureMemory;
+ sTotalTextureMemoryInBytes -= mGLTexturep->mTextureMemory;
+ // Increase the discard level (reduce the texture res)
+ S32 new_discard = current_discard+1;
+ mGLTexturep->setDiscardLevel(new_discard);
+ sBoundTextureMemoryInBytes += mGLTexturep->mTextureMemory;
+ sTotalTextureMemoryInBytes += mGLTexturep->mTextureMemory;
+ if(LLViewerTextureManager::sTesterp)
+ {
+ LLViewerTextureManager::sTesterp->setStablizingTime() ;
+ }
+ }
+ }
+ }
+}
+
+//----------------------------------------------------------------------------------------------
+//end of LLViewerLODTexture
+//----------------------------------------------------------------------------------------------
+
+//----------------------------------------------------------------------------------------------
+//start of LLViewerMediaTexture
+//----------------------------------------------------------------------------------------------
+//static
+void LLViewerMediaTexture::updateClass()
+{
+ static const F32 MAX_INACTIVE_TIME = 30.f ;
+
+ for(media_map_t::iterator iter = sMediaMap.begin() ; iter != sMediaMap.end(); )
+ {
+ LLViewerMediaTexture* mediap = iter->second;
+ ++iter ;
+
+ if(mediap->getNumRefs() == 1 && mediap->getLastReferencedTimer()->getElapsedTimeF32() > MAX_INACTIVE_TIME) //one by sMediaMap
+ {
+ sMediaMap.erase(mediap->getID()) ;
+ }
+ }
+}
+
+LLViewerMediaTexture::LLViewerMediaTexture(const LLUUID& id, BOOL usemipmaps, LLImageGL* gl_image)
+ : LLViewerTexture(id, usemipmaps)
+{
+ sMediaMap.insert(std::make_pair(id, this));
+
+ mGLTexturep = gl_image ;
+ if(mGLTexturep.isNull())
+ {
+ generateGLTexture() ;
+ }
+ mIsPlaying = FALSE ;
+}
+
+void LLViewerMediaTexture::reinit(BOOL usemipmaps /* = TRUE */)
+{
+ mGLTexturep = NULL ;
+ init(false);
+ mUseMipMaps = usemipmaps ;
+ mIsPlaying = FALSE ;
+ getLastReferencedTimer()->reset() ;
+
+ generateGLTexture() ;
+}
+
+void LLViewerMediaTexture::setUseMipMaps(BOOL mipmap)
+{
+ mUseMipMaps = mipmap;
+
+ if(mGLTexturep.notNull())
+ {
+ mGLTexturep->setUseMipMaps(mipmap) ;
+ }
+}
+
+//virtual
+S8 LLViewerMediaTexture::getType() const
+{
+ return LLViewerTexture::MEDIA_TEXTURE ;
+}
+
+void LLViewerMediaTexture::setOldTexture(LLViewerTexture* tex)
+{
+ mOldTexturep = tex ;
+}
+
+LLViewerTexture* LLViewerMediaTexture::getOldTexture() const
+{
+ return mOldTexturep ;
+}
+//----------------------------------------------------------------------------------------------
+//end of LLViewerMediaTexture
+//----------------------------------------------------------------------------------------------
+
+//----------------------------------------------------------------------------------------------
+//start of LLTexturePipelineTester
+//----------------------------------------------------------------------------------------------
+LLTexturePipelineTester::LLTexturePipelineTester() :
+ LLMetricPerformanceTester("TextureTester", FALSE)
+{
+ addMetricString("TotalBytesLoaded") ;
+ addMetricString("TotalBytesLoadedFromCache") ;
+ addMetricString("TotalBytesLoadedForLargeImage") ;
+ addMetricString("TotalBytesLoadedForSculpties") ;
+ addMetricString("StartFetchingTime") ;
+ addMetricString("TotalGrayTime") ;
+ addMetricString("TotalStablizingTime") ;
+ addMetricString("StartTimeLoadingSculpties") ;
+ addMetricString("EndTimeLoadingSculpties") ;
+
+ addMetricString("Time") ;
+ addMetricString("TotalBytesBound") ;
+ addMetricString("TotalBytesBoundForLargeImage") ;
+ addMetricString("PercentageBytesBound") ;
+
+ mTotalBytesLoaded = 0 ;
+ mTotalBytesLoadedFromCache = 0 ;
+ mTotalBytesLoadedForLargeImage = 0 ;
+ mTotalBytesLoadedForSculpties = 0 ;
+
+ reset() ;
+}
+
+LLTexturePipelineTester::~LLTexturePipelineTester()
+{
+ LLViewerTextureManager::sTesterp = NULL ;
+}
+
+void LLTexturePipelineTester::update()
+{
+ mLastTotalBytesUsed = mTotalBytesUsed ;
+ mLastTotalBytesUsedForLargeImage = mTotalBytesUsedForLargeImage ;
+ mTotalBytesUsed = 0 ;
+ mTotalBytesUsedForLargeImage = 0 ;
+
+ if(LLAppViewer::getTextureFetch()->getNumRequests() > 0) //fetching list is not empty
+ {
+ if(mPause)
+ {
+ //start a new fetching session
+ reset() ;
+ mStartFetchingTime = LLImageGL::sLastFrameTime ;
+ mPause = FALSE ;
+ }
+
+ //update total gray time
+ if(mUsingDefaultTexture)
+ {
+ mUsingDefaultTexture = FALSE ;
+ mTotalGrayTime = LLImageGL::sLastFrameTime - mStartFetchingTime ;
+ }
+
+ //update the stablizing timer.
+ updateStablizingTime() ;
+
+ outputTestResults() ;
+ }
+ else if(!mPause)
+ {
+ //stop the current fetching session
+ mPause = TRUE ;
+ outputTestResults() ;
+ reset() ;
+ }
+}
+
+void LLTexturePipelineTester::reset()
+{
+ mPause = TRUE ;
+
+ mUsingDefaultTexture = FALSE ;
+ mStartStablizingTime = 0.0f ;
+ mEndStablizingTime = 0.0f ;
+
+ mTotalBytesUsed = 0 ;
+ mTotalBytesUsedForLargeImage = 0 ;
+ mLastTotalBytesUsed = 0 ;
+ mLastTotalBytesUsedForLargeImage = 0 ;
+
+ mStartFetchingTime = 0.0f ;
+
+ mTotalGrayTime = 0.0f ;
+ mTotalStablizingTime = 0.0f ;
+
+ mStartTimeLoadingSculpties = 1.0f ;
+ mEndTimeLoadingSculpties = 0.0f ;
+}
+
+//virtual
+void LLTexturePipelineTester::outputTestRecord(LLSD *sd)
+{
+ (*sd)[mCurLabel]["TotalBytesLoaded"] = (LLSD::Integer)mTotalBytesLoaded ;
+ (*sd)[mCurLabel]["TotalBytesLoadedFromCache"] = (LLSD::Integer)mTotalBytesLoadedFromCache ;
+ (*sd)[mCurLabel]["TotalBytesLoadedForLargeImage"] = (LLSD::Integer)mTotalBytesLoadedForLargeImage ;
+ (*sd)[mCurLabel]["TotalBytesLoadedForSculpties"] = (LLSD::Integer)mTotalBytesLoadedForSculpties ;
+
+ (*sd)[mCurLabel]["StartFetchingTime"] = (LLSD::Real)mStartFetchingTime ;
+ (*sd)[mCurLabel]["TotalGrayTime"] = (LLSD::Real)mTotalGrayTime ;
+ (*sd)[mCurLabel]["TotalStablizingTime"] = (LLSD::Real)mTotalStablizingTime ;
+
+ (*sd)[mCurLabel]["StartTimeLoadingSculpties"] = (LLSD::Real)mStartTimeLoadingSculpties ;
+ (*sd)[mCurLabel]["EndTimeLoadingSculpties"] = (LLSD::Real)mEndTimeLoadingSculpties ;
+
+ (*sd)[mCurLabel]["Time"] = LLImageGL::sLastFrameTime ;
+ (*sd)[mCurLabel]["TotalBytesBound"] = (LLSD::Integer)mLastTotalBytesUsed ;
+ (*sd)[mCurLabel]["TotalBytesBoundForLargeImage"] = (LLSD::Integer)mLastTotalBytesUsedForLargeImage ;
+ (*sd)[mCurLabel]["PercentageBytesBound"] = (LLSD::Real)(100.f * mLastTotalBytesUsed / mTotalBytesLoaded) ;
+}
+
+void LLTexturePipelineTester::updateTextureBindingStats(const LLViewerTexture* imagep)
+{
+ U32 mem_size = (U32)imagep->getTextureMemory() ;
+ mTotalBytesUsed += mem_size ;
+
+ if(MIN_LARGE_IMAGE_AREA <= (U32)(mem_size / (U32)imagep->getComponents()))
+ {
+ mTotalBytesUsedForLargeImage += mem_size ;
+ }
+}
+
+void LLTexturePipelineTester::updateTextureLoadingStats(const LLViewerFetchedTexture* imagep, const LLImageRaw* raw_imagep, BOOL from_cache)
+{
+ U32 data_size = (U32)raw_imagep->getDataSize() ;
+ mTotalBytesLoaded += data_size ;
+
+ if(from_cache)
+ {
+ mTotalBytesLoadedFromCache += data_size ;
+ }
+
+ if(MIN_LARGE_IMAGE_AREA <= (U32)(data_size / (U32)raw_imagep->getComponents()))
+ {
+ mTotalBytesLoadedForLargeImage += data_size ;
+ }
+
+ if(imagep->isForSculpt())
+ {
+ mTotalBytesLoadedForSculpties += data_size ;
+
+ if(mStartTimeLoadingSculpties > mEndTimeLoadingSculpties)
+ {
+ mStartTimeLoadingSculpties = LLImageGL::sLastFrameTime ;
+ }
+ mEndTimeLoadingSculpties = LLImageGL::sLastFrameTime ;
+ }
+}
+
+void LLTexturePipelineTester::updateGrayTextureBinding()
+{
+ mUsingDefaultTexture = TRUE ;
+}
+
+void LLTexturePipelineTester::setStablizingTime()
+{
+ if(mStartStablizingTime <= mStartFetchingTime)
+ {
+ mStartStablizingTime = LLImageGL::sLastFrameTime ;
+ }
+ mEndStablizingTime = LLImageGL::sLastFrameTime ;
+}
+
+void LLTexturePipelineTester::updateStablizingTime()
+{
+ if(mStartStablizingTime > mStartFetchingTime)
+ {
+ F32 t = mEndStablizingTime - mStartStablizingTime ;
+
+ if(t > 0.0001f && (t - mTotalStablizingTime) < 0.0001f)
+ {
+ //already stablized
+ mTotalStablizingTime = LLImageGL::sLastFrameTime - mStartStablizingTime ;
+
+ //cancel the timer
+ mStartStablizingTime = 0.f ;
+ mEndStablizingTime = 0.f ;
+ }
+ else
+ {
+ mTotalStablizingTime = t ;
+ }
+ }
+ mTotalStablizingTime = 0.f ;
+}
+
+//virtual
+void LLTexturePipelineTester::compareTestSessions(std::ofstream* os)
+{
+ LLTexturePipelineTester::LLTextureTestSession* base_sessionp = dynamic_cast<LLTexturePipelineTester::LLTextureTestSession*>(mBaseSessionp) ;
+ LLTexturePipelineTester::LLTextureTestSession* current_sessionp = dynamic_cast<LLTexturePipelineTester::LLTextureTestSession*>(mCurrentSessionp) ;
+ if(!base_sessionp || !current_sessionp)
+ {
+ llerrs << "type of test session does not match!" << llendl ;
+ }
+
+ //compare and output the comparison
+ *os << llformat("%s\n", mName.c_str()) ;
+ *os << llformat("AggregateResults\n") ;
+
+ compareTestResults(os, "TotalFetchingTime", base_sessionp->mTotalFetchingTime, current_sessionp->mTotalFetchingTime) ;
+ compareTestResults(os, "TotalGrayTime", base_sessionp->mTotalGrayTime, current_sessionp->mTotalGrayTime) ;
+ compareTestResults(os, "TotalStablizingTime", base_sessionp->mTotalStablizingTime, current_sessionp->mTotalStablizingTime);
+ compareTestResults(os, "StartTimeLoadingSculpties", base_sessionp->mStartTimeLoadingSculpties, current_sessionp->mStartTimeLoadingSculpties) ;
+ compareTestResults(os, "TotalTimeLoadingSculpties", base_sessionp->mTotalTimeLoadingSculpties, current_sessionp->mTotalTimeLoadingSculpties) ;
+
+ compareTestResults(os, "TotalBytesLoaded", base_sessionp->mTotalBytesLoaded, current_sessionp->mTotalBytesLoaded) ;
+ compareTestResults(os, "TotalBytesLoadedFromCache", base_sessionp->mTotalBytesLoadedFromCache, current_sessionp->mTotalBytesLoadedFromCache) ;
+ compareTestResults(os, "TotalBytesLoadedForLargeImage", base_sessionp->mTotalBytesLoadedForLargeImage, current_sessionp->mTotalBytesLoadedForLargeImage) ;
+ compareTestResults(os, "TotalBytesLoadedForSculpties", base_sessionp->mTotalBytesLoadedForSculpties, current_sessionp->mTotalBytesLoadedForSculpties) ;
+
+ *os << llformat("InstantResults\n") ;
+ S32 size = llmin(base_sessionp->mInstantPerformanceListCounter, current_sessionp->mInstantPerformanceListCounter) ;
+ for(S32 i = 0 ; i < size ; i++)
+ {
+ *os << llformat("Time(B-T)-%.4f-%.4f\n", base_sessionp->mInstantPerformanceList[i].mTime, current_sessionp->mInstantPerformanceList[i].mTime) ;
+
+ compareTestResults(os, "AverageBytesUsedPerSecond", base_sessionp->mInstantPerformanceList[i].mAverageBytesUsedPerSecond,
+ current_sessionp->mInstantPerformanceList[i].mAverageBytesUsedPerSecond) ;
+
+ compareTestResults(os, "AverageBytesUsedForLargeImagePerSecond", base_sessionp->mInstantPerformanceList[i].mAverageBytesUsedForLargeImagePerSecond,
+ current_sessionp->mInstantPerformanceList[i].mAverageBytesUsedForLargeImagePerSecond) ;
+
+ compareTestResults(os, "AveragePercentageBytesUsedPerSecond", base_sessionp->mInstantPerformanceList[i].mAveragePercentageBytesUsedPerSecond,
+ current_sessionp->mInstantPerformanceList[i].mAveragePercentageBytesUsedPerSecond) ;
+ }
+
+ if(size < base_sessionp->mInstantPerformanceListCounter)
+ {
+ for(S32 i = size ; i < base_sessionp->mInstantPerformanceListCounter ; i++)
+ {
+ *os << llformat("Time(B-T)-%.4f- \n", base_sessionp->mInstantPerformanceList[i].mTime) ;
+
+ *os << llformat(", AverageBytesUsedPerSecond, %d, N/A \n", base_sessionp->mInstantPerformanceList[i].mAverageBytesUsedPerSecond) ;
+ *os << llformat(", AverageBytesUsedForLargeImagePerSecond, %d, N/A \n", base_sessionp->mInstantPerformanceList[i].mAverageBytesUsedForLargeImagePerSecond) ;
+ *os << llformat(", AveragePercentageBytesUsedPerSecond, %.4f, N/A \n", base_sessionp->mInstantPerformanceList[i].mAveragePercentageBytesUsedPerSecond) ;
+ }
+ }
+ else if(size < current_sessionp->mInstantPerformanceListCounter)
+ {
+ for(S32 i = size ; i < current_sessionp->mInstantPerformanceListCounter ; i++)
+ {
+ *os << llformat("Time(B-T)- -%.4f\n", current_sessionp->mInstantPerformanceList[i].mTime) ;
+
+ *os << llformat(", AverageBytesUsedPerSecond, N/A, %d\n", current_sessionp->mInstantPerformanceList[i].mAverageBytesUsedPerSecond) ;
+ *os << llformat(", AverageBytesUsedForLargeImagePerSecond, N/A, %d\n", current_sessionp->mInstantPerformanceList[i].mAverageBytesUsedForLargeImagePerSecond) ;
+ *os << llformat(", AveragePercentageBytesUsedPerSecond, N/A, %.4f\n", current_sessionp->mInstantPerformanceList[i].mAveragePercentageBytesUsedPerSecond) ;
+ }
+ }
+}
+
+//virtual
+LLMetricPerformanceTester::LLTestSession* LLTexturePipelineTester::loadTestSession(LLSD* log)
+{
+ LLTexturePipelineTester::LLTextureTestSession* sessionp = new LLTexturePipelineTester::LLTextureTestSession() ;
+ if(!sessionp)
+ {
+ return NULL ;
+ }
+
+ F32 total_fetching_time = 0.f ;
+ F32 total_gray_time = 0.f ;
+ F32 total_stablizing_time = 0.f ;
+ F32 total_loading_sculpties_time = 0.f ;
+
+ F32 start_fetching_time = -1.f ;
+ F32 start_fetching_sculpties_time = 0.f ;
+
+ F32 last_time = 0.0f ;
+ S32 frame_count = 0 ;
+
+ sessionp->mInstantPerformanceListCounter = 0 ;
+ sessionp->mInstantPerformanceList.resize(128) ;
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedPerSecond = 0 ;
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedForLargeImagePerSecond = 0 ;
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAveragePercentageBytesUsedPerSecond = 0.f ;
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mTime = 0.f ;
+
+ //load a session
+ BOOL in_log = (*log).has(mCurLabel) ;
+ while(in_log)
+ {
+ LLSD::String label = mCurLabel ;
+ incLabel() ;
+ in_log = (*log).has(mCurLabel) ;
+
+ if(sessionp->mInstantPerformanceListCounter >= (S32)sessionp->mInstantPerformanceList.size())
+ {
+ sessionp->mInstantPerformanceList.resize(sessionp->mInstantPerformanceListCounter + 128) ;
+ }
+
+ //time
+ F32 start_time = (*log)[label]["StartFetchingTime"].asReal() ;
+ F32 cur_time = (*log)[label]["Time"].asReal() ;
+ if(start_time - start_fetching_time > 0.0001f) //fetching has paused for a while
+ {
+ sessionp->mTotalFetchingTime += total_fetching_time ;
+ sessionp->mTotalGrayTime += total_gray_time ;
+ sessionp->mTotalStablizingTime += total_stablizing_time ;
+
+ sessionp->mStartTimeLoadingSculpties = start_fetching_sculpties_time ;
+ sessionp->mTotalTimeLoadingSculpties += total_loading_sculpties_time ;
+
+ start_fetching_time = start_time ;
+ total_fetching_time = 0.0f ;
+ total_gray_time = 0.f ;
+ total_stablizing_time = 0.f ;
+ total_loading_sculpties_time = 0.f ;
+ }
+ else
+ {
+ total_fetching_time = cur_time - start_time ;
+ total_gray_time = (*log)[label]["TotalGrayTime"].asReal() ;
+ total_stablizing_time = (*log)[label]["TotalStablizingTime"].asReal() ;
+
+ total_loading_sculpties_time = (*log)[label]["EndTimeLoadingSculpties"].asReal() - (*log)[label]["StartTimeLoadingSculpties"].asReal() ;
+ if(start_fetching_sculpties_time < 0.f && total_loading_sculpties_time > 0.f)
+ {
+ start_fetching_sculpties_time = (*log)[label]["StartTimeLoadingSculpties"].asReal() ;
+ }
+ }
+
+ //total loaded bytes
+ sessionp->mTotalBytesLoaded = (*log)[label]["TotalBytesLoaded"].asInteger() ;
+ sessionp->mTotalBytesLoadedFromCache = (*log)[label]["TotalBytesLoadedFromCache"].asInteger() ;
+ sessionp->mTotalBytesLoadedForLargeImage = (*log)[label]["TotalBytesLoadedForLargeImage"].asInteger() ;
+ sessionp->mTotalBytesLoadedForSculpties = (*log)[label]["TotalBytesLoadedForSculpties"].asInteger() ;
+
+ //instant metrics
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedPerSecond +=
+ (*log)[label]["TotalBytesBound"].asInteger() ;
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedForLargeImagePerSecond +=
+ (*log)[label]["TotalBytesBoundForLargeImage"].asInteger() ;
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAveragePercentageBytesUsedPerSecond +=
+ (*log)[label]["PercentageBytesBound"].asReal() ;
+ frame_count++ ;
+ if(cur_time - last_time >= 1.0f)
+ {
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedPerSecond /= frame_count ;
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedForLargeImagePerSecond /= frame_count ;
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAveragePercentageBytesUsedPerSecond /= frame_count ;
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mTime = last_time ;
+
+ frame_count = 0 ;
+ last_time = cur_time ;
+ sessionp->mInstantPerformanceListCounter++ ;
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedPerSecond = 0 ;
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAverageBytesUsedForLargeImagePerSecond = 0 ;
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mAveragePercentageBytesUsedPerSecond = 0.f ;
+ sessionp->mInstantPerformanceList[sessionp->mInstantPerformanceListCounter].mTime = 0.f ;
+ }
+ }
+
+ sessionp->mTotalFetchingTime += total_fetching_time ;
+ sessionp->mTotalGrayTime += total_gray_time ;
+ sessionp->mTotalStablizingTime += total_stablizing_time ;
+
+ if(sessionp->mStartTimeLoadingSculpties < 0.f)
+ {
+ sessionp->mStartTimeLoadingSculpties = start_fetching_sculpties_time ;
+ }
+ sessionp->mTotalTimeLoadingSculpties += total_loading_sculpties_time ;
+
+ return sessionp;
+}
+
+LLTexturePipelineTester::LLTextureTestSession::LLTextureTestSession()
+{
+ reset() ;
+}
+LLTexturePipelineTester::LLTextureTestSession::~LLTextureTestSession()
+{
+}
+void LLTexturePipelineTester::LLTextureTestSession::reset()
+{
+ mTotalFetchingTime = 0.0f ;
+
+ mTotalGrayTime = 0.0f ;
+ mTotalStablizingTime = 0.0f ;
+
+ mStartTimeLoadingSculpties = 0.0f ;
+ mTotalTimeLoadingSculpties = 0.0f ;
+
+ mTotalBytesLoaded = 0 ;
+ mTotalBytesLoadedFromCache = 0 ;
+ mTotalBytesLoadedForLargeImage = 0 ;
+ mTotalBytesLoadedForSculpties = 0 ;
+
+ mInstantPerformanceListCounter = 0 ;
+}
+//----------------------------------------------------------------------------------------------
+//end of LLTexturePipelineTester
+//----------------------------------------------------------------------------------------------
+
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
new file mode 100644
index 0000000000..142c212435
--- /dev/null
+++ b/indra/newview/llviewertexture.h
@@ -0,0 +1,672 @@
+/**
+ * @file llviewertexture.h
+ * @brief Object for managing images and their textures
+ *
+ * $LicenseInfo:firstyear=2000&license=viewergpl$
+ *
+ * Copyright (c) 2000-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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_LLVIEWERTEXTURE_H
+#define LL_LLVIEWERTEXTURE_H
+
+#include "lltexture.h"
+#include "lltimer.h"
+#include "llframetimer.h"
+#include "llhost.h"
+#include "llgltypes.h"
+#include "llrender.h"
+#include "llmetricperformancetester.h"
+
+#include <map>
+#include <list>
+
+#define MIN_VIDEO_RAM_IN_MEGA_BYTES 32
+#define MAX_VIDEO_RAM_IN_MEGA_BYTES 512 // 512MB max for performance reasons.
+
+class LLFace;
+class LLImageGL ;
+class LLViewerTexture;
+class LLViewerFetchedTexture ;
+class LLViewerMediaTexture ;
+class LLTexturePipelineTester ;
+
+typedef void (*loaded_callback_func)( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata );
+
+class LLVFile;
+class LLMessageSystem;
+
+class LLLoadedCallbackEntry
+{
+public:
+ LLLoadedCallbackEntry(loaded_callback_func cb,
+ S32 discard_level,
+ BOOL need_imageraw, // Needs image raw for the callback
+ void* userdata )
+ : mCallback(cb),
+ mLastUsedDiscard(MAX_DISCARD_LEVEL+1),
+ mDesiredDiscard(discard_level),
+ mNeedsImageRaw(need_imageraw),
+ mUserData(userdata)
+ {
+ }
+
+ loaded_callback_func mCallback;
+ S32 mLastUsedDiscard;
+ S32 mDesiredDiscard;
+ BOOL mNeedsImageRaw;
+ void* mUserData;
+};
+
+class LLTextureBar;
+
+class LLViewerTexture : public LLTexture
+{
+public:
+ enum
+ {
+ MAX_IMAGE_SIZE_DEFAULT = 1024,
+ INVALID_DISCARD_LEVEL = 0x7fff
+ };
+ enum
+ {
+ LOCAL_TEXTURE,
+ MEDIA_TEXTURE,
+ DYNAMIC_TEXTURE,
+ FETCHED_TEXTURE,
+ LOD_TEXTURE,
+ INVALID_TEXTURE_TYPE
+ };
+
+ enum EBoostLevel
+ {
+ BOOST_NONE = 0,
+ BOOST_AVATAR_BAKED = 1,
+ BOOST_AVATAR = 2,
+ BOOST_CLOUDS = 3,
+ BOOST_SCULPTED = 4,
+
+ BOOST_HIGH = 10,
+ BOOST_TERRAIN = 11, // has to be high priority for minimap / low detail
+ BOOST_SELECTED = 12,
+ BOOST_HUD = 13,
+ BOOST_AVATAR_BAKED_SELF = 14,
+ BOOST_UI = 15,
+ BOOST_PREVIEW = 16,
+ BOOST_MAP = 17,
+ BOOST_MAP_LAYER = 18,
+ BOOST_AVATAR_SELF = 19, // needed for baking avatar
+ BOOST_MAX_LEVEL
+ };
+
+protected:
+ virtual ~LLViewerTexture();
+ LOG_CLASS(LLViewerTexture);
+
+public:
+ static void initClass();
+ static void cleanupClass();
+ static void updateClass(const F32 velocity, const F32 angular_velocity) ;
+
+ LLViewerTexture(BOOL usemipmaps = TRUE);
+ LLViewerTexture(const LLUUID& id, BOOL usemipmaps) ;
+ LLViewerTexture(const LLImageRaw* raw, BOOL usemipmaps) ;
+ LLViewerTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps) ;
+
+ virtual S8 getType() const;
+ virtual BOOL isMissingAsset()const ;
+ virtual void dump(); // debug info to llinfos
+
+ /*virtual*/ bool bindDefaultImage(const S32 stage = 0) const ;
+ /*virtual*/ void forceImmediateUpdate() ;
+
+ const LLUUID& getID() const { return mID; }
+
+ void setBoostLevel(S32 level);
+ S32 getBoostLevel() { return mBoostLevel; }
+
+ //maxVirtualSize of the texture
+ void addTextureStats(F32 virtual_size) const ;
+ void resetTextureStats(BOOL zero = FALSE);
+ F32 getMaxVirtualSize()const {return mMaxVirtualSize ;}
+
+ LLFrameTimer* getLastReferencedTimer() {return &mLastReferencedTimer ;}
+
+ S32 getFullWidth() const { return mFullWidth; }
+ S32 getFullHeight() const { return mFullHeight; }
+
+ void addFace(LLFace* facep) ;
+ void removeFace(LLFace* facep) ;
+
+ void generateGLTexture() ;
+ void destroyGLTexture() ;
+
+ //---------------------------------------------------------------------------------------------
+ //functions to access LLImageGL
+ //---------------------------------------------------------------------------------------------
+ /*virtual*/S32 getWidth(S32 discard_level = -1) const;
+ /*virtual*/S32 getHeight(S32 discard_level = -1) const;
+
+ BOOL hasGLTexture() const ;
+ BOOL hasValidGLTexture() const ;
+ LLGLuint getTexName() const ;
+ BOOL createGLTexture() ;
+ BOOL createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S32 usename = 0);
+
+ void setFilteringOption(LLTexUnit::eTextureFilterOptions option);
+ void setExplicitFormat(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format = 0, BOOL swap_bytes = FALSE);
+ void setAddressMode(LLTexUnit::eTextureAddressMode mode);
+ BOOL setSubImage(const LLImageRaw* imageraw, S32 x_pos, S32 y_pos, S32 width, S32 height);
+ BOOL setSubImage(const U8* datap, S32 data_width, S32 data_height, S32 x_pos, S32 y_pos, S32 width, S32 height);
+ void setGLTextureCreated (bool initialized);
+
+ LLTexUnit::eTextureAddressMode getAddressMode(void) const ;
+ S32 getMaxDiscardLevel() const;
+ S32 getDiscardLevel() const;
+ S8 getComponents() const ;
+ BOOL getBoundRecently() const;
+ S32 getTextureMemory() const ;
+ LLGLenum getPrimaryFormat() const;
+ BOOL getIsAlphaMask() const ;
+ LLTexUnit::eTextureType getTarget(void) const ;
+ BOOL getMask(const LLVector2 &tc);
+ F32 getTimePassedSinceLastBound();
+ BOOL getMissed() const ;
+ BOOL isValidForSculpt(S32 discard_level, S32 image_width, S32 image_height, S32 ncomponents) ;
+ BOOL readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compressed_ok) const;
+ //---------------------------------------------------------------------------------------------
+ //end of functions to access LLImageGL
+ //---------------------------------------------------------------------------------------------
+
+ void switchToTexture(LLViewerTexture* new_texture) ; //make all faces pointing to this texture to point to new_texture.
+
+ //-----------------
+ /*virtual*/ void setActive() ;
+ void forceActive() ;
+ void setNoDelete() ;
+ void dontDiscard() { mDontDiscard = 1; mTextureState = NO_DELETE; }
+ BOOL getDontDiscard() const { return mDontDiscard; }
+ //-----------------
+
+ /*virtual*/ void updateBindStatsForTester() ;
+protected:
+ void cleanup() ;
+ void init(bool firstinit) ;
+
+private:
+ //note: do not make this function public.
+ /*virtual*/ LLImageGL* getGLTexture() const ;
+
+protected:
+ LLUUID mID;
+ S32 mBoostLevel; // enum describing priority level
+ S32 mFullWidth;
+ S32 mFullHeight;
+ BOOL mUseMipMaps ;
+ S8 mComponents;
+ mutable F32 mMaxVirtualSize; // The largest virtual size of the image, in pixels - how much data to we need?
+
+ LLFrameTimer mLastReferencedTimer;
+
+ typedef std::list<LLFace*> ll_face_list_t ;
+ ll_face_list_t mFaceList ; //reverse pointer pointing to the faces using this image as texture
+
+ //GL texture
+ LLPointer<LLImageGL> mGLTexturep ;
+ S8 mDontDiscard; // Keep full res version of this image (for UI, etc)
+
+protected:
+ typedef enum
+ {
+ DELETED = 0, //removed from memory
+ DELETION_CANDIDATE, //ready to be removed from memory
+ INACTIVE, //not be used for the last certain period (i.e., 30 seconds).
+ ACTIVE, //just being used, can become inactive if not being used for a certain time (10 seconds).
+ NO_DELETE = 99 //stay in memory, can not be removed.
+ } LLGLTexureState;
+ LLGLTexureState mTextureState ;
+
+public:
+ static const U32 sCurrentFileVersion;
+ static S32 sImageCount;
+ static S32 sRawCount;
+ static S32 sAuxCount;
+ static LLTimer sEvaluationTimer;
+ static F32 sDesiredDiscardBias;
+ static F32 sDesiredDiscardScale;
+ static S32 sBoundTextureMemoryInBytes;
+ static S32 sTotalTextureMemoryInBytes;
+ static S32 sMaxBoundTextureMemInMegaBytes;
+ static S32 sMaxTotalTextureMemInMegaBytes;
+ static S32 sMaxDesiredTextureMemInBytes ;
+ static BOOL sDontLoadVolumeTextures;
+
+ static LLPointer<LLViewerTexture> sNullImagep; // Null texture for non-textured objects.
+};
+
+
+//
+//textures are managed in gTextureList.
+//raw image data is fetched from remote or local cache
+//but the raw image this texture pointing to is fixed.
+//
+class LLViewerFetchedTexture : public LLViewerTexture
+{
+ friend class LLTextureBar; // debug info only
+ friend class LLTextureView; // debug info only
+
+protected:
+ /*virtual*/ ~LLViewerFetchedTexture();
+public:
+ LLViewerFetchedTexture(const LLUUID& id, BOOL usemipmaps = TRUE);
+ LLViewerFetchedTexture(const LLImageRaw* raw, BOOL usemipmaps);
+ LLViewerFetchedTexture(const std::string& full_path, const LLUUID& id, BOOL usemipmaps = TRUE);
+
+public:
+ static F32 maxDecodePriority();
+
+ struct Compare
+ {
+ // lhs < rhs
+ bool operator()(const LLPointer<LLViewerFetchedTexture> &lhs, const LLPointer<LLViewerFetchedTexture> &rhs) const
+ {
+ const LLViewerFetchedTexture* lhsp = (const LLViewerFetchedTexture*)lhs;
+ const LLViewerFetchedTexture* rhsp = (const LLViewerFetchedTexture*)rhs;
+ // greater priority is "less"
+ const F32 lpriority = lhsp->getDecodePriority();
+ const F32 rpriority = rhsp->getDecodePriority();
+ if (lpriority > rpriority) // higher priority
+ return true;
+ if (lpriority < rpriority)
+ return false;
+ return lhsp < rhsp;
+ }
+ };
+
+public:
+ /*virtual*/ S8 getType() const ;
+ /*virtual*/ void forceImmediateUpdate() ;
+ /*virtual*/ void dump() ;
+
+ // Set callbacks to get called when the image gets updated with higher
+ // resolution versions.
+ void setLoadedCallback(loaded_callback_func cb,
+ S32 discard_level, BOOL keep_imageraw, BOOL needs_aux,
+ void* userdata);
+ bool hasCallbacks() { return mLoadedCallbackList.empty() ? false : true; }
+ bool doLoadedCallbacks();
+
+ // ONLY call from LLViewerTextureList
+ BOOL createTexture(S32 usename = 0);
+ void destroyTexture() ;
+
+ virtual void processTextureStats() ;
+ F32 calcDecodePriority() ;
+
+ BOOL needsAux() const { return mNeedsAux; }
+
+ // Host we think might have this image, used for baked av textures.
+ void setTargetHost(LLHost host) { mTargetHost = host; }
+ LLHost getTargetHost() const { return mTargetHost; }
+
+ // Set the decode priority for this image...
+ // DON'T CALL THIS UNLESS YOU KNOW WHAT YOU'RE DOING, it can mess up
+ // the priority list, and cause horrible things to happen.
+ void setDecodePriority(F32 priority = -1.0f);
+ F32 getDecodePriority() const { return mDecodePriority; };
+
+ // setDesiredDiscardLevel is only used by LLViewerTextureList
+ void setDesiredDiscardLevel(S32 discard) { mDesiredDiscardLevel = discard; }
+ S32 getDesiredDiscardLevel() { return mDesiredDiscardLevel; }
+ void setMinDiscardLevel(S32 discard) { mMinDesiredDiscardLevel = llmin(mMinDesiredDiscardLevel,(S8)discard); }
+
+ bool updateFetch();
+
+ // Override the computation of discard levels if we know the exact output
+ // size of the image. Used for UI textures to not decode, even if we have
+ // more data.
+ void setKnownDrawSize(S32 width, S32 height);
+
+ void setIsMissingAsset();
+ /*virtual*/ BOOL isMissingAsset() const { return mIsMissingAsset; }
+
+ // returns dimensions of original image for local files (before power of two scaling)
+ // and returns 0 for all asset system images
+ S32 getOriginalWidth() { return mOrigWidth; }
+ S32 getOriginalHeight() { return mOrigHeight; }
+
+ BOOL isInImageList() const {return mInImageList ;}
+ void setInImageList(BOOL flag) {mInImageList = flag ;}
+
+ const std::string& getLocalFileName() const {return mLocalFileName ;}
+ LLFrameTimer* getLastPacketTimer() {return &mLastPacketTimer;}
+
+ U32 getFetchPriority() const { return mFetchPriority ;}
+ F32 getDownloadProgress() const {return mDownloadProgress ;}
+
+ LLImageRaw* readBackRawImage(S8 discard_level) ;
+ void destroyRawImage();
+
+ //---------------
+ BOOL isDeleted() ;
+ BOOL isInactive() ;
+ BOOL isDeletionCandidate();
+ void setDeletionCandidate() ;
+ void setInactive() ;
+ BOOL getUseDiscard() const { return mUseMipMaps && !mDontDiscard; }
+ //---------------
+
+ void setForSculpt();
+ BOOL isForSculpt() const {return mForSculpt;}
+
+private:
+ void init(bool firstinit) ;
+ void cleanup() ;
+
+ F32 calcDecodePriorityForUnknownTexture(F32 pixel_priority) ;
+
+private:
+ BOOL mFullyLoaded;
+
+protected:
+ S32 mOrigWidth;
+ S32 mOrigHeight;
+
+ // Override the computation of discard levels if we know the exact output size of the image.
+ // Used for UI textures to not decode, even if we have more data.
+ S32 mKnownDrawWidth;
+ S32 mKnownDrawHeight;
+
+ std::string mLocalFileName;
+
+ S8 mDesiredDiscardLevel; // The discard level we'd LIKE to have - if we have it and there's space
+ S8 mMinDesiredDiscardLevel; // The minimum discard level we'd like to have
+ S32 mMinDiscardLevel;
+
+ S32 mRequestedDiscardLevel;
+ F32 mRequestedDownloadPriority;
+ S32 mFetchState;
+ U32 mFetchPriority;
+ F32 mDownloadProgress;
+ F32 mFetchDeltaTime;
+ F32 mRequestDeltaTime;
+ S32 mDecodeFrame;
+ S32 mVisibleFrame; // decode frame where image was last visible
+
+ S8 mNeedsAux; // We need to decode the auxiliary channels
+ S8 mDecodingAux; // Are we decoding high components
+ S8 mIsRawImageValid;
+ S8 mHasFetcher; // We've made a fecth request
+ S8 mIsFetching; // Fetch request is active
+
+ mutable S8 mIsMissingAsset; // True if we know that there is no image asset with this image id in the database.
+
+ F32 mDecodePriority; // The priority for decoding this image.
+ typedef std::list<LLLoadedCallbackEntry*> callback_list_t;
+ callback_list_t mLoadedCallbackList;
+
+ LLPointer<LLImageRaw> mRawImage;
+ S32 mRawDiscardLevel;
+
+ // Used ONLY for cloth meshes right now. Make SURE you know what you're
+ // doing if you use it for anything else! - djs
+ LLPointer<LLImageRaw> mAuxRawImage;
+
+ LLHost mTargetHost; // if LLHost::invalid, just request from agent's simulator
+
+ // Timers
+ LLFrameTimer mLastPacketTimer; // Time since last packet.
+
+ BOOL mInImageList; // TRUE if image is in list (in which case don't reset priority!)
+ BOOL mNeedsCreateTexture;
+
+ BOOL mForSculpt ; //a flag if the texture is used as sculpt data.
+ BOOL mIsFetched ; //is loaded from remote or from cache, not generated locally.
+
+public:
+ static LLPointer<LLViewerFetchedTexture> sMissingAssetImagep; // Texture to show for an image asset that is not in the database
+ static LLPointer<LLViewerFetchedTexture> sWhiteImagep; // Texture to show NOTHING (whiteness)
+ static LLPointer<LLViewerFetchedTexture> sDefaultImagep; // "Default" texture for error cases, the only case of fetched texture which is generated in local.
+ static LLPointer<LLViewerFetchedTexture> sSmokeImagep; // Old "Default" translucent texture
+};
+
+//
+//the image data is fetched from remote or from local cache
+//the resolution of the texture is adjustable: depends on the view-dependent parameters.
+//
+class LLViewerLODTexture : public LLViewerFetchedTexture
+{
+protected:
+ /*virtual*/ ~LLViewerLODTexture(){}
+
+public:
+ LLViewerLODTexture(const LLUUID& id, BOOL usemipmaps = TRUE);
+ LLViewerLODTexture(const std::string& full_path, const LLUUID& id, BOOL usemipmaps = TRUE);
+
+ /*virtual*/ S8 getType() const;
+ // Process image stats to determine priority/quality requirements.
+ /*virtual*/ void processTextureStats();
+
+private:
+ void init(bool firstinit) ;
+
+private:
+
+ F32 mTexelsPerImage; // Texels per image.
+ F32 mDiscardVirtualSize; // Virtual size used to calculate desired discard
+ F32 mCalculatedDiscardLevel; // Last calculated discard level
+};
+
+//
+//the image data is fetched from the media pipeline periodically
+//the resolution of the texture is also adjusted by the media pipeline
+//
+class LLViewerMediaTexture : public LLViewerTexture
+{
+protected:
+ /*virtual*/ ~LLViewerMediaTexture() {}
+
+public:
+ LLViewerMediaTexture(const LLUUID& id, BOOL usemipmaps = TRUE, LLImageGL* gl_image = NULL) ;
+
+ /*virtual*/ S8 getType() const;
+
+ void reinit(BOOL usemipmaps = TRUE);
+
+ BOOL getUseMipMaps() {return mUseMipMaps ; }
+ void setUseMipMaps(BOOL mipmap) ;
+
+ void setOldTexture(LLViewerTexture* tex) ;
+ LLViewerTexture* getOldTexture() const ;
+
+ void setPlaying(BOOL playing) {mIsPlaying = playing ;}
+ BOOL isPlaying() const {return mIsPlaying;}
+
+private:
+ LLPointer<LLViewerTexture> mOldTexturep ; //the texture this media texture replaces.
+ BOOL mIsPlaying ;
+
+public:
+ static void updateClass() ;
+
+public:
+ typedef std::map< LLUUID, LLPointer<LLViewerMediaTexture> > media_map_t ;
+ static media_map_t sMediaMap ;
+};
+
+//just an interface class, do not create instance from this class.
+class LLViewerTextureManager
+{
+private:
+ //make the constructor private to preclude creating instances from this class.
+ LLViewerTextureManager(){}
+
+public:
+ //texture pipeline tester
+ static LLTexturePipelineTester* sTesterp ;
+
+ //returns NULL if tex is not a LLViewerFetchedTexture nor derived from LLViewerFetchedTexture.
+ static LLViewerFetchedTexture* staticCastToFetchedTexture(LLViewerTexture* tex, BOOL report_error = FALSE) ;
+
+ //
+ //"find-texture" just check if the texture exists, if yes, return it, otherwise return null.
+ //
+ static LLViewerTexture* findTexture(const LLUUID& id) ;
+ static LLViewerMediaTexture* findMediaTexture(const LLUUID& id) ;
+
+ static LLViewerMediaTexture* createMediaTexture(const LLUUID& id, BOOL usemipmaps = TRUE, LLImageGL* gl_image = NULL) ;
+
+ //
+ //"get-texture" will create a new texture if the texture does not exist.
+ //
+ static LLViewerMediaTexture* getMediaTexture(const LLUUID& id, BOOL usemipmaps = TRUE, LLImageGL* gl_image = NULL) ;
+
+ static LLPointer<LLViewerTexture> getLocalTexture(BOOL usemipmaps = TRUE, BOOL generate_gl_tex = TRUE);
+ static LLPointer<LLViewerTexture> getLocalTexture(const LLUUID& id, BOOL usemipmaps, BOOL generate_gl_tex = TRUE) ;
+ static LLPointer<LLViewerTexture> getLocalTexture(const LLImageRaw* raw, BOOL usemipmaps) ;
+ static LLPointer<LLViewerTexture> getLocalTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps, BOOL generate_gl_tex = TRUE) ;
+
+ static LLViewerFetchedTexture* getFetchedTexture(const LLUUID &image_id,
+ BOOL usemipmap = TRUE,
+ BOOL level_immediate = FALSE, // Get the requested level immediately upon creation.
+ S8 texture_type = LLViewerTexture::FETCHED_TEXTURE,
+ LLGLint internal_format = 0,
+ LLGLenum primary_format = 0,
+ LLHost request_from_host = LLHost()
+ );
+
+ static LLViewerFetchedTexture* getFetchedTextureFromFile(const std::string& filename,
+ BOOL usemipmap = TRUE,
+ BOOL level_immediate = FALSE, // Get the requested level immediately upon creation.
+ S8 texture_type = LLViewerTexture::FETCHED_TEXTURE,
+ LLGLint internal_format = 0,
+ LLGLenum primary_format = 0,
+ const LLUUID& force_id = LLUUID::null
+ );
+
+ static LLViewerFetchedTexture* getFetchedTextureFromHost(const LLUUID& image_id, LLHost host) ;
+
+ static void init() ;
+ static void cleanup() ;
+};
+//
+//this class is used for test/debug only
+//it tracks the activities of the texture pipeline
+//records them, and outputs them to log files
+//
+class LLTexturePipelineTester : public LLMetricPerformanceTester
+{
+ enum
+ {
+ MIN_LARGE_IMAGE_AREA = 262144 //512 * 512
+ };
+public:
+ LLTexturePipelineTester() ;
+ ~LLTexturePipelineTester() ;
+
+ void update();
+ void updateTextureBindingStats(const LLViewerTexture* imagep) ;
+ void updateTextureLoadingStats(const LLViewerFetchedTexture* imagep, const LLImageRaw* raw_imagep, BOOL from_cache) ;
+ void updateGrayTextureBinding() ;
+ void setStablizingTime() ;
+
+ /*virtual*/ void analyzePerformance(std::ofstream* os, LLSD* base, LLSD* current) ;
+
+private:
+ void reset() ;
+ void updateStablizingTime() ;
+
+ /*virtual*/ void outputTestRecord(LLSD* sd) ;
+
+private:
+ BOOL mPause ;
+private:
+ BOOL mUsingDefaultTexture; //if set, some textures are still gray.
+
+ U32 mTotalBytesUsed ; //total bytes of textures bound/used for the current frame.
+ U32 mTotalBytesUsedForLargeImage ; //total bytes of textures bound/used for the current frame for images larger than 256 * 256.
+ U32 mLastTotalBytesUsed ; //total bytes of textures bound/used for the previous frame.
+ U32 mLastTotalBytesUsedForLargeImage ; //total bytes of textures bound/used for the previous frame for images larger than 256 * 256.
+
+ //
+ //data size
+ //
+ U32 mTotalBytesLoaded ; //total bytes fetched by texture pipeline
+ U32 mTotalBytesLoadedFromCache ; //total bytes fetched by texture pipeline from local cache
+ U32 mTotalBytesLoadedForLargeImage ; //total bytes fetched by texture pipeline for images larger than 256 * 256.
+ U32 mTotalBytesLoadedForSculpties ; //total bytes fetched by texture pipeline for sculpties
+
+ //
+ //time
+ //NOTE: the error tolerances of the following timers is one frame time.
+ //
+ F32 mStartFetchingTime ;
+ F32 mTotalGrayTime ; //total loading time when no gray textures.
+ F32 mTotalStablizingTime ; //total stablizing time when texture memory overflows
+ F32 mStartTimeLoadingSculpties ; //the start moment of loading sculpty images.
+ F32 mEndTimeLoadingSculpties ; //the end moment of loading sculpty images.
+ F32 mStartStablizingTime ;
+ F32 mEndStablizingTime ;
+
+private:
+ //
+ //The following members are used for performance analyzing
+ //
+ class LLTextureTestSession : public LLTestSession
+ {
+ public:
+ LLTextureTestSession() ;
+ /*virtual*/ ~LLTextureTestSession() ;
+
+ void reset() ;
+
+ F32 mTotalFetchingTime ;
+ F32 mTotalGrayTime ;
+ F32 mTotalStablizingTime ;
+ F32 mStartTimeLoadingSculpties ;
+ F32 mTotalTimeLoadingSculpties ;
+
+ S32 mTotalBytesLoaded ;
+ S32 mTotalBytesLoadedFromCache ;
+ S32 mTotalBytesLoadedForLargeImage ;
+ S32 mTotalBytesLoadedForSculpties ;
+
+ typedef struct _texture_instant_preformance_t
+ {
+ S32 mAverageBytesUsedPerSecond ;
+ S32 mAverageBytesUsedForLargeImagePerSecond ;
+ F32 mAveragePercentageBytesUsedPerSecond ;
+ F32 mTime ;
+ }texture_instant_preformance_t ;
+ std::vector<texture_instant_preformance_t> mInstantPerformanceList ;
+ S32 mInstantPerformanceListCounter ;
+ };
+
+ /*virtual*/ LLMetricPerformanceTester::LLTestSession* loadTestSession(LLSD* log) ;
+ /*virtual*/ void compareTestSessions(std::ofstream* os) ;
+};
+
+#endif
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
new file mode 100644
index 0000000000..2f3ed0e68a
--- /dev/null
+++ b/indra/newview/llviewertexturelist.cpp
@@ -0,0 +1,1518 @@
+/**
+ * @file llviewertexturelist.cpp
+ * @brief Object for managing the list of images within a region
+ *
+ * $LicenseInfo:firstyear=2000&license=viewergpl$
+ *
+ * Copyright (c) 2000-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 "llviewerprecompiledheaders.h"
+
+#include "llviewertexturelist.h"
+
+#include "imageids.h"
+#include "llgl.h" // fot gathering stats from GL
+#include "llimagegl.h"
+#include "llimagebmp.h"
+#include "llimagej2c.h"
+#include "llimagetga.h"
+#include "llimagejpeg.h"
+#include "llimagepng.h"
+
+#include "llsdserialize.h"
+#include "llsys.h"
+#include "llvfs.h"
+#include "llvfile.h"
+#include "llvfsthread.h"
+#include "llxmltree.h"
+#include "message.h"
+
+#include "llagent.h"
+#include "lltexturecache.h"
+#include "lltexturefetch.h"
+#include "llviewercontrol.h"
+#include "llviewertexture.h"
+#include "llviewermedia.h"
+#include "llviewerregion.h"
+#include "llviewerstats.h"
+#include "pipeline.h"
+#include "llappviewer.h"
+#include "lluictrlfactory.h" // for LLXUIParser
+#include <sys/stat.h>
+
+////////////////////////////////////////////////////////////////////////////
+
+void (*LLViewerTextureList::sUUIDCallback)(void **, const LLUUID&) = NULL;
+
+const S32 IMAGES_PER_REQUEST = 42;
+const S32 IMAGES_MIN_UPDATES = 4; // Always update the highest N images each frame
+const S32 IMAGES_MAX_PACKET_UPDATES = 1; // Only send N packets of IMAGES_PER_REQUEST in a frame
+const F32 RESEND_IMAGE_REQUEST_TIME = 15.f; // seconds
+
+LLViewerTextureList gTextureList;
+
+///////////////////////////////////////////////////////////////////////////////
+
+LLViewerTextureList::LLViewerTextureList()
+ : mForceResetTextureStats(FALSE),
+ mUpdateStats(FALSE),
+ mMaxResidentTexMemInMegaBytes(0),
+ mMaxTotalTextureMemInMegaBytes(0)
+{
+}
+
+void LLViewerTextureList::init()
+{
+ mNumImages = 0;
+ mMaxResidentTexMemInMegaBytes = 0;
+ mMaxTotalTextureMemInMegaBytes = 0 ;
+ if (gNoRender)
+ {
+ // Don't initialize GL stuff if we're not rendering.
+ return;
+ }
+
+ mUpdateStats = TRUE;
+
+ // Update how much texture RAM we're allowed to use.
+ updateMaxResidentTexMem(0); // 0 = use current
+
+ doPreloadImages();
+}
+
+
+void LLViewerTextureList::doPreloadImages()
+{
+ LL_DEBUGS("ViewerImages") << "Preloading images..." << LL_ENDL;
+
+ // Set the "missing asset" image
+ LLViewerFetchedTexture::sMissingAssetImagep = LLViewerTextureManager::getFetchedTextureFromFile("missing_asset.tga", MIPMAP_NO, IMMEDIATE_YES);
+
+ // Set the "white" image
+ LLViewerFetchedTexture::sWhiteImagep = LLViewerTextureManager::getFetchedTextureFromFile("white.tga", MIPMAP_NO, IMMEDIATE_YES);
+
+ LLUIImageList* image_list = LLUIImageList::getInstance();
+
+ image_list->initFromFile();
+
+ // turn off clamping and bilinear filtering for uv picking images
+ //LLViewerFetchedTexture* uv_test = preloadUIImage("uv_test1.tga", LLUUID::null, FALSE);
+ //uv_test->setClamp(FALSE, FALSE);
+ //uv_test->setMipFilterNearest(TRUE, TRUE);
+ //uv_test = preloadUIImage("uv_test2.tga", LLUUID::null, FALSE);
+ //uv_test->setClamp(FALSE, FALSE);
+ //uv_test->setMipFilterNearest(TRUE, TRUE);
+
+ // prefetch specific UUIDs
+ LLViewerTextureManager::getFetchedTexture(IMG_SHOT, TRUE);
+ LLViewerTextureManager::getFetchedTexture(IMG_SMOKE_POOF, TRUE);
+ LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTextureFromFile("silhouette.j2c", MIPMAP_YES, IMMEDIATE_YES);
+ if (image)
+ {
+ image->setAddressMode(LLTexUnit::TAM_WRAP);
+ mImagePreloads.insert(image);
+ }
+ image = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryLines.png", MIPMAP_YES, IMMEDIATE_YES);
+ if (image)
+ {
+ image->setAddressMode(LLTexUnit::TAM_WRAP);
+ mImagePreloads.insert(image);
+ }
+ else
+ {
+ llinfos << "JAMESDEBUG" << llendl;
+ }
+ image = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryPassLines.png", MIPMAP_YES, IMMEDIATE_YES);
+ if (image)
+ {
+ image->setAddressMode(LLTexUnit::TAM_WRAP);
+ mImagePreloads.insert(image);
+ }
+ else
+ {
+ llinfos << "JAMESDEBUG" << llendl;
+ }
+ image = LLViewerTextureManager::getFetchedTexture(DEFAULT_WATER_NORMAL, MIPMAP_YES, IMMEDIATE_YES);
+ if (image)
+ {
+ image->setAddressMode(LLTexUnit::TAM_WRAP);
+ mImagePreloads.insert(image);
+ }
+ image = LLViewerTextureManager::getFetchedTextureFromFile("transparent.j2c", MIPMAP_YES, IMMEDIATE_YES, LLViewerTexture::FETCHED_TEXTURE,
+ 0,0,LLUUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"));
+ if (image)
+ {
+ image->setAddressMode(LLTexUnit::TAM_WRAP);
+ mImagePreloads.insert(image);
+ }
+
+}
+
+static std::string get_texture_list_name()
+{
+ return std::string("texture_list_") + gSavedSettings.getString("LoginLocation") + ".xml";
+}
+
+void LLViewerTextureList::doPrefetchImages()
+{
+ if (LLAppViewer::instance()->getPurgeCache())
+ {
+ // cache was purged, no point
+ return;
+ }
+
+ // Pre-fetch textures from last logout
+ LLSD imagelist;
+ std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, get_texture_list_name());
+ llifstream file;
+ file.open(filename);
+ if (file.is_open())
+ {
+ LLSDSerialize::fromXML(imagelist, file);
+ }
+ for (LLSD::array_iterator iter = imagelist.beginArray();
+ iter != imagelist.endArray(); ++iter)
+ {
+ LLSD imagesd = *iter;
+ LLUUID uuid = imagesd["uuid"];
+ S32 pixel_area = imagesd["area"];
+ S32 texture_type = imagesd["type"];
+
+ if(LLViewerTexture::FETCHED_TEXTURE == texture_type || LLViewerTexture::LOD_TEXTURE == texture_type)
+ {
+ LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture(uuid, MIPMAP_TRUE, FALSE, texture_type);
+ if (image)
+ {
+ image->addTextureStats((F32)pixel_area);
+ }
+ }
+ }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+LLViewerTextureList::~LLViewerTextureList()
+{
+}
+
+void LLViewerTextureList::shutdown()
+{
+ // clear out preloads
+ mImagePreloads.clear();
+
+ // Write out list of currently loaded textures for precaching on startup
+ typedef std::set<std::pair<S32,LLViewerFetchedTexture*> > image_area_list_t;
+ image_area_list_t image_area_list;
+ for (image_priority_list_t::iterator iter = mImageList.begin();
+ iter != mImageList.end(); ++iter)
+ {
+ LLViewerFetchedTexture* image = *iter;
+ if (!image->hasGLTexture() ||
+ !image->getUseDiscard() ||
+ image->needsAux() ||
+ image->getTargetHost() != LLHost::invalid)
+ {
+ continue; // avoid UI, baked, and other special images
+ }
+ S32 desired = image->getDesiredDiscardLevel();
+ if (desired >= 0 && desired < MAX_DISCARD_LEVEL)
+ {
+ S32 pixel_area = image->getWidth(desired) * image->getHeight(desired);
+ image_area_list.insert(std::make_pair(pixel_area, image));
+ }
+ }
+
+ LLSD imagelist;
+ const S32 max_count = 1000;
+ S32 count = 0;
+ S32 image_type ;
+ for (image_area_list_t::reverse_iterator riter = image_area_list.rbegin();
+ riter != image_area_list.rend(); ++riter)
+ {
+ LLViewerFetchedTexture* image = riter->second;
+ image_type = (S32)image->getType() ;
+ imagelist[count]["area"] = riter->first;
+ imagelist[count]["uuid"] = image->getID();
+ imagelist[count]["type"] = image_type;
+ if (++count >= max_count)
+ break;
+ }
+
+ if (count > 0 && !gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "").empty())
+ {
+ std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, get_texture_list_name());
+ llofstream file;
+ file.open(filename);
+ LLSDSerialize::toPrettyXML(imagelist, file);
+ }
+
+ //
+ // Clean up "loaded" callbacks.
+ //
+ mCallbackList.clear();
+
+ // Flush all of the references
+ mLoadingStreamList.clear();
+ mCreateTextureList.clear();
+
+ mUUIDMap.clear();
+
+ mImageList.clear();
+}
+
+void LLViewerTextureList::dump()
+{
+ llinfos << "LLViewerTextureList::dump()" << llendl;
+ for (image_priority_list_t::iterator it = mImageList.begin(); it != mImageList.end(); ++it)
+ {
+ LLViewerFetchedTexture* image = *it;
+
+ llinfos << "priority " << image->getDecodePriority()
+ << " boost " << image->getBoostLevel()
+ << " size " << image->getWidth() << "x" << image->getHeight()
+ << " discard " << image->getDiscardLevel()
+ << " desired " << image->getDesiredDiscardLevel()
+ << " http://asset.siva.lindenlab.com/" << image->getID() << ".texture"
+ << llendl;
+ }
+}
+
+void LLViewerTextureList::destroyGL(BOOL save_state)
+{
+ LLImageGL::destroyGL(save_state);
+}
+
+void LLViewerTextureList::restoreGL()
+{
+ LLImageGL::restoreGL();
+}
+
+/* Vertical tab container button image IDs
+ Seem to not decode when running app in debug.
+
+ const LLUUID BAD_IMG_ONE("1097dcb3-aef9-8152-f471-431d840ea89e");
+ const LLUUID BAD_IMG_TWO("bea77041-5835-1661-f298-47e2d32b7a70");
+ */
+
+///////////////////////////////////////////////////////////////////////////////
+
+LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string& filename,
+ BOOL usemipmaps,
+ BOOL level_immediate,
+ S8 texture_type,
+ LLGLint internal_format,
+ LLGLenum primary_format,
+ const LLUUID& force_id)
+{
+ if (gNoRender)
+ {
+ // Never mind that this ignores image_set_id;
+ // getImage() will handle that later.
+ return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, TRUE);
+ }
+
+ std::string full_path = gDirUtilp->findSkinnedFilename("textures", filename);
+ if (full_path.empty())
+ {
+ llwarns << "Failed to find local image file: " << filename << llendl;
+ return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, TRUE);
+ }
+
+ // generate UUID based on hash of filename
+ LLUUID new_id;
+ if (force_id.notNull())
+ {
+ new_id = force_id;
+ }
+ else
+ {
+ new_id.generate(full_path);
+ }
+
+ LLPointer<LLViewerFetchedTexture> imagep = findImage(new_id);
+
+ if (imagep.isNull())
+ {
+ switch(texture_type)
+ {
+ case LLViewerTexture::FETCHED_TEXTURE:
+ imagep = new LLViewerFetchedTexture(full_path, new_id, usemipmaps);
+ break ;
+ case LLViewerTexture::LOD_TEXTURE:
+ imagep = new LLViewerLODTexture(full_path, new_id, usemipmaps);
+ break ;
+ default:
+ llerrs << "Invalid texture type " << texture_type << llendl ;
+ }
+
+ if (internal_format && primary_format)
+ {
+ imagep->setExplicitFormat(internal_format, primary_format);
+ }
+
+ addImage(imagep);
+
+ if (level_immediate)
+ {
+ imagep->dontDiscard();
+ imagep->setBoostLevel(LLViewerFetchedTexture::BOOST_UI);
+ }
+ }
+
+ imagep->setGLTextureCreated(true);
+
+ return imagep;
+}
+
+
+LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id,
+ BOOL usemipmaps,
+ BOOL level_immediate,
+ S8 texture_type,
+ LLGLint internal_format,
+ LLGLenum primary_format,
+ LLHost request_from_host)
+{
+ // Return the image with ID image_id
+ // If the image is not found, creates new image and
+ // enqueues a request for transmission
+
+ if ((&image_id == NULL) || image_id.isNull())
+ {
+ return (LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, TRUE));
+ }
+
+ LLPointer<LLViewerFetchedTexture> imagep = findImage(image_id);
+
+ if (imagep.isNull())
+ {
+ imagep = createImage(image_id, usemipmaps, level_immediate, texture_type, internal_format, primary_format, request_from_host) ;
+ }
+
+ imagep->setGLTextureCreated(true);
+
+ return imagep;
+}
+
+//when this function is called, there is no such texture in the gTextureList with image_id.
+LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id,
+ BOOL usemipmaps,
+ BOOL level_immediate,
+ S8 texture_type,
+ LLGLint internal_format,
+ LLGLenum primary_format,
+ LLHost request_from_host)
+{
+ LLPointer<LLViewerFetchedTexture> imagep ;
+ switch(texture_type)
+ {
+ case LLViewerTexture::FETCHED_TEXTURE:
+ imagep = new LLViewerFetchedTexture(image_id, usemipmaps);
+ break ;
+ case LLViewerTexture::LOD_TEXTURE:
+ imagep = new LLViewerLODTexture(image_id, usemipmaps);
+ break ;
+ default:
+ llerrs << "Invalid texture type " << texture_type << llendl ;
+ }
+
+ // Might want to request from host other than where the agent is. JC
+ imagep->setTargetHost(request_from_host);
+
+ if (internal_format && primary_format)
+ {
+ imagep->setExplicitFormat(internal_format, primary_format);
+ }
+
+ addImage(imagep);
+
+ if (level_immediate)
+ {
+ imagep->dontDiscard();
+ imagep->setBoostLevel(LLViewerFetchedTexture::BOOST_UI);
+ }
+ else
+ {
+ //by default, the texure can not be removed from memory even if it is not used.
+ //here turn this off
+ //if this texture should be set to NO_DELETE, either pass level_immediate == TRUE here, or call setNoDelete() afterwards.
+ imagep->forceActive() ;
+ }
+
+ return imagep ;
+}
+
+LLViewerFetchedTexture *LLViewerTextureList::findImage(const LLUUID &image_id)
+{
+ uuid_map_t::iterator iter = mUUIDMap.find(image_id);
+ if(iter == mUUIDMap.end())
+ return NULL;
+ return iter->second;
+}
+
+void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image)
+{
+ llassert(image);
+ if (image->isInImageList())
+ {
+ llerrs << "LLViewerTextureList::addImageToList - Image already in list" << llendl;
+ }
+ llverify((mImageList.insert(image)).second == true);
+ image->setInImageList(TRUE) ;
+}
+
+void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image)
+{
+ llassert(image);
+ if (!image->isInImageList())
+ {
+ llinfos << "RefCount: " << image->getNumRefs() << llendl ;
+ uuid_map_t::iterator iter = mUUIDMap.find(image->getID());
+ if(iter == mUUIDMap.end() || iter->second != image)
+ {
+ llinfos << "Image is not in mUUIDMap!" << llendl ;
+ }
+ llerrs << "LLViewerTextureList::removeImageFromList - Image not in list" << llendl;
+ }
+ llverify(mImageList.erase(image) == 1);
+ image->setInImageList(FALSE) ;
+}
+
+void LLViewerTextureList::addImage(LLViewerFetchedTexture *new_image)
+{
+ if (!new_image)
+ {
+ llwarning("No image to add to image list", 0);
+ return;
+ }
+ LLUUID image_id = new_image->getID();
+
+ LLViewerFetchedTexture *image = findImage(image_id);
+ if (image)
+ {
+ llwarns << "Image with ID " << image_id << " already in list" << llendl;
+ }
+ mNumImages++;
+
+ addImageToList(new_image);
+ mUUIDMap[image_id] = new_image;
+}
+
+
+void LLViewerTextureList::deleteImage(LLViewerFetchedTexture *image)
+{
+ if( image)
+ {
+ if (image->hasCallbacks())
+ {
+ mCallbackList.erase(image);
+ }
+
+ llverify(mUUIDMap.erase(image->getID()) == 1);
+ mNumImages--;
+ removeImageFromList(image);
+ }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////
+
+void LLViewerTextureList::dirtyImage(LLViewerFetchedTexture *image)
+{
+ mDirtyTextureList.insert(image);
+}
+
+////////////////////////////////////////////////////////////////////////////
+
+void LLViewerTextureList::updateImages(F32 max_time)
+{
+ LLViewerStats::getInstance()->mNumImagesStat.addValue(mNumImages);
+ LLViewerStats::getInstance()->mNumRawImagesStat.addValue(LLImageRaw::sRawImageCount);
+ LLViewerStats::getInstance()->mGLTexMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageGL::sGlobalTextureMemoryInBytes));
+ LLViewerStats::getInstance()->mGLBoundMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageGL::sBoundTextureMemoryInBytes));
+ LLViewerStats::getInstance()->mRawMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageRaw::sGlobalRawMemory));
+ LLViewerStats::getInstance()->mFormattedMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageFormatted::sGlobalFormattedMemory));
+
+ updateImagesDecodePriorities();
+ max_time -= updateImagesFetchTextures(max_time);
+ max_time = llmin(llmax(max_time, 0.001f*10.f*gFrameIntervalSeconds), 0.001f);
+ max_time -= updateImagesCreateTextures(max_time);
+ max_time = llmin(llmax(max_time, 0.001f*10.f*gFrameIntervalSeconds), 0.001f);
+ if (!mDirtyTextureList.empty())
+ {
+ LLFastTimer t(LLFastTimer::FTM_IMAGE_MARK_DIRTY);
+ gPipeline.dirtyPoolObjectTextures(mDirtyTextureList);
+ mDirtyTextureList.clear();
+ }
+ bool didone = false;
+ for (image_list_t::iterator iter = mCallbackList.begin();
+ iter != mCallbackList.end(); )
+ {
+ //trigger loaded callbacks on local textures immediately
+ LLViewerFetchedTexture* image = *iter++;
+ if (!image->getLocalFileName().empty())
+ {
+ // Do stuff to handle callbacks, update priorities, etc.
+ didone = image->doLoadedCallbacks();
+ }
+ else if (!didone)
+ {
+ // Do stuff to handle callbacks, update priorities, etc.
+ didone = image->doLoadedCallbacks();
+ }
+ }
+ if (!gNoRender && !gGLManager.mIsDisabled)
+ {
+ LLViewerMedia::updateImagesMediaStreams();
+ }
+ updateImagesUpdateStats();
+}
+
+void LLViewerTextureList::updateImagesDecodePriorities()
+{
+ // Update the decode priority for N images each frame
+ {
+ const size_t max_update_count = llmin((S32) (1024*gFrameIntervalSeconds) + 1, 32); //target 1024 textures per second
+ S32 update_counter = llmin(max_update_count, mUUIDMap.size()/10);
+ uuid_map_t::iterator iter = mUUIDMap.upper_bound(mLastUpdateUUID);
+ while(update_counter > 0 && !mUUIDMap.empty())
+ {
+ if (iter == mUUIDMap.end())
+ {
+ iter = mUUIDMap.begin();
+ }
+ mLastUpdateUUID = iter->first;
+ LLPointer<LLViewerFetchedTexture> imagep = iter->second;
+ ++iter; // safe to incrament now
+
+ //
+ // Flush formatted images using a lazy flush
+ //
+ const F32 LAZY_FLUSH_TIMEOUT = 30.f; // stop decoding
+ const F32 MAX_INACTIVE_TIME = 50.f; // actually delete
+ S32 min_refs = 3; // 1 for mImageList, 1 for mUUIDMap, 1 for local reference
+ if (imagep->hasCallbacks())
+ {
+ min_refs++; // Add an extra reference if we're on the loaded callback list
+ }
+ S32 num_refs = imagep->getNumRefs();
+ if (num_refs == min_refs)
+ {
+ if (imagep->getLastReferencedTimer()->getElapsedTimeF32() > LAZY_FLUSH_TIMEOUT)
+ {
+ // Remove the unused image from the image list
+ deleteImage(imagep);
+ imagep = NULL; // should destroy the image
+ }
+ continue;
+ }
+ else
+ {
+ if(imagep->isDeleted())
+ {
+ continue ;
+ }
+ else if(imagep->isDeletionCandidate())
+ {
+ imagep->destroyTexture() ;
+ continue ;
+ }
+ else if(imagep->isInactive())
+ {
+ if (imagep->getLastReferencedTimer()->getElapsedTimeF32() > MAX_INACTIVE_TIME)
+ {
+ imagep->setDeletionCandidate() ;
+ }
+ continue ;
+ }
+ else
+ {
+ imagep->getLastReferencedTimer()->reset();
+
+ //reset texture state.
+ imagep->setInactive() ;
+ }
+ }
+
+ imagep->processTextureStats();
+ F32 old_priority = imagep->getDecodePriority();
+ F32 old_priority_test = llmax(old_priority, 0.0f);
+ F32 decode_priority = imagep->calcDecodePriority();
+ F32 decode_priority_test = llmax(decode_priority, 0.0f);
+ // Ignore < 20% difference
+ if ((decode_priority_test < old_priority_test * .8f) ||
+ (decode_priority_test > old_priority_test * 1.25f))
+ {
+ removeImageFromList(imagep);
+ imagep->setDecodePriority(decode_priority);
+ addImageToList(imagep);
+ }
+ update_counter--;
+ }
+ }
+}
+
+/*
+ static U8 get_image_type(LLViewerFetchedTexture* imagep, LLHost target_host)
+ {
+ // Having a target host implies this is a baked image. I don't
+ // believe that boost level has been set at this point. JC
+ U8 type_from_host = (target_host.isOk()
+ ? LLImageBase::TYPE_AVATAR_BAKE
+ : LLImageBase::TYPE_NORMAL);
+ S32 boost_level = imagep->getBoostLevel();
+ U8 type_from_boost = ( (boost_level == LLViewerFetchedTexture::BOOST_AVATAR_BAKED
+ || boost_level == LLViewerFetchedTexture::BOOST_AVATAR_BAKED_SELF)
+ ? LLImageBase::TYPE_AVATAR_BAKE
+ : LLImageBase::TYPE_NORMAL);
+ if (type_from_host == LLImageBase::TYPE_NORMAL
+ && type_from_boost == LLImageBase::TYPE_AVATAR_BAKE)
+ {
+ llwarns << "TAT: get_image_type() type_from_host doesn't match type_from_boost"
+ << " host " << target_host
+ << " boost " << imagep->getBoostLevel()
+ << " imageid " << imagep->getID()
+ << llendl;
+ imagep->dump();
+ }
+ return type_from_host;
+ }
+ */
+
+F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time)
+{
+ if (gNoRender || gGLManager.mIsDisabled) return 0.0f;
+
+ //
+ // Create GL textures for all textures that need them (images which have been
+ // decoded, but haven't been pushed into GL).
+ //
+ LLFastTimer t(LLFastTimer::FTM_IMAGE_CREATE);
+
+ LLTimer create_timer;
+ image_list_t::iterator enditer = mCreateTextureList.begin();
+ for (image_list_t::iterator iter = mCreateTextureList.begin();
+ iter != mCreateTextureList.end();)
+ {
+ image_list_t::iterator curiter = iter++;
+ enditer = iter;
+ LLViewerFetchedTexture *imagep = *curiter;
+ imagep->createTexture();
+ if (create_timer.getElapsedTimeF32() > max_time)
+ {
+ break;
+ }
+ }
+ mCreateTextureList.erase(mCreateTextureList.begin(), enditer);
+ return create_timer.getElapsedTimeF32();
+}
+
+void LLViewerTextureList::forceImmediateUpdate(LLViewerFetchedTexture* imagep)
+{
+ if(!imagep)
+ {
+ return ;
+ }
+ if(imagep->isInImageList())
+ {
+ removeImageFromList(imagep);
+ }
+
+ imagep->processTextureStats();
+ F32 decode_priority = LLViewerFetchedTexture::maxDecodePriority() ;
+ imagep->setDecodePriority(decode_priority);
+ mImageList.insert(imagep);
+ imagep->setInImageList(TRUE) ;
+
+ return ;
+}
+
+F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time)
+{
+ LLTimer image_op_timer;
+
+ // Update the decode priority for N images each frame
+ // Make a list with 32 high priority entries + 256 cycled entries
+ const size_t max_priority_count = llmin((S32) (256*10.f*gFrameIntervalSeconds)+1, 32);
+ const size_t max_update_count = llmin((S32) (1024*10.f*gFrameIntervalSeconds)+1, 256);
+
+ // 32 high priority entries
+ std::set<LLViewerFetchedTexture*> entries;
+ size_t update_counter = llmin(max_priority_count, mImageList.size());
+ image_priority_list_t::iterator iter1 = mImageList.begin();
+ while(update_counter > 0)
+ {
+ // added extra granularity and verbosity for crash logging during 1.19.1 RC. -Brad
+ if(iter1 == mImageList.end())
+ {
+ llerrs << "DEV-12002: update_counter not calculated correctly!" << llendl;
+ return 0.f;
+ }
+
+ LLPointer<LLViewerFetchedTexture> const & ptr = *iter1;
+
+ LLViewerFetchedTexture * img = ptr.get();
+
+ // added extra granularity and verbosity for crash logging during 1.19.1 RC. -Brad
+ if(img == NULL)
+ {
+ llwarns << "DEV-12002: image is NULL!" << llendl;
+ }
+
+ entries.insert(img);
+
+ ++iter1;
+ update_counter--;
+ }
+
+ // 256 cycled entries
+ update_counter = llmin(max_update_count, mUUIDMap.size());
+ uuid_map_t::iterator iter2 = mUUIDMap.upper_bound(mLastFetchUUID);
+ while(update_counter > 0)
+ {
+ if (iter2 == mUUIDMap.end())
+ {
+ iter2 = mUUIDMap.begin();
+ }
+ mLastFetchUUID = iter2->first;
+ entries.insert(iter2->second);
+ ++iter2;
+ update_counter--;
+ }
+
+ S32 min_count = max_priority_count + max_update_count/4;
+ for (std::set<LLViewerFetchedTexture*>::iterator iter3 = entries.begin();
+ iter3 != entries.end(); )
+ {
+ LLPointer<LLViewerFetchedTexture> imagep = *iter3++;
+
+ imagep->updateFetch();
+ if (min_count <= 0 && image_op_timer.getElapsedTimeF32() > max_time)
+ {
+ break;
+ }
+ min_count--;
+ }
+ return image_op_timer.getElapsedTimeF32();
+}
+
+void LLViewerTextureList::updateImagesUpdateStats()
+{
+ if (mUpdateStats)
+ {
+ for (image_priority_list_t::iterator iter = mImageList.begin();
+ iter != mImageList.end(); )
+ {
+ LLViewerFetchedTexture* imagep = *iter++;
+ imagep->resetTextureStats(mForceResetTextureStats);
+ }
+ mUpdateStats = FALSE;
+ mForceResetTextureStats = FALSE;
+ }
+}
+
+void LLViewerTextureList::decodeAllImages(F32 max_time)
+{
+ LLTimer timer;
+ if(gNoRender) return;
+
+ // Update texture stats and priorities
+ std::vector<LLPointer<LLViewerFetchedTexture> > image_list;
+ for (image_priority_list_t::iterator iter = mImageList.begin();
+ iter != mImageList.end(); )
+ {
+ LLViewerFetchedTexture* imagep = *iter++;
+ image_list.push_back(imagep);
+ imagep->setInImageList(FALSE) ;
+ }
+ mImageList.clear();
+ for (std::vector<LLPointer<LLViewerFetchedTexture> >::iterator iter = image_list.begin();
+ iter != image_list.end(); ++iter)
+ {
+ LLViewerFetchedTexture* imagep = *iter;
+ imagep->processTextureStats();
+ F32 decode_priority = imagep->calcDecodePriority();
+ imagep->setDecodePriority(decode_priority);
+ mImageList.insert(imagep);
+ imagep->setInImageList(TRUE) ;
+ }
+ image_list.clear();
+
+ // Update fetch (decode)
+ for (image_priority_list_t::iterator iter = mImageList.begin();
+ iter != mImageList.end(); )
+ {
+ LLViewerFetchedTexture* imagep = *iter++;
+ imagep->updateFetch();
+ }
+ // Run threads
+ S32 fetch_pending = 0;
+ while (1)
+ {
+ LLAppViewer::instance()->getTextureCache()->update(1); // unpauses the texture cache thread
+ LLAppViewer::instance()->getImageDecodeThread()->update(1); // unpauses the image thread
+ fetch_pending = LLAppViewer::instance()->getTextureFetch()->update(1); // unpauses the texture fetch thread
+ if (fetch_pending == 0 || timer.getElapsedTimeF32() > max_time)
+ {
+ break;
+ }
+ }
+ // Update fetch again
+ for (image_priority_list_t::iterator iter = mImageList.begin();
+ iter != mImageList.end(); )
+ {
+ LLViewerFetchedTexture* imagep = *iter++;
+ imagep->updateFetch();
+ }
+ max_time -= timer.getElapsedTimeF32();
+ max_time = llmax(max_time, .001f);
+ F32 create_time = updateImagesCreateTextures(max_time);
+
+ LL_DEBUGS("ViewerImages") << "decodeAllImages() took " << timer.getElapsedTimeF32() << " seconds. "
+ << " fetch_pending " << fetch_pending
+ << " create_time " << create_time
+ << LL_ENDL;
+}
+
+
+BOOL LLViewerTextureList::createUploadFile(const std::string& filename,
+ const std::string& out_filename,
+ const U8 codec)
+{
+ // First, load the image.
+ LLPointer<LLImageRaw> raw_image = new LLImageRaw;
+
+ switch (codec)
+ {
+ case IMG_CODEC_BMP:
+ {
+ LLPointer<LLImageBMP> bmp_image = new LLImageBMP;
+
+ if (!bmp_image->load(filename))
+ {
+ return FALSE;
+ }
+
+ if (!bmp_image->decode(raw_image, 0.0f))
+ {
+ return FALSE;
+ }
+ }
+ break;
+ case IMG_CODEC_TGA:
+ {
+ LLPointer<LLImageTGA> tga_image = new LLImageTGA;
+
+ if (!tga_image->load(filename))
+ {
+ return FALSE;
+ }
+
+ if (!tga_image->decode(raw_image))
+ {
+ return FALSE;
+ }
+
+ if( (tga_image->getComponents() != 3) &&
+ (tga_image->getComponents() != 4) )
+ {
+ tga_image->setLastError( "Image files with less than 3 or more than 4 components are not supported." );
+ return FALSE;
+ }
+ }
+ break;
+ case IMG_CODEC_JPEG:
+ {
+ LLPointer<LLImageJPEG> jpeg_image = new LLImageJPEG;
+
+ if (!jpeg_image->load(filename))
+ {
+ return FALSE;
+ }
+
+ if (!jpeg_image->decode(raw_image, 0.0f))
+ {
+ return FALSE;
+ }
+ }
+ break;
+ case IMG_CODEC_PNG:
+ {
+ LLPointer<LLImagePNG> png_image = new LLImagePNG;
+
+ if (!png_image->load(filename))
+ {
+ return FALSE;
+ }
+
+ if (!png_image->decode(raw_image, 0.0f))
+ {
+ return FALSE;
+ }
+ }
+ break;
+ default:
+ return FALSE;
+ }
+
+ LLPointer<LLImageJ2C> compressedImage = convertToUploadFile(raw_image);
+
+ if( !compressedImage->save(out_filename) )
+ {
+ llinfos << "Couldn't create output file " << out_filename << llendl;
+ return FALSE;
+ }
+
+ // test to see if the encode and save worked.
+ LLPointer<LLImageJ2C> integrity_test = new LLImageJ2C;
+ if( !integrity_test->loadAndValidate( out_filename ) )
+ {
+ llinfos << "Image: " << out_filename << " is corrupt." << llendl;
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+// note: modifies the argument raw_image!!!!
+LLPointer<LLImageJ2C> LLViewerTextureList::convertToUploadFile(LLPointer<LLImageRaw> raw_image)
+{
+ raw_image->biasedScaleToPowerOfTwo(LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT);
+ LLPointer<LLImageJ2C> compressedImage = new LLImageJ2C();
+ compressedImage->setRate(0.f);
+
+ if (gSavedSettings.getBOOL("LosslessJ2CUpload") &&
+ (raw_image->getWidth() * raw_image->getHeight() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF * LL_IMAGE_REZ_LOSSLESS_CUTOFF))
+ compressedImage->setReversible(TRUE);
+
+ compressedImage->encode(raw_image, 0.0f);
+
+ return compressedImage;
+}
+
+// Returns min setting for TextureMemory (in MB)
+S32 LLViewerTextureList::getMinVideoRamSetting()
+{
+ S32 system_ram = (S32)BYTES_TO_MEGA_BYTES(gSysMemory.getPhysicalMemoryClamped());
+ //min texture mem sets to 64M if total physical mem is more than 1.5GB
+ return (system_ram > 1500) ? 64 : MIN_VIDEO_RAM_IN_MEGA_BYTES ;
+}
+
+//static
+// Returns max setting for TextureMemory (in MB)
+S32 LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended)
+{
+ S32 max_texmem;
+ if (gGLManager.mVRAM != 0)
+ {
+ // Treat any card with < 32 MB (shudder) as having 32 MB
+ // - it's going to be swapping constantly regardless
+ S32 max_vram = gGLManager.mVRAM;
+ max_vram = llmax(max_vram, getMinVideoRamSetting());
+ max_texmem = max_vram;
+ if (!get_recommended)
+ max_texmem *= 2;
+ }
+ else
+ {
+ if (get_recommended)
+ max_texmem = 128;
+ else
+ max_texmem = 512;
+ llwarns << "VRAM amount not detected, defaulting to " << max_texmem << " MB" << llendl;
+ }
+
+ S32 system_ram = (S32)BYTES_TO_MEGA_BYTES(gSysMemory.getPhysicalMemoryClamped()); // In MB
+ //llinfos << "*** DETECTED " << system_ram << " MB of system memory." << llendl;
+ if (get_recommended)
+ max_texmem = llmin(max_texmem, (S32)(system_ram/2));
+ else
+ max_texmem = llmin(max_texmem, (S32)(system_ram));
+
+ max_texmem = llclamp(max_texmem, getMinVideoRamSetting(), MAX_VIDEO_RAM_IN_MEGA_BYTES);
+
+ return max_texmem;
+}
+
+const S32 VIDEO_CARD_FRAMEBUFFER_MEM = 12; // MB
+const S32 MIN_MEM_FOR_NON_TEXTURE = 512 ; //MB
+void LLViewerTextureList::updateMaxResidentTexMem(S32 mem)
+{
+ // Initialize the image pipeline VRAM settings
+ S32 cur_mem = gSavedSettings.getS32("TextureMemory");
+ F32 mem_multiplier = gSavedSettings.getF32("RenderTextureMemoryMultiple");
+ S32 default_mem = getMaxVideoRamSetting(true); // recommended default
+ if (mem == 0)
+ {
+ mem = cur_mem > 0 ? cur_mem : default_mem;
+ }
+ else if (mem < 0)
+ {
+ mem = default_mem;
+ }
+
+ // limit the texture memory to a multiple of the default if we've found some cards to behave poorly otherwise
+ mem = llmin(mem, (S32) (mem_multiplier * (F32) default_mem));
+
+ mem = llclamp(mem, getMinVideoRamSetting(), getMaxVideoRamSetting());
+ if (mem != cur_mem)
+ {
+ gSavedSettings.setS32("TextureMemory", mem);
+ return; //listener will re-enter this function
+ }
+
+ // TODO: set available resident texture mem based on use by other subsystems
+ // currently max(12MB, VRAM/4) assumed...
+
+ S32 vb_mem = mem;
+ S32 fb_mem = llmax(VIDEO_CARD_FRAMEBUFFER_MEM, vb_mem/4);
+ mMaxResidentTexMemInMegaBytes = (vb_mem - fb_mem) ; //in MB
+
+ mMaxTotalTextureMemInMegaBytes = mMaxResidentTexMemInMegaBytes * 2;
+ if (mMaxResidentTexMemInMegaBytes > 640)
+ {
+ mMaxTotalTextureMemInMegaBytes -= (mMaxResidentTexMemInMegaBytes >> 2);
+ }
+
+ //system mem
+ S32 system_ram = (S32)BYTES_TO_MEGA_BYTES(gSysMemory.getPhysicalMemoryClamped()); // In MB
+
+ //minimum memory reserved for non-texture use.
+ //if system_raw >= 1GB, reserve at least 512MB for non-texture use;
+ //otherwise reserve half of the system_ram for non-texture use.
+ S32 min_non_texture_mem = llmin(system_ram / 2, MIN_MEM_FOR_NON_TEXTURE) ;
+
+ if (mMaxTotalTextureMemInMegaBytes > system_ram - min_non_texture_mem)
+ {
+ mMaxTotalTextureMemInMegaBytes = system_ram - min_non_texture_mem ;
+ }
+
+ llinfos << "Total Video Memory set to: " << vb_mem << " MB" << llendl;
+ llinfos << "Available Texture Memory set to: " << (vb_mem - fb_mem) << " MB" << llendl;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+// static
+void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_data)
+{
+ LLFastTimer t(LLFastTimer::FTM_PROCESS_IMAGES);
+
+ // Receive image header, copy into image object and decompresses
+ // if this is a one-packet image.
+
+ LLUUID id;
+
+ char ip_string[256];
+ u32_to_ip_string(msg->getSenderIP(),ip_string);
+
+ if (msg->getReceiveCompressedSize())
+ {
+ gTextureList.mTextureBits += msg->getReceiveCompressedSize() * 8;
+ }
+ else
+ {
+ gTextureList.mTextureBits += msg->getReceiveSize() * 8;
+ }
+ gTextureList.mTexturePackets++;
+
+ U8 codec;
+ U16 packets;
+ U32 totalbytes;
+ msg->getUUIDFast(_PREHASH_ImageID, _PREHASH_ID, id);
+ msg->getU8Fast(_PREHASH_ImageID, _PREHASH_Codec, codec);
+ msg->getU16Fast(_PREHASH_ImageID, _PREHASH_Packets, packets);
+ msg->getU32Fast(_PREHASH_ImageID, _PREHASH_Size, totalbytes);
+
+ S32 data_size = msg->getSizeFast(_PREHASH_ImageData, _PREHASH_Data);
+ if (!data_size)
+ {
+ return;
+ }
+ if (data_size < 0)
+ {
+ // msg->getSizeFast() is probably trying to tell us there
+ // was an error.
+ llerrs << "image header chunk size was negative: "
+ << data_size << llendl;
+ return;
+ }
+
+ // this buffer gets saved off in the packet list
+ U8 *data = new U8[data_size];
+ msg->getBinaryDataFast(_PREHASH_ImageData, _PREHASH_Data, data, data_size);
+
+ LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture(id, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE);
+ if (!image)
+ {
+ delete [] data;
+ return;
+ }
+ image->getLastPacketTimer()->reset();
+ bool res = LLAppViewer::getTextureFetch()->receiveImageHeader(msg->getSender(), id, codec, packets, totalbytes, data_size, data);
+ if (!res)
+ {
+ delete[] data;
+ }
+}
+
+// static
+void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_data)
+{
+ LLMemType mt1(LLMemType::MTYPE_APPFMTIMAGE);
+ LLFastTimer t(LLFastTimer::FTM_PROCESS_IMAGES);
+
+ // Receives image packet, copy into image object,
+ // checks if all packets received, decompresses if so.
+
+ LLUUID id;
+ U16 packet_num;
+
+ char ip_string[256];
+ u32_to_ip_string(msg->getSenderIP(),ip_string);
+
+ if (msg->getReceiveCompressedSize())
+ {
+ gTextureList.mTextureBits += msg->getReceiveCompressedSize() * 8;
+ }
+ else
+ {
+ gTextureList.mTextureBits += msg->getReceiveSize() * 8;
+ }
+ gTextureList.mTexturePackets++;
+
+ //llprintline("Start decode, image header...");
+ msg->getUUIDFast(_PREHASH_ImageID, _PREHASH_ID, id);
+ msg->getU16Fast(_PREHASH_ImageID, _PREHASH_Packet, packet_num);
+ S32 data_size = msg->getSizeFast(_PREHASH_ImageData, _PREHASH_Data);
+
+ if (!data_size)
+ {
+ return;
+ }
+ if (data_size < 0)
+ {
+ // msg->getSizeFast() is probably trying to tell us there
+ // was an error.
+ llerrs << "image data chunk size was negative: "
+ << data_size << llendl;
+ return;
+ }
+ if (data_size > MTUBYTES)
+ {
+ llerrs << "image data chunk too large: " << data_size << " bytes" << llendl;
+ return;
+ }
+ U8 *data = new U8[data_size];
+ msg->getBinaryDataFast(_PREHASH_ImageData, _PREHASH_Data, data, data_size);
+
+ LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture(id, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE);
+ if (!image)
+ {
+ delete [] data;
+ return;
+ }
+ image->getLastPacketTimer()->reset();
+ bool res = LLAppViewer::getTextureFetch()->receiveImagePacket(msg->getSender(), id, packet_num, data_size, data);
+ if (!res)
+ {
+ delete[] data;
+ }
+}
+
+
+// We've been that the asset server does not contain the requested image id.
+// static
+void LLViewerTextureList::processImageNotInDatabase(LLMessageSystem *msg,void **user_data)
+{
+ LLFastTimer t(LLFastTimer::FTM_PROCESS_IMAGES);
+ LLUUID image_id;
+ msg->getUUIDFast(_PREHASH_ImageID, _PREHASH_ID, image_id);
+
+ LLViewerFetchedTexture* image = gTextureList.findImage( image_id );
+ if( image )
+ {
+ image->setIsMissingAsset();
+ }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+//static
+const U32 SIXTEEN_MEG = 0x1000000;
+S32 LLViewerTextureList::calcMaxTextureRAM()
+{
+ // Decide the maximum amount of RAM we should allow the user to allocate to texture cache
+ LLMemoryInfo memory_info;
+ U32 available_memory = memory_info.getPhysicalMemoryClamped();
+
+ clamp_rescale((F32)available_memory,
+ (F32)(SIXTEEN_MEG * 16),
+ (F32)U32_MAX,
+ (F32)(SIXTEEN_MEG * 4),
+ (F32)(U32_MAX >> 1));
+ return available_memory;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+// explicitly cleanup resources, as this is a singleton class with process
+// lifetime so ability to perform std::map operations in destructor is not
+// guaranteed.
+void LLUIImageList::cleanUp()
+{
+ mUIImages.clear();
+ mUITextureList.clear() ;
+}
+
+LLUIImagePtr LLUIImageList::getUIImageByID(const LLUUID& image_id)
+{
+ // use id as image name
+ std::string image_name = image_id.asString();
+
+ // look for existing image
+ uuid_ui_image_map_t::iterator found_it = mUIImages.find(image_name);
+ if (found_it != mUIImages.end())
+ {
+ return found_it->second;
+ }
+
+ return loadUIImageByID(image_id);
+}
+
+LLUIImagePtr LLUIImageList::getUIImage(const std::string& image_name)
+{
+ // look for existing image
+ uuid_ui_image_map_t::iterator found_it = mUIImages.find(image_name);
+ if (found_it != mUIImages.end())
+ {
+ return found_it->second;
+ }
+
+ return loadUIImageByName(image_name, image_name);
+}
+
+LLUIImagePtr LLUIImageList::loadUIImageByName(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect)
+{
+ LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTextureFromFile(filename, MIPMAP_NO, IMMEDIATE_YES);
+ return loadUIImage(imagep, name, use_mips, scale_rect);
+}
+
+LLUIImagePtr LLUIImageList::loadUIImageByID(const LLUUID& id, BOOL use_mips, const LLRect& scale_rect)
+{
+ LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTexture(id, MIPMAP_NO, IMMEDIATE_YES);
+ return loadUIImage(imagep, id.asString(), use_mips, scale_rect);
+}
+
+LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips, const LLRect& scale_rect)
+{
+ if (!imagep) return NULL;
+
+ imagep->setAddressMode(LLTexUnit::TAM_CLAMP);
+
+ //all UI images are non-deletable
+ imagep->setNoDelete() ;
+
+ LLUIImagePtr new_imagep = new LLUIImage(name, imagep);
+ mUIImages.insert(std::make_pair(name, new_imagep));
+ mUITextureList.push_back(imagep) ;
+
+ LLUIImageLoadData* datap = new LLUIImageLoadData;
+ datap->mImageName = name;
+ datap->mImageScaleRegion = scale_rect;
+
+ imagep->setLoadedCallback(onUIImageLoaded, 0, FALSE, FALSE, datap);
+
+ return new_imagep;
+}
+
+LLUIImagePtr LLUIImageList::preloadUIImage(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect)
+{
+ // look for existing image
+ uuid_ui_image_map_t::iterator found_it = mUIImages.find(name);
+ if (found_it != mUIImages.end())
+ {
+ // image already loaded!
+ llerrs << "UI Image " << name << " already loaded." << llendl;
+ }
+
+ return loadUIImageByName(name, filename, use_mips, scale_rect);
+}
+
+//static
+void LLUIImageList::onUIImageLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* user_data )
+{
+ if(!success || !user_data)
+ {
+ return;
+ }
+
+ LLUIImageLoadData* image_datap = (LLUIImageLoadData*)user_data;
+ std::string ui_image_name = image_datap->mImageName;
+ LLRect scale_rect = image_datap->mImageScaleRegion;
+ if (final)
+ {
+ delete image_datap;
+ }
+
+ LLUIImageList* instance = getInstance();
+
+ uuid_ui_image_map_t::iterator found_it = instance->mUIImages.find(ui_image_name);
+ if (found_it != instance->mUIImages.end())
+ {
+ LLUIImagePtr imagep = found_it->second;
+
+ // for images grabbed from local files, apply clipping rectangle to restore original dimensions
+ // from power-of-2 gl image
+ if (success && imagep.notNull() && src_vi && !src_vi->getLocalFileName().empty())
+ {
+ F32 clip_x = (F32)src_vi->getOriginalWidth() / (F32)src_vi->getFullWidth();
+ F32 clip_y = (F32)src_vi->getOriginalHeight() / (F32)src_vi->getFullHeight();
+ imagep->setClipRegion(LLRectf(0.f, clip_y, clip_x, 0.f));
+ if (scale_rect != LLRect::null)
+ {
+ imagep->setScaleRegion(
+ LLRectf(llclamp((F32)scale_rect.mLeft / (F32)imagep->getWidth(), 0.f, 1.f),
+ llclamp((F32)scale_rect.mTop / (F32)imagep->getHeight(), 0.f, 1.f),
+ llclamp((F32)scale_rect.mRight / (F32)imagep->getWidth(), 0.f, 1.f),
+ llclamp((F32)scale_rect.mBottom / (F32)imagep->getHeight(), 0.f, 1.f)));
+ }
+ }
+ }
+}
+
+struct UIImageDeclaration : public LLInitParam::Block<UIImageDeclaration>
+{
+ Mandatory<std::string> name;
+ Optional<std::string> file_name;
+ Optional<bool> preload;
+ Optional<LLRect> scale_rect;
+ Optional<bool> use_mips;
+
+ UIImageDeclaration()
+ : name("name"),
+ file_name("file_name"),
+ preload("preload", false),
+ scale_rect("scale"),
+ use_mips("use_mips", false)
+ {}
+};
+
+struct UIImageDeclarations : public LLInitParam::Block<UIImageDeclarations>
+{
+ Mandatory<S32> version;
+ Multiple<UIImageDeclaration> textures;
+
+ UIImageDeclarations()
+ : version("version"),
+ textures("texture")
+ {}
+};
+
+bool LLUIImageList::initFromFile()
+{
+ // construct path to canonical textures.xml in default skin dir
+ std::string base_file_path = gDirUtilp->getExpandedFilename(LL_PATH_SKINS, "default", "textures", "textures.xml");
+
+ LLXMLNodePtr root;
+
+ if (!LLXMLNode::parseFile(base_file_path, root, NULL))
+ {
+ llwarns << "Unable to parse UI image list file " << base_file_path << llendl;
+ return false;
+ }
+
+ std::vector<std::string> paths;
+ // path to current selected skin
+ paths.push_back(gDirUtilp->getSkinDir()
+ + gDirUtilp->getDirDelimiter()
+ + "textures"
+ + gDirUtilp->getDirDelimiter()
+ + "textures.xml");
+ // path to user overrides on current skin
+ paths.push_back(gDirUtilp->getUserSkinDir()
+ + gDirUtilp->getDirDelimiter()
+ + "textures"
+ + gDirUtilp->getDirDelimiter()
+ + "textures.xml");
+
+ // apply skinned xml files incrementally
+ for(std::vector<std::string>::iterator path_it = paths.begin();
+ path_it != paths.end();
+ ++path_it)
+ {
+ // don't reapply base file to itself
+ if (!path_it->empty() && (*path_it) != base_file_path)
+ {
+ LLXMLNodePtr update_root;
+ if (LLXMLNode::parseFile(*path_it, update_root, NULL))
+ {
+ LLXMLNode::updateNode(root, update_root);
+ }
+ }
+ }
+
+ UIImageDeclarations images;
+ LLXUIParser::instance().readXUI(root, images);
+
+ if (!images.validateBlock()) return false;
+
+ enum e_decode_pass
+ {
+ PASS_DECODE_NOW,
+ PASS_DECODE_LATER,
+ NUM_PASSES
+ };
+
+ for (S32 cur_pass = PASS_DECODE_NOW; cur_pass < NUM_PASSES; cur_pass++)
+ {
+ for (LLInitParam::ParamIterator<UIImageDeclaration>::const_iterator image_it = images.textures().begin();
+ image_it != images.textures().end();
+ ++image_it)
+ {
+ std::string file_name = image_it->file_name.isProvided() ? image_it->file_name() : image_it->name();
+
+ // load high priority textures on first pass (to kick off decode)
+ enum e_decode_pass decode_pass = image_it->preload ? PASS_DECODE_NOW : PASS_DECODE_LATER;
+ if (decode_pass != cur_pass)
+ {
+ continue;
+ }
+ preloadUIImage(image_it->name, file_name, image_it->use_mips, image_it->scale_rect);
+ }
+
+ if (cur_pass == PASS_DECODE_NOW && !gSavedSettings.getBOOL("NoPreload"))
+ {
+ gTextureList.decodeAllImages(10.f); // decode preloaded images
+ }
+ }
+ return true;
+}
+
+
diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h
new file mode 100644
index 0000000000..11d1dd855f
--- /dev/null
+++ b/indra/newview/llviewertexturelist.h
@@ -0,0 +1,243 @@
+/**
+ * @file llviewertexturelist.h
+ * @brief Object for managing the list of images within a region
+ *
+ * $LicenseInfo:firstyear=2000&license=viewergpl$
+ *
+ * Copyright (c) 2000-2009, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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_LLVIEWERTEXTURELIST_H
+#define LL_LLVIEWERTEXTURELIST_H
+
+#include "lluuid.h"
+//#include "message.h"
+#include "llgl.h"
+#include "llstat.h"
+#include "llviewertexture.h"
+#include "llui.h"
+#include <list>
+#include <set>
+
+const U32 LL_IMAGE_REZ_LOSSLESS_CUTOFF = 128;
+
+const BOOL MIPMAP_YES = TRUE;
+const BOOL MIPMAP_NO = FALSE;
+
+const BOOL GL_TEXTURE_YES = TRUE;
+const BOOL GL_TEXTURE_NO = FALSE;
+
+const BOOL IMMEDIATE_YES = TRUE;
+const BOOL IMMEDIATE_NO = FALSE;
+
+class LLImageJ2C;
+class LLMessageSystem;
+class LLTextureView;
+
+typedef void (*LLImageCallback)(BOOL success,
+ LLViewerFetchedTexture *src_vi,
+ LLImageRaw* src,
+ LLImageRaw* src_aux,
+ S32 discard_level,
+ BOOL final,
+ void* userdata);
+
+class LLViewerTextureList
+{
+ LOG_CLASS(LLViewerTextureList);
+
+ friend class LLTextureView;
+ friend class LLViewerTextureManager;
+
+public:
+ static BOOL createUploadFile(const std::string& filename, const std::string& out_filename, const U8 codec);
+ static LLPointer<LLImageJ2C> convertToUploadFile(LLPointer<LLImageRaw> raw_image);
+ static void processImageNotInDatabase( LLMessageSystem *msg, void **user_data );
+ static S32 calcMaxTextureRAM();
+ static void receiveImageHeader(LLMessageSystem *msg, void **user_data);
+ static void receiveImagePacket(LLMessageSystem *msg, void **user_data);
+
+public:
+ LLViewerTextureList();
+ ~LLViewerTextureList();
+
+ void init();
+ void shutdown();
+ void dump();
+ void destroyGL(BOOL save_state = TRUE);
+ void restoreGL();
+
+ LLViewerFetchedTexture *findImage(const LLUUID &image_id);
+
+ void dirtyImage(LLViewerFetchedTexture *image);
+
+ // Using image stats, determine what images are necessary, and perform image updates.
+ void updateImages(F32 max_time);
+ void forceImmediateUpdate(LLViewerFetchedTexture* imagep) ;
+
+ // Decode and create textures for all images currently in list.
+ void decodeAllImages(F32 max_decode_time);
+
+ void handleIRCallback(void **data, const S32 number);
+
+ void setUpdateStats(BOOL b) { mUpdateStats = b; }
+
+ S32 getMaxResidentTexMem() const { return mMaxResidentTexMemInMegaBytes; }
+ S32 getMaxTotalTextureMem() const { return mMaxTotalTextureMemInMegaBytes;}
+ S32 getNumImages() { return mImageList.size(); }
+
+ void updateMaxResidentTexMem(S32 mem);
+
+ void doPreloadImages();
+ void doPrefetchImages();
+
+ static S32 getMinVideoRamSetting();
+ static S32 getMaxVideoRamSetting(bool get_recommended = false);
+
+private:
+ void updateImagesDecodePriorities();
+ F32 updateImagesCreateTextures(F32 max_time);
+ F32 updateImagesFetchTextures(F32 max_time);
+ void updateImagesUpdateStats();
+
+ void addImage(LLViewerFetchedTexture *image);
+ void deleteImage(LLViewerFetchedTexture *image);
+
+ void addImageToList(LLViewerFetchedTexture *image);
+ void removeImageFromList(LLViewerFetchedTexture *image);
+
+ LLViewerFetchedTexture * getImage(const LLUUID &image_id,
+ BOOL usemipmap = TRUE,
+ BOOL level_immediate = FALSE, // Get the requested level immediately upon creation.
+ S8 texture_type = LLViewerTexture::FETCHED_TEXTURE,
+ LLGLint internal_format = 0,
+ LLGLenum primary_format = 0,
+ LLHost request_from_host = LLHost()
+ );
+
+ LLViewerFetchedTexture * getImageFromFile(const std::string& filename,
+ BOOL usemipmap = TRUE,
+ BOOL level_immediate = FALSE, // Get the requested level immediately upon creation.
+ S8 texture_type = LLViewerTexture::FETCHED_TEXTURE,
+ LLGLint internal_format = 0,
+ LLGLenum primary_format = 0,
+ const LLUUID& force_id = LLUUID::null
+ );
+
+ LLViewerFetchedTexture* createImage(const LLUUID &image_id,
+ BOOL usemipmap = TRUE,
+ BOOL level_immediate = FALSE, // Get the requested level immediately upon creation.
+ S8 texture_type = LLViewerTexture::FETCHED_TEXTURE,
+ LLGLint internal_format = 0,
+ LLGLenum primary_format = 0,
+ LLHost request_from_host = LLHost()
+ );
+
+ // Request image from a specific host, used for baked avatar textures.
+ // Implemented in header in case someone changes default params above. JC
+ LLViewerFetchedTexture* getImageFromHost(const LLUUID& image_id, LLHost host)
+ { return getImage(image_id, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE, 0, 0, host); }
+
+public:
+ typedef std::set<LLPointer<LLViewerFetchedTexture> > image_list_t;
+ image_list_t mLoadingStreamList;
+ image_list_t mCreateTextureList;
+ image_list_t mCallbackList;
+
+ // Note: just raw pointers because they are never referenced, just compared against
+ std::set<LLViewerFetchedTexture*> mDirtyTextureList;
+
+ BOOL mForceResetTextureStats;
+
+private:
+ typedef std::map< LLUUID, LLPointer<LLViewerFetchedTexture> > uuid_map_t;
+ uuid_map_t mUUIDMap;
+ LLUUID mLastUpdateUUID;
+ LLUUID mLastFetchUUID;
+
+ typedef std::set<LLPointer<LLViewerFetchedTexture>, LLViewerFetchedTexture::Compare> image_priority_list_t;
+ image_priority_list_t mImageList;
+
+ // simply holds on to LLViewerFetchedTexture references to stop them from being purged too soon
+ std::set<LLPointer<LLViewerFetchedTexture> > mImagePreloads;
+
+ BOOL mUpdateStats;
+ S32 mMaxResidentTexMemInMegaBytes;
+ S32 mMaxTotalTextureMemInMegaBytes;
+ LLFrameTimer mForceDecodeTimer;
+
+public:
+ U32 mTextureBits;
+ U32 mTexturePackets;
+
+private:
+ S32 mNumImages;
+ static void (*sUUIDCallback)(void**, const LLUUID &);
+};
+
+class LLUIImageList : public LLImageProviderInterface, public LLSingleton<LLUIImageList>
+{
+public:
+ // LLImageProviderInterface
+ LLUIImagePtr getUIImageByID(const LLUUID& id);
+ LLUIImagePtr getUIImage(const std::string& name);
+ void cleanUp();
+
+ bool initFromFile();
+
+ LLUIImagePtr preloadUIImage(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect);
+
+ static void onUIImageLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata );
+private:
+ LLUIImagePtr loadUIImageByName(const std::string& name, const std::string& filename, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null);
+ LLUIImagePtr loadUIImageByID(const LLUUID& id, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null);
+
+ LLUIImagePtr loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null);
+
+
+ struct LLUIImageLoadData
+ {
+ std::string mImageName;
+ LLRect mImageScaleRegion;
+ };
+
+ typedef std::map< std::string, LLPointer<LLUIImage> > uuid_ui_image_map_t;
+ uuid_ui_image_map_t mUIImages;
+
+ //
+ //keep a copy of UI textures to prevent them to be deleted.
+ //mGLTexturep of each UI texture equals to some LLUIImage.mImage.
+ std::list< LLPointer<LLViewerFetchedTexture> > mUITextureList ;
+};
+
+const BOOL GLTEXTURE_TRUE = TRUE;
+const BOOL GLTEXTURE_FALSE = FALSE;
+const BOOL MIPMAP_TRUE = TRUE;
+const BOOL MIPMAP_FALSE = FALSE;
+
+extern LLViewerTextureList gTextureList;
+
+#endif
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 91fc95cf6f..616e44b29a 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -82,7 +82,6 @@
#include "llagent.h"
#include "llalertdialog.h"
#include "llbox.h"
-#include "llchatbar.h"
#include "llconsole.h"
#include "llviewercontrol.h"
#include "llcylinder.h"
@@ -97,7 +96,6 @@
#include "llfeaturemanager.h"
#include "llfilepicker.h"
#include "llfloater.h"
-#include "llfloateractivespeakers.h"
#include "llfloaterbuildoptions.h"
#include "llfloaterbuyland.h"
#include "llfloatercamera.h"
@@ -113,6 +111,7 @@
#include "llfloatertools.h"
#include "llfloaterworldmap.h"
#include "llfocusmgr.h"
+#include "llfontfreetype.h"
#include "llgesturemgr.h"
#include "llglheaders.h"
#include "llhoverview.h"
@@ -120,7 +119,7 @@
#include "llhudview.h"
#include "llimagebmp.h"
#include "llimagej2c.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
#include "llkeyboard.h"
#include "lllineeditor.h"
#include "llmenugl.h"
@@ -166,7 +165,7 @@
#include "llvieweraudio.h"
#include "llviewercamera.h"
#include "llviewergesture.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerinventory.h"
#include "llviewerkeyboard.h"
#include "llviewermenu.h"
@@ -189,10 +188,13 @@
#include "llviewernetwork.h"
#include "llpostprocess.h"
#include "llbottomtray.h"
+#include "llnearbychatbar.h"
+
+#include "llnotificationmanager.h"
#include "llfloaternotificationsconsole.h"
-#include "llnearbychathistory.h"
+#include "llnearbychat.h"
#include "llviewerwindowlistener.h"
#if LL_WINDOWS
@@ -607,11 +609,11 @@ bool LLViewerWindow::shouldShowToolTipFor(LLMouseHandler *mh)
{
LLMouseHandler::EShowToolTip showlevel = mh->getShowToolTip();
- return (
- showlevel == LLMouseHandler::SHOW_ALWAYS ||
- (showlevel == LLMouseHandler::SHOW_IF_NOT_BLOCKED &&
- !mToolTipBlocked)
- );
+ bool tool_tip_allowed = (showlevel == LLMouseHandler::SHOW_ALWAYS
+ || (showlevel == LLMouseHandler::SHOW_IF_NOT_BLOCKED
+ && !mToolTipBlocked));
+
+ return tool_tip_allowed;
}
return false;
}
@@ -1363,8 +1365,8 @@ LLViewerWindow::LLViewerWindow(
// Init the image list. Must happen after GL is initialized and before the images that
// LLViewerWindow needs are requested.
- gImageList.init();
- LLViewerImage::initClass();
+ gTextureList.init();
+ LLViewerTextureManager::init() ;
gBumpImageList.init();
// Init font system, but don't actually load the fonts yet
@@ -1532,10 +1534,10 @@ void LLViewerWindow::initBase()
params.rect(LLRect (0, 1, 1, 0));
params.h_pad(4);
params.v_pad(2);
- params.text_color(gSavedSkinSettings.getColor( "ToolTipTextColor" ));
- params.border_color(gSavedSkinSettings.getColor( "ToolTipBorderColor" ));
+ params.text_color(LLUIColorTable::instance().getColor( "ToolTipTextColor" ));
+ params.border_color(LLUIColorTable::instance().getColor( "ToolTipBorderColor" ));
params.border_visible(false);
- params.background_color(gSavedSkinSettings.getColor( "ToolTipBgColor" ));
+ params.background_color(LLUIColorTable::instance().getColor( "ToolTipBgColor" ));
params.bg_visible(true);
params.font.style("NORMAL");
params.border_drop_shadow_visible(true);
@@ -1557,22 +1559,22 @@ void LLViewerWindow::initWorldUI()
gIMMgr = LLIMMgr::getInstance();
+ // side tray
+ getRootView()->addChild(LLSideTray::getInstance());
+
+ getRootView()->sendChildToFront(gFloaterView);
+ getRootView()->sendChildToFront(gSnapshotFloaterView);
+
// new bottom panel
+ getRootView()->addChild(LLBottomTray::getInstance());
+ // Make sure Bottom Tray is behind Side Tray regardless "addChild" order.
+ getRootView()->sendChildToBack(LLBottomTray::getInstance());
LLRect rc = LLBottomTray::getInstance()->getRect();
rc.mLeft = 0;
rc.mRight = mRootView->getRect().getWidth();
- mRootView->addChild(LLBottomTray::getInstance());
LLBottomTray::getInstance()->reshape(rc.getWidth(),rc.getHeight(),FALSE);
LLBottomTray::getInstance()->setRect(rc);
- // Updating of bottom boundary of gConsole to avoid overlapping
- if (gConsole)
- {
- LLRect cr = gConsole->getRect();
- cr.mBottom += LLBottomTray::getInstance()->getRect().getHeight();
- gConsole->setRect(cr);
- }
-
// View for hover information
LLHoverView::Params hvp;
hvp.name("gHoverview");
@@ -1615,7 +1617,6 @@ void LLViewerWindow::initWorldUI()
// Force gFloaterWorldMap to initialize
LLFloaterReg::getInstance("world_map");
- LLFloaterReg::hideInstance("world_map");
// Force gFloaterTools to initialize
LLFloaterReg::getInstance("build");
@@ -1643,16 +1644,22 @@ void LLViewerWindow::initWorldUI()
getRootView()->addChild(gStatusBar);
getRootView()->addChild(navbar);
- // side tray
- getRootView()->addChild(LLSideTray::getInstance());
//sidetray
//then notify area
//then menu
- getRootView()->sendChildToFront(LLSideTray::getInstance());
+ //getRootView()->sendChildToFront(LLSideTray::getInstance());
+
getRootView()->sendChildToFront(gNotifyBoxView);
// menu holder appears on top to get first pass at all mouse events
getRootView()->sendChildToFront(gMenuHolder);
+
+ //Channel Manager
+ LLNotificationsUI::LLChannelManager* channel_manager = LLNotificationsUI::LLChannelManager::getInstance();
+ getRootView()->addChild(channel_manager);
+ //Notification Manager
+ LLNotificationsUI::LLNotificationManager* notify_manager = LLNotificationsUI::LLNotificationManager::getInstance();
+ getRootView()->addChild(notify_manager);
}
// Destroy the UI
@@ -1702,7 +1709,7 @@ void LLViewerWindow::shutdownGL()
gSky.cleanup();
stop_glerror();
- gImageList.shutdown();
+ gTextureList.shutdown();
stop_glerror();
gBumpImageList.shutdown();
@@ -1714,7 +1721,7 @@ void LLViewerWindow::shutdownGL()
gPipeline.cleanup();
stop_glerror();
- LLViewerImage::cleanupClass();
+ LLViewerTextureManager::cleanup() ;
llinfos << "Cleaning up select manager" << llendl;
LLSelectMgr::getInstance()->cleanup();
@@ -1837,7 +1844,7 @@ void LLViewerWindow::reshape(S32 width, S32 height)
// store the mode the user wants (even if not there yet)
- gSavedSettings.setBOOL("NotFullScreen", !mWantFullscreen);
+ gSavedSettings.setBOOL("WindowFullScreen", mWantFullscreen);
// store new settings for the mode we are in, regardless
if (!mWindow->getFullscreen())
@@ -1864,8 +1871,11 @@ void LLViewerWindow::reshape(S32 width, S32 height)
// Hide normal UI when a logon fails
void LLViewerWindow::setNormalControlsVisible( BOOL visible )
{
- LLBottomTray::getInstance()->setVisible(visible);
- LLBottomTray::getInstance()->setEnabled(visible);
+ if(LLBottomTray::instanceExists())
+ {
+ LLBottomTray::getInstance()->setVisible(visible);
+ LLBottomTray::getInstance()->setEnabled(visible);
+ }
if ( gMenuBarView )
{
@@ -1897,19 +1907,19 @@ void LLViewerWindow::setMenuBackgroundColor(bool god_mode, bool dev_grid)
if(god_mode && LLViewerLogin::getInstance()->isInProductionGrid())
{
- new_bg_color = gSavedSkinSettings.getColor( "MenuBarGodBgColor" );
+ new_bg_color = LLUIColorTable::instance().getColor( "MenuBarGodBgColor" );
}
else if(god_mode && !LLViewerLogin::getInstance()->isInProductionGrid())
{
- new_bg_color = gSavedSkinSettings.getColor( "MenuNonProductionGodBgColor" );
+ new_bg_color = LLUIColorTable::instance().getColor( "MenuNonProductionGodBgColor" );
}
else if(!god_mode && !LLViewerLogin::getInstance()->isInProductionGrid())
{
- new_bg_color = gSavedSkinSettings.getColor( "MenuNonProductionBgColor" );
+ new_bg_color = LLUIColorTable::instance().getColor( "MenuNonProductionBgColor" );
}
else
{
- new_bg_color = gSavedSkinSettings.getColor( "MenuBarBgColor" );
+ new_bg_color = LLUIColorTable::instance().getColor( "MenuBarBgColor" );
}
if(gMenuBarView)
@@ -2172,10 +2182,11 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
LLUICtrl* keyboard_focus = gFocusMgr.getKeyboardFocus();
if( keyboard_focus )
{
+ LLLineEditor* chat_editor = LLBottomTray::instanceExists() ? LLBottomTray::getInstance()->getNearbyChatBar()->getChatBox() : NULL;
// arrow keys move avatar while chatting hack
- if (gChatBar && gChatBar->inputEditorHasFocus())
+ if (chat_editor && chat_editor->hasFocus())
{
- if (gChatBar->getCurrentChat().empty() || gSavedSettings.getBOOL("ArrowKeysMoveAvatar"))
+ if (chat_editor->getText().empty() || gSavedSettings.getBOOL("ArrowKeysMoveAvatar"))
{
switch(key)
{
@@ -2392,6 +2403,29 @@ void LLViewerWindow::moveCursorToCenter()
LLUI::setCursorPositionScreen(x, y);
}
+void LLViewerWindow::updateBottomTrayRect()
+{
+ if(LLBottomTray::instanceExists() && LLSideTray::instanceCreated())
+ {
+ S32 side_tray_width = 0;
+ if(LLSideTray::getInstance()->getVisible())
+ {
+ side_tray_width = LLSideTray::getInstance()->getTrayWidth();
+ }
+
+ LLBottomTray* bottom_tray = LLBottomTray::getInstance();
+ S32 right = llround((F32)mWindowRect.mRight / mDisplayScale.mV[VX]) - side_tray_width;
+
+ LLRect rc = bottom_tray->getRect();
+ if (right != rc.mRight)
+ {
+ rc.mRight = right;
+ bottom_tray->reshape(rc.getWidth(), rc.getHeight(), FALSE);
+ bottom_tray->setRect(rc);
+ }
+ }
+}
+
//////////////////////////////////////////////////////////////////////
//
// Hover handlers
@@ -2405,6 +2439,8 @@ void LLViewerWindow::updateUI()
updateWorldViewRect();
+ updateBottomTrayRect();
+
LLView::sMouseHandlerMessage.clear();
S32 x = mCurrentMousePoint.mX;
@@ -2621,57 +2657,91 @@ void LLViewerWindow::updateUI()
// Show a new tool tip (or update one that is alrady shown)
BOOL tool_tip_handled = FALSE;
std::string tool_tip_msg;
- F32 tooltip_delay = gSavedSettings.getF32( "ToolTipDelay" );
- //HACK: hack for tool-based tooltips which need to pop up more quickly
- //Also for show xui names as tooltips debug mode
- if ((mouse_captor && !mouse_captor->isView()) || LLUI::sShowXUINames)
- {
- tooltip_delay = gSavedSettings.getF32( "DragAndDropToolTipDelay" );
- }
- if( handled &&
- gMouseIdleTimer.getElapsedTimeF32() > tooltip_delay &&
- !mWindow->isCursorHidden() )
+ if( handled
+ && !mWindow->isCursorHidden()
+ && mToolTip)
{
LLRect screen_sticky_rect;
- LLMouseHandler *mh;
+ LLMouseHandler *tooltip_source = NULL;
S32 local_x, local_y;
if (mouse_captor)
{
mouse_captor->screenPointToLocal(x, y, &local_x, &local_y);
- mh = mouse_captor;
+ tooltip_source = mouse_captor;
}
else if (handled_by_top_ctrl)
{
top_ctrl->screenPointToLocal(x, y, &local_x, &local_y);
- mh = top_ctrl;
+ tooltip_source = top_ctrl;
}
else
{
local_x = x; local_y = y;
- mh = mRootView;
+ tooltip_source = mRootView;
}
+ F32 tooltip_delay = gSavedSettings.getF32( "ToolTipDelay" );
+ //HACK: hack for tool-based tooltips which need to pop up more quickly
+ //Also for show xui names as tooltips debug mode
+ if ((gFocusMgr.getMouseCapture()
+ && !gFocusMgr.getMouseCapture()->isView())
+ || LLUI::sShowXUINames)
+ {
+ tooltip_delay = gSavedSettings.getF32( "DragAndDropToolTipDelay" );
+ }
+
+
BOOL tooltip_vis = FALSE;
- if (shouldShowToolTipFor(mh))
+ if (shouldShowToolTipFor(tooltip_source))
{
- tool_tip_handled = mh->handleToolTip(local_x, local_y, tool_tip_msg, &screen_sticky_rect );
+ tool_tip_handled = tooltip_source->handleToolTip(local_x, local_y, tool_tip_msg, &screen_sticky_rect );
+ // if we actually got a tooltip back...
if( tool_tip_handled && !tool_tip_msg.empty() )
{
- mToolTipStickyRect = screen_sticky_rect;
- mToolTip->setWrappedText( tool_tip_msg, 200 );
- mToolTip->reshapeToFitText();
- mToolTip->setOrigin( x, y );
- LLRect virtual_window_rect(0, getWindowHeight(), getWindowWidth(), 0);
- mToolTip->translateIntoRect( virtual_window_rect, FALSE );
- tooltip_vis = TRUE;
+ if (mToolTip->getVisible() // already showing a tooltip
+ || gMouseIdleTimer.getElapsedTimeF32() > tooltip_delay) // mouse has been still long enough to show the tooltip
+ {
+ // if tooltip has changed or mouse has moved outside of "sticky" rectangle...
+ if (mLastToolTipMessage != tool_tip_msg
+ || !mToolTipStickyRect.pointInRect(x, y))
+ {
+ //...update "sticky" rect and tooltip position
+ mToolTipStickyRect = screen_sticky_rect;
+ mToolTip->setOrigin( x, y );
+ }
+
+ // remember this tooltip so we know when it changes
+ mLastToolTipMessage = tool_tip_msg;
+ mToolTip->setWrappedText( tool_tip_msg, 200 );
+ mToolTip->reshapeToFitText();
+ LLRect virtual_window_rect(0, getWindowHeight(), getWindowWidth(), 0);
+ mToolTip->translateIntoRect( virtual_window_rect, FALSE );
+ tooltip_vis = TRUE;
+ }
}
}
- if (mToolTip)
+ // HACK: assuming tooltip background is in ToolTipBGColor, perform fade out
+ LLColor4 bg_color = LLUIColorTable::instance().getColor( "ToolTipBgColor" );
+ if (tooltip_vis)
{
- mToolTip->setVisible( tooltip_vis );
+ mToolTipFadeTimer.stop();
+ mToolTip->setBackgroundColor(bg_color);
}
+ else
+ {
+ if (!mToolTipFadeTimer.getStarted())
+ {
+ mToolTipFadeTimer.start();
+ }
+ F32 tool_tip_fade_time = gSavedSettings.getF32("ToolTipFadeTime");
+ bg_color.mV[VALPHA] = clamp_rescale(mToolTipFadeTimer.getElapsedTimeF32(), 0.f, tool_tip_fade_time, bg_color.mV[VALPHA], 0.f);
+ mToolTip->setBackgroundColor(bg_color);
+ }
+
+ // above interpolation of bg_color alpha is guaranteed to reach 0.f exactly
+ mToolTip->setVisible( bg_color.mV[VALPHA] != 0.f );
}
updateLayout();
@@ -2781,6 +2851,14 @@ void LLViewerWindow::updateLayout()
}
gMenuBarView->setItemVisible("BuildTools", gFloaterTools->getVisible());
}
+
+ // Always update console
+ if(gConsole)
+ {
+ LLRect console_rect = getChatConsoleRect();
+ gConsole->reshape(console_rect.getWidth(), console_rect.getHeight());
+ gConsole->setRect(console_rect);
+ }
}
void LLViewerWindow::updateMouseDelta()
@@ -2897,40 +2975,33 @@ void LLViewerWindow::updateKeyboardFocus()
if(LLSideTray::instanceCreated())//just getInstance will create sidetray. we don't want this
LLSideTray::getInstance()->highlightFocused();
-
-
- if (gSavedSettings.getBOOL("ChatBarStealsFocus")
- && gChatBar
- && gFocusMgr.getKeyboardFocus() == NULL
- && gChatBar->isInVisibleChain())
- {
- gChatBar->startChat(NULL);
- }
-
-
}
-void LLViewerWindow::updateWorldViewRect()
+void LLViewerWindow::updateWorldViewRect(bool use_full_window)
{
if (!LLSideTray::instanceCreated()) return;
+ // start off using whole window to render world
LLRect new_world_rect = mWindowRect;
- // pull in right side of world view based on sidetray
- LLSideTray* sidetray = LLSideTray::getInstance();
- if (sidetray->getVisible())
+ if (use_full_window == false)
{
- new_world_rect.mRight -= llround((F32)sidetray->getTrayWidth() * mDisplayScale.mV[VX]);
- }
+ // pull in right side of world view based on sidetray
+ LLSideTray* sidetray = LLSideTray::getInstance();
+ if (sidetray->getVisible())
+ {
+ new_world_rect.mRight -= llround((F32)sidetray->getTrayWidth() * mDisplayScale.mV[VX]);
+ }
- // push top of world view below nav bar
- if (LLNavigationBar::getInstance()->getVisible())
- {
- LLNavigationBar* barp = LLNavigationBar::getInstance();
- LLRect nav_bar_rect;
- if(barp->localRectToOtherView(barp->getLocalRect(), &nav_bar_rect, mRootView))
+ // push top of world view below nav bar
+ if (LLNavigationBar::getInstance()->getVisible())
{
- new_world_rect.mTop = llround((F32)LLNavigationBar::getInstance()->getRect().mBottom * mDisplayScale.mV[VY]);
+ LLNavigationBar* barp = LLNavigationBar::getInstance();
+ LLRect nav_bar_rect;
+ if(barp->localRectToOtherView(barp->getLocalRect(), &nav_bar_rect, mRootView))
+ {
+ new_world_rect.mTop = llround((F32)LLNavigationBar::getInstance()->getRect().mBottom * mDisplayScale.mV[VY]);
+ }
}
}
@@ -3417,12 +3488,12 @@ LLVector3 LLViewerWindow::mouseDirectionGlobal(const S32 x, const S32 y) const
// find vertical field of view
F32 fov = LLViewerCamera::getInstance()->getView();
- // find world view center
- F32 center_x = (F32)getWorldViewRect().getCenterX();
- F32 center_y = (F32)getWorldViewRect().getCenterY();
+ // find world view center in scaled ui coordinates
+ F32 center_x = (F32)getWorldViewRect().getCenterX() / mDisplayScale.mV[VX];
+ F32 center_y = (F32)getWorldViewRect().getCenterY() / mDisplayScale.mV[VY];
// calculate pixel distance to screen
- F32 distance = (getWorldViewHeight() / 2.f) / (tan(fov / 2.f));
+ F32 distance = ((F32)getWorldViewHeight() / (mDisplayScale.mV[VY] * 2.f)) / (tan(fov / 2.f));
// calculate click point relative to middle of screen
F32 click_x = x - center_x;
@@ -3441,11 +3512,11 @@ LLVector3 LLViewerWindow::mouseDirectionGlobal(const S32 x, const S32 y) const
LLVector3 LLViewerWindow::mousePointHUD(const S32 x, const S32 y) const
{
// find screen resolution
- S32 height = getWorldViewHeight();
+ S32 height = llround((F32)getWorldViewHeight() / mDisplayScale.mV[VY]);
// find world view center
- F32 center_x = (F32)getWorldViewRect().getCenterX();
- F32 center_y = (F32)getWorldViewRect().getCenterY();
+ F32 center_x = (F32)getWorldViewRect().getCenterX() / mDisplayScale.mV[VX];
+ F32 center_y = (F32)getWorldViewRect().getCenterY() / mDisplayScale.mV[VY];
// remap with uniform scale (1/height) so that top is -0.5, bottom is +0.5
F32 hud_x = -((F32)x - center_x) / height;
@@ -3463,12 +3534,12 @@ LLVector3 LLViewerWindow::mouseDirectionCamera(const S32 x, const S32 y) const
F32 fov_width = fov_height * LLViewerCamera::getInstance()->getAspect();
// find screen resolution
- S32 height = getWorldViewHeight();
- S32 width = getWorldViewWidth();
+ S32 height = llround((F32)getWorldViewHeight() / mDisplayScale.mV[VY]);
+ S32 width = llround((F32)getWorldViewWidth() / mDisplayScale.mV[VX]);
// find world view center
- F32 center_x = (F32)getWorldViewRect().getCenterX();
- F32 center_y = (F32)getWorldViewRect().getCenterY();
+ F32 center_x = (F32)getWorldViewRect().getCenterX() / mDisplayScale.mV[VX];
+ F32 center_y = (F32)getWorldViewRect().getCenterY() / mDisplayScale.mV[VY];
// calculate click point relative to middle of screen
F32 click_x = (((F32)x - center_x) / (F32)width) * fov_width * -1.f;
@@ -3919,6 +3990,9 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
// PRE SNAPSHOT
gDisplaySwapBuffers = FALSE;
+ // if not showing ui, use full window to render world view
+ updateWorldViewRect(!show_ui);
+
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
setCursor(UI_CURSOR_WAIT);
@@ -4393,7 +4467,7 @@ void LLViewerWindow::stopGL(BOOL save_state)
//Note: --bao
//if not necessary, do not change the order of the function calls in this function.
//if change something, make sure it will not break anything.
- //especially be careful to put anything behind gImageList.destroyGL(save_state);
+ //especially be careful to put anything behind gTextureList.destroyGL(save_state);
if (!gGLManager.mIsDisabled)
{
llinfos << "Shutting down GL..." << llendl;
@@ -4418,7 +4492,7 @@ void LLViewerWindow::stopGL(BOOL save_state)
LLVOAvatar::destroyGL();
stop_glerror();
- LLDynamicTexture::destroyGL();
+ LLViewerDynamicTexture::destroyGL();
stop_glerror();
if (gPipeline.isInit())
@@ -4436,9 +4510,9 @@ void LLViewerWindow::stopGL(BOOL save_state)
gPostProcess->invalidate();
}
- gImageList.destroyGL(save_state);
+ gTextureList.destroyGL(save_state);
stop_glerror();
-
+
gGLManager.mIsDisabled = TRUE;
stop_glerror();
@@ -4451,7 +4525,7 @@ void LLViewerWindow::restoreGL(const std::string& progress_message)
//Note: --bao
//if not necessary, do not change the order of the function calls in this function.
//if change something, make sure it will not break anything.
- //especially, be careful to put something before gImageList.restoreGL();
+ //especially, be careful to put something before gTextureList.restoreGL();
if (gGLManager.mIsDisabled)
{
llinfos << "Restoring GL..." << llendl;
@@ -4459,8 +4533,9 @@ void LLViewerWindow::restoreGL(const std::string& progress_message)
initGLDefaults();
LLGLState::restoreGL();
- gImageList.restoreGL();
-
+
+ gTextureList.restoreGL();
+
// for future support of non-square pixels, and fonts that are properly stretched
//LLFontGL::destroyDefaultFonts();
initFonts();
@@ -4471,7 +4546,7 @@ void LLViewerWindow::restoreGL(const std::string& progress_message)
LLManipTranslate::restoreGL();
gBumpImageList.restoreGL();
- LLDynamicTexture::restoreGL();
+ LLViewerDynamicTexture::restoreGL();
LLVOAvatar::restoreGL();
gResizeScreenTexture = TRUE;
@@ -4651,7 +4726,7 @@ BOOL LLViewerWindow::changeDisplaySettings(BOOL fullscreen, LLCoordScreen size,
BOOL was_maximized = gSavedSettings.getBOOL("WindowMaximized");
mWantFullscreen = fullscreen;
mShowFullscreenProgress = show_progress_bar;
- gSavedSettings.setBOOL("NotFullScreen", !mWantFullscreen);
+ gSavedSettings.setBOOL("WindowFullScreen", mWantFullscreen);
//gResizeScreenTexture = TRUE;
@@ -4856,13 +4931,12 @@ void LLViewerWindow::calcDisplayScale()
}
}
-S32 TOOL_BAR_HEIGHT = 20; // *TODO:Skinning Fix
-
S32 LLViewerWindow::getChatConsoleBottomPad()
{
S32 offset = 0;
- if( gToolBar && gToolBar->getVisible() )
- offset += TOOL_BAR_HEIGHT;
+
+ if(LLBottomTray::instanceExists())
+ offset += LLBottomTray::getInstance()->getRect().getHeight();
return offset;
}
@@ -4881,7 +4955,9 @@ LLRect LLViewerWindow::getChatConsoleRect()
console_rect.mLeft += CONSOLE_PADDING_LEFT;
- if (gSavedSettings.getBOOL("ChatFullWidth"))
+ static const BOOL CHAT_FULL_WIDTH = gSavedSettings.getBOOL("ChatFullWidth");
+
+ if (CHAT_FULL_WIDTH)
{
console_rect.mRight -= CONSOLE_PADDING_RIGHT;
}
@@ -4963,10 +5039,6 @@ LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos,
{
}
-LLPickInfo::~LLPickInfo()
-{
-}
-
void LLPickInfo::fetchResults()
{
@@ -4985,59 +5057,14 @@ void LLPickInfo::fetchResults()
NULL, -1, mPickTransparent, &face_hit,
&intersection, &uv, &normal, &binormal);
- // read back colors and depth values from buffer
- //glReadPixels(mScreenRegion.mLeft, mScreenRegion.mBottom, mScreenRegion.getWidth(), mScreenRegion.getHeight(), GL_RGBA, GL_UNSIGNED_BYTE, mPickBuffer);
- //glReadPixels(mScreenRegion.mLeft, mScreenRegion.mBottom, mScreenRegion.getWidth(), mScreenRegion.getHeight(), GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, mPickDepthBuffer );
-
- // find pick region that is fully onscreen
- LLCoordGL scaled_pick_point;;
- scaled_pick_point.mX = llclamp(llround((F32)mMousePt.mX * gViewerWindow->getDisplayScale().mV[VX]), PICK_HALF_WIDTH, gViewerWindow->getWorldViewWidth() - PICK_HALF_WIDTH);
- scaled_pick_point.mY = llclamp(llround((F32)mMousePt.mY * gViewerWindow->getDisplayScale().mV[VY]), PICK_HALF_WIDTH, gViewerWindow->getWorldViewHeight() - PICK_HALF_WIDTH);
- //S32 pixel_index = PICK_HALF_WIDTH * PICK_DIAMETER + PICK_HALF_WIDTH;
- //S32 pick_id = (U32)mPickBuffer[(pixel_index * 4) + 0] << 16 | (U32)mPickBuffer[(pixel_index * 4) + 1] << 8 | (U32)mPickBuffer[(pixel_index * 4) + 2];
- //F32 depth = mPickDepthBuffer[pixel_index];
-
- //S32 x_offset = mMousePt.mX - llround((F32)scaled_pick_point.mX / gViewerWindow->getDisplayScale().mV[VX]);
- //S32 y_offset = mMousePt.mY - llround((F32)scaled_pick_point.mY / gViewerWindow->getDisplayScale().mV[VY]);
-
mPickPt = mMousePt;
- // we hit nothing, scan surrounding pixels for something useful
- /*if (!pick_id)
- {
- S32 closest_distance = 10000;
- //S32 closest_pick_name = 0;
- for (S32 col = 0; col < PICK_DIAMETER; col++)
- {
- for (S32 row = 0; row < PICK_DIAMETER; row++)
- {
- S32 distance_squared = (llabs(col - x_offset - PICK_HALF_WIDTH) * llabs(col - x_offset - PICK_HALF_WIDTH)) + (llabs(row - y_offset - PICK_HALF_WIDTH) * llabs(row - y_offset - PICK_HALF_WIDTH));
- pixel_index = row * PICK_DIAMETER + col;
- S32 test_name = (U32)mPickBuffer[(pixel_index * 4) + 0] << 16 | (U32)mPickBuffer[(pixel_index * 4) + 1] << 8 | (U32)mPickBuffer[(pixel_index * 4) + 2];
- if (test_name && distance_squared < closest_distance)
- {
- closest_distance = distance_squared;
- pick_id = test_name;
- depth = mPickDepthBuffer[pixel_index];
- mPickPt.mX = mMousePt.mX + (col - PICK_HALF_WIDTH);
- mPickPt.mY = mMousePt.mY + (row - PICK_HALF_WIDTH);
- }
- }
- }
- }*/
-
-
U32 te_offset = face_hit > -1 ? face_hit : 0;
- //pick_id &= 0x000fffff;
//unproject relative clicked coordinate from window coordinate using GL
LLViewerObject* objectp = hit_object;
- //if (pick_id == (S32)GL_NAME_PARCEL_WALL)
- //{
- // mPickType = PICK_PARCEL_WALL;
- //}
if (hit_icon &&
(!objectp ||
icon_dist < (LLViewerCamera::getInstance()->getOrigin()-intersection).magVec()))
@@ -5081,20 +5108,6 @@ void LLPickInfo::fetchResults()
mObjectID = objectp->mID;
mObjectFace = (te_offset == NO_FACE) ? -1 : (S32)te_offset;
- /*glh::matrix4f newModel((F32*)LLViewerCamera::getInstance()->getModelview().mMatrix);
-
- for(U32 i = 0; i < 16; ++i)
- {
- modelview[i] = newModel.m[i];
- projection[i] = LLViewerCamera::getInstance()->getProjection().mMatrix[i/4][i%4];
- }
- glGetIntegerv( GL_VIEWPORT, viewport );
-
- winX = ((F32)mPickPt.mX) * gViewerWindow->getDisplayScale().mV[VX];
- winY = ((F32)mPickPt.mY) * gViewerWindow->getDisplayScale().mV[VY];
-
- gluUnProject( winX, winY, depth, modelview, projection, viewport, &posX, &posY, &posZ);*/
-
mPosGlobal = gAgent.getPosGlobalFromAgent(intersection);
if (mWantSurfaceInfo)
@@ -5120,7 +5133,7 @@ void LLPickInfo::updateXYCoords()
if (mObjectFace > -1)
{
const LLTextureEntry* tep = getObject()->getTE(mObjectFace);
- LLPointer<LLViewerImage> imagep = gImageList.getImage(tep->getID());
+ LLPointer<LLViewerTexture> imagep = LLViewerTextureManager::getFetchedTexture(tep->getID());
if(mUVCoords.mV[VX] >= 0.f && mUVCoords.mV[VY] >= 0.f && imagep.notNull())
{
LLCoordGL coords;
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index b729889631..3455ce8ede 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -78,7 +78,6 @@ public:
BOOL pick_transparent,
BOOL pick_surface_info,
void (*pick_callback)(const LLPickInfo& pick_info));
- ~LLPickInfo();
void fetchResults();
LLPointer<LLViewerObject> getObject() const;
@@ -280,7 +279,8 @@ public:
void updateKeyboardFocus();
void updatePicking(S32 x, S32 y, MASK mask);
- void updateWorldViewRect();
+ void updateWorldViewRect(bool use_full_window=false);
+ void updateBottomTrayRect();
BOOL handleKey(KEY key, MASK mask);
void handleScrollWheel (S32 clicks);
@@ -417,7 +417,9 @@ protected:
LLProgressView *mProgressView;
+ LLFrameTimer mToolTipFadeTimer;
LLTextBox* mToolTip;
+ std::string mLastToolTipMessage;
BOOL mToolTipBlocked; // True after a key press or a mouse button event. False once the mouse moves again.
LLRect mToolTipStickyRect; // Once a tool tip is shown, it will stay visible until the mouse leaves this rect.
diff --git a/indra/newview/llvlcomposition.cpp b/indra/newview/llvlcomposition.cpp
index e52fec7909..f26ba6f46e 100644
--- a/indra/newview/llvlcomposition.cpp
+++ b/indra/newview/llvlcomposition.cpp
@@ -39,8 +39,8 @@
#include "v3math.h"
#include "llsurface.h"
#include "lltextureview.h"
-#include "llviewerimage.h"
-#include "llviewerimagelist.h"
+#include "llviewertexture.h"
+#include "llviewertexturelist.h"
#include "llviewerregion.h"
#include "noise.h"
#include "llregionhandle.h" // for from_region_handle
@@ -106,7 +106,7 @@ void LLVLComposition::setDetailTextureID(S32 corner, const LLUUID& id)
{
return;
}
- mDetailTextures[corner] = gImageList.getImage(id);
+ mDetailTextures[corner] = LLViewerTextureManager::getFetchedTexture(id);
mDetailTextures[corner]->setNoDelete() ;
mRawImages[corner] = NULL;
}
@@ -229,7 +229,7 @@ BOOL LLVLComposition::generateComposition()
{
if (mDetailTextures[i]->getDiscardLevel() < 0)
{
- mDetailTextures[i]->setBoostLevel(LLViewerImage::BOOST_TERRAIN); // in case we are at low detail
+ mDetailTextures[i]->setBoostLevel(LLViewerTexture::BOOST_TERRAIN); // in case we are at low detail
mDetailTextures[i]->addTextureStats(BASE_SIZE*BASE_SIZE);
return FALSE;
}
@@ -237,8 +237,8 @@ BOOL LLVLComposition::generateComposition()
(mDetailTextures[i]->getWidth() < BASE_SIZE ||
mDetailTextures[i]->getHeight() < BASE_SIZE)))
{
- S32 width = mDetailTextures[i]->getWidth(0);
- S32 height = mDetailTextures[i]->getHeight(0);
+ S32 width = mDetailTextures[i]->getFullWidth();
+ S32 height = mDetailTextures[i]->getFullHeight();
S32 min_dim = llmin(width, height);
S32 ddiscard = 0;
while (min_dim > BASE_SIZE && ddiscard < MAX_DISCARD_LEVEL)
@@ -246,7 +246,7 @@ BOOL LLVLComposition::generateComposition()
ddiscard++;
min_dim /= 2;
}
- mDetailTextures[i]->setBoostLevel(LLViewerImage::BOOST_TERRAIN); // in case we are at low detail
+ mDetailTextures[i]->setBoostLevel(LLViewerTexture::BOOST_TERRAIN); // in case we are at low detail
mDetailTextures[i]->setMinDiscardLevel(ddiscard);
return FALSE;
}
@@ -280,7 +280,7 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y,
{
// Read back a raw image for this discard level, if it exists
mRawImages[i] = new LLImageRaw;
- S32 min_dim = llmin(mDetailTextures[i]->getWidth(0), mDetailTextures[i]->getHeight(0));
+ S32 min_dim = llmin(mDetailTextures[i]->getFullWidth(), mDetailTextures[i]->getFullHeight());
S32 ddiscard = 0;
while (min_dim > BASE_SIZE && ddiscard < MAX_DISCARD_LEVEL)
{
@@ -336,7 +336,7 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y,
//
//
- LLViewerImage *texturep;
+ LLViewerTexture *texturep;
U32 tex_width, tex_height, tex_comps;
U32 tex_stride;
F32 tex_x_scalef, tex_y_scalef;
@@ -455,7 +455,7 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y,
for (S32 i = 0; i < 4; i++)
{
// Un-boost detatil textures (will get re-boosted if rendering in high detail)
- mDetailTextures[i]->setBoostLevel(LLViewerImage::BOOST_NONE);
+ mDetailTextures[i]->setBoostLevel(LLViewerTexture::BOOST_NONE);
mDetailTextures[i]->setMinDiscardLevel(MAX_DISCARD_LEVEL + 1);
}
@@ -467,7 +467,7 @@ LLUUID LLVLComposition::getDetailTextureID(S32 corner)
return mDetailTextures[corner]->getID();
}
-LLViewerImage* LLVLComposition::getDetailTexture(S32 corner)
+LLViewerFetchedTexture* LLVLComposition::getDetailTexture(S32 corner)
{
return mDetailTextures[corner];
}
diff --git a/indra/newview/llvlcomposition.h b/indra/newview/llvlcomposition.h
index 6d5db3c050..d1b3dc4495 100644
--- a/indra/newview/llvlcomposition.h
+++ b/indra/newview/llvlcomposition.h
@@ -34,7 +34,7 @@
#define LL_LLVLCOMPOSITION_H
#include "llviewerlayer.h"
-#include "llviewerimage.h"
+#include "llviewertexture.h"
class LLSurface;
@@ -62,7 +62,7 @@ public:
CORNER_COUNT = 4
};
LLUUID getDetailTextureID(S32 corner);
- LLViewerImage* getDetailTexture(S32 corner);
+ LLViewerFetchedTexture* getDetailTexture(S32 corner);
F32 getStartHeight(S32 corner);
F32 getHeightRange(S32 corner);
@@ -79,7 +79,7 @@ protected:
LLSurface *mSurfacep;
BOOL mTexturesLoaded;
- LLPointer<LLViewerImage> mDetailTextures[CORNER_COUNT];
+ LLPointer<LLViewerFetchedTexture> mDetailTextures[CORNER_COUNT];
LLPointer<LLImageRaw> mRawImages[CORNER_COUNT];
F32 mStartHeight[CORNER_COUNT];
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index c2b54ec9c6..714145ce14 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -52,7 +52,7 @@
#include "llheadrotmotion.h"
#include "llhudeffecttrail.h"
#include "llhudmanager.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
#include "llkeyframefallmotion.h"
#include "llkeyframestandmotion.h"
#include "llkeyframewalkmotion.h"
@@ -67,7 +67,7 @@
#include "lltexlayer.h"
#include "lltoolmorph.h"
#include "llviewercamera.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewermenu.h"
#include "llviewerobjectlist.h"
#include "llviewerparcelmgr.h"
@@ -170,8 +170,8 @@ const LLColor4 DUMMY_COLOR = LLColor4(0.5,0.5,0.5,1.0);
enum ERenderName
{
RENDER_NAME_NEVER,
- RENDER_NAME_FADE,
- RENDER_NAME_ALWAYS
+ RENDER_NAME_ALWAYS,
+ RENDER_NAME_FADE
};
//-----------------------------------------------------------------------------
@@ -717,8 +717,8 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mRippleTimeLast = 0.f;
- mShadowImagep = gImageList.getImageFromFile("foot_shadow.j2c");
- gGL.getTexUnit(0)->bind(mShadowImagep.get());
+ mShadowImagep = LLViewerTextureManager::getFetchedTextureFromFile("foot_shadow.j2c");
+ gGL.getTexUnit(0)->bind(mShadowImagep);
mShadowImagep->setAddressMode(LLTexUnit::TAM_CLAMP);
mInAir = FALSE;
@@ -2499,7 +2499,7 @@ void LLVOAvatar::idleUpdateLoadingEffect()
particle_parameters.mPartData.mStartColor = LLColor4(1, 1, 1, 0.5f);
particle_parameters.mPartData.mEndColor = LLColor4(1, 1, 1, 0.0f);
particle_parameters.mPartData.mStartScale.mV[VX] = 0.8f;
- LLViewerImage* cloud = gImageList.getImageFromFile("cloud-particle.j2c");
+ LLViewerTexture* cloud = LLViewerTextureManager::getFetchedTextureFromFile("cloud-particle.j2c");
particle_parameters.mPartImageID = cloud->getID();
particle_parameters.mMaxAge = 0.f;
particle_parameters.mPattern = LLPartSysData::LL_PART_SRC_PATTERN_ANGLE_CONE;
@@ -2603,7 +2603,8 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
{
render_name = render_name
&& !gAgent.cameraMouselook()
- && (visible_chat || !gSavedSettings.getBOOL("RenderNameHideSelf"));
+ && (visible_chat || (gSavedSettings.getBOOL("RenderNameShowSelf")
+ && gSavedSettings.getS32("AvatarNameTagMode") ));
}
if ( render_name )
@@ -2660,7 +2661,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
new_name = TRUE;
}
- LLColor4 avatar_name_color = gSavedSkinSettings.getColor( "AvatarNameColor" );
+ LLColor4 avatar_name_color = LLUIColorTable::instance().getColor( "AvatarNameColor" );
avatar_name_color.setAlpha(alpha);
mNameText->setColor(avatar_name_color);
@@ -2802,7 +2803,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
std::deque<LLChat>::iterator chat_iter = mChats.begin();
mNameText->clearString();
- LLColor4 new_chat = gSavedSkinSettings.getColor( "AvatarNameColor" );
+ LLColor4 new_chat = LLUIColorTable::instance().getColor( "AvatarNameColor" );
LLColor4 normal_chat = lerp(new_chat, LLColor4(0.8f, 0.8f, 0.8f, 1.f), 0.7f);
LLColor4 old_chat = lerp(normal_chat, LLColor4(0.6f, 0.6f, 0.6f, 1.f), 0.7f);
if (mTyping && mChats.size() >= MAX_BUBBLE_CHAT_UTTERANCES)
@@ -3869,7 +3870,7 @@ U32 LLVOAvatar::renderFootShadows()
LLGLDepthTest test(GL_TRUE, GL_FALSE);
//render foot shadows
LLGLEnable blend(GL_BLEND);
- gGL.getTexUnit(0)->bind(mShadowImagep.get());
+ gGL.getTexUnit(0)->bind(mShadowImagep);
glColor4fv(mShadow0Facep->getRenderColor().mV);
mShadow0Facep->renderIndexed(foot_mask);
glColor4fv(mShadow1Facep->getRenderColor().mV);
@@ -3945,7 +3946,7 @@ void LLVOAvatar::updateTextures(LLAgent &agent)
{
if (layer_baked[i] && !mBakedTextureDatas[i].mIsLoaded)
{
- gGL.getTexUnit(0)->bind(getImage(mBakedTextureDatas[i].mTextureIndex));
+ gGL.getTexUnit(0)->bind(getImage( mBakedTextureDatas[i].mTextureIndex ));
}
}
}
@@ -3955,7 +3956,7 @@ void LLVOAvatar::updateTextures(LLAgent &agent)
mHasGrey = FALSE; // debug
for (U32 index = 0; index < getNumTEs(); index++)
{
- LLViewerImage *imagep = getImage(index);
+ LLViewerFetchedTexture *imagep = LLViewerTextureManager::staticCastToFetchedTexture(getImage(index), TRUE);
if (imagep)
{
const LLTextureEntry *te = getTE(index);
@@ -4007,15 +4008,15 @@ void LLVOAvatar::updateTextures(LLAgent &agent)
}
-void LLVOAvatar::addLocalTextureStats(ETextureIndex idx, LLViewerImage* imagep,
- F32 texel_area_ratio, BOOL render_avatar, BOOL covered_by_baked, U32 index)
+void LLVOAvatar::addLocalTextureStats( ETextureIndex idx, LLViewerFetchedTexture* imagep,
+ F32 texel_area_ratio, BOOL render_avatar, BOOL covered_by_baked, U32 index )
{
// No local texture stats for non-self avatars
return;
}
-void LLVOAvatar::addBakedTextureStats( LLViewerImage* imagep, F32 pixel_area, F32 texel_area_ratio, S32 boost_level)
+void LLVOAvatar::addBakedTextureStats( LLViewerFetchedTexture* imagep, F32 pixel_area, F32 texel_area_ratio, S32 boost_level)
{
mMaxPixelArea = llmax(pixel_area, mMaxPixelArea);
mMinPixelArea = llmin(pixel_area, mMinPixelArea);
@@ -4024,13 +4025,13 @@ void LLVOAvatar::addBakedTextureStats( LLViewerImage* imagep, F32 pixel_area, F3
}
//virtual
-void LLVOAvatar::setImage(const U8 te, LLViewerImage *imagep)
+void LLVOAvatar::setImage(const U8 te, LLViewerTexture *imagep)
{
setTEImage(te, imagep);
}
//virtual
-LLViewerImage* LLVOAvatar::getImage(const U8 te) const
+LLViewerTexture* LLVOAvatar::getImage(const U8 te) const
{
return getTEImage(te);
}
@@ -5213,7 +5214,7 @@ void LLVOAvatar::updateShadowFaces()
sprite.setSize(0.4f + cos_elev * 0.8f, 0.3f);
LLVector3 sun_vec = gSky.mVOSkyp ? gSky.mVOSkyp->getToSun() : LLVector3(0.f, 0.f, 0.f);
- if (mShadowImagep->getHasGLTexture())
+ if (mShadowImagep->hasValidGLTexture())
{
LLVector3 normal;
LLVector3d shadow_pos;
@@ -5772,10 +5773,10 @@ void LLVOAvatar::updateMeshTextures()
// if user has never specified a texture, assign the default
for (U32 i=0; i < getNumTEs(); i++)
{
- const LLViewerImage* te_image = getImage(i);
+ const LLViewerTexture* te_image = getImage(i);
if(!te_image || te_image->getID().isNull() || (te_image->getID() == IMG_DEFAULT))
{
- setImage(i, gImageList.getImage(i == TEX_HAIR ? IMG_DEFAULT : IMG_DEFAULT_AVATAR)); // IMG_DEFAULT_AVATAR = a special texture that's never rendered.
+ setImage(i, LLViewerTextureManager::getFetchedTexture(i == TEX_HAIR ? IMG_DEFAULT : IMG_DEFAULT_AVATAR)); // IMG_DEFAULT_AVATAR = a special texture that's never rendered.
}
}
@@ -5829,7 +5830,7 @@ void LLVOAvatar::updateMeshTextures()
{
if (use_lkg_baked_layer[i] && !self_customizing )
{
- LLViewerImage* baked_img = gImageList.getImageFromHost( mBakedTextureDatas[i].mLastTextureIndex, target_host );
+ LLViewerFetchedTexture* baked_img = LLViewerTextureManager::getFetchedTextureFromHost( mBakedTextureDatas[i].mLastTextureIndex, target_host );
mBakedTextureDatas[i].mIsUsed = TRUE;
for (U32 k=0; k < mBakedTextureDatas[i].mMeshes.size(); k++)
{
@@ -5838,7 +5839,7 @@ void LLVOAvatar::updateMeshTextures()
}
else if (!self_customizing && is_layer_baked[i])
{
- LLViewerImage* baked_img = getImage( mBakedTextureDatas[i].mTextureIndex );
+ LLViewerFetchedTexture* baked_img = LLViewerTextureManager::staticCastToFetchedTexture(getImage( mBakedTextureDatas[i].mTextureIndex ), TRUE) ;
if( baked_img->getID() == mBakedTextureDatas[i].mLastTextureIndex )
{
// Even though the file may not be finished loading, we'll consider it loaded and use it (rather than doing compositing).
@@ -5873,7 +5874,7 @@ void LLVOAvatar::updateMeshTextures()
if (!is_layer_baked[BAKED_HAIR] || self_customizing)
{
const LLColor4 color = mTexHairColor ? mTexHairColor->getColor() : LLColor4(1,1,1,1);
- LLViewerImage* hair_img = getImage( TEX_HAIR );
+ LLViewerTexture* hair_img = getImage( TEX_HAIR );
for (U32 i = 0; i < mBakedTextureDatas[BAKED_HAIR].mMeshes.size(); i++)
{
mBakedTextureDatas[BAKED_HAIR].mMeshes[i]->setColor( color.mV[VX], color.mV[VY], color.mV[VZ], color.mV[VW] );
@@ -5907,7 +5908,7 @@ void LLVOAvatar::updateMeshTextures()
//-----------------------------------------------------------------------------
// setLocalTexture()
//-----------------------------------------------------------------------------
-void LLVOAvatar::setLocalTexture(ETextureIndex type, LLViewerImage* tex, BOOL baked_version_exists, U32 index)
+void LLVOAvatar::setLocalTexture( ETextureIndex type, LLViewerTexture* in_tex, BOOL baked_version_ready, U32 index )
{
// invalid for anyone but self
llassert(0);
@@ -6153,7 +6154,7 @@ void LLVOAvatar::dumpAvatarTEs( const std::string& context )
iter++)
{
const LLVOAvatarDictionary::TextureEntry *texture_dict = iter->second;
- const LLViewerImage* te_image = getImage(iter->first);
+ const LLViewerTexture* te_image = getImage(iter->first);
if( !te_image )
{
llinfos << " " << texture_dict->mName << ": null ptr" << llendl;
@@ -6319,7 +6320,7 @@ void LLVOAvatar::onFirstTEMessageReceived()
// (That is, don't do a transition from unbaked to baked.)
if (layer_baked)
{
- LLViewerImage* image = getImage( mBakedTextureDatas[i].mTextureIndex );
+ LLViewerFetchedTexture* image = LLViewerTextureManager::staticCastToFetchedTexture(getImage( mBakedTextureDatas[i].mTextureIndex ), TRUE) ;
mBakedTextureDatas[i].mLastTextureIndex = image->getID();
// If we have more than one texture for the other baked layers, we'll want to call this for them too.
if ( (i == BAKED_HEAD) || (i == BAKED_UPPER) || (i == BAKED_LOWER) )
@@ -6381,7 +6382,8 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
&& mBakedTextureDatas[baked_index].mLastTextureIndex != IMG_DEFAULT
&& baked_index != BAKED_SKIRT)
{
- setTEImage(mBakedTextureDatas[baked_index].mTextureIndex, gImageList.getImage(mBakedTextureDatas[baked_index].mLastTextureIndex));
+ setTEImage(mBakedTextureDatas[baked_index].mTextureIndex,
+ LLViewerTextureManager::getFetchedTexture(mBakedTextureDatas[baked_index].mLastTextureIndex, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE));
}
}
@@ -6518,7 +6520,7 @@ void LLVOAvatar::getAnimNames( LLDynamicArray<std::string>* names )
names->put( "enter_away_from_keyboard_state" );
}
-void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerImage *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata )
+void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata )
{
if (!userdata) return;
@@ -6571,7 +6573,7 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerImage *src_vi,
if (texture_dict->mIsUsedByBakedTexture)
{
const ETextureIndex texture_index = iter->first;
- const LLViewerImage *baked_img = self->getImage(texture_index);
+ const LLViewerTexture *baked_img = self->getImage(texture_index);
if (id == baked_img->getID())
{
const EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex;
@@ -6609,7 +6611,7 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerImage *src_vi,
}
// static
-void LLVOAvatar::onInitialBakedTextureLoaded( BOOL success, LLViewerImage *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata )
+void LLVOAvatar::onInitialBakedTextureLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata )
{
LLUUID *avatar_idp = (LLUUID *)userdata;
LLVOAvatar *selfp = (LLVOAvatar *)gObjectList.findObject(*avatar_idp);
@@ -6624,7 +6626,7 @@ void LLVOAvatar::onInitialBakedTextureLoaded( BOOL success, LLViewerImage *src_v
}
}
-void LLVOAvatar::onBakedTextureLoaded(BOOL success, LLViewerImage *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata)
+void LLVOAvatar::onBakedTextureLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata)
{
//llinfos << "onBakedTextureLoaded: " << src_vi->getID() << llendl;
@@ -6659,7 +6661,7 @@ void LLVOAvatar::useBakedTexture( const LLUUID& id )
mHeadMesh1.setTexture( head_baked ); */
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
{
- LLViewerImage* image_baked = getImage( mBakedTextureDatas[i].mTextureIndex );
+ LLViewerTexture* image_baked = getImage( mBakedTextureDatas[i].mTextureIndex );
if (id == image_baked->getID())
{
mBakedTextureDatas[i].mIsLoaded = true;
@@ -6734,7 +6736,7 @@ void LLVOAvatar::dumpArchetypeXML( void* )
{
if (LLVOAvatarDictionary::getTEWearableType((ETextureIndex)te) == type)
{
- LLViewerImage* te_image = avatar->getImage((ETextureIndex)te);
+ LLViewerTexture* te_image = avatar->getImage((ETextureIndex)te);
if( te_image )
{
std::string uuid_str;
@@ -7623,7 +7625,7 @@ U32 calc_shame(LLVOVolume* volume, std::set<LLUUID> &textures)
{
LLFace* face = drawablep->getFace(i);
const LLTextureEntry* te = face->getTextureEntry();
- LLViewerImage* img = face->getTexture();
+ LLViewerTexture* img = face->getTexture();
textures.insert(img->getID());
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index b22c0deb33..f36d64aa8e 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -94,7 +94,7 @@ public:
virtual void markDead();
static void initClass(); // Initialize data that's only init'd once per class.
static void cleanupClass(); // Cleanup data that's only init'd once per class.
- void initInstance(); // Called after construction to initialize the class.
+ virtual void initInstance(); // Called after construction to initialize the class.
protected:
virtual ~LLVOAvatar();
BOOL loadSkeletonNode();
@@ -370,7 +370,7 @@ public:
private:
LLFace* mShadow0Facep;
LLFace* mShadow1Facep;
- LLPointer<LLViewerImage> mShadowImagep;
+ LLPointer<LLViewerTexture> mShadowImagep;
//--------------------------------------------------------------------
// Impostors
@@ -432,8 +432,8 @@ private:
// Constants
//--------------------------------------------------------------------
public:
- virtual LLViewerImage::EBoostLevel getAvatarBoostLevel() const { return LLViewerImage::BOOST_AVATAR; }
- virtual LLViewerImage::EBoostLevel getAvatarBakedBoostLevel() const { return LLViewerImage::BOOST_AVATAR_BAKED; }
+ virtual LLViewerTexture::EBoostLevel getAvatarBoostLevel() const { return LLViewerTexture::BOOST_AVATAR; }
+ virtual LLViewerTexture::EBoostLevel getAvatarBakedBoostLevel() const { return LLViewerTexture::BOOST_AVATAR_BAKED; }
virtual S32 getTexImageSize() const;
virtual S32 getTexImageArea() const { return getTexImageSize()*getTexImageSize(); }
@@ -450,7 +450,7 @@ public:
// Loading status
//--------------------------------------------------------------------
public:
- virtual BOOL isTextureDefined(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const;
+ virtual BOOL isTextureDefined(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const;
BOOL isTextureVisible(LLVOAvatarDefines::ETextureIndex index) const;
protected:
BOOL isFullyBaked();
@@ -462,9 +462,9 @@ protected:
public:
void releaseComponentTextures(); // ! BACKWARDS COMPATIBILITY !
protected:
- static void onBakedTextureMasksLoaded(BOOL success, LLViewerImage *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
- static void onInitialBakedTextureLoaded(BOOL success, LLViewerImage *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
- static void onBakedTextureLoaded(BOOL success, LLViewerImage *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
+ static void onBakedTextureMasksLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
+ static void onInitialBakedTextureLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
+ static void onBakedTextureLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
virtual void removeMissingBakedTextures();
void useBakedTexture(const LLUUID& id);
@@ -489,15 +489,15 @@ protected:
// Local Textures
//--------------------------------------------------------------------
protected:
- virtual void setLocalTexture(LLVOAvatarDefines::ETextureIndex type, LLViewerImage* tex, BOOL baked_version_exits, U32 index = 0);
- virtual void addLocalTextureStats(LLVOAvatarDefines::ETextureIndex type, LLViewerImage* imagep, F32 texel_area_ratio, BOOL rendered, BOOL covered_by_baked, U32 index = 0);
+ virtual void setLocalTexture(LLVOAvatarDefines::ETextureIndex type, LLViewerTexture* tex, BOOL baked_version_exits, U32 index = 0);
+ virtual void addLocalTextureStats(LLVOAvatarDefines::ETextureIndex type, LLViewerFetchedTexture* imagep, F32 texel_area_ratio, BOOL rendered, BOOL covered_by_baked, U32 index = 0);
//--------------------------------------------------------------------
// Texture accessors
//--------------------------------------------------------------------
private:
- virtual void setImage(const U8 te, LLViewerImage *imagep);
- virtual LLViewerImage* getImage(const U8 te) const;
+ virtual void setImage(const U8 te, LLViewerTexture *imagep);
+ virtual LLViewerTexture* getImage(const U8 te) const;
virtual const LLTextureEntry* getTexEntry(const U8 te_num) const;
virtual void setTexEntry(const U8 index, const LLTextureEntry &te);
@@ -508,7 +508,7 @@ private:
//--------------------------------------------------------------------
protected:
void deleteLayerSetCaches(bool clearAll = true);
- void addBakedTextureStats(LLViewerImage* imagep, F32 pixel_area, F32 texel_area_ratio, S32 boost_level);
+ void addBakedTextureStats(LLViewerFetchedTexture* imagep, F32 pixel_area, F32 texel_area_ratio, S32 boost_level);
//--------------------------------------------------------------------
// Composites
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index e7d7d74f62..4a6bb6facb 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -54,7 +54,7 @@
#include "llheadrotmotion.h"
#include "llhudeffecttrail.h"
#include "llhudmanager.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
#include "llkeyframefallmotion.h"
#include "llkeyframestandmotion.h"
#include "llkeyframewalkmotion.h"
@@ -69,7 +69,7 @@
#include "lltoolmorph.h"
#include "lltrans.h"
#include "llviewercamera.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewermenu.h"
#include "llviewerobjectlist.h"
#include "llviewerparcelmgr.h"
@@ -103,7 +103,7 @@ struct LocalTextureData
mWearableID(IMG_DEFAULT_AVATAR),
mTexEntry(NULL)
{}
- LLPointer<LLViewerImage> mImage;
+ LLPointer<LLViewerFetchedTexture> mImage;
BOOL mIsBakedReady;
S32 mDiscard;
LLUUID mWearableID; // UUID of the wearable that this texture belongs to, not of the image itself
@@ -156,14 +156,17 @@ LLVOAvatarSelf::LLVOAvatarSelf(const LLUUID& id,
gAgentWearables.setAvatarObject(this);
lldebugs << "Marking avatar as self " << id << llendl;
-
- for (U32 i = 0; i < TEX_NUM_INDICES; i++)
- {
- mLocalTextureDatas[(ETextureIndex)i].push_back(new LocalTextureData);
- }
+}
+void LLVOAvatarSelf::initInstance()
+{
BOOL status = TRUE;
+ // creates hud joint(mScreen) among other things
status &= loadAvatarSelf();
+
+ // adds attachment points to mScreen among other things
+ LLVOAvatar::initInstance();
+
status &= buildMenus();
if (!status)
{
@@ -528,19 +531,6 @@ LLVOAvatarSelf::~LLVOAvatarSelf()
gAgentWearables.setAvatarObject(NULL);
delete mScreenp;
mScreenp = NULL;
-
- for (localtexture_map_t::iterator iter = mLocalTextureDatas.begin();
- iter != mLocalTextureDatas.end();
- iter++)
- {
- localtexture_vec_t &local_textures = iter->second;
- for (U32 i = 0; i < local_textures.size(); i++)
- {
- LocalTextureData* loc_tex_data = local_textures[i];
- delete loc_tex_data;
- local_textures[i] = NULL;
- }
- }
}
/**
@@ -667,7 +657,7 @@ void LLVOAvatarSelf::stopMotionFromSource(const LLUUID& source_id)
}
// virtual
-void LLVOAvatarSelf::setLocalTextureTE(U8 te, LLViewerImage* image, BOOL set_by_user, U32 index)
+void LLVOAvatarSelf::setLocalTextureTE(U8 te, LLViewerTexture* image, BOOL set_by_user, U32 index)
{
if (te >= TEX_NUM_INDICES)
{
@@ -708,9 +698,10 @@ void LLVOAvatarSelf::removeMissingBakedTextures()
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
{
const S32 te = mBakedTextureDatas[i].mTextureIndex;
- if (getTEImage(te)->isMissingAsset())
+ LLViewerTexture* tex = getTEImage(te) ;
+ if (!tex || tex->isMissingAsset())
{
- setTEImage(te, gImageList.getImage(IMG_DEFAULT_AVATAR));
+ setTEImage(te, LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT_AVATAR));
removed = TRUE;
}
}
@@ -999,24 +990,30 @@ LLViewerJointAttachment *LLVOAvatarSelf::attachObject(LLViewerObject *viewer_obj
return attachment;
}
+U32 LLVOAvatarSelf::getNumWearables(LLVOAvatarDefines::ETextureIndex i) const
+{
+ EWearableType type = LLVOAvatarDictionary::getInstance()->getTEWearableType(i);
+ return gAgentWearables.getWearableCount(type);
+}
+
// virtual
-void LLVOAvatarSelf::localTextureLoaded(BOOL success, LLViewerImage *src_vi, LLImageRaw* src_raw, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata)
+void LLVOAvatarSelf::localTextureLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src_raw, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata)
{
//llinfos << "onLocalTextureLoaded: " << src_vi->getID() << llendl;
const LLUUID& src_id = src_vi->getID();
LLAvatarTexData *data = (LLAvatarTexData *)userdata;
+ ETextureIndex index = data->mIndex;
+ if (!isIndexLocalTexture(index)) return;
+ LLLocalTextureObject *local_tex_obj = getLocalTextureObject(index, 0);
if (success)
{
- ETextureIndex index = data->mIndex;
- if (!isIndexLocalTexture(index)) return;
- LocalTextureData *local_tex_data = getLocalTextureData(index,0);
- if (!local_tex_data->mIsBakedReady &&
- local_tex_data->mImage.notNull() &&
- (local_tex_data->mImage->getID() == src_id) &&
- discard_level < local_tex_data->mDiscard)
+ if (!local_tex_obj->getBakedReady() &&
+ local_tex_obj->getImage() != NULL &&
+ (local_tex_obj->getID() == src_id) &&
+ discard_level < local_tex_obj->getDiscard())
{
- local_tex_data->mDiscard = discard_level;
+ local_tex_obj->setDiscard(discard_level);
if (!gAgent.cameraCustomizeAvatar())
{
requestLayerSetUpdate(index);
@@ -1030,15 +1027,12 @@ void LLVOAvatarSelf::localTextureLoaded(BOOL success, LLViewerImage *src_vi, LLI
}
else if (final)
{
- ETextureIndex index = data->mIndex;
- if (!isIndexLocalTexture(index)) return;
- LocalTextureData *local_tex_data = getLocalTextureData(index,0);
// Failed: asset is missing
- if (!local_tex_data->mIsBakedReady &&
- local_tex_data->mImage.notNull() &&
- local_tex_data->mImage->getID() == src_id)
+ if (!local_tex_obj->getBakedReady() &&
+ local_tex_obj->getImage() != NULL &&
+ local_tex_obj->getImage()->getID() == src_id)
{
- local_tex_data->mDiscard = 0;
+ local_tex_obj->setDiscard(0);
requestLayerSetUpdate(index);
updateMeshTextures();
}
@@ -1066,19 +1060,19 @@ BOOL LLVOAvatarSelf::getLocalTextureRaw(ETextureIndex index, LLImageRaw* image_r
*/
// virtual
-BOOL LLVOAvatarSelf::getLocalTextureGL(ETextureIndex type, LLImageGL** image_gl_pp, U32 index) const
+BOOL LLVOAvatarSelf::getLocalTextureGL(ETextureIndex type, LLViewerTexture** tex_pp, U32 index) const
{
- *image_gl_pp = NULL;
+ *tex_pp = NULL;
if (!isIndexLocalTexture(type)) return FALSE;
if (getLocalTextureID(type, index) == IMG_DEFAULT_AVATAR) return TRUE;
- const LocalTextureData *local_tex_data = getLocalTextureData(type, index);
- if (!local_tex_data)
+ const LLLocalTextureObject *local_tex_obj = getLocalTextureObject(type, index);
+ if (!local_tex_obj)
{
return FALSE;
}
- *image_gl_pp = local_tex_data->mImage;
+ *tex_pp = local_tex_obj->getImage();
return TRUE;
}
@@ -1086,10 +1080,10 @@ const LLUUID& LLVOAvatarSelf::getLocalTextureID(ETextureIndex type, U32 index) c
{
if (!isIndexLocalTexture(type)) return IMG_DEFAULT_AVATAR;
- const LocalTextureData *local_tex_data = getLocalTextureData(type,index);
- if (local_tex_data && local_tex_data->mImage.notNull())
+ const LLLocalTextureObject *local_tex_obj = getLocalTextureObject(type, index);
+ if (local_tex_obj && local_tex_obj->getImage() != NULL)
{
- return local_tex_data->mImage->getID();
+ return local_tex_obj->getImage()->getID();
}
return IMG_DEFAULT_AVATAR;
}
@@ -1222,7 +1216,7 @@ void LLVOAvatarSelf::invalidateComposite( LLTexLayerSet* layerset, BOOL set_by_u
llassert(isSelf());
ETextureIndex baked_te = getBakedTE( layerset );
- setTEImage( baked_te, gImageList.getImage(IMG_DEFAULT_AVATAR) );
+ setTEImage( baked_te, LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT_AVATAR) );
layerset->requestUpload();
}
}
@@ -1279,14 +1273,14 @@ S32 LLVOAvatarSelf::getLocalDiscardLevel(ETextureIndex type, U32 index) const
{
if (!isIndexLocalTexture(type)) return FALSE;
- const LocalTextureData *local_tex_data = getLocalTextureData(type,index);
- if (local_tex_data)
+ const LLLocalTextureObject *local_tex_obj = getLocalTextureObject(type, index);
+ if (local_tex_obj)
{
if (type >= 0
&& getLocalTextureID(type,index) != IMG_DEFAULT_AVATAR
- && !local_tex_data->mImage->isMissingAsset())
+ && !local_tex_obj->getImage()->isMissingAsset())
{
- return local_tex_data->mImage->getDiscardLevel();
+ return local_tex_obj->getImage()->getDiscardLevel();
}
else
{
@@ -1305,18 +1299,18 @@ void LLVOAvatarSelf::getLocalTextureByteCount(S32* gl_bytes) const
for (S32 type = 0; type < TEX_NUM_INDICES; type++)
{
if (!isIndexLocalTexture((ETextureIndex)type)) continue;
- const localtexture_vec_t & local_tex_vec = getLocalTextureData((ETextureIndex)type);
- for (U32 num = 0; num < local_tex_vec.size(); num++)
+ U32 max_tex = getNumWearables((ETextureIndex) type);
+ for (U32 num = 0; num < max_tex; num++)
{
- const LocalTextureData *local_tex_data = local_tex_vec[num];
- if (local_tex_data)
+ const LLLocalTextureObject *local_tex_obj = getLocalTextureObject((ETextureIndex) type, num);
+ if (local_tex_obj)
{
- const LLViewerImage* image_gl = local_tex_data->mImage;
+ const LLViewerFetchedTexture* image_gl = local_tex_obj->getImage();
if (image_gl)
{
S32 bytes = (S32)image_gl->getWidth() * image_gl->getHeight() * image_gl->getComponents();
- if (image_gl->getHasGLTexture())
+ if (image_gl->hasValidGLTexture())
{
*gl_bytes += bytes;
}
@@ -1327,26 +1321,53 @@ void LLVOAvatarSelf::getLocalTextureByteCount(S32* gl_bytes) const
}
// virtual
-void LLVOAvatarSelf::setLocalTexture(ETextureIndex type, LLViewerImage* tex, BOOL baked_version_ready, U32 index)
+void LLVOAvatarSelf::setLocalTexture(ETextureIndex type, LLViewerTexture* src_tex, BOOL baked_version_ready, U32 index)
{
if (!isIndexLocalTexture(type)) return;
+ LLViewerFetchedTexture* tex = LLViewerTextureManager::staticCastToFetchedTexture(src_tex, TRUE) ;
+ if(!tex)
+ {
+ return ;
+ }
+
S32 desired_discard = isSelf() ? 0 : 2;
- LocalTextureData *local_tex_data = getLocalTextureData(type,index);
+ LLLocalTextureObject *local_tex_obj = getLocalTextureObject(type,index);
+ if (!local_tex_obj)
+ {
+ if (type >= TEX_NUM_INDICES)
+ {
+ llerrs << "Tried to set local texture with invalid type: (" << (U32) type << ", " << index << ")" << llendl;
+ return;
+ }
+ EWearableType wearable_type = LLVOAvatarDictionary::getInstance()->getTEWearableType(type);
+ if (!gAgentWearables.getWearable(wearable_type,0))
+ {
+ // no wearable is loaded, cannot set the texture.
+ return;
+ }
+ gAgentWearables.addLocalTextureObject(wearable_type,type,index);
+ local_tex_obj = getLocalTextureObject(type,index);
+ if (!local_tex_obj)
+ {
+ llerrs << "Unable to create LocalTextureObject for wearable type & index: (" << (U32) wearable_type << ", " << index << ")" << llendl;
+ return;
+ }
+ }
if (!baked_version_ready)
{
- if (tex != local_tex_data->mImage || local_tex_data->mIsBakedReady)
+ if (tex != local_tex_obj->getImage() || local_tex_obj->getBakedReady())
{
- local_tex_data->mDiscard = MAX_DISCARD_LEVEL+1;
+ local_tex_obj->setDiscard(MAX_DISCARD_LEVEL+1);
}
if (tex->getID() != IMG_DEFAULT_AVATAR)
{
- if (local_tex_data->mDiscard > desired_discard)
+ if (local_tex_obj->getDiscard() > desired_discard)
{
S32 tex_discard = tex->getDiscardLevel();
if (tex_discard >= 0 && tex_discard <= desired_discard)
{
- local_tex_data->mDiscard = tex_discard;
+ local_tex_obj->setDiscard(tex_discard);
if (isSelf() && !gAgent.cameraCustomizeAvatar())
{
requestLayerSetUpdate(type);
@@ -1364,8 +1385,8 @@ void LLVOAvatarSelf::setLocalTexture(ETextureIndex type, LLViewerImage* tex, BOO
tex->setMinDiscardLevel(desired_discard);
}
}
- local_tex_data->mIsBakedReady = baked_version_ready;
- local_tex_data->mImage = tex;
+ local_tex_obj->setBakedReady( baked_version_ready );
+ local_tex_obj->setImage(tex);
}
// virtual
@@ -1388,7 +1409,7 @@ void LLVOAvatarSelf::dumpLocalTextures() const
const ETextureIndex baked_equiv = LLVOAvatarDictionary::getInstance()->getBakedTexture(baked_index)->mTextureIndex;
const std::string &name = texture_dict->mName;
- const LocalTextureData *local_tex_data = getLocalTextureData(iter->first,0);
+ const LLLocalTextureObject *local_tex_obj = getLocalTextureObject(iter->first, 0);
if (isTextureDefined(baked_equiv))
{
#if LL_RELEASE_FOR_DOWNLOAD
@@ -1399,15 +1420,15 @@ void LLVOAvatarSelf::dumpLocalTextures() const
llinfos << "LocTex " << name << ": Baked " << getTEImage(baked_equiv)->getID() << llendl;
#endif
}
- else if (local_tex_data->mImage.notNull())
+ else if (local_tex_obj->getImage() != NULL)
{
- if (local_tex_data->mImage->getID() == IMG_DEFAULT_AVATAR)
+ if (local_tex_obj->getImage()->getID() == IMG_DEFAULT_AVATAR)
{
llinfos << "LocTex " << name << ": None" << llendl;
}
else
{
- const LLViewerImage* image = local_tex_data->mImage;
+ const LLViewerFetchedTexture* image = local_tex_obj->getImage();
llinfos << "LocTex " << name << ": "
<< "Discard " << image->getDiscardLevel() << ", "
@@ -1423,7 +1444,7 @@ void LLVOAvatarSelf::dumpLocalTextures() const
}
else
{
- llinfos << "LocTex " << name << ": No LLViewerImage" << llendl;
+ llinfos << "LocTex " << name << ": No LLViewerTexture" << llendl;
}
}
}
@@ -1433,7 +1454,7 @@ void LLVOAvatarSelf::dumpLocalTextures() const
// onLocalTextureLoaded()
//-----------------------------------------------------------------------------
-void LLVOAvatarSelf::onLocalTextureLoaded(BOOL success, LLViewerImage *src_vi, LLImageRaw* src_raw, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata)
+void LLVOAvatarSelf::onLocalTextureLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src_raw, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata)
{
LLAvatarTexData *data = (LLAvatarTexData *)userdata;
LLVOAvatarSelf *self = (LLVOAvatarSelf *)gObjectList.findObject(data->mAvatarID);
@@ -1449,57 +1470,6 @@ void LLVOAvatarSelf::onLocalTextureLoaded(BOOL success, LLViewerImage *src_vi, L
}
}
-
-const LLVOAvatarSelf::localtexture_vec_t &LLVOAvatarSelf::getLocalTextureData(LLVOAvatarDefines::ETextureIndex type) const
-{
- localtexture_map_t::const_iterator found_localtexture = mLocalTextureDatas.find(type);
- if (found_localtexture != mLocalTextureDatas.end())
- {
- const localtexture_vec_t &local_tex_data = found_localtexture->second;
- return local_tex_data;
- }
- llassert(0);
- static localtexture_vec_t ret;
- return ret;
-}
-
-const LocalTextureData* LLVOAvatarSelf::getLocalTextureData(LLVOAvatarDefines::ETextureIndex type, U32 index ) const
-{
- const localtexture_vec_t &local_tex_array = getLocalTextureData(type);
-
- if (index >= local_tex_array.size())
- {
- return NULL;
- }
-
- return local_tex_array[index];
-}
-
-LLVOAvatarSelf::localtexture_vec_t &LLVOAvatarSelf::getLocalTextureData(LLVOAvatarDefines::ETextureIndex type)
-{
- localtexture_map_t::iterator found_localtexture = mLocalTextureDatas.find(type);
- if (found_localtexture != mLocalTextureDatas.end())
- {
- localtexture_vec_t &local_tex_data = found_localtexture->second;
- return local_tex_data;
- }
- llassert(0);
- static localtexture_vec_t ret;
- return ret;
-}
-
-LocalTextureData* LLVOAvatarSelf::getLocalTextureData(LLVOAvatarDefines::ETextureIndex type, U32 index )
-{
- localtexture_vec_t &local_tex_array = getLocalTextureData(type);
-
- if (index >= local_tex_array.size())
- {
- return NULL;
- }
-
- return local_tex_array[index];
-}
-
// static
void LLVOAvatarSelf::dumpTotalLocalTextureByteCount()
{
@@ -1547,8 +1517,8 @@ BOOL LLVOAvatarSelf::updateIsFullyLoaded()
continue;
// Check for the case that texture is defined but not sufficiently loaded to display anything.
- LLViewerImage* baked_img = getImage( texture_data.mTextureIndex );
- if (!baked_img || !baked_img->getHasGLTexture())
+ LLViewerTexture* baked_img = getImage( texture_data.mTextureIndex );
+ if (!baked_img || !baked_img->hasValidGLTexture())
{
loading = TRUE;
}
@@ -1638,7 +1608,7 @@ BOOL LLVOAvatarSelf::canGrabLocalTexture(ETextureIndex type, U32 index) const
return TRUE;
}
-void LLVOAvatarSelf::addLocalTextureStats( ETextureIndex type, LLViewerImage* imagep,
+void LLVOAvatarSelf::addLocalTextureStats( ETextureIndex type, LLViewerFetchedTexture* imagep,
F32 texel_area_ratio, BOOL render_avatar, BOOL covered_by_baked, U32 index )
{
if (!isIndexLocalTexture(type)) return;
@@ -1664,6 +1634,18 @@ void LLVOAvatarSelf::addLocalTextureStats( ETextureIndex type, LLViewerImage* im
}
}
+LLLocalTextureObject* LLVOAvatarSelf::getLocalTextureObject(LLVOAvatarDefines::ETextureIndex i, U32 wearable_index) const
+{
+ EWearableType type = LLVOAvatarDictionary::getInstance()->getTEWearableType(i);
+ LLWearable* wearable = gAgentWearables.getWearable(type, wearable_index);
+ if (wearable)
+ {
+ return wearable->getLocalTextureObject(i);
+ }
+
+ return NULL;
+}
+
//-----------------------------------------------------------------------------
// getBakedTE()
// Used by the LayerSet. (Layer sets don't in general know what textures depend on them.)
@@ -1690,7 +1672,7 @@ void LLVOAvatarSelf::setNewBakedTexture( ETextureIndex te, const LLUUID& uuid )
{
// Baked textures live on other sims.
LLHost target_host = getObjectHost();
- setTEImage( te, gImageList.getImageFromHost( uuid, target_host ) );
+ setTEImage( te, LLViewerTextureManager::getFetchedTextureFromHost( uuid, target_host ) );
updateMeshTextures();
dirtyMesh();
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index 02a77cba90..e34f09aca2 100644
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -34,6 +34,7 @@
#ifndef LL_LLVOAVATARSELF_H
#define LL_LLVOAVATARSELF_H
+#include "llviewertexture.h"
#include "llvoavatar.h"
struct LocalTextureData;
@@ -54,6 +55,7 @@ public:
LLVOAvatarSelf(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
virtual ~LLVOAvatarSelf();
virtual void markDead();
+ virtual void initInstance(); // Called after construction to initialize the class.
protected:
BOOL loadAvatarSelf();
BOOL buildSkeletonSelf(const LLVOAvatarSkeletonInfo *info);
@@ -140,8 +142,8 @@ private:
// LLVOAvatar Constants
//--------------------------------------------------------------------
public:
- /*virtual*/ LLViewerImage::EBoostLevel getAvatarBoostLevel() const { return LLViewerImage::BOOST_AVATAR_SELF; }
- /*virtual*/ LLViewerImage::EBoostLevel getAvatarBakedBoostLevel() const { return LLViewerImage::BOOST_AVATAR_BAKED_SELF; }
+ /*virtual*/ LLViewerTexture::EBoostLevel getAvatarBoostLevel() const { return LLViewerTexture::BOOST_AVATAR_SELF; }
+ /*virtual*/ LLViewerTexture::EBoostLevel getAvatarBakedBoostLevel() const { return LLViewerTexture::BOOST_AVATAR_BAKED_SELF; }
/*virtual*/ S32 getTexImageSize() const { return LLVOAvatar::getTexImageSize()*4; }
/** Rendering
@@ -168,18 +170,20 @@ public:
// Local Textures
//--------------------------------------------------------------------
public:
- BOOL getLocalTextureGL(LLVOAvatarDefines::ETextureIndex type, LLImageGL** image_gl_pp, U32 index = 0) const;
+ BOOL getLocalTextureGL(LLVOAvatarDefines::ETextureIndex type, LLViewerTexture** image_gl_pp, U32 index = 0) const;
const LLUUID& getLocalTextureID(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const;
- void setLocalTextureTE(U8 te, LLViewerImage* image, BOOL set_by_user, U32 index = 0);
+ void setLocalTextureTE(U8 te, LLViewerTexture* image, BOOL set_by_user, U32 index = 0);
const LLUUID& grabLocalTexture(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const;
BOOL canGrabLocalTexture(LLVOAvatarDefines::ETextureIndex type, U32 index = 0) const;
protected:
- /*virtual*/ void setLocalTexture(LLVOAvatarDefines::ETextureIndex type, LLViewerImage* tex, BOOL baked_version_exits, U32 index = 0);
- void localTextureLoaded(BOOL succcess, LLViewerImage *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
+ /*virtual*/ void setLocalTexture(LLVOAvatarDefines::ETextureIndex type, LLViewerTexture* tex, BOOL baked_version_exits, U32 index = 0);
+ void localTextureLoaded(BOOL succcess, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
void getLocalTextureByteCount(S32* gl_byte_count) const;
- /*virtual*/ void addLocalTextureStats(LLVOAvatarDefines::ETextureIndex i, LLViewerImage* imagep, F32 texel_area_ratio, BOOL rendered, BOOL covered_by_baked, U32 index = 0);
+ /*virtual*/ void addLocalTextureStats(LLVOAvatarDefines::ETextureIndex i, LLViewerFetchedTexture* imagep, F32 texel_area_ratio, BOOL rendered, BOOL covered_by_baked, U32 index = 0);
+ LLLocalTextureObject* getLocalTextureObject(LLVOAvatarDefines::ETextureIndex i, U32 index = 0) const;
+
private:
- static void onLocalTextureLoaded(BOOL succcess, LLViewerImage *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
+ static void onLocalTextureLoaded(BOOL succcess, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
//--------------------------------------------------------------------
// Baked textures
@@ -225,20 +229,6 @@ private:
static LLMap< LLGLenum, LLGLuint*> sScratchTexNames;
static LLMap< LLGLenum, F32*> sScratchTexLastBindTime;
- //--------------------------------------------------------------------
- // Texture Data
- //--------------------------------------------------------------------
-private:
- typedef std::vector<LocalTextureData*> localtexture_vec_t; // all textures of a certain TE
- typedef std::map<LLVOAvatarDefines::ETextureIndex, localtexture_vec_t> localtexture_map_t; // texture TE vectors arranged by texture type
- localtexture_map_t mLocalTextureDatas;
-
- const localtexture_vec_t& getLocalTextureData(LLVOAvatarDefines::ETextureIndex index) const; // const accessor into mLocalTextureDatas
- const LocalTextureData* getLocalTextureData(LLVOAvatarDefines::ETextureIndex type, U32 index) const; // const accessor to individual LocalTextureData
-
- localtexture_vec_t& getLocalTextureData(LLVOAvatarDefines::ETextureIndex index); // accessor into mLocalTextureDatas
- LocalTextureData* getLocalTextureData(LLVOAvatarDefines::ETextureIndex type, U32 index); // accessor to individual LocalTextureData
-
/** Textures
** **
*******************************************************************************/
@@ -276,6 +266,8 @@ public:
// HUDs
//--------------------------------------------------------------------
private:
+ U32 getNumWearables(LLVOAvatarDefines::ETextureIndex i) const;
+
LLViewerJoint* mScreenp; // special purpose joint for HUD attachments
/** Attachments
diff --git a/indra/newview/llvoclouds.cpp b/indra/newview/llvoclouds.cpp
index 9095ee43c8..fbc4e2e609 100644
--- a/indra/newview/llvoclouds.cpp
+++ b/indra/newview/llvoclouds.cpp
@@ -44,7 +44,7 @@
#include "llprimitive.h"
#include "llsky.h"
#include "llviewercamera.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerobjectlist.h"
#include "llviewerregion.h"
#include "llvosky.h"
@@ -61,8 +61,8 @@ LLVOClouds::LLVOClouds(const LLUUID &id, const LLPCode pcode, LLViewerRegion *re
mCloudGroupp = NULL;
mbCanSelect = FALSE;
setNumTEs(1);
- LLViewerImage* image = gImageList.getImage(gCloudTextureID);
- image->setBoostLevel(LLViewerImage::BOOST_CLOUDS);
+ LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(gCloudTextureID);
+ image->setBoostLevel(LLViewerTexture::BOOST_CLOUDS);
setTEImage(0, image);
}
diff --git a/indra/newview/llvoclouds.h b/indra/newview/llvoclouds.h
index f70ea5b9e7..95e6b96e4e 100644
--- a/indra/newview/llvoclouds.h
+++ b/indra/newview/llvoclouds.h
@@ -37,7 +37,7 @@
#include "lltable.h"
#include "v4coloru.h"
-class LLViewerImage;
+class LLViewerTexture;
class LLViewerCloudGroup;
class LLCloudGroup;
diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp
index a956ec8ab3..cf6eb8e9fd 100644
--- a/indra/newview/llvograss.cpp
+++ b/indra/newview/llvograss.cpp
@@ -46,7 +46,7 @@
#include "llsurfacepatch.h"
#include "llvosky.h"
#include "llviewercamera.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerregion.h"
#include "pipeline.h"
#include "llspatialpartition.h"
@@ -106,7 +106,7 @@ void LLVOGrass::updateSpecies()
SpeciesMap::const_iterator it = sSpeciesTable.begin();
mSpecies = (*it).first;
}
- setTEImage(0, gImageList.getImage(sSpeciesTable[mSpecies]->mTextureID));
+ setTEImage(0, LLViewerTextureManager::getFetchedTexture(sSpeciesTable[mSpecies]->mTextureID, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE));
}
diff --git a/indra/newview/llvograss.h b/indra/newview/llvograss.h
index 11b79d519c..124400d356 100644
--- a/indra/newview/llvograss.h
+++ b/indra/newview/llvograss.h
@@ -38,7 +38,7 @@
#include <map>
class LLSurfacePatch;
-class LLViewerImage;
+class LLViewerTexture;
class LLVOGrass : public LLAlphaObject
diff --git a/indra/newview/llvoground.h b/indra/newview/llvoground.h
index f485bd0aa4..af3fcd65d4 100644
--- a/indra/newview/llvoground.h
+++ b/indra/newview/llvoground.h
@@ -36,7 +36,7 @@
#include "stdtypes.h"
#include "v3color.h"
#include "v4coloru.h"
-#include "llviewerimage.h"
+#include "llviewertexture.h"
#include "llviewerobject.h"
class LLVOGround : public LLStaticViewerObject
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index 082dcb50a2..f1d4520370 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -67,6 +67,9 @@
#include "llfloaterfriends.h" //VIVOX, inorder to refresh communicate panel
#include "llfloaterchat.h" // for LLFloaterChat::addChat()
+// for Talk Button's state updating
+#include "llnearbychatbar.h"
+
// for base64 decoding
#include "apr_base64.h"
@@ -4551,7 +4554,7 @@ void LLVoiceClient::messageEvent(
if(messageHeader.find("text/html") != std::string::npos)
{
- std::string rawMessage;
+ std::string message;
{
const std::string startMarker = "<body";
@@ -4563,7 +4566,7 @@ void LLVoiceClient::messageEvent(
std::string::size_type end;
// Default to displaying the raw string, so the message gets through.
- rawMessage = messageBody;
+ message = messageBody;
// Find the actual message text within the XML fragment
start = messageBody.find(startMarker);
@@ -4577,7 +4580,7 @@ void LLVoiceClient::messageEvent(
if(end != std::string::npos)
end -= start;
- rawMessage.assign(messageBody, start, end);
+ message.assign(messageBody, start, end);
}
else
{
@@ -4593,24 +4596,24 @@ void LLVoiceClient::messageEvent(
if(end != std::string::npos)
end -= start;
- rawMessage.assign(messageBody, start, end);
+ message.assign(messageBody, start, end);
}
}
}
-// LL_DEBUGS("Voice") << " raw message = \n" << rawMessage << LL_ENDL;
+// LL_DEBUGS("Voice") << " raw message = \n" << message << LL_ENDL;
// strip formatting tags
{
std::string::size_type start;
std::string::size_type end;
- while((start = rawMessage.find('<')) != std::string::npos)
+ while((start = message.find('<')) != std::string::npos)
{
- if((end = rawMessage.find('>', start + 1)) != std::string::npos)
+ if((end = message.find('>', start + 1)) != std::string::npos)
{
// Strip out the tag
- rawMessage.erase(start, (end + 1) - start);
+ message.erase(start, (end + 1) - start);
}
else
{
@@ -4626,31 +4629,31 @@ void LLVoiceClient::messageEvent(
// The text may contain text encoded with &lt;, &gt;, and &amp;
mark = 0;
- while((mark = rawMessage.find("&lt;", mark)) != std::string::npos)
+ while((mark = message.find("&lt;", mark)) != std::string::npos)
{
- rawMessage.replace(mark, 4, "<");
+ message.replace(mark, 4, "<");
mark += 1;
}
mark = 0;
- while((mark = rawMessage.find("&gt;", mark)) != std::string::npos)
+ while((mark = message.find("&gt;", mark)) != std::string::npos)
{
- rawMessage.replace(mark, 4, ">");
+ message.replace(mark, 4, ">");
mark += 1;
}
mark = 0;
- while((mark = rawMessage.find("&amp;", mark)) != std::string::npos)
+ while((mark = message.find("&amp;", mark)) != std::string::npos)
{
- rawMessage.replace(mark, 5, "&");
+ message.replace(mark, 5, "&");
mark += 1;
}
}
// strip leading/trailing whitespace (since we always seem to get a couple newlines)
- LLStringUtil::trim(rawMessage);
+ LLStringUtil::trim(message);
-// LL_DEBUGS("Voice") << " stripped message = \n" << rawMessage << LL_ENDL;
+// LL_DEBUGS("Voice") << " stripped message = \n" << message << LL_ENDL;
sessionState *session = findSession(sessionHandle);
if(session)
@@ -4674,14 +4677,12 @@ void LLVoiceClient::messageEvent(
quiet_chat = true;
// TODO: Question: Return busy mode response here? Or maybe when session is started instead?
}
-
- std::string fullMessage = std::string(": ") + rawMessage;
-
+
LL_DEBUGS("Voice") << "adding message, name " << session->mName << " session " << session->mIMSessionID << ", target " << session->mCallerID << LL_ENDL;
gIMMgr->addMessage(session->mIMSessionID,
session->mCallerID,
session->mName.c_str(),
- fullMessage.c_str(),
+ message.c_str(),
LLStringUtil::null, // default arg
IM_NOTHING_SPECIAL, // default arg
0, // default arg
@@ -4689,7 +4690,7 @@ void LLVoiceClient::messageEvent(
LLVector3::zero, // default arg
true); // prepend name and make it a link to the user's profile
- chat.mText = std::string("IM: ") + session->mName + std::string(": ") + rawMessage;
+ chat.mText = std::string("IM: ") + session->mName + std::string(": ") + message;
// If the chat should come in quietly (i.e. we're in busy mode), pretend it's from a local agent.
LLFloaterChat::addChat( chat, TRUE, quiet_chat );
}
@@ -5785,6 +5786,7 @@ bool LLVoiceClient::getMuteMic() const
void LLVoiceClient::setUserPTTState(bool ptt)
{
mUserPTTState = ptt;
+ LLNearbyChatBar::getInstance()->setPTTState(ptt);
}
bool LLVoiceClient::getUserPTTState()
@@ -5795,6 +5797,7 @@ bool LLVoiceClient::getUserPTTState()
void LLVoiceClient::toggleUserPTTState(void)
{
mUserPTTState = !mUserPTTState;
+ LLNearbyChatBar::getInstance()->setPTTState(mUserPTTState);
}
void LLVoiceClient::setVoiceEnabled(bool enabled)
diff --git a/indra/newview/llvoicevisualizer.cpp b/indra/newview/llvoicevisualizer.cpp
index a361a1160c..9bafc03a6d 100644
--- a/indra/newview/llvoicevisualizer.cpp
+++ b/indra/newview/llvoicevisualizer.cpp
@@ -42,9 +42,8 @@
#include "llvoicevisualizer.h"
#include "llviewercamera.h"
#include "llviewerobject.h"
-#include "llimagegl.h"
-#include "llviewerimage.h"
-#include "llviewerimagelist.h"
+#include "llviewertexture.h"
+#include "llviewertexturelist.h"
#include "llvoiceclient.h"
#include "llrender.h"
@@ -143,7 +142,7 @@ LLVoiceVisualizer::LLVoiceVisualizer( const U8 type )
for (int i=0; i<NUM_VOICE_SYMBOL_WAVES; i++)
{
mSoundSymbol.mWaveFadeOutStartTime [i] = mCurrentTime;
- mSoundSymbol.mTexture [i] = gImageList.getImageFromFile(sound_level_img[i], FALSE, TRUE);
+ mSoundSymbol.mTexture [i] = LLViewerTextureManager::getFetchedTextureFromFile(sound_level_img[i], FALSE, TRUE);
mSoundSymbol.mWaveActive [i] = false;
mSoundSymbol.mWaveOpacity [i] = 1.0f;
mSoundSymbol.mWaveExpansion [i] = 1.0f;
diff --git a/indra/newview/llvoicevisualizer.h b/indra/newview/llvoicevisualizer.h
index 0cbf24b786..1887849300 100644
--- a/indra/newview/llvoicevisualizer.h
+++ b/indra/newview/llvoicevisualizer.h
@@ -121,7 +121,7 @@ class LLVoiceVisualizer : public LLHUDEffect
bool mWaveActive [ NUM_VOICE_SYMBOL_WAVES ];
F64 mWaveFadeOutStartTime [ NUM_VOICE_SYMBOL_WAVES ];
F32 mWaveOpacity [ NUM_VOICE_SYMBOL_WAVES ];
- LLPointer<LLImageGL> mTexture [ NUM_VOICE_SYMBOL_WAVES ];
+ LLPointer<LLViewerFetchedTexture> mTexture [ NUM_VOICE_SYMBOL_WAVES ];
bool mActive;
LLVector3 mPosition;
};
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp
index d99758edf8..993cf522e9 100644
--- a/indra/newview/llvosky.cpp
+++ b/indra/newview/llvosky.cpp
@@ -49,7 +49,7 @@
#include "llglheaders.h"
#include "llsky.h"
#include "llviewercamera.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerobjectlist.h"
#include "llviewerregion.h"
#include "llworld.h"
@@ -212,8 +212,8 @@ void LLSkyTex::init()
for (S32 i = 0; i < 2; ++i)
{
- mImageGL[i] = new LLImageGL(FALSE);
- mImageGL[i]->setAddressMode(LLTexUnit::TAM_CLAMP);
+ mTexture[i] = LLViewerTextureManager::getLocalTexture(FALSE);
+ mTexture[i]->setAddressMode(LLTexUnit::TAM_CLAMP);
mImageRaw[i] = new LLImageRaw(sResolution, sResolution, sComponents);
initEmpty(i);
@@ -222,16 +222,16 @@ void LLSkyTex::init()
void LLSkyTex::cleanupGL()
{
- mImageGL[0] = NULL;
- mImageGL[1] = NULL;
+ mTexture[0] = NULL;
+ mTexture[1] = NULL;
}
void LLSkyTex::restoreGL()
{
for (S32 i = 0; i < 2; i++)
{
- mImageGL[i] = new LLImageGL(FALSE);
- mImageGL[i]->setAddressMode(LLTexUnit::TAM_CLAMP);
+ mTexture[i] = LLViewerTextureManager::getLocalTexture(FALSE);
+ mTexture[i]->setAddressMode(LLTexUnit::TAM_CLAMP);
}
}
@@ -289,13 +289,13 @@ void LLSkyTex::create(const F32 brightness)
void LLSkyTex::createGLImage(S32 which)
{
- mImageGL[which]->createGLTexture(0, mImageRaw[which]);
- mImageGL[which]->setAddressMode(LLTexUnit::TAM_CLAMP);
+ mTexture[which]->createGLTexture(0, mImageRaw[which]);
+ mTexture[which]->setAddressMode(LLTexUnit::TAM_CLAMP);
}
void LLSkyTex::bindTexture(BOOL curr)
{
- gGL.getTexUnit(0)->bind(mImageGL[getWhich(curr)]);
+ gGL.getTexUnit(0)->bind(mTexture[getWhich(curr)]);
}
/***************************************
@@ -368,7 +368,7 @@ LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
initSunDirection(mSunDefaultPosition, LLVector3(0, 0, 0));
}
mAmbientScale = gSavedSettings.getF32("SkyAmbientScale");
- mNightColorShift = gSavedSkinSettings.getColor3("SkyNightColorShift");
+ mNightColorShift = gSavedSettings.getColor3("SkyNightColorShift");
mFogColor.mV[VRED] = mFogColor.mV[VGREEN] = mFogColor.mV[VBLUE] = 0.5f;
mFogColor.mV[VALPHA] = 0.0f;
mFogRatio = 1.2f;
@@ -376,11 +376,11 @@ LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
mSun.setIntensity(SUN_INTENSITY);
mMoon.setIntensity(0.1f * SUN_INTENSITY);
- mSunTexturep = gImageList.getImage(gSunTextureID, TRUE, TRUE);
+ mSunTexturep = LLViewerTextureManager::getFetchedTexture(gSunTextureID, TRUE, TRUE);
mSunTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
- mMoonTexturep = gImageList.getImage(gMoonTextureID, TRUE, TRUE);
+ mMoonTexturep = LLViewerTextureManager::getFetchedTexture(gMoonTextureID, TRUE, TRUE);
mMoonTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
- mBloomTexturep = gImageList.getImage(IMG_BLOOM1);
+ mBloomTexturep = LLViewerTextureManager::getFetchedTexture(IMG_BLOOM1);
mBloomTexturep->setNoDelete() ;
mBloomTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
@@ -390,7 +390,7 @@ LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
LLVOSky::~LLVOSky()
{
- // Don't delete images - it'll get deleted by gImageList on shutdown
+ // Don't delete images - it'll get deleted by gTextureList on shutdown
// This needs to be done for each texture
mCubeMap = NULL;
@@ -472,11 +472,11 @@ void LLVOSky::restoreGL()
{
mSkyTex[i].restoreGL();
}
- mSunTexturep = gImageList.getImage(gSunTextureID, TRUE, TRUE);
+ mSunTexturep = LLViewerTextureManager::getFetchedTexture(gSunTextureID, TRUE, TRUE);
mSunTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
- mMoonTexturep = gImageList.getImage(gMoonTextureID, TRUE, TRUE);
+ mMoonTexturep = LLViewerTextureManager::getFetchedTexture(gMoonTextureID, TRUE, TRUE);
mMoonTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
- mBloomTexturep = gImageList.getImage(IMG_BLOOM1);
+ mBloomTexturep = LLViewerTextureManager::getFetchedTexture(IMG_BLOOM1);
mBloomTexturep->setNoDelete() ;
mBloomTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h
index 5e23065153..466cdfdcd0 100644
--- a/indra/newview/llvosky.h
+++ b/indra/newview/llvosky.h
@@ -36,7 +36,7 @@
#include "stdtypes.h"
#include "v3color.h"
#include "v4coloru.h"
-#include "llviewerimage.h"
+#include "llviewertexture.h"
#include "llviewerobject.h"
#include "llframetimer.h"
@@ -122,7 +122,7 @@ class LLSkyTex
private:
static S32 sResolution;
static S32 sComponents;
- LLPointer<LLImageGL> mImageGL[2];
+ LLPointer<LLViewerTexture> mTexture[2];
LLPointer<LLImageRaw> mImageRaw[2];
LLColor4 *mSkyData;
LLVector3 *mSkyDirs; // Cache of sky direction vectors
@@ -567,9 +567,9 @@ public:
BOOL isReflFace(const LLFace* face) const { return face == mFace[FACE_REFLECTION]; }
LLFace* getReflFace() const { return mFace[FACE_REFLECTION]; }
- LLViewerImage* getSunTex() const { return mSunTexturep; }
- LLViewerImage* getMoonTex() const { return mMoonTexturep; }
- LLViewerImage* getBloomTex() const { return mBloomTexturep; }
+ LLViewerTexture* getSunTex() const { return mSunTexturep; }
+ LLViewerTexture* getMoonTex() const { return mMoonTexturep; }
+ LLViewerTexture* getBloomTex() const { return mBloomTexturep; }
void forceSkyUpdate(void) { mForceUpdate = TRUE; }
public:
@@ -579,9 +579,9 @@ public:
protected:
~LLVOSky();
- LLPointer<LLViewerImage> mSunTexturep;
- LLPointer<LLViewerImage> mMoonTexturep;
- LLPointer<LLViewerImage> mBloomTexturep;
+ LLPointer<LLViewerFetchedTexture> mSunTexturep;
+ LLPointer<LLViewerFetchedTexture> mMoonTexturep;
+ LLPointer<LLViewerFetchedTexture> mBloomTexturep;
static S32 sResolution;
static S32 sTileResX;
diff --git a/indra/newview/llvotextbubble.cpp b/indra/newview/llvotextbubble.cpp
index de69aac037..9871965458 100644
--- a/indra/newview/llvotextbubble.cpp
+++ b/indra/newview/llvotextbubble.cpp
@@ -43,7 +43,7 @@
#include "llbox.h"
#include "lldrawable.h"
#include "llface.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llvolume.h"
#include "pipeline.h"
#include "llviewerregion.h"
@@ -125,7 +125,7 @@ void LLVOTextBubble::updateTextures(LLAgent &agent)
const LLTextureEntry *te = getTE(i);
F32 texel_area_ratio = fabs(te->mScaleS * te->mScaleT);
texel_area_ratio = llclamp(texel_area_ratio, .125f, 16.f);
- LLViewerImage *imagep = getTEImage(i);
+ LLViewerTexture *imagep = getTEImage(i);
if (imagep)
{
imagep->addTextureStats(mPixelArea / texel_area_ratio);
@@ -142,9 +142,9 @@ LLDrawable *LLVOTextBubble::createDrawable(LLPipeline *pipeline)
for (U32 i = 0; i < getNumTEs(); i++)
{
- LLViewerImage *imagep;
+ LLViewerTexture *imagep;
const LLTextureEntry *texture_entry = getTE(i);
- imagep = gImageList.getImage(texture_entry->getID());
+ imagep = LLViewerTextureManager::getFetchedTexture(texture_entry->getID());
mDrawable->addFace((LLFacePool*) NULL, imagep);
}
@@ -194,7 +194,7 @@ BOOL LLVOTextBubble::updateGeometry(LLDrawable *drawable)
{
LLFace *face = drawable->getFace(i);
face->setTEOffset(i);
- face->setTexture(LLViewerImage::sSmokeImagep);
+ face->setTexture(LLViewerFetchedTexture::sSmokeImagep);
face->setState(LLFace::FULLBRIGHT);
}
diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp
index b602b93025..d1cac4c77e 100644
--- a/indra/newview/llvotree.cpp
+++ b/indra/newview/llvotree.cpp
@@ -48,7 +48,7 @@
#include "lldrawable.h"
#include "llface.h"
#include "llviewercamera.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerobjectlist.h"
#include "llviewerregion.h"
#include "llworld.h"
@@ -311,10 +311,10 @@ U32 LLVOTree::processUpdateMessage(LLMessageSystem *mesgsys,
//
// Load Species-Specific data
//
- mTreeImagep = gImageList.getImage(sSpeciesTable[mSpecies]->mTextureID);
+ mTreeImagep = LLViewerTextureManager::getFetchedTexture(sSpeciesTable[mSpecies]->mTextureID, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE);
if (mTreeImagep)
{
- gGL.getTexUnit(0)->bind(mTreeImagep.get());
+ gGL.getTexUnit(0)->bind(mTreeImagep);
}
mBranchLength = sSpeciesTable[mSpecies]->mBranchLength;
mTrunkLength = sSpeciesTable[mSpecies]->mTrunkLength;
diff --git a/indra/newview/llvotree.h b/indra/newview/llvotree.h
index 42a6d54f62..13817fa111 100644
--- a/indra/newview/llvotree.h
+++ b/indra/newview/llvotree.h
@@ -39,7 +39,7 @@
class LLFace;
class LLDrawPool;
-
+class LLViewerFetchedTexture;
class LLVOTree : public LLViewerObject
{
@@ -160,7 +160,7 @@ protected:
LLVector3 mWind;
LLPointer<LLVertexBuffer> mReferenceBuffer; //reference geometry for generating tree mesh
- LLPointer<LLViewerImage> mTreeImagep; // Pointer to proper tree image
+ LLPointer<LLViewerFetchedTexture> mTreeImagep; // Pointer to proper tree image
U8 mSpecies; // Species of tree
F32 mBranchLength; // Scale (length) of tree branches
@@ -184,7 +184,7 @@ protected:
// complete rebuild when not animating
LLVector3 mLastPosition;
LLQuaternion mLastRotation;
-
+
U32 mFrameCount;
typedef std::map<U32, TreeSpeciesData*> SpeciesMap;
diff --git a/indra/newview/llvotreenew.h b/indra/newview/llvotreenew.h
index 02f6d3a056..3fec5855ef 100644
--- a/indra/newview/llvotreenew.h
+++ b/indra/newview/llvotreenew.h
@@ -41,7 +41,7 @@
#include "llstrider.h"
#include "v2math.h"
#include "v3math.h"
-#include "llviewerimage.h"
+#include "llviewertexture.h"
class LLFace;
class LLDrawPool;
@@ -187,7 +187,7 @@ public:
//LLTreeParams mParams;
U8 mSpecies;
- LLPointer<LLViewerImage> mTreeImagep;
+ LLPointer<LLViewerTexture> mTreeImagep;
LLMatrix4 mTrunkFlareFrames[MAX_FLARE];
F32 mSegSplitsError[3];
U32 mRandOffset[MAX_LEVELS];
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index f31f09f60e..bef38bb669 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -59,7 +59,7 @@
#include "llsky.h"
#include "llviewercamera.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerregion.h"
#include "llviewertextureanim.h"
#include "llworld.h"
@@ -427,7 +427,7 @@ void LLVOVolume::updateTextures()
return;
}
- if (LLViewerImage::sDontLoadVolumeTextures || mDrawable.isNull()) // || !mDrawable->isVisible())
+ if (LLViewerTexture::sDontLoadVolumeTextures || mDrawable.isNull()) // || !mDrawable->isVisible())
{
return;
}
@@ -443,7 +443,7 @@ void LLVOVolume::updateTextures()
{
LLFace* face = mDrawable->getFace(i);
const LLTextureEntry *te = face->getTextureEntry();
- LLViewerImage *imagep = face->getTexture();
+ LLViewerTexture *imagep = face->getTexture();
if (!imagep || !te ||
face->mExtents[0] == face->mExtents[1])
{
@@ -456,7 +456,7 @@ void LLVOVolume::updateTextures()
{
F32 area = (F32) LLViewerCamera::getInstance()->getScreenPixelArea();
vsize = area;
- imagep->setBoostLevel(LLViewerImage::BOOST_HUD);
+ imagep->setBoostLevel(LLViewerTexture::BOOST_HUD);
face->setPixelArea(area); // treat as full screen
}
else
@@ -486,10 +486,14 @@ void LLVOVolume::updateTextures()
}
else if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_PRIORITY))
{
- F32 pri = imagep->getDecodePriority();
- pri = llmax(pri, 0.0f);
- if (pri < min_vsize) min_vsize = pri;
- if (pri > max_vsize) max_vsize = pri;
+ LLViewerFetchedTexture* img = LLViewerTextureManager::staticCastToFetchedTexture(imagep) ;
+ if(img)
+ {
+ F32 pri = img->getDecodePriority();
+ pri = llmax(pri, 0.0f);
+ if (pri < min_vsize) min_vsize = pri;
+ if (pri > max_vsize) max_vsize = pri;
+ }
}
else if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_FACE_AREA))
{
@@ -503,7 +507,7 @@ void LLVOVolume::updateTextures()
{
LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT);
LLUUID id = sculpt_params->getSculptTexture();
- mSculptTexture = gImageList.getImage(id);
+ mSculptTexture = LLViewerTextureManager::getFetchedTexture(id, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE);
if (mSculptTexture.notNull())
{
S32 lod = llmin(mLOD, 3);
@@ -511,7 +515,7 @@ void LLVOVolume::updateTextures()
F32 tex_size = lodf * MAX_SCULPT_REZ;
mSculptTexture->addTextureStats(2.f * tex_size * tex_size);
mSculptTexture->setBoostLevel(llmax((S32)mSculptTexture->getBoostLevel(),
- (S32)LLViewerImage::BOOST_SCULPTED));
+ (S32)LLViewerTexture::BOOST_SCULPTED));
mSculptTexture->setForSculpt() ;
}
@@ -625,7 +629,7 @@ void LLVOVolume::setScale(const LLVector3 &scale, BOOL damped)
LLFace* LLVOVolume::addFace(S32 f)
{
const LLTextureEntry* te = getTE(f);
- LLViewerImage* imagep = getTEImage(f);
+ LLViewerTexture* imagep = getTEImage(f);
return mDrawable->addFace(te, imagep);
}
@@ -701,7 +705,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams &volume_params, const S32 detail
if (isSculpted())
{
- mSculptTexture = gImageList.getImage(volume_params.getSculptID());
+ mSculptTexture = LLViewerTextureManager::getFetchedTexture(volume_params.getSculptID(), TRUE, FALSE, LLViewerTexture::LOD_TEXTURE);
if (mSculptTexture.notNull())
{
sculpt();
@@ -783,9 +787,9 @@ void LLVOVolume::sculpt()
sculpt_height = 0;
sculpt_data = NULL ;
- if(LLViewerImage::sTesterp)
+ if(LLViewerTextureManager::sTesterp)
{
- LLViewerImage::sTesterp->updateGrayTextureBinding();
+ LLViewerTextureManager::sTesterp->updateGrayTextureBinding();
}
}
else
@@ -796,9 +800,9 @@ void LLVOVolume::sculpt()
sculpt_data = raw_image->getData();
- if(LLViewerImage::sTesterp)
+ if(LLViewerTextureManager::sTesterp)
{
- mSculptTexture->updateBindStats() ;
+ mSculptTexture->updateBindStatsForTester() ;
}
}
getVolume()->sculpt(sculpt_width, sculpt_height, sculpt_components, sculpt_data, discard_level);
@@ -1257,7 +1261,7 @@ BOOL LLVOVolume::isRootEdit() const
return TRUE;
}
-void LLVOVolume::setTEImage(const U8 te, LLViewerImage *imagep)
+void LLVOVolume::setTEImage(const U8 te, LLViewerTexture *imagep)
{
BOOL changed = (mTEImages[te] != imagep);
LLViewerObject::setTEImage(te, imagep);
@@ -2056,7 +2060,7 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector3& start, const LLVector3& e
{
LLFace* face = mDrawable->getFace(face_hit);
- if (pick_transparent || !face->getTexture() || face->getTexture()->getMask(face->surfaceToTexture(tc, p, n)))
+ if (pick_transparent || !face->getTexture() || !face->getTexture()->hasGLTexture() || face->getTexture()->getMask(face->surfaceToTexture(tc, p, n)))
{
v_end = p;
if (face_hitp != NULL)
@@ -2167,7 +2171,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
U8 bump = (type == LLRenderPass::PASS_BUMP ? facep->getTextureEntry()->getBumpmap() : 0);
- LLViewerImage* tex = facep->getTexture();
+ LLViewerTexture* tex = facep->getTexture();
U8 glow = 0;
@@ -2318,7 +2322,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
if (facep->hasGeometry() && facep->mPixelArea > FORCE_CULL_AREA)
{
const LLTextureEntry* te = facep->getTextureEntry();
- LLViewerImage* tex = facep->getTexture();
+ LLViewerTexture* tex = facep->getTexture();
if (facep->isState(LLFace::TEXTURE_ANIM))
{
@@ -2566,7 +2570,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
LLSpatialGroup::buffer_map_t buffer_map;
- LLViewerImage* last_tex = NULL;
+ LLViewerTexture* last_tex = NULL;
S32 buffer_index = 0;
if (distance_sort)
@@ -2578,7 +2582,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
{
//pull off next face
LLFace* facep = *face_iter;
- LLViewerImage* tex = facep->getTexture();
+ LLViewerTexture* tex = facep->getTexture();
if (distance_sort)
{
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index 5d7b373b3c..d343d4db74 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -34,7 +34,7 @@
#define LL_LLVOVOLUME_H
#include "llviewerobject.h"
-#include "llviewerimage.h"
+#include "llviewertexture.h"
#include "llframetimer.h"
#include "llapr.h"
#include "m3math.h" // LLMatrix3
@@ -153,7 +153,7 @@ public:
/*virtual*/ void setScale(const LLVector3 &scale, BOOL damped);
- /*virtual*/ void setTEImage(const U8 te, LLViewerImage *imagep);
+ /*virtual*/ void setTEImage(const U8 te, LLViewerTexture *imagep);
/*virtual*/ S32 setTETexture(const U8 te, const LLUUID &uuid);
/*virtual*/ S32 setTEColor(const U8 te, const LLColor3 &color);
/*virtual*/ S32 setTEColor(const U8 te, const LLColor4 &color);
@@ -237,7 +237,7 @@ private:
BOOL mVolumeChanged;
F32 mVObjRadius;
LLVolumeInterface *mVolumeImpl;
- LLPointer<LLViewerImage> mSculptTexture;
+ LLPointer<LLViewerFetchedTexture> mSculptTexture;
// statics
public:
diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp
index d23c746b75..427119285b 100644
--- a/indra/newview/llvowater.cpp
+++ b/indra/newview/llvowater.cpp
@@ -45,7 +45,7 @@
#include "llsurface.h"
#include "llvosky.h"
#include "llviewercamera.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerregion.h"
#include "llworld.h"
#include "pipeline.h"
diff --git a/indra/newview/llvowater.h b/indra/newview/llvowater.h
index cdda48f6f2..28a5633c58 100644
--- a/indra/newview/llvowater.h
+++ b/indra/newview/llvowater.h
@@ -34,7 +34,7 @@
#define LL_VOWATER_H
#include "llviewerobject.h"
-#include "llviewerimage.h"
+#include "llviewertexture.h"
#include "v2math.h"
const U32 N_RES = 16; //32 // number of subdivisions of wave tile
diff --git a/indra/newview/llwatchdog.h b/indra/newview/llwatchdog.h
index ed7d5bdcfb..79398c434a 100644
--- a/indra/newview/llwatchdog.h
+++ b/indra/newview/llwatchdog.h
@@ -64,9 +64,10 @@ public:
/* virtual */ bool isAlive() const;
/* virtual */ void reset();
- /* virtual */ void start(const std::string& state);
+ /* virtual */ void start() { start(""); }
/* virtual */ void stop();
+ void start(const std::string& state);
void setTimeout(F32 d);
void ping(const std::string& state);
const std::string& getState() {return mPingState; }
diff --git a/indra/newview/llwaterparamset.cpp b/indra/newview/llwaterparamset.cpp
index a26ccedfb2..3e97f9dbef 100644
--- a/indra/newview/llwaterparamset.cpp
+++ b/indra/newview/llwaterparamset.cpp
@@ -39,7 +39,7 @@
#include "llwaterparammanager.h"
#include "lluictrlfactory.h"
#include "llsliderctrl.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewercontrol.h"
#include "lluuid.h"
diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp
index 1e35a31cb6..0d3dd10a01 100644
--- a/indra/newview/llwearable.cpp
+++ b/indra/newview/llwearable.cpp
@@ -35,7 +35,7 @@
#include "llagent.h"
#include "llagentwearables.h"
#include "llfloatercustomize.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llinventorymodel.h"
#include "llviewerregion.h"
#include "llvoavatar.h"
@@ -156,7 +156,7 @@ BOOL LLWearable::exportFile(LLFILE* file) const
for (te_map_t::const_iterator iter = mTEMap.begin(); iter != mTEMap.end(); ++iter)
{
S32 te = iter->first;
- const LLUUID& image_id = iter->second;
+ const LLUUID& image_id = iter->second.getID();
if( fprintf( file, "%d %s\n", te, image_id.asString().c_str()) < 0 )
{
return FALSE;
@@ -350,7 +350,8 @@ BOOL LLWearable::importFile( LLFILE* file )
return FALSE;
}
- mTEMap[te] = LLUUID(text_buffer );
+ //TODO: check old values
+ mTEMap[te] = LLLocalTextureObject(NULL, NULL, NULL, LLUUID(text_buffer));
}
return TRUE;
@@ -459,16 +460,21 @@ BOOL LLWearable::isDirty() const
{
if (LLVOAvatarDictionary::getTEWearableType((ETextureIndex) te) == mType)
{
- LLViewerImage* avatar_image = avatar->getTEImage( te );
+ LLViewerTexture* avatar_image = avatar->getTEImage( te );
if( !avatar_image )
{
llassert( 0 );
continue;
}
- const LLUUID& image_id = get_if_there(mTEMap, te, LLVOAvatarDictionary::getDefaultTextureImageID((ETextureIndex) te));
- if( avatar_image->getID() != image_id )
+
+ te_map_t::const_iterator iter = mTEMap.find(te);
+ if(iter != mTEMap.end())
{
- return TRUE;
+ const LLUUID& image_id = iter->second.getID();
+ if (avatar_image->getID() != image_id)
+ {
+ return TRUE;
+ }
}
}
}
@@ -511,7 +517,7 @@ void LLWearable::setTexturesToDefaults()
{
if (LLVOAvatarDictionary::getTEWearableType((ETextureIndex) te) == mType)
{
- mTEMap[te] = LLVOAvatarDictionary::getDefaultTextureImageID((ETextureIndex) te);
+ mTEMap[te] = LLLocalTextureObject(NULL, NULL, NULL, LLVOAvatarDictionary::getDefaultTextureImageID((ETextureIndex) te));
}
}
}
@@ -558,8 +564,17 @@ void LLWearable::writeToAvatar( BOOL set_by_user )
{
if (LLVOAvatarDictionary::getTEWearableType((ETextureIndex) te) == mType)
{
- const LLUUID& image_id = get_if_there(mTEMap, te, LLVOAvatarDictionary::getDefaultTextureImageID((ETextureIndex) te));
- LLViewerImage* image = gImageList.getImage( image_id );
+ te_map_t::const_iterator iter = mTEMap.find(te);
+ LLUUID image_id;
+ if(iter != mTEMap.end())
+ {
+ image_id = iter->second.getID();
+ }
+ else
+ {
+ image_id = LLVOAvatarDictionary::getDefaultTextureImageID((ETextureIndex) te);
+ }
+ LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture( image_id, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE );
avatar->setLocalTextureTE(te, image, set_by_user);
}
}
@@ -570,7 +585,7 @@ void LLWearable::writeToAvatar( BOOL set_by_user )
{
LLViewerInventoryItem* item;
// MULTI_WEARABLE:
- item = (LLViewerInventoryItem*)gInventory.getItem(gAgentWearables.getWearableItem(mType,0));
+ item = (LLViewerInventoryItem*)gInventory.getItem(gAgentWearables.getWearableItemID(mType,0));
U32 perm_mask = PERM_NONE;
BOOL is_complete = FALSE;
if(item)
@@ -631,7 +646,7 @@ void LLWearable::removeFromAvatar( EWearableType type, BOOL set_by_user )
}
// Pull textures
- LLViewerImage* image = gImageList.getImage( IMG_DEFAULT_AVATAR );
+ LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture( IMG_DEFAULT_AVATAR );
for( S32 te = 0; te < TEX_NUM_INDICES; te++ )
{
if (LLVOAvatarDictionary::getTEWearableType((ETextureIndex) te) == type)
@@ -682,10 +697,10 @@ void LLWearable::readFromAvatar()
{
if (LLVOAvatarDictionary::getTEWearableType((ETextureIndex) te) == mType)
{
- LLViewerImage* image = avatar->getTEImage( te );
+ LLViewerTexture* image = avatar->getTEImage( te );
if( image )
{
- mTEMap[te] = image->getID();
+ mTEMap[te] = LLLocalTextureObject(NULL, NULL, NULL, image->getID());
}
}
}
@@ -733,12 +748,54 @@ void LLWearable::copyDataFrom(const LLWearable* src)
{
if (LLVOAvatarDictionary::getTEWearableType((ETextureIndex) te) == mType)
{
- const LLUUID& image_id = get_if_there(src->mTEMap, te, LLVOAvatarDictionary::getDefaultTextureImageID((ETextureIndex) te));
- mTEMap[te] = image_id;
+ te_map_t::const_iterator iter = mTEMap.find(te);
+ LLUUID image_id;
+ if(iter != mTEMap.end())
+ {
+ image_id = iter->second.getID();
+ }
+ else
+ {
+ image_id = LLVOAvatarDictionary::getDefaultTextureImageID((ETextureIndex) te);
+ }
+ mTEMap[te] = LLLocalTextureObject(NULL, NULL, NULL, image_id);
}
}
}
+void LLWearable::setItemID(const LLUUID& item_id)
+{
+ mItemID = item_id;
+}
+
+const LLUUID& LLWearable::getItemID() const
+{
+ return mItemID;
+}
+
+LLLocalTextureObject* LLWearable::getLocalTextureObject(S32 index) const
+{
+ te_map_t::const_iterator iter = mTEMap.find(index);
+ if( iter != mTEMap.end() )
+ {
+ return (LLLocalTextureObject*) &iter->second;
+ }
+ return NULL;
+}
+
+void LLWearable::setLocalTextureObject(S32 index, LLLocalTextureObject *lto)
+{
+ if( lto )
+ {
+ LLLocalTextureObject obj(*lto);
+ mTEMap[index] = obj;
+ }
+ else
+ {
+ mTEMap.erase(index);
+ }
+}
+
struct LLWearableSaveData
{
EWearableType mType;
@@ -849,7 +906,7 @@ std::ostream& operator<<(std::ostream &s, const LLWearable &w)
iter != w.mTEMap.end(); ++iter)
{
S32 te = iter->first;
- const LLUUID& image_id = iter->second;
+ const LLUUID& image_id = iter->second.getID();
s << " " << te << " " << image_id << "\n";
}
return s;
diff --git a/indra/newview/llwearable.h b/indra/newview/llwearable.h
index 7ebdd788ce..5f0b235c7f 100644
--- a/indra/newview/llwearable.h
+++ b/indra/newview/llwearable.h
@@ -39,6 +39,8 @@
#include "llsaleinfo.h"
#include "llassetstorage.h"
#include "llwearabledictionary.h"
+#include "llfile.h"
+#include "lllocaltextureobject.h"
class LLViewerInventoryItem;
@@ -60,7 +62,7 @@ public:
// Accessors
//--------------------------------------------------------------------
public:
- const LLAssetID& getID() const { return mAssetID; }
+ const LLAssetID& getAssetID() const { return mAssetID; }
const LLTransactionID& getTransactionID() const { return mTransactionID; }
EWearableType getType() const { return mType; }
void setType(EWearableType type) { mType = type; }
@@ -99,6 +101,10 @@ public:
static void setCurrentDefinitionVersion( S32 version ) { LLWearable::sCurrentDefinitionVersion = version; }
friend std::ostream& operator<<(std::ostream &s, const LLWearable &w);
+ void setItemID(const LLUUID& item_id);
+ const LLUUID& getItemID() const;
+ LLLocalTextureObject* getLocalTextureObject(S32 index) const;
+ void setLocalTextureObject(S32 index, LLLocalTextureObject *lto);
private:
static S32 sCurrentDefinitionVersion; // Depends on the current state of the avatar_lad.xml.
@@ -113,8 +119,9 @@ private:
typedef std::map<S32, F32> param_map_t;
param_map_t mVisualParamMap; // maps visual param id to weight
- typedef std::map<S32, LLUUID> te_map_t;
- te_map_t mTEMap; // maps TE to Image ID
+ typedef std::map<S32, LLLocalTextureObject> te_map_t;
+ te_map_t mTEMap; // maps TE to LocalTextureObject
+ LLUUID mItemID; // ID of the inventory item in the agent's inventory
};
#endif // LL_LLWEARABLE_H
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index 781f8298f7..57f57f75d7 100644
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -41,6 +41,7 @@
#include "llviewerwindow.h"
#include "llviewercontrol.h"
#include "llfloaterhtmlhelp.h"
+#include "llfloaterreg.h"
#include "llalertdialog.h"
class URLLoader : public LLAlertDialog::URLLoader
@@ -75,7 +76,7 @@ void LLWeb::loadURL(const std::string& url)
}
else
{
- LLFloaterMediaBrowser::showInstance(url);
+ LLFloaterReg::showInstance("media_browser",url);
}
}
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 692efd2b7a..5c6fc2cf21 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -46,8 +46,8 @@
#include "llregionhandle.h"
#include "llsurface.h"
#include "llviewercamera.h"
-#include "llviewerimage.h"
-#include "llviewerimagelist.h"
+#include "llviewertexture.h"
+#include "llviewertexturelist.h"
#include "llviewernetwork.h"
#include "llviewerobjectlist.h"
#include "llviewerparceloverlay.h"
@@ -109,8 +109,8 @@ LLWorld::LLWorld() :
*(default_texture++) = MAX_WATER_COLOR.mV[2];
*(default_texture++) = MAX_WATER_COLOR.mV[3];
- mDefaultWaterTexturep = new LLViewerImage(raw, FALSE);
- gGL.getTexUnit(0)->bind(mDefaultWaterTexturep.get());
+ mDefaultWaterTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE);
+ gGL.getTexUnit(0)->bind(mDefaultWaterTexturep);
mDefaultWaterTexturep->setAddressMode(LLTexUnit::TAM_CLAMP);
}
@@ -962,7 +962,7 @@ void LLWorld::shiftRegions(const LLVector3& offset)
LLViewerPartSim::getInstance()->shift(offset);
}
-LLViewerImage* LLWorld::getDefaultWaterTexture()
+LLViewerTexture* LLWorld::getDefaultWaterTexture()
{
return mDefaultWaterTexturep;
}
diff --git a/indra/newview/llworld.h b/indra/newview/llworld.h
index b5380a6f6c..48025c700b 100644
--- a/indra/newview/llworld.h
+++ b/indra/newview/llworld.h
@@ -45,7 +45,7 @@
#include "llsingleton.h"
#include "llstring.h"
#include "llviewerpartsim.h"
-#include "llviewerimage.h"
+#include "llviewertexture.h"
#include "llvowater.h"
class LLViewerRegion;
@@ -141,7 +141,7 @@ public:
F32 getLandFarClip() const;
void setLandFarClip(const F32 far_clip);
- LLViewerImage *getDefaultWaterTexture();
+ LLViewerTexture *getDefaultWaterTexture();
void updateWaterObjects();
void shiftRegions(const LLVector3& offset);
@@ -192,7 +192,7 @@ private:
std::list<LLVOWater*> mHoleWaterObjects;
LLPointer<LLVOWater> mEdgeWaterObjects[8];
- LLPointer<LLViewerImage> mDefaultWaterTexturep;
+ LLPointer<LLViewerTexture> mDefaultWaterTexturep;
};
diff --git a/indra/newview/llworldmap.cpp b/indra/newview/llworldmap.cpp
index 827f12d19e..700971dcc4 100644
--- a/indra/newview/llworldmap.cpp
+++ b/indra/newview/llworldmap.cpp
@@ -43,7 +43,7 @@
#include "llviewercontrol.h"
#include "llfloaterworldmap.h"
#include "lltracker.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerregion.h"
#include "llregionflags.h"
#include "lltrans.h"
@@ -519,9 +519,9 @@ void LLWorldMap::processMapLayerReply(LLMessageSystem* msg, void**)
LLWorldMapLayer new_layer;
new_layer.LayerDefined = TRUE;
msg->getUUIDFast(_PREHASH_LayerData, _PREHASH_ImageID, new_layer.LayerImageID, block);
- new_layer.LayerImage = gImageList.getImage(new_layer.LayerImageID, MIPMAP_TRUE, FALSE);
+ new_layer.LayerImage = LLViewerTextureManager::getFetchedTexture(new_layer.LayerImageID, MIPMAP_TRUE, FALSE, LLViewerTexture::LOD_TEXTURE);
- gGL.getTexUnit(0)->bind(new_layer.LayerImage.get());
+ gGL.getTexUnit(0)->bind(new_layer.LayerImage);
new_layer.LayerImage->setAddressMode(LLTexUnit::TAM_CLAMP);
U32 left, right, top, bottom;
@@ -634,15 +634,15 @@ void LLWorldMap::processMapBlockReply(LLMessageSystem* msg, void**)
siminfo->mMapImageID[agent_flags] = image_id;
#ifdef IMMEDIATE_IMAGE_LOAD
- siminfo->mCurrentImage = gImageList.getImage(siminfo->mMapImageID[LLWorldMap::getInstance()->mCurrentMap], MIPMAP_TRUE, FALSE);
- gGL.getTexUnit(0)->bind(siminfo->mCurrentImage.get());
+ siminfo->mCurrentImage = LLViewerTextureManager::getFetchedTexture(siminfo->mMapImageID[LLWorldMap::getInstance()->mCurrentMap], MIPMAP_TRUE, FALSE, LLViewerTexture::LOD_TEXTURE);
+ gGL.getTexUnit(0)->bind(siminfo->mCurrentImage);
siminfo->mCurrentImage->setAddressMode(LLTexUnit::TAM_CLAMP);
#endif
if (siminfo->mMapImageID[2].notNull())
{
#ifdef IMMEDIATE_IMAGE_LOAD
- siminfo->mOverlayImage = gImageList.getImage(siminfo->mMapImageID[2], MIPMAP_TRUE, FALSE);
+ siminfo->mOverlayImage = LLViewerTextureManager::getFetchedTexture(siminfo->mMapImageID[2], MIPMAP_TRUE, FALSE, LLViewerTexture::LOD_TEXTURE);
#endif
}
else
@@ -862,10 +862,10 @@ void LLWorldMap::dump()
if (info->mCurrentImage)
{
llinfos << "image discard " << (S32)info->mCurrentImage->getDiscardLevel()
- << " fullwidth " << info->mCurrentImage->getWidth(0)
- << " fullheight " << info->mCurrentImage->getHeight(0)
- << " maxvirt " << info->mCurrentImage->mMaxVirtualSize
- << " maxdisc " << (S32)info->mCurrentImage->getMaxDiscardLevel()
+ << " fullwidth " << info->mCurrentImage->getFullWidth()
+ << " fullheight " << info->mCurrentImage->getFullHeight()
+ << " maxvirt " << info->mCurrentImage->getMaxVirtualSize()
+ //<< " maxdisc " << (S32)info->mCurrentImage->getMaxDiscardLevel()
<< llendl;
}
}
diff --git a/indra/newview/llworldmap.h b/indra/newview/llworldmap.h
index 1db081c74a..9daee38752 100644
--- a/indra/newview/llworldmap.h
+++ b/indra/newview/llworldmap.h
@@ -45,7 +45,7 @@
#include "lluuid.h"
#include "llpointer.h"
#include "llsingleton.h"
-#include "llviewerimage.h"
+#include "llviewertexture.h"
#include "lleventinfo.h"
#include "v3color.h"
@@ -96,8 +96,8 @@ public:
LLUUID mMapImageID[MAP_SIM_IMAGE_TYPES];
// Hold a reference to the currently displayed image.
- LLPointer<LLViewerImage> mCurrentImage;
- LLPointer<LLViewerImage> mOverlayImage;
+ LLPointer<LLViewerFetchedTexture> mCurrentImage;
+ LLPointer<LLViewerFetchedTexture> mOverlayImage;
};
#define MAP_BLOCK_RES 256
@@ -105,7 +105,7 @@ public:
struct LLWorldMapLayer
{
BOOL LayerDefined;
- LLPointer<LLViewerImage> LayerImage;
+ LLPointer<LLViewerFetchedTexture> LayerImage;
LLUUID LayerImageID;
LLRect LayerExtents;
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index 9ac758433c..67bc205f62 100644
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -54,8 +54,8 @@
#include "lltextureview.h"
#include "lltracker.h"
#include "llviewercamera.h"
-#include "llviewerimage.h"
-#include "llviewerimagelist.h"
+#include "llviewertexture.h"
+#include "llviewertexturelist.h"
#include "llviewermenu.h"
#include "llviewerparceloverlay.h"
#include "llviewerregion.h"
@@ -284,7 +284,7 @@ BOOL is_agent_in_region(LLViewerRegion* region, LLSimInfo* info)
void LLWorldMapView::draw()
{
- static LLCachedControl<LLColor4> map_track_color(gSavedSkinSettings, "MapTrackColor", LLColor4::white);
+ static LLUIColor map_track_color = LLUIColorTable::instance().getColor("MapTrackColor", LLColor4::white);
LLTextureView::clearDebugImages();
@@ -332,7 +332,7 @@ void LLWorldMapView::draw()
continue;
}
LLWorldMapLayer *layer = &LLWorldMap::getInstance()->mMapLayers[LLWorldMap::getInstance()->mCurrentMap][layer_idx];
- LLViewerImage *current_image = layer->LayerImage;
+ LLViewerFetchedTexture *current_image = layer->LayerImage;
if (current_image->isMissingAsset())
{
@@ -367,10 +367,10 @@ void LLWorldMapView::draw()
continue;
}
- current_image->setBoostLevel(LLViewerImage::BOOST_MAP_LAYER);
+ current_image->setBoostLevel(LLViewerTexture::BOOST_MAP_LAYER);
current_image->setKnownDrawSize(llround(pix_width * LLUI::sGLScaleFactor.mV[VX]), llround(pix_height * LLUI::sGLScaleFactor.mV[VY]));
- if (!current_image->getHasGLTexture())
+ if (!current_image->hasValidGLTexture())
{
continue; // better to draw nothing than the default image
}
@@ -434,8 +434,8 @@ void LLWorldMapView::draw()
U64 handle = (*it).first;
LLSimInfo* info = (*it).second;
- LLViewerImage* simimage = info->mCurrentImage;
- LLViewerImage* overlayimage = info->mOverlayImage;
+ LLViewerFetchedTexture* simimage = info->mCurrentImage;
+ LLViewerFetchedTexture* overlayimage = info->mOverlayImage;
if (gMapScale < SIM_MAP_SCALE)
{
@@ -472,7 +472,7 @@ void LLWorldMapView::draw()
bool sim_visible =
(gMapScale >= map_scale_cutoff) &&
(simimage != NULL) &&
- (simimage->getHasGLTexture());
+ (simimage->hasValidGLTexture());
if (sim_visible)
{
@@ -510,7 +510,7 @@ void LLWorldMapView::draw()
(textures_requested_this_tick < MAX_REQUEST_PER_TICK)))
{
textures_requested_this_tick++;
- info->mCurrentImage = gImageList.getImage(info->mMapImageID[LLWorldMap::getInstance()->mCurrentMap], MIPMAP_TRUE, FALSE);
+ info->mCurrentImage = LLViewerTextureManager::getFetchedTexture(info->mMapImageID[LLWorldMap::getInstance()->mCurrentMap], MIPMAP_TRUE, FALSE, LLViewerTexture::LOD_TEXTURE);
info->mCurrentImage->setAddressMode(LLTexUnit::TAM_CLAMP);
simimage = info->mCurrentImage;
gGL.getTexUnit(0)->bind(simimage);
@@ -523,7 +523,7 @@ void LLWorldMapView::draw()
(textures_requested_this_tick < MAX_REQUEST_PER_TICK)))
{
textures_requested_this_tick++;
- info->mOverlayImage = gImageList.getImage(info->mMapImageID[2], MIPMAP_TRUE, FALSE);
+ info->mOverlayImage = LLViewerTextureManager::getFetchedTexture(info->mMapImageID[2], MIPMAP_TRUE, FALSE, LLViewerTexture::LOD_TEXTURE);
info->mOverlayImage->setAddressMode(LLTexUnit::TAM_CLAMP);
overlayimage = info->mOverlayImage;
gGL.getTexUnit(0)->bind(overlayimage);
@@ -546,13 +546,13 @@ void LLWorldMapView::draw()
S32 draw_size = llround(gMapScale);
if (simimage != NULL)
{
- simimage->setBoostLevel(LLViewerImage::BOOST_MAP);
+ simimage->setBoostLevel(LLViewerTexture::BOOST_MAP);
simimage->setKnownDrawSize(llround(draw_size * LLUI::sGLScaleFactor.mV[VX]), llround(draw_size * LLUI::sGLScaleFactor.mV[VY]));
}
if (overlayimage != NULL)
{
- overlayimage->setBoostLevel(LLViewerImage::BOOST_MAP);
+ overlayimage->setBoostLevel(LLViewerTexture::BOOST_MAP);
overlayimage->setKnownDrawSize(llround(draw_size * LLUI::sGLScaleFactor.mV[VX]), llround(draw_size * LLUI::sGLScaleFactor.mV[VY]));
}
@@ -581,7 +581,7 @@ void LLWorldMapView::draw()
gGL.vertex3f(right, top, 0.f);
gGL.end();
- if (gSavedSettings.getBOOL("MapShowLandForSale") && overlayimage && overlayimage->getHasGLTexture())
+ if (gSavedSettings.getBOOL("MapShowLandForSale") && overlayimage && overlayimage->hasValidGLTexture())
{
gGL.getTexUnit(0)->bind(overlayimage);
gGL.color4f(1.f, 1.f, 1.f, alpha);
@@ -908,8 +908,8 @@ void LLWorldMapView::drawImageStack(const LLVector3d& global_pos, LLUIImagePtr i
void LLWorldMapView::drawAgents()
{
- static LLCachedControl<LLColor4> map_avatar_color(gSavedSkinSettings, "MapAvatarColor", LLColor4::white);
- static LLCachedControl<LLColor4> map_avatar_friend_color(gSavedSkinSettings, "MapAvatarFriendColor", LLColor4::white);
+ static LLUIColor map_avatar_color = LLUIColorTable::instance().getColor("MapAvatarColor", LLColor4::white);
+ static LLUIColor map_avatar_friend_color = LLUIColorTable::instance().getColor("MapAvatarFriendColor", LLColor4::white);
F32 agents_scale = (gMapScale * 0.9f) / 256.f;
@@ -1228,12 +1228,11 @@ BOOL LLWorldMapView::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* stic
msg += region_flags;
}
- S32 SLOP = 4;
- localPointToScreen(
- x - SLOP, y - SLOP,
- &(sticky_rect_screen->mLeft), &(sticky_rect_screen->mBottom) );
- sticky_rect_screen->mRight = sticky_rect_screen->mLeft + 2 * SLOP;
- sticky_rect_screen->mTop = sticky_rect_screen->mBottom + 2 * SLOP;
+ const S32 SLOP = 9;
+ S32 screen_x, screen_y;
+
+ localPointToScreen(x, y, &screen_x, &screen_y);
+ sticky_rect_screen->setCenterAndSize(screen_x, screen_y, SLOP, SLOP);
}
return TRUE;
}
diff --git a/indra/newview/llworldmapview.h b/indra/newview/llworldmapview.h
index dd64da1371..41c9772694 100644
--- a/indra/newview/llworldmapview.h
+++ b/indra/newview/llworldmapview.h
@@ -39,7 +39,7 @@
#include "v3math.h"
#include "v3dmath.h"
#include "v4color.h"
-#include "llviewerimage.h"
+#include "llviewertexture.h"
#include "llmapimagetype.h"
#include "llworldmap.h"
@@ -50,7 +50,7 @@ const S32 DEFAULT_TRACKING_ARROW_SIZE = 16;
class LLColor4;
class LLColor4U;
class LLCoordGL;
-class LLViewerImage;
+class LLViewerTexture;
class LLTextBox;
diff --git a/indra/newview/macview_Prefix.h b/indra/newview/macview_Prefix.h
index 33cf7d8cb0..a273320b3d 100644
--- a/indra/newview/macview_Prefix.h
+++ b/indra/newview/macview_Prefix.h
@@ -75,7 +75,6 @@
#include "llfloatertools.h"
#include "llhudeffectlookat.h"
#include "llhudmanager.h"
-#include "llinventoryview.h"
#include "lljoystickbutton.h"
#include "llmenugl.h"
#include "llmorphview.h"
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 25ed853146..38c81bf027 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -76,7 +76,7 @@
#include "lltool.h"
#include "lltoolmgr.h"
#include "llviewercamera.h"
-#include "llviewerimagelist.h"
+#include "llviewertexturelist.h"
#include "llviewerobject.h"
#include "llviewerobjectlist.h"
#include "llviewerparcelmgr.h"
@@ -751,9 +751,9 @@ S32 LLPipeline::setLightingDetail(S32 level)
class LLOctreeDirtyTexture : public LLOctreeTraveler<LLDrawable>
{
public:
- const std::set<LLViewerImage*>& mTextures;
+ const std::set<LLViewerFetchedTexture*>& mTextures;
- LLOctreeDirtyTexture(const std::set<LLViewerImage*>& textures) : mTextures(textures) { }
+ LLOctreeDirtyTexture(const std::set<LLViewerFetchedTexture*>& textures) : mTextures(textures) { }
virtual void visit(const LLOctreeNode<LLDrawable>* node)
{
@@ -766,7 +766,8 @@ public:
for (LLSpatialGroup::drawmap_elem_t::iterator j = i->second.begin(); j != i->second.end(); ++j)
{
LLDrawInfo* params = *j;
- if (mTextures.find(params->mTexture) != mTextures.end())
+ LLViewerFetchedTexture* tex = LLViewerTextureManager::staticCastToFetchedTexture(params->mTexture);
+ if (tex && mTextures.find(tex) != mTextures.end())
{
group->setState(LLSpatialGroup::GEOM_DIRTY);
}
@@ -783,7 +784,7 @@ public:
};
// Called when a texture changes # of channels (causes faces to move to alpha pool)
-void LLPipeline::dirtyPoolObjectTextures(const std::set<LLViewerImage*>& textures)
+void LLPipeline::dirtyPoolObjectTextures(const std::set<LLViewerFetchedTexture*>& textures)
{
assertInitialized();
@@ -815,7 +816,7 @@ void LLPipeline::dirtyPoolObjectTextures(const std::set<LLViewerImage*>& texture
}
}
-LLDrawPool *LLPipeline::findPool(const U32 type, LLViewerImage *tex0)
+LLDrawPool *LLPipeline::findPool(const U32 type, LLViewerTexture *tex0)
{
assertInitialized();
@@ -887,7 +888,7 @@ LLDrawPool *LLPipeline::findPool(const U32 type, LLViewerImage *tex0)
}
-LLDrawPool *LLPipeline::getPool(const U32 type, LLViewerImage *tex0)
+LLDrawPool *LLPipeline::getPool(const U32 type, LLViewerTexture *tex0)
{
LLMemType mt(LLMemType::MTYPE_PIPELINE);
LLDrawPool *poolp = findPool(type, tex0);
@@ -904,7 +905,7 @@ LLDrawPool *LLPipeline::getPool(const U32 type, LLViewerImage *tex0)
// static
-LLDrawPool* LLPipeline::getPoolFromTE(const LLTextureEntry* te, LLViewerImage* imagep)
+LLDrawPool* LLPipeline::getPoolFromTE(const LLTextureEntry* te, LLViewerTexture* imagep)
{
LLMemType mt(LLMemType::MTYPE_PIPELINE);
U32 type = getPoolTypeFromTE(te, imagep);
@@ -912,7 +913,7 @@ LLDrawPool* LLPipeline::getPoolFromTE(const LLTextureEntry* te, LLViewerImage* i
}
//static
-U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerImage* imagep)
+U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* imagep)
{
LLMemType mt_gpt(LLMemType::MTYPE_PIPELINE_GET_POOL_TYPE);
@@ -924,7 +925,7 @@ U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerImage* image
bool alpha = te->getColor().mV[3] < 0.999f;
if (imagep)
{
- alpha = alpha || (imagep->getComponents() == 4 && ! imagep->mIsMediaTexture) || (imagep->getComponents() == 2);
+ alpha = alpha || (imagep->getComponents() == 4 && imagep->getType() != LLViewerTexture::MEDIA_TEXTURE) || (imagep->getComponents() == 2);
}
if (alpha)
@@ -2446,7 +2447,7 @@ void LLPipeline::renderHighlights()
// Make sure the selection image gets downloaded and decoded
if (!mFaceSelectImagep)
{
- mFaceSelectImagep = gImageList.getImage(IMG_FACE_SELECT);
+ mFaceSelectImagep = LLViewerTextureManager::getFetchedTexture(IMG_FACE_SELECT);
}
mFaceSelectImagep->addTextureStats((F32)MAX_IMAGE_AREA);
@@ -2476,7 +2477,7 @@ void LLPipeline::renderHighlights()
for (S32 i = 0; i < count; i++)
{
LLFace* facep = mHighlightFaces[i];
- facep->renderSelected(LLViewerImage::sNullImagep, color);
+ facep->renderSelected(LLViewerTexture::sNullImagep, color);
}
}
@@ -2565,8 +2566,8 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
sUnderWaterRender = FALSE;
}
- gGL.getTexUnit(0)->bind(LLViewerImage::sDefaultImagep);
- LLViewerImage::sDefaultImagep->setAddressMode(LLTexUnit::TAM_WRAP);
+ gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sDefaultImagep);
+ LLViewerFetchedTexture::sDefaultImagep->setAddressMode(LLTexUnit::TAM_WRAP);
//////////////////////////////////////////////
//
@@ -5094,8 +5095,8 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
F32 minLum = llmax(gSavedSettings.getF32("RenderGlowMinLuminance"), 0.0f);
F32 maxAlpha = gSavedSettings.getF32("RenderGlowMaxExtractAlpha");
F32 warmthAmount = gSavedSettings.getF32("RenderGlowWarmthAmount");
- LLVector3 lumWeights = gSavedSkinSettings.getVector3("RenderGlowLumWeights");
- LLVector3 warmthWeights = gSavedSkinSettings.getVector3("RenderGlowWarmthWeights");
+ LLVector3 lumWeights = gSavedSettings.getVector3("RenderGlowLumWeights");
+ LLVector3 warmthWeights = gSavedSettings.getVector3("RenderGlowWarmthWeights");
gGlowExtractProgram.uniform1f("minLuminance", minLum);
gGlowExtractProgram.uniform1f("maxExtractAlpha", maxAlpha);
gGlowExtractProgram.uniform3f("lumWeights", lumWeights.mV[0], lumWeights.mV[1], lumWeights.mV[2]);
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 5358fce766..fc02e7dd88 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -46,7 +46,7 @@
#include "lldrawable.h"
#include "llrendertarget.h"
-class LLViewerImage;
+class LLViewerTexture;
class LLEdge;
class LLFace;
class LLViewerObject;
@@ -104,15 +104,15 @@ public:
/// @brief Get a draw pool from pool type (POOL_SIMPLE, POOL_MEDIA) and texture.
/// @return Draw pool, or NULL if not found.
- LLDrawPool *findPool(const U32 pool_type, LLViewerImage *tex0 = NULL);
+ LLDrawPool *findPool(const U32 pool_type, LLViewerTexture *tex0 = NULL);
/// @brief Get a draw pool for faces of the appropriate type and texture. Create if necessary.
/// @return Always returns a draw pool.
- LLDrawPool *getPool(const U32 pool_type, LLViewerImage *tex0 = NULL);
+ LLDrawPool *getPool(const U32 pool_type, LLViewerTexture *tex0 = NULL);
/// @brief Figures out draw pool type from texture entry. Creates pool if necessary.
- static LLDrawPool* getPoolFromTE(const LLTextureEntry* te, LLViewerImage* te_image);
- static U32 getPoolTypeFromTE(const LLTextureEntry* te, LLViewerImage* imagep);
+ static LLDrawPool* getPoolFromTE(const LLTextureEntry* te, LLViewerTexture* te_image);
+ static U32 getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* imagep);
void addPool(LLDrawPool *poolp); // Only to be used by LLDrawPool classes for splitting pools!
void removePool( LLDrawPool* poolp );
@@ -150,7 +150,7 @@ public:
);
// Something about these textures has changed. Dirty them.
- void dirtyPoolObjectTextures(const std::set<LLViewerImage*>& textures);
+ void dirtyPoolObjectTextures(const std::set<LLViewerFetchedTexture*>& textures);
void resetDrawOrders();
@@ -561,9 +561,9 @@ public:
protected:
std::vector<LLFace*> mSelectedFaces;
- LLPointer<LLViewerImage> mFaceSelectImagep;
- LLPointer<LLViewerImage> mBloomImagep;
- LLPointer<LLViewerImage> mBloomImage2p;
+ LLPointer<LLViewerFetchedTexture> mFaceSelectImagep;
+ LLPointer<LLViewerTexture> mBloomImagep;
+ LLPointer<LLViewerTexture> mBloomImage2p;
U32 mLightMask;
U32 mLightMovingMask;
diff --git a/indra/newview/res/viewerRes.rc b/indra/newview/res/viewerRes.rc
index a902a6dff0..87a8bd5787 100644
--- a/indra/newview/res/viewerRes.rc
+++ b/indra/newview/res/viewerRes.rc
@@ -138,8 +138,8 @@ TOOLMEDIAOPEN CURSOR "toolmediaopen.cur"
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,24,0,0
- PRODUCTVERSION 1,24,0,0
+ FILEVERSION 2,0,0,0
+ PRODUCTVERSION 2,0,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -156,12 +156,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Linden Lab"
VALUE "FileDescription", "Second Life"
- VALUE "FileVersion", "1.24.0.0"
+ VALUE "FileVersion", "2.0.0.0"
VALUE "InternalName", "Second Life"
VALUE "LegalCopyright", "Copyright 2001-2008, Linden Research, Inc."
VALUE "OriginalFilename", "SecondLife.exe"
VALUE "ProductName", "Second Life"
- VALUE "ProductVersion", "1.24.0.0"
+ VALUE "ProductVersion", "2.0.0.0"
END
END
BLOCK "VarFileInfo"
diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index 49ea0bc8aa..d55f9fa42f 100644
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -1,3157 +1,667 @@
-<?xml version="1.0"?>
-<llsd>
- <map>
- <key>AgentChatColor</key>
- <map>
- <key>Comment</key>
- <string>Color of chat messages from other residents</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>AlertBoxColor</key>
- <map>
- <key>Comment</key>
- <string>Alert Box Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.24</real>
- <real>0.24</real>
- <real>0.24</real>
- <real>1</real>
- </array>
- </map>
- <key>AlertCautionBoxColor</key>
- <map>
- <key>Comment</key>
- <string>Alert Caution Box Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>0.82</real>
- <real>0.46</real>
- <real>1</real>
- </array>
- </map>
- <key>AlertCautionTextColor</key>
- <map>
- <key>Comment</key>
- <string>Alert Caution Text Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>1</real>
- </array>
- </map>
- <key>AlertTextColor</key>
- <map>
- <key>Comment</key>
- <string>Alert Text Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.58</real>
- <real>0.66</real>
- <real>0.84</real>
- <real>1</real>
- </array>
- </map>
- <key>AvatarNameColor</key>
- <map>
- <key>Comment</key>
- <string>Avatar Name Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.98</real>
- <real>0.69</real>
- <real>0.36</real>
- <real>1</real>
- </array>
- </map>
- <key>BackgroundChatColor</key>
- <map>
- <key>Comment</key>
- <string>Color of chat bubble background</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.0</real>
- <real>0.0</real>
- <real>0.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ButtonBorderColor</key>
- <map>
- <key>Comment</key>
- <string>Button Border Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.94</real>
- <real>0.61</real>
- <real>0</real>
- <real>1</real>
- </array>
- </map>
- <key>ButtonCautionImageColor</key>
- <map>
- <key>Comment</key>
- <string>Button Caution Image Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- </array>
- </map>
- <key>ButtonColor</key>
- <map>
- <key>Comment</key>
- <string>Button Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- </array>
- </map>
- <key>ButtonFlashBgColor</key>
- <map>
- <key>Comment</key>
- <string>Button Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>0.75</real>
- <real>0.24</real>
- <real>0.5</real>
- </array>
- </map>
- <key>ButtonImageColor</key>
- <map>
- <key>Comment</key>
- <string>Button Image Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- </array>
- </map>
- <key>ButtonLabelColor</key>
- <map>
- <key>Comment</key>
- <string>Button Label Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.86</real>
- <real>0.86</real>
- <real>0.86</real>
- <real>1</real>
- </array>
- </map>
- <key>ButtonLabelDisabledColor</key>
- <map>
- <key>Comment</key>
- <string>Button Label Disabled Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.58</real>
- <real>0.66</real>
- <real>0.84</real>
- <real>0.78</real>
- </array>
- </map>
- <key>ButtonLabelSelectedColor</key>
- <map>
- <key>Comment</key>
- <string>Button Label Selected Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.86</real>
- <real>0.86</real>
- <real>0.86</real>
- <real>1</real>
- </array>
- </map>
- <key>ButtonLabelSelectedDisabledColor</key>
- <map>
- <key>Comment</key>
- <string>Button Label Selected Disabled Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.64</real>
- <real>0.75</real>
- <real>0.93</real>
- <real>0.78</real>
- </array>
- </map>
- <key>ButtonSelectedBgColor</key>
- <map>
- <key>Comment</key>
- <string>Button Selected Bg Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.24</real>
- <real>0.24</real>
- <real>0.24</real>
- <real>1</real>
- </array>
- </map>
- <key>ButtonSelectedColor</key>
- <map>
- <key>Comment</key>
- <string>Button Selected Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- </array>
- </map>
- <key>ButtonUnselectedBgColor</key>
- <map>
- <key>Comment</key>
- <string>Button Unselected Bg Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.24</real>
- <real>0.24</real>
- <real>0.24</real>
- <real>1</real>
- </array>
- </map>
- <key>ButtonUnselectedFgColor</key>
- <map>
- <key>Comment</key>
- <string>Button Unselected Fg Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- </array>
- </map>
- <key>ChatHistoryBgColor</key>
- <map>
- <key>Comment</key>
- <string>Chat History Bg Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- </array>
- </map>
- <key>ChatHistoryTextColor</key>
- <map>
- <key>Comment</key>
- <string>Chat History Text Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- </array>
- </map>
- <key>ColorDropShadow</key>
- <map>
- <key>Comment</key>
- <string>Color Drop Shadow</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>0.78</real>
- </array>
- </map>
- <key>ColorPaletteEntry01</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.0</real>
- <real>0.0</real>
- <real>0.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry02</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.5</real>
- <real>0.5</real>
- <real>0.5</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry03</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.5</real>
- <real>0.0</real>
- <real>0.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry04</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.5</real>
- <real>0.5</real>
- <real>0.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry05</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.0</real>
- <real>0.5</real>
- <real>0.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry06</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.0</real>
- <real>0.5</real>
- <real>0.5</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry07</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.0</real>
- <real>0.0</real>
- <real>0.5</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry08</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.5</real>
- <real>0.0</real>
- <real>0.5</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry09</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.5</real>
- <real>0.5</real>
- <real>0.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry10</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.0</real>
- <real>0.25</real>
- <real>0.25</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry11</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.0</real>
- <real>0.5</real>
- <real>1.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry12</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.0</real>
- <real>0.25</real>
- <real>0.5</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry13</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.5</real>
- <real>0.0</real>
- <real>1.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry14</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.5</real>
- <real>0.25</real>
- <real>0.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry15</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry16</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry17</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry18</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.75</real>
- <real>0.75</real>
- <real>0.75</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry19</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1.0</real>
- <real>0.0</real>
- <real>0.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry20</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1.0</real>
- <real>1.0</real>
- <real>0.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry21</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.0</real>
- <real>1.0</real>
- <real>0.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry22</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.0</real>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry23</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.0</real>
- <real>0.0</real>
- <real>1.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry24</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1.0</real>
- <real>0.0</real>
- <real>1.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry25</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1.0</real>
- <real>1.0</real>
- <real>0.5</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry26</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.0</real>
- <real>1.0</real>
- <real>0.5</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry27</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.5</real>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry28</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.5</real>
- <real>0.5</real>
- <real>1.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry29</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1.0</real>
- <real>0.0</real>
- <real>0.5</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry30</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1.0</real>
- <real>0.5</real>
- <real>0.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry31</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ColorPaletteEntry32</key>
- <map>
- <key>Comment</key>
- <string>Color picker palette entry</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ConsoleBackground</key>
- <map>
- <key>Comment</key>
- <string>Console Background</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>1</real>
- </array>
- </map>
- <key>ContextSilhouetteColor</key>
- <map>
- <key>Comment</key>
- <string>Context Silhouette Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.94</real>
- <real>0.61</real>
- <real>0</real>
- <real>1</real>
- </array>
- </map>
- <key>DefaultHighlightDark</key>
- <map>
- <key>Comment</key>
- <string>Default Highlight Dark</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.1</real>
- <real>0.1</real>
- <real>0.1</real>
- <real>1</real>
- </array>
- </map>
- <key>DefaultHighlightLight</key>
- <map>
- <key>Comment</key>
- <string>Default Highlight Light</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.45</real>
- <real>0.52</real>
- <real>0.61</real>
- <real>1</real>
- </array>
- </map>
- <key>DefaultShadowDark</key>
- <map>
- <key>Comment</key>
- <string>Default Shadow Dark</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.1</real>
- <real>0.1</real>
- <real>0.1</real>
- <real>1</real>
- </array>
- </map>
- <key>DefaultShadowLight</key>
- <map>
- <key>Comment</key>
- <string>Default Shadow Light</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>1</real>
- </array>
- </map>
- <key>EffectColor</key>
- <map>
- <key>Comment</key>
- <string>Particle effects color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>FilterBackgroundColor</key>
- <map>
- <key>Comment</key>
- <string>Filter Background Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0.08</real>
- <real>1</real>
- </array>
- </map>
- <key>FilterTextColor</key>
- <map>
- <key>Comment</key>
- <string>Filter Text Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>0.78</real>
- <real>0.27</real>
- <real>1</real>
- </array>
- </map>
- <key>FloaterButtonImageColor</key>
- <map>
- <key>Comment</key>
- <string>Floater Button Image Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.94</real>
- <real>0.61</real>
- <real>0</real>
- <real>1</real>
- </array>
- </map>
- <key>FloaterDefaultBackgroundColor</key>
- <map>
- <key>Comment</key>
- <string>Default Background Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.24</real>
- <real>0.24</real>
- <real>0.24</real>
- <real>0.55</real>
- </array>
- </map>
- <key>FloaterFocusBackgroundColor</key>
- <map>
- <key>Comment</key>
- <string>Focus Background Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.24</real>
- <real>0.24</real>
- <real>0.24</real>
- <real>1</real>
- </array>
- </map>
- <key>FloaterFocusBorderColor</key>
- <map>
- <key>Comment</key>
- <string>Floater Focus Border Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>0.31</real>
- </array>
- </map>
- <key>FloaterUnfocusBorderColor</key>
- <map>
- <key>Comment</key>
- <string>Floater Unfocus Border Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>0.31</real>
- </array>
- </map>
- <key>FocusColor</key>
- <map>
- <key>Comment</key>
- <string>Focus Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.94</real>
- <real>0.61</real>
- <real>0</real>
- <real>1</real>
- </array>
- </map>
- <key>FolderViewLoadingMessageTextColor</key>
- <map>
- <key>Comment</key>
- <string>Folder View Loading Message Text Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.94</real>
- <real>0.65</real>
- <real>0.35</real>
- <real>1</real>
- </array>
- </map>
- <key>GridFocusPointColor</key>
- <map>
- <key>Comment</key>
- <string>Grid Focus Point Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- <real>0.5</real>
- </array>
- </map>
- <key>GridlineBGColor</key>
- <map>
- <key>Comment</key>
- <string>Gridline BGColor</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.92</real>
- <real>0.92</real>
- <real>1</real>
- <real>0.78</real>
- </array>
- </map>
- <key>GridlineColor</key>
- <map>
- <key>Comment</key>
- <string>Gridline Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- </array>
- </map>
- <key>GridlineShadowColor</key>
- <map>
- <key>Comment</key>
- <string>Gridline Shadow Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>0.31</real>
- </array>
- </map>
- <key>GroupNotifyBoxColor</key>
- <map>
- <key>Comment</key>
- <string>Group Notify Box Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.27</real>
- <real>0.67</real>
- <real>1</real>
- <real>1</real>
- </array>
- </map>
- <key>GroupNotifyTextColor</key>
- <map>
- <key>Comment</key>
- <string>Group Notify Text Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0.12</real>
- <real>0.24</real>
- <real>1</real>
- </array>
- </map>
- <key>GroupOverTierColor</key>
- <map>
- <key>Comment</key>
- <string>Group Over Tier Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.43</real>
- <real>0.06</real>
- <real>0.06</real>
- <real>1</real>
- </array>
- </map>
- <key>HTMLLinkColor</key>
- <map>
- <key>Comment</key>
- <string>Color of hyperlinks</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.60</real>
- <real>0.60</real>
- <real>1.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>HealthTextColor</key>
- <map>
- <key>Comment</key>
- <string>Health Text Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- </array>
- </map>
- <key>HelpBgColor</key>
- <map>
- <key>Comment</key>
- <string>Help Bg Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.78</real>
- <real>0.82</real>
- <real>0.8</real>
- <real>1</real>
- </array>
- </map>
- <key>HelpFgColor</key>
- <map>
- <key>Comment</key>
- <string>Help Fg Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>1</real>
- </array>
- </map>
- <key>HelpScrollHighlightColor</key>
- <map>
- <key>Comment</key>
- <string>Help Scroll Highlight Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.45</real>
- <real>0.52</real>
- <real>0.61</real>
- <real>1</real>
- </array>
- </map>
- <key>HelpScrollShadowColor</key>
- <map>
- <key>Comment</key>
- <string>Help Scroll Shadow Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>1</real>
- </array>
- </map>
- <key>HelpScrollThumbColor</key>
- <map>
- <key>Comment</key>
- <string>Help Scroll Thumb Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.31</real>
- <real>0.38</real>
- <real>0.49</real>
- <real>1</real>
- </array>
- </map>
- <key>HelpScrollTrackColor</key>
- <map>
- <key>Comment</key>
- <string>Help Scroll Track Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.72</real>
- <real>0.72</real>
- <real>0.74</real>
- <real>1</real>
- </array>
- </map>
- <key>HighlightChildColor</key>
- <map>
- <key>Comment</key>
- <string>Highlight Child Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.67</real>
- <real>0.83</real>
- <real>0.96</real>
- <real>1</real>
- </array>
- </map>
- <key>HighlightInspectColor</key>
- <map>
- <key>Comment</key>
- <string>Highlight Inspect Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>0</real>
- <real>1</real>
- <real>1</real>
- </array>
- </map>
- <key>HighlightParentColor</key>
- <map>
- <key>Comment</key>
- <string>Highlight Parent Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.67</real>
- <real>0.83</real>
- <real>0.96</real>
- <real>1</real>
- </array>
- </map>
- <key>IMChatColor</key>
- <map>
- <key>Comment</key>
- <string>Color of instant messages from other residents</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>IMHistoryBgColor</key>
- <map>
- <key>Comment</key>
- <string>IMHistory Bg Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0.12</real>
- <real>0.31</real>
- <real>0.78</real>
- </array>
- </map>
- <key>IMHistoryTextColor</key>
- <map>
- <key>Comment</key>
- <string>IMHistory Text Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- </array>
- </map>
- <key>IconDisabledColor</key>
- <map>
- <key>Comment</key>
- <string>Icon Disabled Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.58</real>
- <real>0.66</real>
- <real>0.84</real>
- <real>0.78</real>
- </array>
- </map>
- <key>IconEnabledColor</key>
- <map>
- <key>Comment</key>
- <string>Icon Enabled Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- </array>
- </map>
- <key>InventoryBackgroundColor</key>
- <map>
- <key>Comment</key>
- <string>Inventory Background Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.24</real>
- <real>0.24</real>
- <real>0.24</real>
- <real>0.31</real>
- </array>
- </map>
- <key>InventoryItemSuffixColor</key>
- <map>
- <key>Comment</key>
- <string>Inventory Item Suffix Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.75</real>
- <real>0.85</real>
- <real>0.85</real>
- <real>1</real>
- </array>
- </map>
- <key>InventorySearchStatusColor</key>
- <map>
- <key>Comment</key>
- <string>Inventory Search Status Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- </array>
- </map>
- <key>LabelDisabledColor</key>
- <map>
- <key>Comment</key>
- <string>Label Disabled Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.58</real>
- <real>0.66</real>
- <real>0.84</real>
- <real>0.3</real>
- </array>
- </map>
- <key>LabelSelectedColor</key>
- <map>
- <key>Comment</key>
- <string>Label Selected Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- </array>
- </map>
- <key>LabelSelectedDisabledColor</key>
- <map>
- <key>Comment</key>
- <string>Label Selected Disabled Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.64</real>
- <real>0.75</real>
- <real>0.93</real>
- <real>0.5</real>
- </array>
- </map>
- <key>LabelTextColor</key>
- <map>
- <key>Comment</key>
- <string>Label Text Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.58</real>
- <real>0.66</real>
- <real>0.84</real>
- <real>1</real>
- </array>
- </map>
- <key>LoginProgressBarBgColor</key>
- <map>
- <key>Comment</key>
- <string>Login Progress Bar Bg Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- </array>
- </map>
- <key>LoginProgressBarFgColor</key>
- <map>
- <key>Comment</key>
- <string>Login Progress Bar Fg Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- </array>
- </map>
- <key>LoginProgressBoxBorderColor</key>
- <map>
- <key>Comment</key>
- <string>Login Progress Box Border Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0.12</real>
- <real>0.24</real>
- <real>0</real>
- </array>
- </map>
- <key>LoginProgressBoxCenterColor</key>
- <map>
- <key>Comment</key>
- <string>Login Progress Box Center Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>0.78</real>
- </array>
- </map>
- <key>LoginProgressBoxShadowColor</key>
- <map>
- <key>Comment</key>
- <string>Login Progress Box Shadow Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>0.78</real>
- </array>
- </map>
- <key>LoginProgressBoxTextColor</key>
- <map>
- <key>Comment</key>
- <string>Login Progress Box Text Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- </array>
- </map>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<colors>
+
+ <!-- Named Colors -->
+
+ <color
+ name="EmphasisColor"
+ value="0.38 0.694 0.573 1" />
+ <color
+ name="EmphasisColor_13"
+ value="0.38 0.694 0.573 0.13" />
+ <color
+ name="EmphasisColor_35"
+ value="0.38 0.694 0.573 0.35" />
+ <color
+ name="White"
+ value="1 1 1 1" />
+ <color
+ name="White_05"
+ value="1 1 1 0.05" />
+ <color
+ name="White_10"
+ value="1 1 1 0.1" />
+ <color
+ name="White_25"
+ value="1 1 1 0.25" />
+ <color
+ name="White_50"
+ value="1 1 1 0.5" />
+ <color
+ name="LtGray"
+ value="0.75 0.75 0.75 1" />
+ <color
+ name="LtGray_50"
+ value="0.75 0.75 0.75 0.50" />
+ <color
+ name="DkGray"
+ value="0.125 0.125 0.125 1" />
+ <color
+ name="DkGray_66"
+ value="0.125 0.125 0.125 .66" />
+ <color
+ name="DkGray2"
+ value="0.169 0.169 0.169 1" />
+ <color
+ name="Black"
+ value="0 0 0 1" />
+ <color
+ name="Black_10"
+ value="0 0 0 0.1" />
+ <color
+ name="Black_25"
+ value="0 0 0 0.25" />
+ <color
+ name="Black_50"
+ value="0 0 0 0.5" />
+ <color
+ name="Red"
+ value="1 0 0 1" />
+ <color
+ name="Green"
+ value="0 1 0 1" />
+ <color
+ name="Blue"
+ value="0 0 1 1" />
+ <color
+ name="Unused?"
+ value="1 0 1 1" />
+ <color
+ name="Transparent"
+ value="0 0 0 0" />
+
+
+
+ <!-- UI Definitions -->
+
+ <color
+ name="AgentChatColor"
+ reference="LtGray" />
+ <color
+ name="AlertBoxColor"
+ value="0.24 0.24 0.24 1" />
+ <color
+ name="AlertCautionBoxColor"
+ value="1 0.82 0.46 1" />
+ <color
+ name="AlertCautionTextColor"
+ reference="Black" />
+ <color
+ name="AlertTextColor"
+ value="0.58 0.66 0.84 1" />
+ <color
+ name="AvatarNameColor"
+ value="0.98 0.69 0.36 1" />
+ <color
+ name="BackgroundChatColor"
+ reference="DkGray_66" />
+ <color
+ name="ButtonBorderColor"
+ reference="Unused?" />
+ <color
+ name="ButtonCautionImageColor"
+ reference="Unused?" />
+ <color
+ name="ButtonColor"
+ reference="Unused?" />
+ <color
+ name="ButtonFlashBgColor"
+ reference="Unused?" />
+ <color
+ name="ButtonImageColor"
+ reference="White" />
+ <color
+ name="ButtonLabelColor"
+ reference="LtGray" />
+ <color
+ name="ButtonLabelDisabledColor"
+ reference="LtGray_50" />
+ <color
+ name="ButtonLabelSelectedColor"
+ reference="White" />
+ <color
+ name="ButtonLabelSelectedDisabledColor"
+ reference="White_50" />
+ <color
+ name="ButtonSelectedBgColor"
+ reference="Unused?" />
+ <color
+ name="ButtonSelectedColor"
+ reference="Unused?" />
+ <color
+ name="ButtonUnselectedBgColor"
+ reference="Unused?" />
+ <color
+ name="ButtonUnselectedFgColor"
+ reference="Unused?" />
+ <color
+ name="ChatHistoryBgColor"
+ reference="Transparent" />
+ <color
+ name="ChatHistoryTextColor"
+ reference="LtGray" />
+ <color
+ name="ColorDropShadow"
+ reference="Black_50" />
+ <color
+ name="ColorPaletteEntry01"
+ value="0 0 0 1" />
+ <color
+ name="ColorPaletteEntry02"
+ value="0.5 0.5 0.5 1" />
+ <color
+ name="ColorPaletteEntry03"
+ value="0.3344 0.5456 0.5159 1" />
+ <color
+ name="ColorPaletteEntry04"
+ value="0.5 0.5 0 1" />
+ <color
+ name="ColorPaletteEntry05"
+ value="0 0.5 0 1" />
+ <color
+ name="ColorPaletteEntry06"
+ value="0 0.5 0.5 1" />
+ <color
+ name="ColorPaletteEntry07"
+ value="0 0 0.5 1" />
+ <color
+ name="ColorPaletteEntry08"
+ value="0.5 0 0.5 1" />
+ <color
+ name="ColorPaletteEntry09"
+ value="0.5 0.5 0 1" />
+ <color
+ name="ColorPaletteEntry10"
+ value="0 0.25 0.25 1" />
+ <color
+ name="ColorPaletteEntry11"
+ value="0 0.5 1 1" />
+ <color
+ name="ColorPaletteEntry12"
+ value="0 0.25 0.5 1" />
+ <color
+ name="ColorPaletteEntry13"
+ value="0.5 0 1 1" />
+ <color
+ name="ColorPaletteEntry14"
+ value="0.5 0.25 0 1" />
+ <color
+ name="ColorPaletteEntry15"
+ value="1 1 1 1" />
+ <color
+ name="ColorPaletteEntry16"
+ value="1 1 1 1" />
+ <color
+ name="ColorPaletteEntry17"
+ value="1 1 1 1" />
+ <color
+ name="ColorPaletteEntry18"
+ value="0.75 0.75 0.75 1" />
+ <color
+ name="ColorPaletteEntry19"
+ value="1 0 0 1" />
+ <color
+ name="ColorPaletteEntry20"
+ reference="Unused?" />
+ <color
+ name="ColorPaletteEntry21"
+ value="0 1 0 1" />
+ <color
+ name="ColorPaletteEntry22"
+ value="0 1 1 1" />
+ <color
+ name="ColorPaletteEntry23"
+ value="0 0 1 1" />
+ <color
+ name="ColorPaletteEntry24"
+ value="1 0 1 1" />
+ <color
+ name="ColorPaletteEntry25"
+ value="1 1 0.5 1" />
+ <color
+ name="ColorPaletteEntry26"
+ value="0 1 0.5 1" />
+ <color
+ name="ColorPaletteEntry27"
+ value="0.5 1 1 1" />
+ <color
+ name="ColorPaletteEntry28"
+ value="0.5 0.5 1 1" />
+ <color
+ name="ColorPaletteEntry29"
+ value="1 0 0.5 1" />
+ <color
+ name="ColorPaletteEntry30"
+ value="1 0.5 0 1" />
+ <color
+ name="ColorPaletteEntry31"
+ value="1 1 1 1" />
+ <color
+ name="ColorPaletteEntry32"
+ value="1 1 1 1" />
+ <color
+ name="ConsoleBackground"
+ reference="Black" />
+ <color
+ name="ContextSilhouetteColor"
+ value="0.94 0.61 0 1" />
+ <color
+ name="DefaultHighlightDark"
+ reference="White_10" />
+ <color
+ name="DefaultHighlightLight"
+ reference="White_25" />
+ <color
+ name="DefaultShadowDark"
+ reference="Black_50" />
+ <color
+ name="DefaultShadowLight"
+ reference="Black_50" />
+ <color
+ name="EffectColor"
+ reference="White" />
+ <color
+ name="FilterBackgroundColor"
+ reference="FloaterDefaultBackgroundColor" />
+ <color
+ name="FilterTextColor"
+ value="1 0.78 0.27 1" />
+ <color
+ name="FloaterButtonImageColor"
+ reference="LtGray" />
+ <color
+ name="FloaterDefaultBackgroundColor"
+ reference="DkGray_66" />
+ <color
+ name="FloaterFocusBackgroundColor"
+ reference="DkGray2" />
+ <color
+ name="FloaterFocusBorderColor"
+ reference="Black_50" />
+ <color
+ name="FloaterUnfocusBorderColor"
+ reference="Black_50" />
+ <color
+ name="FocusColor"
+ reference="EmphasisColor" />
+ <color
+ name="FolderViewLoadingMessageTextColor"
+ value="0.3344 0.5456 0.5159 1" />
+ <color
+ name="GridFocusPointColor"
+ reference="White_50" />
+ <color
+ name="GridlineBGColor"
+ value="0.92 0.92 1 0.78" />
+ <color
+ name="GridlineColor"
+ value="1 0 0 1" />
+ <color
+ name="GridlineShadowColor"
+ value="0 0 0 0.31" />
+ <color
+ name="GroupNotifyBoxColor"
+ value="0.3344 0.5456 0.5159 1" />
+ <color
+ name="GroupNotifyTextColor"
+ reference="White"/>
+ <color
+ name="GroupNotifyDimmedTextColor"
+ reference="DkGray"/>
+ <color
+ name="GroupOverTierColor"
+ value="0.43 0.06 0.06 1" />
+ <color
+ name="HTMLLinkColor"
+ reference="EmphasisColor" />
+ <color
+ name="HealthTextColor"
+ reference="White" />
+ <color
+ name="HelpBgColor"
+ reference="Unused?" />
+ <color
+ name="HelpFgColor"
+ reference="Unused?" />
+ <color
+ name="HelpScrollHighlightColor"
+ reference="Unused?" />
+ <color
+ name="HelpScrollShadowColor"
+ reference="Unused?" />
+ <color
+ name="HelpScrollThumbColor"
+ reference="Unused?" />
+ <color
+ name="HelpScrollTrackColor"
+ reference="Unused?" />
+ <color
+ name="HighlightChildColor"
+ reference="Unused?" />
+ <color
+ name="HighlightInspectColor"
+ value="1 0.5 0 1" />
+ <color
+ name="HighlightParentColor"
+ value="0.67 0.83 0.96 1" />
+ <color
+ name="IMChatColor"
+ reference="LtGray" />
+ <color
+ name="IMHistoryBgColor"
+ reference="Unused?" />
+ <color
+ name="IMHistoryTextColor"
+ reference="Unused?" />
+ <color
+ name="IconDisabledColor"
+ reference="White_50" />
+ <color
+ name="IconEnabledColor"
+ reference="White" />
+ <color
+ name="InventoryBackgroundColor"
+ reference="Unused?" />
+ <color
+ name="InventoryItemSuffixColor"
+ reference="White_25" />
+ <color
+ name="InventorySearchStatusColor"
+ reference="Black" />
+ <color
+ name="LabelDisabledColor"
+ reference="White_50" />
+ <color
+ name="LabelSelectedColor"
+ reference="White" />
+ <color
+ name="LabelSelectedDisabledColor"
+ reference="White_50" />
+ <color
+ name="LabelTextColor"
+ reference="LtGray" />
+ <color
+ name="LoginProgressBarBgColor"
+ reference="Unused?" />
+ <color
+ name="LoginProgressBarFgColor"
+ reference="Unused?" />
+ <color
+ name="LoginProgressBoxBorderColor"
+ value="0 0.12 0.24 0" />
+ <color
+ name="LoginProgressBoxCenterColor"
+ value="0 0 0 0.78" />
+ <color
+ name="LoginProgressBoxShadowColor"
+ value="0 0 0 0.78" />
+ <color
+ name="LoginProgressBoxTextColor"
+ reference="White" />
+ <color
+ name="MapAvatarColor"
+ reference="White" />
+ <color
+ name="MapAvatarFriendColor"
+ reference="Unused?" />
+ <color
+ name="MapAvatarSelfColor"
+ value="0.53125 0 0.498047 1" />
+ <color
+ name="MapFrustumColor"
+ reference="White_10" />
+ <color
+ name="MapFrustumRotatingColor"
+ value="1 1 1 0.2" />
+ <color
+ name="MapTrackColor"
+ reference="Red" />
+ <color
+ name="MapTrackDisabledColor"
+ value="0.5 0 0 1" />
+ <color
+ name="MenuBarBgColor"
+ reference="DkGray" />
+ <color
+ name="MenuBarGodBgColor"
+ reference="DkGray2" />
+ <color
+ name="MenuDefaultBgColor"
+ reference="DkGray2" />
+ <color
+ name="MenuItemDisabledColor"
+ reference="LtGray_50" />
+ <color
+ name="MenuItemEnabledColor"
+ reference="LtGray" />
+ <color
+ name="MenuItemHighlightBgColor"
+ reference="EmphasisColor_35" />
+ <color
+ name="MenuItemHighlightFgColor"
+ reference="White" />
+ <color
+ name="MenuNonProductionBgColor"
+ reference="Black" />
+ <color
+ name="MenuNonProductionGodBgColor"
+ value="0 0.5 0 1" />
+ <color
+ name="MenuPopupBgColor"
+ reference="DkGray_66" />
+ <color
+ name="MultiSliderDisabledThumbColor"
+ reference="Unused?" />
+ <color
+ name="MultiSliderThumbCenterColor"
+ reference="Unused?" />
+ <color
+ name="MultiSliderThumbCenterSelectedColor"
+ reference="Unused?" />
+ <color
+ name="MultiSliderThumbOutlineColor"
+ reference="Unused?" />
+ <color
+ name="MultiSliderTrackColor"
+ reference="Unused?" />
+ <color
+ name="MultiSliderTriangleColor"
+ reference="Unused?" />
+ <color
+ name="NetMapBackgroundColor"
+ value="0 0 0 0.3" />
+ <color
+ name="NetMapGroupOwnAboveWater"
+ value="1 0 1 1" />
+ <color
+ name="NetMapGroupOwnBelowWater"
+ value="0.78 0 0.78 1" />
+ <color
+ name="NetMapOtherOwnAboveWater"
+ value="0.24 0.24 0.24 1" />
+ <color
+ name="NetMapOtherOwnBelowWater"
+ value="0.12 0.12 0.12 1" />
+ <color
+ name="NetMapYouOwnAboveWater"
+ value="0 1 1 1" />
+ <color
+ name="NetMapYouOwnBelowWater"
+ value="0 0.78 0.78 1" />
+ <color
+ name="NotifyBoxColor"
+ value="0.27 0.67 1 1" />
+ <color
+ name="NotifyCautionBoxColor"
+ value="1 0.82 0.46 1" />
+ <color
+ name="NotifyCautionWarnColor"
+ reference="White" />
+ <color
+ name="NotifyTextColor"
+ reference="White" />
+ <color
+ name="ObjectChatColor"
+ reference="LtGray" />
+ <color
+ name="OverdrivenColor"
+ value="1 0 0 1" />
+ <color
+ name="PanelDefaultBackgroundColor"
+ reference="DkGray" />
+ <color
+ name="PanelDefaultHighlightLight"
+ reference="White_50" />
+ <color
+ name="PanelFocusBackgroundColor"
+ reference="DkGray2" />
+ <color
+ name="ParcelHoverColor"
+ reference="White" />
+ <color
+ name="PieMenuBgColor"
+ value="0.24 0.24 0.24 0.59" />
+ <color
+ name="PieMenuLineColor"
+ value="0 0 0 0.5" />
+ <color
+ name="PieMenuSelectedColor"
+ value="0.72 0.72 0.74 0.3" />
+ <color
+ name="PropertyColorAuction"
+ value="0.5 0 1 0.4" />
+ <color
+ name="PropertyColorAvail"
+ reference="Transparent" />
+ <color
+ name="PropertyColorForSale"
+ value="1 0.5 0 0.4" />
+ <color
+ name="PropertyColorGroup"
+ value="0 0.72 0.72 0.4" />
+ <color
+ name="PropertyColorOther"
+ value="1 0 0 0.4" />
+ <color
+ name="PropertyColorSelf"
+ value="0 1 0 0.4" />
+ <color
+ name="ScriptBgReadOnlyColor"
+ value="0.39 0.39 0.39 1" />
+ <color
+ name="ScriptErrorColor"
+ value="0.82 0.27 0.27 1" />
+ <color
+ name="ScrollBGStripeColor"
+ reference="Transparent" />
+ <color
+ name="ScrollBgReadOnlyColor"
+ reference="Transparent" />
+ <color
+ name="ScrollBgWriteableColor"
+ reference="White_05" />
+ <color
+ name="ScrollDisabledColor"
+ reference="Unused?" />
+ <color
+ name="ScrollHighlightedColor"
+ reference="Unused?" />
+ <color
+ name="ScrollHoveredColor"
+ reference="EmphasisColor_13" />
+ <color
+ name="ScrollSelectedBGColor"
+ reference="EmphasisColor_35" />
+ <color
+ name="ScrollSelectedFGColor"
+ reference="White" />
+ <color
+ name="ScrollUnselectedColor"
+ reference="LtGray" />
+ <color
+ name="ScrollbarThumbColor"
+ reference="White" />
+ <color
+ name="ScrollbarTrackColor"
+ reference="Black" />
+ <color
+ name="SilhouetteChildColor"
+ value="0.13 0.42 0.77 1" />
+ <color
+ name="SilhouetteParentColor"
+ reference="Unused?" />
+ <color
+ name="SliderDisabledThumbColor"
+ reference="White_50" />
+ <color
+ name="SliderThumbCenterColor"
+ reference="White" />
+ <color
+ name="SliderThumbOutlineColor"
+ reference="White" />
+ <color
+ name="SliderTrackColor"
+ reference="Unused?" />
+ <color
+ name="SpeakingColor"
+ value="0 1 0 1" />
+ <color
+ name="SystemChatColor"
+ reference="White" />
+ <color
+ name="TextBgFocusColor"
+ reference="White" />
+ <color
+ name="TextBgReadOnlyColor"
+ reference="White_05" />
+ <color
+ name="TextBgWriteableColor"
+ reference="LtGray" />
+ <color
+ name="TextCursorColor"
+ reference="Black" />
+ <color
+ name="TextDefaultColor"
+ value="0 0 0 .33" />
+ <color
+ name="TextEmbeddedItemColor"
+ value="0 0 0.5 1" />
+ <color
+ name="TextEmbeddedItemReadOnlyColor"
+ reference="Unused?" />
+ <color
+ name="TextFgColor"
+ value="0.102 0.102 0.102 1" />
+ <color
+ name="TextFgReadOnlyColor"
+ reference="LtGray" />
+ <color
+ name="TextFgTentativeColor"
+ value="0 0 0 .33" />
+ <color
+ name="TimeTextColor"
+ reference="LtGray" />
+ <color
+ name="TitleBarFocusColor"
+ reference="White_10" />
+ <color
+ name="ToolTipBgColor"
+ value="0 0 0 .75" />
+ <color
+ name="ToolTipBorderColor"
+ value="0 0 0 .75" />
+ <color
+ name="ToolTipTextColor"
+ reference="LtGray" />
+ <color
+ name="UserChatColor"
+ reference="LtGray" />
+ <color
+ name="llOwnerSayChatColor"
+ reference="LtGray" />
- <key>MapAvatarColor</key>
- <map>
- <key>Comment</key>
- <string>Color of chat messages from other residents</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.0</real>
- <real>1.0</real>
- <real>0.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>MapAvatarFriendColor</key>
- <map>
- <key>Comment</key>
- <string>Color of chat messages from other residents</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1.0</real>
- <real>1.0</real>
- <real>0.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>MapAvatarSelfColor</key>
- <map>
- <key>Comment</key>
- <string>Color of chat messages from other residents</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>MapFrustumColor</key>
- <map>
- <key>Comment</key>
- <string>Color of chat messages from other residents</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- <real>0.1</real>
- </array>
- </map>
- <key>MapFrustumRotatingColor</key>
- <map>
- <key>Comment</key>
- <string>Color of chat messages from other residents</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- <real>0.2</real>
- </array>
- </map>
- <key>MapTrackColor</key>
- <map>
- <key>Comment</key>
- <string>Color of chat messages from other residents</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1.0</real>
- <real>0.0</real>
- <real>0.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>MapTrackDisabledColor</key>
- <map>
- <key>Comment</key>
- <string>Color of chat messages from other residents</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.5</real>
- <real>0.0</real>
- <real>0.0</real>
- <real>1.0</real>
- </array>
- </map>
-
-
- <key>MenuBarBgColor</key>
- <map>
- <key>Comment</key>
- <string>Menu Bar Bg Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.24</real>
- <real>0.24</real>
- <real>0.24</real>
- <real>1</real>
- </array>
- </map>
- <key>MenuBarGodBgColor</key>
- <map>
- <key>Comment</key>
- <string>Menu Bar God Bg Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.24</real>
- <real>0.5</real>
- <real>0.24</real>
- <real>1</real>
- </array>
- </map>
- <key>MenuDefaultBgColor</key>
- <map>
- <key>Comment</key>
- <string>Menu Default Bg Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>1</real>
- </array>
- </map>
- <key>MenuItemDisabledColor</key>
- <map>
- <key>Comment</key>
- <string>Menu Item Disabled Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.52</real>
- <real>0.52</real>
- <real>0.64</real>
- <real>0.5</real>
- </array>
- </map>
- <key>MenuItemEnabledColor</key>
- <map>
- <key>Comment</key>
- <string>Menu Item Enabled Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- </array>
- </map>
- <key>MenuItemHighlightBgColor</key>
- <map>
- <key>Comment</key>
- <string>Menu Item Highlight Bg Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.72</real>
- <real>0.72</real>
- <real>0.74</real>
- <real>0.39</real>
- </array>
- </map>
- <key>MenuItemHighlightFgColor</key>
- <map>
- <key>Comment</key>
- <string>Menu Item Highlight Fg Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- </array>
- </map>
- <key>MenuNonProductionBgColor</key>
- <map>
- <key>Comment</key>
- <string>Menu Non Production Bg Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.5</real>
- <real>0</real>
- <real>0</real>
- <real>1</real>
- </array>
- </map>
- <key>MenuNonProductionGodBgColor</key>
- <map>
- <key>Comment</key>
- <string>Menu Non Production God Bg Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0.5</real>
- <real>0</real>
- <real>1</real>
- </array>
- </map>
- <key>MenuPopupBgColor</key>
- <map>
- <key>Comment</key>
- <string>Menu Popup Bg Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>1</real>
- </array>
- </map>
- <key>MultiSliderDisabledThumbColor</key>
- <map>
- <key>Comment</key>
- <string>Multi Slider Disabled Thumb Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>1</real>
- </array>
- </map>
- <key>MultiSliderThumbCenterColor</key>
- <map>
- <key>Comment</key>
- <string>Multi Slider Thumb Center Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.72</real>
- <real>0.72</real>
- <real>0.74</real>
- <real>1</real>
- </array>
- </map>
- <key>MultiSliderThumbCenterSelectedColor</key>
- <map>
- <key>Comment</key>
- <string>Multi Slider Thumb Center Selected Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>0.2</real>
- <real>0.2</real>
- <real>1</real>
- </array>
- </map>
- <key>MultiSliderThumbOutlineColor</key>
- <map>
- <key>Comment</key>
- <string>Multi Slider Thumb Outline Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>1</real>
- </array>
- </map>
- <key>MultiSliderTrackColor</key>
- <map>
- <key>Comment</key>
- <string>Multi Slider Track Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.12</real>
- <real>0.12</real>
- <real>0.12</real>
- <real>1</real>
- </array>
- </map>
- <key>MultiSliderTriangleColor</key>
- <map>
- <key>Comment</key>
- <string>Multi Slider Triangle Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>1</real>
- <real>0.2</real>
- <real>1</real>
- </array>
- </map>
- <key>NetMapBackgroundColor</key>
- <map>
- <key>Comment</key>
- <string>Net Map Background Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>0.3</real>
- </array>
- </map>
- <key>NetMapGroupOwnAboveWater</key>
- <map>
- <key>Comment</key>
- <string>Net Map Group Own Above Water</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>0</real>
- <real>1</real>
- <real>1</real>
- </array>
- </map>
- <key>NetMapGroupOwnBelowWater</key>
- <map>
- <key>Comment</key>
- <string>Net Map Group Own Below Water</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.78</real>
- <real>0</real>
- <real>0.78</real>
- <real>1</real>
- </array>
- </map>
- <key>NetMapOtherOwnAboveWater</key>
- <map>
- <key>Comment</key>
- <string>Net Map Other Own Above Water</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.24</real>
- <real>0.24</real>
- <real>0.24</real>
- <real>1</real>
- </array>
- </map>
- <key>NetMapOtherOwnBelowWater</key>
- <map>
- <key>Comment</key>
- <string>Net Map Other Own Below Water</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.12</real>
- <real>0.12</real>
- <real>0.12</real>
- <real>1</real>
- </array>
- </map>
- <key>NetMapYouOwnAboveWater</key>
- <map>
- <key>Comment</key>
- <string>Net Map You Own Above Water</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- </array>
- </map>
- <key>NetMapYouOwnBelowWater</key>
- <map>
- <key>Comment</key>
- <string>Net Map You Own Below Water</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0.78</real>
- <real>0.78</real>
- <real>1</real>
- </array>
- </map>
- <key>NotifyBoxColor</key>
- <map>
- <key>Comment</key>
- <string>Notify Box Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.27</real>
- <real>0.67</real>
- <real>1</real>
- <real>1</real>
- </array>
- </map>
- <key>NotifyCautionBoxColor</key>
- <map>
- <key>Comment</key>
- <string>Notify Caution Box Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>0.82</real>
- <real>0.46</real>
- <real>1</real>
- </array>
- </map>
- <key>NotifyCautionWarnColor</key>
- <map>
- <key>Comment</key>
- <string>Notify Caution Warn Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>1</real>
- </array>
- </map>
- <key>NotifyTextColor</key>
- <map>
- <key>Comment</key>
- <string>Notify Text Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>1</real>
- </array>
- </map>
- <key>ObjectChatColor</key>
- <map>
- <key>Comment</key>
- <string>Color of chat messages from objects</string>
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.7</real>
- <real>0.9</real>
- <real>0.7</real>
- <real>1.0</real>
- </array>
- </map>
- <key>OverdrivenColor</key>
- <map>
- <key>Comment</key>
- <string>Color of various indicators when resident is speaking too loud.</string>
- <key>Persist</key>
- <integer>0</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1.0</real>
- <real>0.0</real>
- <real>0.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>PanelDefaultBackgroundColor</key>
- <map>
- <key>Comment</key>
- <string>Default Background Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.24</real>
- <real>0.24</real>
- <real>0.24</real>
- <real>0.55</real>
- </array>
- </map>
- <key>PanelDefaultHighlightLight</key>
- <map>
- <key>Comment</key>
- <string>Default Highlight Light</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.45</real>
- <real>0.52</real>
- <real>0.61</real>
- <real>1</real>
- </array>
- </map>
- <key>PanelFocusBackgroundColor</key>
- <map>
- <key>Comment</key>
- <string>Focus Background Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.24</real>
- <real>0.24</real>
- <real>0.24</real>
- <real>1</real>
- </array>
- </map>
- <key>ParcelHoverColor</key>
- <map>
- <key>Comment</key>
- <string>Parcel Hover Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- </array>
- </map>
- <key>PieMenuBgColor</key>
- <map>
- <key>Comment</key>
- <string>Pie Menu Bg Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.24</real>
- <real>0.24</real>
- <real>0.24</real>
- <real>0.59</real>
- </array>
- </map>
- <key>PieMenuLineColor</key>
- <map>
- <key>Comment</key>
- <string>Pie Menu Line Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>0.5</real>
- </array>
- </map>
- <key>PieMenuSelectedColor</key>
- <map>
- <key>Comment</key>
- <string>Pie Menu Selected Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.72</real>
- <real>0.72</real>
- <real>0.74</real>
- <real>0.3</real>
- </array>
- </map>
- <key>PropertyColorAuction</key>
- <map>
- <key>Comment</key>
- <string>Property Color Auction</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.50</real>
- <real>0</real>
- <real>1</real>
- <real>0.4</real>
- </array>
- </map>
- <key>PropertyColorAvail</key>
- <map>
- <key>Comment</key>
- <string>Property Color Avail</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- </array>
- </map>
- <key>PropertyColorForSale</key>
- <map>
- <key>Comment</key>
- <string>Property Color For Sale</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>0.50</real>
- <real>0</real>
- <real>0.4</real>
- </array>
- </map>
- <key>PropertyColorGroup</key>
- <map>
- <key>Comment</key>
- <string>Property Color Group</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0.72</real>
- <real>0.72</real>
- <real>0.4</real>
- </array>
- </map>
- <key>PropertyColorOther</key>
- <map>
- <key>Comment</key>
- <string>Property Color Other</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>0</real>
- <real>0</real>
- <real>0.4</real>
- </array>
- </map>
- <key>PropertyColorSelf</key>
- <map>
- <key>Comment</key>
- <string>Property Color Self</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>1</real>
- <real>0</real>
- <real>0.4</real>
- </array>
- </map>
- <key>RenderGlowLumWeights</key>
- <map>
- <key>Comment</key>
- <string>Weights for each color channel to be used in calculating luminance (should add up to 1.0)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Vector3</string>
- <key>Value</key>
- <array>
- <real>0.299</real>
- <real>0.587</real>
- <real>0.114</real>
- </array>
- </map>
- <key>RenderGlowWarmthWeights</key>
- <map>
- <key>Comment</key>
- <string>Weight of each color channel used before finding the max warmth</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Vector3</string>
- <key>Value</key>
- <array>
- <real>1.0</real>
- <real>0.5</real>
- <real>0.7</real>
- </array>
- </map>
- <key>ScriptBgReadOnlyColor</key>
- <map>
- <key>Comment</key>
- <string>Script Bg Read Only Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.39</real>
- <real>0.39</real>
- <real>0.39</real>
- <real>1</real>
- </array>
- </map>
- <key>ScriptErrorColor</key>
- <map>
- <key>Comment</key>
- <string>Color of script error messages</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.82</real>
- <real>0.27</real>
- <real>0.27</real>
- <real>1.0</real>
- </array>
- </map>
- <key>ScrollBGStripeColor</key>
- <map>
- <key>Comment</key>
- <string>Scroll BGStripe Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.39</real>
- <real>0.39</real>
- <real>0.39</real>
- <real>0.16</real>
- </array>
- </map>
- <key>ScrollBgReadOnlyColor</key>
- <map>
- <key>Comment</key>
- <string>Scroll Bg Read Only Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.78</real>
- <real>0.82</real>
- <real>0.8</real>
- <real>1</real>
- </array>
- </map>
- <key>ScrollBgWriteableColor</key>
- <map>
- <key>Comment</key>
- <string>Scroll Bg Writeable Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.78</real>
- <real>0.82</real>
- <real>0.8</real>
- <real>1</real>
- </array>
- </map>
- <key>ScrollDisabledColor</key>
- <map>
- <key>Comment</key>
- <string>Scroll Disabled Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.5</real>
- <real>0.5</real>
- <real>0.5</real>
- <real>0.8</real>
- </array>
- </map>
- <key>ScrollHighlightedColor</key>
- <map>
- <key>Comment</key>
- <string>Scroll Highlighted Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.72</real>
- <real>0.72</real>
- <real>0.74</real>
- <real>0.5</real>
- </array>
- </map>
- <key>ScrollHoveredColor</key>
- <map>
- <key>Comment</key>
- <string>Scroll Hovered Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.72</real>
- <real>0.72</real>
- <real>0.74</real>
- <real>0.5</real>
- </array>
- </map>
- <key>ScrollSelectedBGColor</key>
- <map>
- <key>Comment</key>
- <string>Scroll Selected BGColor</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.39</real>
- <real>0.39</real>
- <real>0.74</real>
- <real>0.59</real>
- </array>
- </map>
- <key>ScrollSelectedFGColor</key>
- <map>
- <key>Comment</key>
- <string>Scroll Selected FGColor</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>0.8</real>
- </array>
- </map>
- <key>ScrollUnselectedColor</key>
- <map>
- <key>Comment</key>
- <string>Scroll Unselected Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>0.8</real>
- </array>
- </map>
- <key>ScrollbarThumbColor</key>
- <map>
- <key>Comment</key>
- <string>Scrollbar Thumb Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.24</real>
- <real>0.3</real>
- <real>0.49</real>
- <real>1</real>
- </array>
- </map>
- <key>ScrollbarTrackColor</key>
- <map>
- <key>Comment</key>
- <string>Scrollbar Track Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.6</real>
- <real>0.6</real>
- <real>0.62</real>
- <real>1</real>
- </array>
- </map>
- <key>SilhouetteChildColor</key>
- <map>
- <key>Comment</key>
- <string>Silhouette Child Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.13</real>
- <real>0.42</real>
- <real>0.77</real>
- <real>1</real>
- </array>
- </map>
- <key>SilhouetteParentColor</key>
- <map>
- <key>Comment</key>
- <string>Silhouette Parent Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>1</real>
- <real>0</real>
- <real>1</real>
- </array>
- </map>
- <key>SkyNightColorShift</key>
- <map>
- <key>Comment</key>
- <string>Controls moonlight color (base color applied to moon as light source)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color3</string>
- <key>Value</key>
- <array>
- <real>0.67</real>
- <real>0.67</real>
- <real>1.0</real>
- </array>
- </map>
- <key>SliderDisabledThumbColor</key>
- <map>
- <key>Comment</key>
- <string>Slider Disabled Thumb Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>1</real>
- </array>
- </map>
- <key>SliderThumbCenterColor</key>
- <map>
- <key>Comment</key>
- <string>Slider Thumb Center Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.78</real>
- <real>0.78</real>
- <real>0.78</real>
- <real>1</real>
- </array>
- </map>
- <key>SliderThumbOutlineColor</key>
- <map>
- <key>Comment</key>
- <string>Slider Thumb Outline Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- </array>
- </map>
- <key>SliderTrackColor</key>
- <map>
- <key>Comment</key>
- <string>Slider Track Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- </array>
- </map>
- <key>SpeakingColor</key>
- <map>
- <key>Comment</key>
- <string>Color of various indicators when resident is speaking on a voice channel.</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.0</real>
- <real>1.0</real>
- <real>0.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>SystemChatColor</key>
- <map>
- <key>Comment</key>
- <string>Color of chat messages from SL System</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.800000011921</real>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>TextBgFocusColor</key>
- <map>
- <key>Comment</key>
- <string>Text Bg Focus Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.78</real>
- <real>0.82</real>
- <real>0.8</real>
- <real>1</real>
- </array>
- </map>
- <key>TextBgReadOnlyColor</key>
- <map>
- <key>Comment</key>
- <string>Text Bg Read Only Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.24</real>
- <real>0.24</real>
- <real>0.24</real>
- <real>0.63</real>
- </array>
- </map>
- <key>TextBgWriteableColor</key>
- <map>
- <key>Comment</key>
- <string>Text Bg Writeable Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.78</real>
- <real>0.82</real>
- <real>0.8</real>
- <real>0.9</real>
- </array>
- </map>
- <key>TextCursorColor</key>
- <map>
- <key>Comment</key>
- <string>Text Cursor Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>1</real>
- </array>
- </map>
- <key>TextDefaultColor</key>
- <map>
- <key>Comment</key>
- <string>Text Default Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0.08</real>
- <real>0</real>
- <real>1</real>
- </array>
- </map>
- <key>TextEmbeddedItemColor</key>
- <map>
- <key>Comment</key>
- <string>Text Embedded Item Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0.5</real>
- <real>1</real>
- </array>
- </map>
- <key>TextEmbeddedItemReadOnlyColor</key>
- <map>
- <key>Comment</key>
- <string>Text Embedded Item Read Only Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.23</real>
- <real>0.58</real>
- <real>0.95</real>
- <real>1</real>
- </array>
- </map>
- <key>TextFgColor</key>
- <map>
- <key>Comment</key>
- <string>Text Fg Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>1</real>
- </array>
- </map>
- <key>TextFgReadOnlyColor</key>
- <map>
- <key>Comment</key>
- <string>Text Fg Read Only Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- <real>0.78</real>
- </array>
- </map>
- <key>TextFgTentativeColor</key>
- <map>
- <key>Comment</key>
- <string>Text Fg Tentative Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>0.5</real>
- </array>
- </map>
- <key>TimeTextColor</key>
- <map>
- <key>Comment</key>
- <string>Time Text Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- </array>
- </map>
- <key>TitleBarFocusColor</key>
- <map>
- <key>Comment</key>
- <string>Title Bar Focus Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1</real>
- <real>1</real>
- <real>1</real>
- <real>0.12</real>
- </array>
- </map>
- <key>ToolTipBgColor</key>
- <map>
- <key>Comment</key>
- <string>Tool Tip Bg Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.72</real>
- <real>0.72</real>
- <real>0.74</real>
- <real>0.78</real>
- </array>
- </map>
- <key>ToolTipBorderColor</key>
- <map>
- <key>Comment</key>
- <string>Tool Tip Border Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.67</real>
- <real>0.83</real>
- <real>0.96</real>
- <real>1</real>
- </array>
- </map>
- <key>ToolTipTextColor</key>
- <map>
- <key>Comment</key>
- <string>Tool Tip Text Color</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0</real>
- <real>0</real>
- <real>0</real>
- <real>1</real>
- </array>
- </map>
- <key>UserChatColor</key>
- <map>
- <key>Comment</key>
- <string>Color of your chat messages</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
- </array>
- </map>
- <key>llOwnerSayChatColor</key>
- <map>
- <key>Comment</key>
- <string>Color of chat messages from objects only visible to the owner</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Color4</string>
- <key>Value</key>
- <array>
- <real>0.99</real>
- <real>0.99</real>
- <real>0.67</real>
- <real>1.0</real>
- </array>
- </map>
- </map>
-</llsd>
+ <!-- New Colors -->
+ <color
+ name="OutputMonitorMutedColor"
+ reference="DkGray2" />
+</colors>
diff --git a/indra/newview/skins/default/textures/bottomtray/DownArrow.png b/indra/newview/skins/default/textures/bottomtray/DownArrow.png
new file mode 100644
index 0000000000..82f58b22b9
--- /dev/null
+++ b/indra/newview/skins/default/textures/bottomtray/DownArrow.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/bottomtray/Unread_IM.png b/indra/newview/skins/default/textures/bottomtray/Unread_IM.png
new file mode 100644
index 0000000000..a355917fca
--- /dev/null
+++ b/indra/newview/skins/default/textures/bottomtray/Unread_IM.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl1.png b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl1.png
new file mode 100644
index 0000000000..cd18ae310d
--- /dev/null
+++ b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl1.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl2.png b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl2.png
new file mode 100644
index 0000000000..b0ed6ee8eb
--- /dev/null
+++ b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl2.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl3.png b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl3.png
new file mode 100644
index 0000000000..14ec77b99a
--- /dev/null
+++ b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Lvl3.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/bottomtray/VoicePTT_Off.png b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Off.png
new file mode 100644
index 0000000000..48be51e9af
--- /dev/null
+++ b/indra/newview/skins/default/textures/bottomtray/VoicePTT_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/bottomtray/VoicePTT_On.png b/indra/newview/skins/default/textures/bottomtray/VoicePTT_On.png
new file mode 100644
index 0000000000..be4881b64c
--- /dev/null
+++ b/indra/newview/skins/default/textures/bottomtray/VoicePTT_On.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Off.png b/indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Off.png
new file mode 100644
index 0000000000..19c842b816
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Over.png b/indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Over.png
new file mode 100644
index 0000000000..e47f913db1
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Press.png b/indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Press.png
new file mode 100644
index 0000000000..b9879dcc8a
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/Accordion_ArrowClosed_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Off.png b/indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Off.png
new file mode 100644
index 0000000000..d506cda5c9
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Over.png b/indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Over.png
new file mode 100644
index 0000000000..e2c67de9c0
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Press.png b/indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Press.png
new file mode 100644
index 0000000000..08f7493a02
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/Accordion_ArrowOpened_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/Accordion_Off.png b/indra/newview/skins/default/textures/containers/Accordion_Off.png
new file mode 100644
index 0000000000..414f4509c6
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/Accordion_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/Accordion_Over.png b/indra/newview/skins/default/textures/containers/Accordion_Over.png
new file mode 100644
index 0000000000..5416d73310
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/Accordion_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/Accordion_Press.png b/indra/newview/skins/default/textures/containers/Accordion_Press.png
new file mode 100644
index 0000000000..1578e0dfc5
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/Accordion_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/Container.png b/indra/newview/skins/default/textures/containers/Container.png
new file mode 100644
index 0000000000..511eb94386
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/Container.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/TabTop_Left_Off.png b/indra/newview/skins/default/textures/containers/TabTop_Left_Off.png
new file mode 100644
index 0000000000..1951413f8d
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/TabTop_Left_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/TabTop_Left_Over.png b/indra/newview/skins/default/textures/containers/TabTop_Left_Over.png
new file mode 100644
index 0000000000..295cd89a57
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/TabTop_Left_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/TabTop_Left_Selected.png b/indra/newview/skins/default/textures/containers/TabTop_Left_Selected.png
new file mode 100644
index 0000000000..8364716e02
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/TabTop_Left_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/TabTop_Middle_Off.png b/indra/newview/skins/default/textures/containers/TabTop_Middle_Off.png
new file mode 100644
index 0000000000..21f1c2d8a8
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/TabTop_Middle_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/TabTop_Middle_Over.png b/indra/newview/skins/default/textures/containers/TabTop_Middle_Over.png
new file mode 100644
index 0000000000..0758cbcf0d
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/TabTop_Middle_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/TabTop_Middle_Selected.png b/indra/newview/skins/default/textures/containers/TabTop_Middle_Selected.png
new file mode 100644
index 0000000000..3946917c7c
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/TabTop_Middle_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/TabTop_Right_Off.png b/indra/newview/skins/default/textures/containers/TabTop_Right_Off.png
new file mode 100644
index 0000000000..eeef28e5a5
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/TabTop_Right_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/TabTop_Right_Over.png b/indra/newview/skins/default/textures/containers/TabTop_Right_Over.png
new file mode 100644
index 0000000000..c2cbc2b1e5
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/TabTop_Right_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/TabTop_Right_Selected.png b/indra/newview/skins/default/textures/containers/TabTop_Right_Selected.png
new file mode 100644
index 0000000000..b0f1f16398
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/TabTop_Right_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Left_Off.png b/indra/newview/skins/default/textures/containers/Toolbar_Left_Off.png
new file mode 100644
index 0000000000..41b5d24d87
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/Toolbar_Left_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Left_Over.png b/indra/newview/skins/default/textures/containers/Toolbar_Left_Over.png
new file mode 100644
index 0000000000..083acc0156
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/Toolbar_Left_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Left_Selected.png b/indra/newview/skins/default/textures/containers/Toolbar_Left_Selected.png
new file mode 100644
index 0000000000..ee4649a8f9
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/Toolbar_Left_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Middle_Off.png b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Off.png
new file mode 100644
index 0000000000..55c02160e3
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Middle_Over.png b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Over.png
new file mode 100644
index 0000000000..2f6ea90196
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Middle_Selected.png b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Selected.png
new file mode 100644
index 0000000000..642113b135
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/Toolbar_Middle_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Right_Off.png b/indra/newview/skins/default/textures/containers/Toolbar_Right_Off.png
new file mode 100644
index 0000000000..01fd765c3d
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/Toolbar_Right_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Right_Over.png b/indra/newview/skins/default/textures/containers/Toolbar_Right_Over.png
new file mode 100644
index 0000000000..74e00635f1
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/Toolbar_Right_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/containers/Toolbar_Right_Selected.png b/indra/newview/skins/default/textures/containers/Toolbar_Right_Selected.png
new file mode 100644
index 0000000000..8a0d98a780
--- /dev/null
+++ b/indra/newview/skins/default/textures/containers/Toolbar_Right_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/AddItem_Off.png b/indra/newview/skins/default/textures/icons/AddItem_Off.png
new file mode 100644
index 0000000000..52d4f9bc80
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/AddItem_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/AddItem_Over.png b/indra/newview/skins/default/textures/icons/AddItem_Over.png
new file mode 100644
index 0000000000..cad6e8d52f
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/AddItem_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/AddItem_Press.png b/indra/newview/skins/default/textures/icons/AddItem_Press.png
new file mode 100644
index 0000000000..acc898e5f4
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/AddItem_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/BackArrow_Off.png b/indra/newview/skins/default/textures/icons/BackArrow_Off.png
new file mode 100644
index 0000000000..ff32192856
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/BackArrow_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/BackArrow_Over.png b/indra/newview/skins/default/textures/icons/BackArrow_Over.png
new file mode 100644
index 0000000000..b36e03a8cf
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/BackArrow_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/Info.png b/indra/newview/skins/default/textures/icons/Info.png
new file mode 100644
index 0000000000..e52560281b
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Info.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/OptionsMenu_Off.png b/indra/newview/skins/default/textures/icons/OptionsMenu_Off.png
new file mode 100644
index 0000000000..25b055bfc0
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/OptionsMenu_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/OptionsMenu_Over.png b/indra/newview/skins/default/textures/icons/OptionsMenu_Over.png
new file mode 100644
index 0000000000..fcabd4c6d3
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/OptionsMenu_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/OptionsMenu_Press.png b/indra/newview/skins/default/textures/icons/OptionsMenu_Press.png
new file mode 100644
index 0000000000..6e91dd7159
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/OptionsMenu_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/TrashItem_Off.png b/indra/newview/skins/default/textures/icons/TrashItem_Off.png
new file mode 100644
index 0000000000..bb64920ec4
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/TrashItem_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/TrashItem_Over.png b/indra/newview/skins/default/textures/icons/TrashItem_Over.png
new file mode 100644
index 0000000000..1a0eea6c67
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/TrashItem_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/TrashItem_Press.png b/indra/newview/skins/default/textures/icons/TrashItem_Press.png
new file mode 100644
index 0000000000..c62f833d86
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/TrashItem_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/VoicePTT_Lvl1.png b/indra/newview/skins/default/textures/icons/VoicePTT_Lvl1.png
new file mode 100644
index 0000000000..cd18ae310d
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/VoicePTT_Lvl1.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/VoicePTT_Lvl2.png b/indra/newview/skins/default/textures/icons/VoicePTT_Lvl2.png
new file mode 100644
index 0000000000..b0ed6ee8eb
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/VoicePTT_Lvl2.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/VoicePTT_Lvl3.png b/indra/newview/skins/default/textures/icons/VoicePTT_Lvl3.png
new file mode 100644
index 0000000000..14ec77b99a
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/VoicePTT_Lvl3.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/VoicePTT_Off.png b/indra/newview/skins/default/textures/icons/VoicePTT_Off.png
new file mode 100644
index 0000000000..48be51e9af
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/VoicePTT_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/icons/VoicePTT_On.png b/indra/newview/skins/default/textures/icons/VoicePTT_On.png
new file mode 100644
index 0000000000..be4881b64c
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/VoicePTT_On.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/image_edit_icon.tga b/indra/newview/skins/default/textures/image_edit_icon.tga
new file mode 100644
index 0000000000..8666f0bbe6
--- /dev/null
+++ b/indra/newview/skins/default/textures/image_edit_icon.tga
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/Arrow_Left_Off.png b/indra/newview/skins/default/textures/navbar/Arrow_Left_Off.png
new file mode 100644
index 0000000000..19569501fe
--- /dev/null
+++ b/indra/newview/skins/default/textures/navbar/Arrow_Left_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/Arrow_Left_Over.png b/indra/newview/skins/default/textures/navbar/Arrow_Left_Over.png
new file mode 100644
index 0000000000..a91b74819f
--- /dev/null
+++ b/indra/newview/skins/default/textures/navbar/Arrow_Left_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/Arrow_Right_Off.png b/indra/newview/skins/default/textures/navbar/Arrow_Right_Off.png
new file mode 100644
index 0000000000..3648c42656
--- /dev/null
+++ b/indra/newview/skins/default/textures/navbar/Arrow_Right_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/Arrow_Right_Over.png b/indra/newview/skins/default/textures/navbar/Arrow_Right_Over.png
new file mode 100644
index 0000000000..a2caf227a7
--- /dev/null
+++ b/indra/newview/skins/default/textures/navbar/Arrow_Right_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/Favorite_Star_Active.png b/indra/newview/skins/default/textures/navbar/Favorite_Star_Active.png
new file mode 100644
index 0000000000..a4060e5e37
--- /dev/null
+++ b/indra/newview/skins/default/textures/navbar/Favorite_Star_Active.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/Favorite_Star_Off.png b/indra/newview/skins/default/textures/navbar/Favorite_Star_Off.png
new file mode 100644
index 0000000000..9c2815ebba
--- /dev/null
+++ b/indra/newview/skins/default/textures/navbar/Favorite_Star_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/Favorite_Star_Over.png b/indra/newview/skins/default/textures/navbar/Favorite_Star_Over.png
new file mode 100644
index 0000000000..377b707529
--- /dev/null
+++ b/indra/newview/skins/default/textures/navbar/Favorite_Star_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/Favorite_Star_Press.png b/indra/newview/skins/default/textures/navbar/Favorite_Star_Press.png
new file mode 100644
index 0000000000..a69a729bd4
--- /dev/null
+++ b/indra/newview/skins/default/textures/navbar/Favorite_Star_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/FileMenu_Divider.png b/indra/newview/skins/default/textures/navbar/FileMenu_Divider.png
new file mode 100644
index 0000000000..5ab4abc5b8
--- /dev/null
+++ b/indra/newview/skins/default/textures/navbar/FileMenu_Divider.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/Help_Over.png b/indra/newview/skins/default/textures/navbar/Help_Over.png
new file mode 100644
index 0000000000..b9bc0d0f87
--- /dev/null
+++ b/indra/newview/skins/default/textures/navbar/Help_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/Help_Press.png b/indra/newview/skins/default/textures/navbar/Help_Press.png
new file mode 100644
index 0000000000..ed3695f9d5
--- /dev/null
+++ b/indra/newview/skins/default/textures/navbar/Help_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/Home_Off.png b/indra/newview/skins/default/textures/navbar/Home_Off.png
new file mode 100644
index 0000000000..fe3bc63b77
--- /dev/null
+++ b/indra/newview/skins/default/textures/navbar/Home_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/Home_Over.png b/indra/newview/skins/default/textures/navbar/Home_Over.png
new file mode 100644
index 0000000000..d9c6b3842e
--- /dev/null
+++ b/indra/newview/skins/default/textures/navbar/Home_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/Info_Off.png b/indra/newview/skins/default/textures/navbar/Info_Off.png
new file mode 100644
index 0000000000..64722255a3
--- /dev/null
+++ b/indra/newview/skins/default/textures/navbar/Info_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/Info_Over.png b/indra/newview/skins/default/textures/navbar/Info_Over.png
new file mode 100644
index 0000000000..84f1d03129
--- /dev/null
+++ b/indra/newview/skins/default/textures/navbar/Info_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/Info_Press.png b/indra/newview/skins/default/textures/navbar/Info_Press.png
new file mode 100644
index 0000000000..169105829e
--- /dev/null
+++ b/indra/newview/skins/default/textures/navbar/Info_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/NavBar_BG.png b/indra/newview/skins/default/textures/navbar/NavBar_BG.png
new file mode 100644
index 0000000000..1df61751a8
--- /dev/null
+++ b/indra/newview/skins/default/textures/navbar/NavBar_BG.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/Row_Selection.png b/indra/newview/skins/default/textures/navbar/Row_Selection.png
new file mode 100644
index 0000000000..fc4f0c07ef
--- /dev/null
+++ b/indra/newview/skins/default/textures/navbar/Row_Selection.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/Search.png b/indra/newview/skins/default/textures/navbar/Search.png
new file mode 100644
index 0000000000..c43519d5f1
--- /dev/null
+++ b/indra/newview/skins/default/textures/navbar/Search.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Close_Off.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Close_Off.png
new file mode 100644
index 0000000000..bc4e00c646
--- /dev/null
+++ b/indra/newview/skins/default/textures/taskpanel/TabIcon_Close_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Home_Off.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Home_Off.png
new file mode 100644
index 0000000000..1e7d7beafa
--- /dev/null
+++ b/indra/newview/skins/default/textures/taskpanel/TabIcon_Home_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Home_Selected.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Home_Selected.png
new file mode 100644
index 0000000000..a70d3abbbf
--- /dev/null
+++ b/indra/newview/skins/default/textures/taskpanel/TabIcon_Home_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Me_Off.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Me_Off.png
new file mode 100644
index 0000000000..2d36f70361
--- /dev/null
+++ b/indra/newview/skins/default/textures/taskpanel/TabIcon_Me_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Me_Selected.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Me_Selected.png
new file mode 100644
index 0000000000..3c20459126
--- /dev/null
+++ b/indra/newview/skins/default/textures/taskpanel/TabIcon_Me_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Open_Off.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Open_Off.png
new file mode 100644
index 0000000000..4556602f58
--- /dev/null
+++ b/indra/newview/skins/default/textures/taskpanel/TabIcon_Open_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_People_Off.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_People_Off.png
new file mode 100644
index 0000000000..c272372a39
--- /dev/null
+++ b/indra/newview/skins/default/textures/taskpanel/TabIcon_People_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_People_Selected.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_People_Selected.png
new file mode 100644
index 0000000000..3828752606
--- /dev/null
+++ b/indra/newview/skins/default/textures/taskpanel/TabIcon_People_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Off.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Off.png
new file mode 100644
index 0000000000..d7ec33af55
--- /dev/null
+++ b/indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Selected.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Selected.png
new file mode 100644
index 0000000000..dd7e361ea9
--- /dev/null
+++ b/indra/newview/skins/default/textures/taskpanel/TabIcon_Places_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Things_Off.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Things_Off.png
new file mode 100644
index 0000000000..e56eda9802
--- /dev/null
+++ b/indra/newview/skins/default/textures/taskpanel/TabIcon_Things_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/taskpanel/TabIcon_Things_Selected.png b/indra/newview/skins/default/textures/taskpanel/TabIcon_Things_Selected.png
new file mode 100644
index 0000000000..d4ac451c8e
--- /dev/null
+++ b/indra/newview/skins/default/textures/taskpanel/TabIcon_Things_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/taskpanel/TaskPanel_Tab_Off.png b/indra/newview/skins/default/textures/taskpanel/TaskPanel_Tab_Off.png
new file mode 100644
index 0000000000..918be7555f
--- /dev/null
+++ b/indra/newview/skins/default/textures/taskpanel/TaskPanel_Tab_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/taskpanel/TaskPanel_Tab_Selected.png b/indra/newview/skins/default/textures/taskpanel/TaskPanel_Tab_Selected.png
new file mode 100644
index 0000000000..b3316386b9
--- /dev/null
+++ b/indra/newview/skins/default/textures/taskpanel/TaskPanel_Tab_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 84dd3ffd7a..dc5936a435 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -1,75 +1,180 @@
<textures version="101">
+ <!-- Please add new files alphabetically to prevent merge conflicts. JC -->
- <texture name="icn_scrollbar_thumb.tga" preload="true" scale.top="7" scale.left="4" scale.bottom="8" scale.right="4" />
- <texture name="icn_scrollbar_bg.tga" preload="true" scale.top="7" scale.left="4" scale.bottom="8" scale.right="4" />
+ <texture name="ScrollThumb_Horiz" file_name="widgets/ScrollThumb_Horiz.png" preload="true" scale.left="4" scale.top="10" scale.bottom="53" scale.right="4" />
+ <texture name="ScrollThumb_Vert" file_name="widgets/ScrollThumb_Vert.png" preload="true" scale.left="4" scale.top="53" scale.bottom="10" scale.right="4" />
+ <texture name="ScrollTrack_Vert" file_name="widgets/ScrollTrack_Vert.png" preload="true" scale.left="2" scale.top="40" scale.bottom="13" scale.right="0" />
+ <texture name="ScrollTrack_Horiz" file_name="widgets/ScrollTrack_Horiz.png" preload="true" scale.left="0" scale.top="13" scale.bottom="40" scale.right="2" />
<texture name="sm_rounded_corners_simple.tga" scale.left="4" scale.top="4" scale.bottom="4" scale.right="4"/>
+
+ <!--There are still references to this old textfield art in the code somewhere -erica-->
<texture name="icn_textfield_enabled.tga" scale.left="5" scale.top="5" scale.bottom="5" scale.right="5"/>
-
- <texture name="button_disabled_32x128.tga" preload="true" scale.left="16" scale.top="16" scale.right="112" scale.bottom="16" />
-
- <texture name="button_enabled_32x128.tga" preload="true" scale.left="16" scale.top="16" scale.right="112" scale.bottom="16" />
-
- <texture name="toolbar_btn_enabled.tga" scale.left="7" scale.top="32" scale.right="121" scale.bottom="0" />
+ <texture name="icn_rounded-text-field.tga" scale.left="14" scale.bottom="16" scale.top="16" scale.right="114"/>
- <texture name="toolbar_btn_disabled.tga" scale.left="7" scale.top="32" scale.right="121" scale.bottom="0" />
-
- <texture name="toolbar_btn_selected.tga" scale.left="7" scale.top="32" scale.right="121" scale.bottom="0" />
-
- <texture name="button_enabled_selected_32x128.tga" preload="true" scale.left="16" scale.top="16" scale.right="112" scale.bottom="16" />
-
- <texture name="checkbox_disabled_false.tga" preload="true"/>
- <texture name="checkbox_disabled_true.tga" preload="true"/>
- <texture name="checkbox_enabled_false.tga" preload="true"/>
- <texture name="checkbox_enabled_true.tga" preload="true"/>
-
- <texture name="close_in_blue.tga" preload="true"/>
+ <texture name="TextField_Search_Disabled" file_name="widgets/TextField_Search_Disabled.png" preload="true" scale.left="4" scale.top="18" scale.right="252" scale.bottom="4" />
+ <texture name="TextField_Off" file_name="widgets/TextField_Off.png" preload="true" scale.left="4" scale.top="18" scale.right="252" scale.bottom="4" />
+ <texture name="TextField_Search_Active" file_name="widgets/TextField_Search_Active.png" preload="true" scale.left="4" scale.top="18" scale.right="252" scale.bottom="4" />
+ <texture name="TextField_Search_Off" file_name="widgets/TextField_Search_Off.png" preload="true" scale.left="4" scale.top="18" scale.right="252" scale.bottom="4" />
+ <texture name="TextField_Disabled" file_name="widgets/TextField_Disabled.png" preload="true" scale.left="4" scale.top="18" scale.right="252" scale.bottom="4" />
+ <texture name="TextField_Active" file_name="widgets/TextField_Active.png" preload="true" scale.left="4" scale.top="18" scale.right="252" scale.bottom="4" />
+
+ <texture name="PushButton_Off" file_name="widgets/PushButton_Off.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" />
+ <texture name="PushButton_Press" file_name="widgets/PushButton_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" />
+ <texture name="PushButton_Disabled" file_name="widgets/PushButton_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" />
+ <texture name="PushButton_Selected" file_name="widgets/PushButton_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" />
+ <texture name="PushButton_Selected_Press" file_name="widgets/PushButton_Selected_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" />
+ <texture name="PushButton_Selected_Disabled" file_name="widgets/PushButton_Selected_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" />
+
+ <texture name="toolbar_btn_enabled.tga" scale.left="7" scale.top="32" scale.right="121" scale.bottom="0" />
+ <texture name="toolbar_btn_disabled.tga" scale.left="7" scale.top="32" scale.right="121" scale.bottom="0" />
+ <texture name="toolbar_btn_selected.tga" scale.left="7" scale.top="32" scale.right="121" scale.bottom="0" />
+
+ <texture name="Checkbox_Off_Disabled" file_name="widgets/Checkbox_Disabled.png" preload="true" />
+ <texture name="Checkbox_On_Disabled" file_name="widgets/Checkbox_On_Disabled.png" preload="true" />
+ <texture name="Checkbox_Off" file_name="widgets/Checkbox_Off.png" preload="true" />
+ <texture name="Checkbox_On" file_name="widgets/Checkbox_On.png" preload="true" />
+ <texture name="Checkbox_On_Press" file_name="widgets/Checkbox_On_Press.png" preload="true" />
+ <texture name="Checkbox_Press" file_name="widgets/Checkbox_Press.png" preload="true" />
+ <texture name="RadioButton_On_Press" file_name="widgets/RadioButton_On_Press.png" preload="true" />
<texture name="minimize_inactive.tga" preload="true"/>
- <texture name="minimize.tga" preload="true"/>
+ <texture name="minimize.tga" preload="true" />
<texture name="minimize_pressed.tga" preload="true"/>
-
- <texture name="radio_active_false.tga" preload="true"/>
- <texture name="radio_active_true.tga" preload="true"/>
- <texture name="radio_inactive_false.tga" preload="true"/>
- <texture name="radio_inactive_true.tga" preload="true"/>
-
- <texture name="combobox_arrow.tga" preload="true"/>
-
- <texture name="resize_handle_bottom_right_blue.tga" preload="true"/>
-
- <texture name="rounded_square.tga" file_name="rounded_square.j2c" preload="true" scale.left="16" scale.top="16" scale.right="112" scale.bottom="16"/>
-
+
+ <texture name="Icon_Close_Background" file_name="windows/Icon_Close_Background.png" preload="true" />
+ <texture name="Icon_Close_Foreground" file_name="windows/Icon_Close_Foreground.png" preload="true" />
+ <texture name="Icon_Close_Press" file_name="windows/Icon_Close_Press.png" preload="true" />
+ <texture name="Icon_Close_Toast" file_name="windows/Icon_Close_Toast.png" preload="true" />
+ <texture name="Icon_Dock_Background" file_name="windows/Icon_Dock_Background.png" preload="true" />
+ <texture name="Icon_Dock_Foreground" file_name="windows/Icon_Dock_Foreground.png" preload="true" />
+ <texture name="Icon_Dock_Press" file_name="windows/Icon_Dock_Press.png" preload="true" />
+ <texture name="Icon_Undock_Background" file_name="windows/Icon_Undock_Background.png" preload="true" />
+ <texture name="Icon_Undock_Foreground" file_name="windows/Icon_Undock_Foreground.png" preload="true" />
+ <texture name="Icon_Undock_Press" file_name="windows/Icon_Undock_Press.png" preload="true" />
+ <texture name="Toast_CloseBtn" file_name="windows/Toast_CloseBtn.png" preload="true" />
+ <texture name="Toast" file_name="windows/Toast.png" preload="true" />
+
+ <texture name="Window_Background" file_name="windows/Window_Background.png" preload="true" />
+ <texture name="Window_Foreground" file_name="windows/Window_Foreground.png" preload="true" />
+
+ <texture name="Favorite_Star_Active" file_name="navbar/Favorite_Star_Active.png" preload="true" />
+ <texture name="Favorite_Star_Off" file_name="navbar/Favorite_Star_Off.png" preload="true" />
+ <texture name="Favorite_Star_Press" file_name="navbar/Favorite_Star_Press.png" preload="true" />
+ <texture name="FileMenu_BarSelect" file_name="navbar/FileMenu_BarSelect.png" preload="true" />
+ <texture name="FileMenu_BG" file_name="navbar/FileMenu_BG.png" preload="true" />
+ <texture name="NavBar_BG_NoFav" file_name="navbar/NavBar_BG_NoFav.png" preload="true" />
+ <texture name="NavBar_BG" file_name="navbar/NavBar_BG.png" preload="true" />
+ <texture name="Row_Selection" file_name="navbar/Row_Selection.png" preload="true" />
+
+ <texture name="BottomTray_BG" file_name="bottomtray/BottomTray_BG.png" preload="true" />
+ <texture name="DownArrow" file_name="bottomtray/DownArrow.png" preload="true" />
+ <texture name="NearbyVoice_Lvl1" file_name="bottomtray/NearbyVoice_Lvl1.png" preload="true" />
+ <texture name="NearbyVoice_Lvl2" file_name="bottomtray/NearbyVoice_Lvl2.png" preload="true" />
+ <texture name="NearbyVoice_Lvl3" file_name="bottomtray/NearbyVoice_Lvl3.png" preload="true" />
+ <texture name="NearbyVoice_On" file_name="bottomtray/NearbyVoice_On.png" preload="true" />
+ <texture name="Unread_IM" file_name="bottomtray/Unread_IM.png" preload="true" />
+ <texture name="Unread_Msg" file_name="bottomtray/Unread_Msg.png" preload="true" />
+ <texture name="VoicePPT_Lvl1" file_name="bottomtray/VoicePPT_Lvl1.png" preload="true" />
+ <texture name="VoicePPT_Lvl2" file_name="bottomtray/VoicePPT_Lvl2.png" preload="true" />
+ <texture name="VoicePPT_Lvl3" file_name="bottomtray/VoicePPT_Lvl3.png" preload="true" />
+ <texture name="VoicePPT_Off" file_name="bottomtray/VoicePPT_Off.png" preload="true" />
+ <texture name="VoicePPT_On" file_name="bottomtray/VoicePPT_On.png" preload="true" />
+
+ <texture name="Accordion_ArrowClosed_Off" file_name="containers/Accordion_ArrowClosed_Off.png" preload="true" />
+ <texture name="Accordion_ArrowClosed_Press" file_name="containers/Accordion_ArrowClosed_Press.png" preload="true" />
+ <texture name="Accordion_ArrowOpened_Off" file_name="containers/Accordion_ArrowOpened_Off.png" preload="true" />
+ <texture name="Accordion_ArrowOpened_Press" file_name="containers/Accordion_ArrowOpened_Press.png" preload="true" />
+ <texture name="Accordion_Off" file_name="containers/Accordion_Off.png" preload="true" />
+ <texture name="Accordion_Press" file_name="containers/Accordion_Press.png" preload="true" />
+ <texture name="Container" file_name="containers/Container.png" preload="true" />
+ <texture name="TabTop_Divider" file_name="containers/TabTop_Divider.png" preload="true" />
+ <texture name="TabTop_Left_Press" file_name="containers/TabTop_Left_Press.png" preload="true" />
+ <texture name="TabTop_Middle_Press" file_name="containers/TabTop_Middle_Press.png" preload="true" />
+ <texture name="TabTop_Right_Off" file_name="containers/TabTop_Right_Off.png" preload="true" />
+ <texture name="TabTop_Right_Press" file_name="containers/TabTop_Right_Press.png" preload="true" />
+ <texture name="TabTop_Right_Selected" file_name="containers/TabTop_Right_Selected.png" preload="true" />
+ <texture name="Toolbar_Divider" file_name="containers/Toolbar_Divider.png" preload="true" />
+ <texture name="Toolbar_Left_Off" file_name="containers/Toolbar_Left_Off.png" preload="true" />
+ <texture name="Toolbar_Left_Press" file_name="containers/Toolbar_Left_Press.png" preload="true" />
+ <texture name="Toolbar_Left_Selected" file_name="containers/Toolbar_Left_Selected.png" preload="true" />
+ <texture name="Toolbar_Middle_Off" file_name="containers/Toolbar_Middle_Off.png" preload="true" />
+ <texture name="Toolbar_Middle_Press" file_name="containers/Toolbar_Middle_Press.png" preload="true" />
+ <texture name="Toolbar_Middle_Selected" file_name="containers/Toolbar_Middle_Selected.png" preload="true" />
+ <texture name="Toolbar_Right_Off" file_name="containers/Toolbar_Right_Off.png" preload="true" />
+ <texture name="Toolbar_Right_Press" file_name="containers/Toolbar_Right_Press.png" preload="true" />
+ <texture name="Toolbar_Right_Selected" file_name="containers/Toolbar_Right_Selected.png" preload="true" />
+
+ <texture name="AddItem_Off" file_name="icons/AddItem_Off.png" preload="true" />
+ <texture name="AddItem_Press" file_name="icons/AddItem_Press.png" preload="true" />
+ <texture name="BackArrow_Off" file_name="icons/BackArrow_Off.png" preload="true" />
+ <texture name="BackArrow_Press" file_name="icons/BackArrow_Press.png" preload="true" />
+ <texture name="Info" file_name="icons/Info.png" preload="true" />
+ <texture name="OptionsMenu_Off" file_name="icons/OptionsMenu_Off.png" preload="true" />
+ <texture name="OptionsMenu_Press" file_name="icons/OptionsMenu_Press.png" preload="true" />
+ <texture name="TrashItem_Off" file_name="icons/TrashItem_Off.png" preload="true" />
+ <texture name="TrashItem_Press" file_name="icons/TrashItem_Press.png" preload="true" />
+ <texture name="Widget_DownArrow" file_name="icons/Widget_DownArrow.png" preload="true" />
+
+ <texture name="TabIcon_Close_Off" file_name="taskpanel/TabIcon_Close_Off.png" preload="true" />
+ <texture name="TabIcon_Home_Off" file_name="taskpanel/TabIcon_Home_Off.png" preload="true" />
+ <texture name="TabIcon_Home_Selected" file_name="taskpanel/TabIcon_Home_Selected.png" preload="true" />
+ <texture name="TabIcon_Me_Off" file_name="taskpanel/TabIcon_Me_Off.png" preload="true" />
+ <texture name="TabIcon_Me_Selected" file_name="taskpanel/TabIcon_Me_Selected.png" preload="true" />
+ <texture name="TabIcon_Open_Off" file_name="taskpanel/TabIcon_Open_Off.png" preload="true" />
+ <texture name="TabIcon_People_Off" file_name="taskpanel/TabIcon_People_Off.png" preload="true" />
+ <texture name="TabIcon_People_Selected" file_name="taskpanel/TabIcon_People_Selected.png" preload="true" />
+ <texture name="TabIcon_Places_Off" file_name="taskpanel/TabIcon_Places_Off.png" preload="true" />
+ <texture name="TabIcon_Places_Selected" file_name="taskpanel/TabIcon_Places_Selected.png" preload="true" />
+ <texture name="TabIcon_Things_Off" file_name="taskpanel/TabIcon_Things_Off.png" preload="true" />
+ <texture name="TabIcon_Things_Selected" file_name="taskpanel/TabIcon_Things_Selected.png" preload="true" />
+
+ <texture name="DisclosureArrow_Closed_Off" file_name="widgets/DisclosureArrow_Closed_Off.png" preload="true" />
+ <texture name="DisclosureArrow_Closed_Process" file_name="widgets/DisclosureArrow_Closed_Process.png" preload="true" />
+ <texture name="DisclosureArrow_Opened_Off" file_name="widgets/DisclosureArrow_Opened_Off.png" preload="true" />
+ <texture name="DisclosureArrow_Opened_Press" file_name="widgets/DisclosureArrow_Opened_Press.png" preload="true" />
+ <texture name="ListItem_Select" file_name="widgets/ListItem_Select.png" preload="true" />
+
+ <texture name="RadioButton_Off" file_name="widgets/RadioButton_Off.png" preload="true" />
+ <texture name="RadioButton_On" file_name="widgets/RadioButton_On.png" preload="true" />
+ <texture name="RadioButton_Disabled" file_name="widgets/RadioButton_Disabled.png" preload="true" />
+ <texture name="RadioButton_On_Disabled" file_name="widgets/RadioButton_On_Disabled.png" preload="true" />
+
+ <texture name="ComboButton_Disabled" file_name="widgets/ComboButton_Disabled.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
+ <texture name="ComboButton_Over" file_name="widgets/ComboButton_Over.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
+ <texture name="ComboButton_Press" file_name="widgets/ComboButton_Press.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
+ <texture name="ComboButton_Selected" file_name="widgets/ComboButton_Selected.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
+ <texture name="ComboButton_Off" file_name="widgets/ComboButton_Off.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
+
+ <texture name="DropDown_Disabled" file_name="widgets/DropDown_Disabled.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
+ <texture name="DropDown_Over" file_name="widgets/DropDown_Over.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
+ <texture name="DropDown_Press" file_name="widgets/DropDown_Press.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
+ <texture name="DropDown_Selected" file_name="widgets/DropDown_Selected.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
+ <texture name="DropDown_Off" file_name="widgets/DropDown_Off.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
+
+ <texture name="Resize_Corner" file_name="windows/Resize_Corner.png" preload="true"/>
+
+ <texture name="rounded_square.tga" file_name="rounded_square.j2c" preload="true" scale.left="16" scale.top="16" scale.right="112" scale.bottom="16" />
+
<texture name="rounded_square_soft.tga" file_name="rounded_square_soft.j2c" preload="true" scale.left="16" scale.top="16" scale.right="112" scale.bottom="16"/>
-
+
<texture name="toolbar_tab.tga" preload="true" scale.left="6" scale.top="42" scale.right="104" scale.bottom="8"/>
<texture name="toolbar_bg.tga" preload="true" scale.left="6" scale.top="42" scale.right="96" scale.bottom="16"/>
-
- <texture name="progressbar_fill.tga" preload="true" scale.left="10" scale.top="7" scale.right="65" scale.bottom="7"/>
- <texture name="progressbar_track.tga" preload="true" scale.left="10" scale.top="7" scale.right="80" scale.bottom="7"/>
-
- <texture name="scrollbutton_down_in_blue.tga" preload="true"/>
- <texture name="scrollbutton_down_out_blue.tga" preload="true"/>
- <texture name="scrollbutton_left_in_blue.tga" preload="true"/>
- <texture name="scrollbutton_left_out_blue.tga" preload="true"/>
- <texture name="scrollbutton_right_in_blue.tga" preload="true"/>
- <texture name="scrollbutton_right_out_blue.tga" preload="true"/>
- <texture name="scrollbutton_up_in_blue.tga" preload="true"/>
- <texture name="scrollbutton_up_out_blue.tga" preload="true"/>
- <texture name="spin_down_in_blue.tga" preload="true"/>
- <texture name="spin_down_out_blue.tga" preload="true"/>
- <texture name="spin_up_in_blue.tga" preload="true"/>
- <texture name="spin_up_out_blue.tga" preload="true"/>
-
- <texture name="square_btn_32x128.tga" preload="true" scale.left="8" scale.top="10" scale.right="120" scale.bottom="10"/>
- <texture name="square_btn_selected_32x128.tga" preload="true" scale.left="2" scale.top="10" scale.right="126" scale.bottom="10"/>
-
- <texture name="tab_bottom_blue.tga" preload="true" scale.left="8" scale.top="8" scale.right="120" scale.bottom="9"/>
- <texture name="tab_bottom_selected_blue.tga" preload="true" scale.left="8" scale.top="8" scale.right="96" scale.bottom="9"/>
- <texture name="tab_left.tga" preload="true" scale.left="8" scale.top="8" scale.right="120" scale.bottom="9"/>
- <texture name="tab_left_selected.tga" preload="true" scale.left="8" scale.top="8" scale.right="96" scale.bottom="9"/>
+
+ <texture name="ProgressBar" file_name="widgets/ProgressBar.png" preload="true" scale.left="4" scale.top="10" scale.right="48" scale.bottom="2" />
+ <texture name="ProgressTrack" file_name="widgets/ProgressTrack.png" preload="true" scale.left="4" scale.top="13" scale.right="148" scale.bottom="2" />
+
+ <texture name="ScrollArrow_Down" file_name="widgets/ScrollArrow_Down.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" />
+ <texture name="ScrollArrow_Left" file_name="widgets/ScrollArrow_Left.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" />
+ <texture name="ScrollArrow_Right" file_name="widgets/ScrollArrow_Right.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" />
+ <texture name="ScrollArrow_Up" file_name="widgets/ScrollArrow_Up.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" />
+
+ <texture name="TabTop_Middle_Off" file_name="containers/TabTop_Middle_Off.png" preload="true" scale.left="8" scale.top="8" scale.right="120" scale.bottom="9" />
+ <texture name="TabTop_Middle_Selected" file_name="containers/TabTop_Middle_Selected.png" preload="true" scale.left="8" scale.top="8" scale.right="96" scale.bottom="9" />
+ <texture name="TabTop_Left_Off" file_name="containers/TabTop_Left_Off.png" preload="true" scale.left="8" scale.top="8" scale.right="120" scale.bottom="9"/>
+ <texture name="TabTop_Left_Selected" file_name="containers/TabTop_Left_Selected.png" preload="true" scale.left="8" scale.top="8" scale.right="96" scale.bottom="9"/>
<texture name="tab_top_blue.tga" preload="true" scale.left="8" scale.top="8" scale.right="120" scale.bottom="9"/>
<texture name="tab_top_selected_blue.tga" preload="true" scale.left="8" scale.top="8" scale.right="96" scale.bottom="9"/>
-
+
<texture name="startup_logo.j2c" preload="true"/>
<texture name="color_swatch_alpha.tga" preload="true"/>
@@ -115,7 +220,7 @@
<texture name="inv_folder_sound.tga"/>
<texture name="inv_folder_texture.tga"/>
<texture name="inv_folder_trash.tga"/>
-
+
<texture name="inv_item_animation.tga"/>
<texture name="inv_item_skin.tga"/>
<texture name="inv_item_callingcard_offline.tga"/>
@@ -142,13 +247,13 @@
<texture name="inv_item_texture.tga"/>
<texture name="inv_item_underpants.tga"/>
<texture name="inv_item_undershirt.tga"/>
-
+
<texture name="lag_status_critical.tga"/>
<texture name="lag_status_good.tga"/>
<texture name="lag_status_warning.tga"/>
-
+
<texture name="legend.tga"/>
-
+
<texture name="map_avatar_16.tga"/>
<texture name="map_avatar_8.tga"/>
<texture name="map_avatar_you_8.tga"/>
@@ -158,17 +263,17 @@
<texture name="map_infohub.tga"/>
<texture name="map_telehub.tga"/>
<texture name="map_track_16.tga"/>
-
+
<texture name="media_icon.tga" file_name="icn_label_media.tga" />
<texture name="music_icon.tga" file_name="icn_label_music.tga" />
- <texture name="noentrylines.j2c" use_mips="true"/>
- <texture name="noentrypasslines.j2c" use_mips="true"/>
-
+ <texture name="NoEntryLines" file_name="world/NoEntryLines.png" use_mips="true" preload="true" />
+ <texture name="NoEntryPassLines" file_name="world/NoEntryPassLines.png" use_mips="true" preload="true" />
+
<texture name="notify_tip_icon.tga"/>
<texture name="notify_caution_icon.tga"/>
<texture name="notify_next.png" preload="true"/>
<texture name="notify_box_icon.tga"/>
-
+
<texture name="object_cone.tga"/>
<texture name="object_cone_active.tga"/>
<texture name="object_cube.tga"/>
@@ -199,11 +304,11 @@
<texture name="object_tree_active.tga"/>
<texture name="object_tube.tga"/>
<texture name="object_tube_active.tga"/>
-
+
<texture name="pixiesmall.j2c" use_mips="true"/>
<texture name="script_error.j2c" use_mips="true"/>
<texture name="silhouette.j2c" use_mips="true"/>
-
+
<texture name="status_no_build.tga"/>
<texture name="status_voice.tga"/>
<texture name="status_buy_currency.tga"/>
@@ -214,7 +319,7 @@
<texture name="status_health.tga"/>
<texture name="status_no_push.tga"/>
<texture name="status_no_scripts.tga"/>
-
+
<texture name="tool_dozer.tga"/>
<texture name="tool_dozer_active.tga"/>
<texture name="tool_zoom.tga"/>
@@ -226,7 +331,7 @@
<texture name="icn_active-speakers-typing1.tga"/>
<texture name="icn_active-speakers-typing2.tga"/>
<texture name="icn_active-speakers-typing3.tga"/>
-
+
<texture name="icn_voice_ptt-off.tga"/>
<texture name="icn_voice_ptt-on.tga"/>
<texture name="icn_voice_ptt-on-lvl1.tga"/>
@@ -234,39 +339,53 @@
<texture name="icn_voice_ptt-on-lvl3.tga"/>
<texture name="icn_voice-call-end.tga"/>
<texture name="icn_voice-call-start.tga"/>
-
+
<texture name="mute_icon.tga"/>
-
- <texture name="icn_slide-groove_dark.tga" scale.left="2" scale.top="5" scale.right="29" scale.bottom="4"/>
- <texture name="icn_slide-highlight.tga" scale.left="2" scale.top="5" scale.right="29" scale.bottom="4"/>
- <texture name="icn_slide-thumb_dark.tga" scale.left="2" scale.top="5" scale.right="29" scale.bottom="4"/>
-
+
+ <texture name="SliderTrack_Horiz" file_name="widgets/SliderTrack_Horiz.png" scale.left="4" scale.top="4" scale.right="100" scale.bottom="2" />
+ <texture name="SliderTrack_Vert" file_name="widgets/SliderTrack_Vert.png" scale.left="2" scale.top="100" scale.right="4" scale.bottom="4" />
+ <texture name="SliderThumb_Off" file_name="widgets/SliderThumb_Off.png" />
+ <texture name="SliderThumb_Disabled" file_name="widgets/SliderThumb_Disabled.png" />
+ <texture name="SliderThumb_Press" file_name="widgets/SliderThumb_Press.png" />
+
<texture name="icn_speaker-muted_dark.tga"/>
<texture name="icn_speaker_dark.tga"/>
<texture name="icn_voice-localchat.tga"/>
<texture name="icn_voice-groupfocus.tga"/>
<texture name="icn_voice-pvtfocus.tga"/>
-
+
<texture name="icn_media-pause.tga"/>
<texture name="icn_media-play.tga"/>
<texture name="icn_music-play.tga"/>
<texture name="icn_music-pause.tga"/>
<texture name="icn_media_web.tga" preload="true"/>
<texture name="icn_media_movie.tga" preload="true"/>
-
+
<texture name="icn_chatbar.tga"/>
<texture name="btn_chatbar.tga" scale.left="20" scale.top="24" scale.right="44" scale.bottom="0"/>
<texture name="btn_chatbar_selected.tga" scale.left="20" scale.top="24" scale.right="44" scale.bottom="0"/>
-
- <texture name="icn_rounded-text-field.tga" scale.left="14" scale.bottom="16" scale.top="16" scale.right="114"/>
- <texture name="flyout_btn_right_selected.tga" scale.left="0" scale.top="30" scale.right="32" scale.bottom="0"/>
- <texture name="flyout_btn_right.tga" scale.left="0" scale.top="30" scale.right="32" scale.bottom="0"/>
- <texture name="flyout_btn_right_disabled.tga" scale.left="0" scale.top="30" scale.right="32" scale.bottom="0"/>
- <texture name="flyout_btn_left_selected.tga" scale.left="16" scale.top="15" scale.right="112" scale.bottom="15"/>
- <texture name="flyout_btn_left.tga" scale.left="16" scale.top="15" scale.right="112" scale.bottom="15"/>
- <texture name="flyout_btn_left_disabled.tga" scale.left="16" scale.top="15" scale.right="112" scale.bottom="15"/>
+ <texture name="SegmentedBtn_Left_Off" file_name="widgets/SegmentedBtn_Left_Off.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
+ <texture name="SegmentedBtn_Left_Press" file_name="widgets/SegmentedBtn_Left_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
+ <texture name="SegmentedBtn_Left_Disabled" file_name="widgets/SegmentedBtn_Left_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
+ <texture name="SegmentedBtn_Left_Selected" file_name="widgets/SegmentedBtn_Left_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
+ <texture name="SegmentedBtn_Left_Selected_Press" file_name="widgets/SegmentedBtn_Left_Selected_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
+ <texture name="SegmentedBtn_Left_Selected_Disabled" file_name="widgets/SegmentedBtn_Left_Selected_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
+
+ <texture name="SegmentedBtn_Middle_Off" file_name="widgets/SegmentedBtn_Middle_Off.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
+ <texture name="SegmentedBtn_Middle_Press" file_name="widgets/SegmentedBtn_Middle_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
+ <texture name="SegmentedBtn_Middle_Disabled" file_name="widgets/SegmentedBtn_Middle_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
+ <texture name="SegmentedBtn_Middle_Selected" file_name="widgets/SegmentedBtn_Middle_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
+ <texture name="SegmentedBtn_Middle_Selected_Press" file_name="widgets/SegmentedBtn_Middle_Selected_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
+ <texture name="SegmentedBtn_Middle_Selected_Disabled" file_name="widgets/SegmentedBtn_Middle_Selected_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
+
+ <texture name="SegmentedBtn_Right_Off" file_name="widgets/SegmentedBtn_Right_Off.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
+ <texture name="SegmentedBtn_Right_Press" file_name="widgets/SegmentedBtn_Right_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
+ <texture name="SegmentedBtn_Right_Disabled" file_name="widgets/SegmentedBtn_Right_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
+ <texture name="SegmentedBtn_Right_Selected" file_name="widgets/SegmentedBtn_Right_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
+ <texture name="SegmentedBtn_Right_Selected_Press" file_name="widgets/SegmentedBtn_Right_Selected_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
+ <texture name="SegmentedBtn_Right_Selected_Disabled" file_name="widgets/SegmentedBtn_Right_Selected_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" />
<texture name="move_forward_out.tga" preload="true"/>
<texture name="move_forward_in.tga" preload="true"/>
@@ -282,7 +401,7 @@
<texture name="move_up_out.tga" preload="true"/>
<texture name="move_down_in.tga" preload="true"/>
<texture name="move_down_out.tga" preload="true"/>
-
+
<texture name="cam_rotate_out.tga" preload="true"/>
<texture name="cam_rotate_in.tga" preload="true"/>
<texture name="cam_zoom_out.tga" preload="true"/>
@@ -306,7 +425,7 @@
<texture name="close_inactive_blue.tga"/>
<texture name="closebox.tga"/>
<texture name="icn_clear_lineeditor.tga" />
-
+
<texture name="up_arrow.tga" file_name="up_arrow.png"/>
<texture name="down_arrow.tga" file_name="down_arrow.png"/>
@@ -321,17 +440,42 @@
<texture name="icn_label_media.tga"/>
<texture name="arrow_down.tga"/>
<texture name="cloud-particle.j2c" use_mips="true"/>
-
+
<texture name="skin_thumbnail_default.png" preload="true" />
<texture name="default_land_picture.j2c"/>
<texture name="default_profile_picture.j2c"/>
<texture name="locked_image.j2c"/>
- <texture name="menu_separator" file_name="menu_separator.png"/>
+ <texture name="menu_separator" file_name="navbar/FileMenu_Divider.png" scale.left="4" scale.top="166" scale.right="0" scale.bottom="0" />
+
+ <texture name="TaskPanel_Tab_Off" file_name="taskpanel/TaskPanel_Tab_Off.png" preload="true" scale.left="4" scale.top="29" scale.right="36" scale.bottom="4" />
+ <texture name="TaskPanel_Tab_Selected" file_name="taskpanel/TaskPanel_Tab_Selected.png" preload="true" scale.left="5" scale.top="30" scale.right="36" scale.bottom="5" />
+ <texture name="TaskPanel_BG" file_name="taskpanel/TaskPanel_BG.png" preload="true" scale.left="4" scale.top="146" scale.right="146" scale.bottom="4" />
+ <texture name="TaskPanel_Tab_Unselected" file_name="taskpanel/TaskPanel_Tab_Over.png" preload="true" scale.left="5" scale.top="30" scale.right="36" scale.bottom="5" />
- <texture name="sidebar_tab_left.tga" preload="true" scale.left="16" scale.top="8" scale.right="112" scale.bottom="9"/>
- <texture name="sidebar_tab_left_selected.tga" preload="true" scale.left="16" scale.top="8" scale.right="112" scale.bottom="9"/>
+ <texture name="Arrow_Left_Off" file_name="navbar/Arrow_Left_Off.png" preload="true"/>
+ <texture name="Arrow_Left_Press" file_name="navbar/Arrow_Left_Press.png" preload="true"/>
+ <texture name="Arrow_Right_Off" file_name="navbar/Arrow_Right_Off.png" preload="true"/>
+ <texture name="Arrow_Right_Press" file_name="navbar/Arrow_Right_Press.png" preload="true"/>
+ <texture name="Home_Off" file_name="navbar/Home_Off.png" preload="true"/>
+ <texture name="Home_Press" file_name="navbar/Home_Press.png" preload="true"/>
+ <texture name="Info_Off" file_name="navbar/Info_Off.png" preload="true"/>
+ <texture name="Info_Press" file_name="navbar/Info_Press.png" preload="true"/>
+ <texture name="Favorite_Star_Over" file_name="navbar/Favorite_Star_Over.png" preload="true"/>
+ <texture name="History_Arrow" file_name="navbar/History_Arrow.png" preload="true"/>
+ <texture name="Search" file_name="navbar/Search.png" preload="true"/>
+ <texture name="Help_Off" file_name="navbar/Help_Off.png" preload="true"/>
+ <texture name="Help_Press" file_name="navbar/Help_Press.png" preload="true"/>
+
+ <texture name="Icon_Gear_Background" file_name="windows/Icon_Gear_Background.png" preload="true"/>
+ <texture name="Icon_Gear_Foreground" file_name="windows/Icon_Gear_Foreground.png" preload="true"/>
+ <texture name="Icon_Gear_Press" file_name="windows/Icon_Gear_Press.png" preload="true"/>
+ <texture name="Stepper_Down_Disabled" file_name="widgets/Stepper_Down_Disabled.png" preload="true"/>
+ <texture name="Stepper_Down_Off" file_name="widgets/Stepper_Down_Off.png" preload="true"/>
+ <texture name="Stepper_Down_Press" file_name="widgets/Stepper_Down_Press.png" preload="true"/>
+ <texture name="Stepper_Up_Disabled" file_name="widgets/Stepper_Up_Disabled.png" preload="true"/>
+ <texture name="Stepper_Up_Off" file_name="widgets/Stepper_Up_Off.png" preload="true"/>
+ <texture name="Stepper_Up_Press" file_name="widgets/Stepper_Up_Press.png" preload="true"/>
- <texture name="teleport_history_backward.tga" preload="true"/>
- <texture name="teleport_history_forward.tga" preload="true"/>
+ <!-- Please add new files alphabetically to prevent merge conflicts. JC -->
</textures>
diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_Disabled.png b/indra/newview/skins/default/textures/widgets/Checkbox_Disabled.png
new file mode 100644
index 0000000000..c1ee210099
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/Checkbox_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_Off.png b/indra/newview/skins/default/textures/widgets/Checkbox_Off.png
new file mode 100644
index 0000000000..2525405f37
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/Checkbox_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_On.png b/indra/newview/skins/default/textures/widgets/Checkbox_On.png
new file mode 100644
index 0000000000..2d9dba1592
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/Checkbox_On.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_On_Disabled.png b/indra/newview/skins/default/textures/widgets/Checkbox_On_Disabled.png
new file mode 100644
index 0000000000..beaa7bcbf6
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/Checkbox_On_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_On_Over.png b/indra/newview/skins/default/textures/widgets/Checkbox_On_Over.png
new file mode 100644
index 0000000000..bc504d130e
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/Checkbox_On_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_On_Press.png b/indra/newview/skins/default/textures/widgets/Checkbox_On_Press.png
new file mode 100644
index 0000000000..5bced95a89
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/Checkbox_On_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_Over.png b/indra/newview/skins/default/textures/widgets/Checkbox_Over.png
new file mode 100644
index 0000000000..5a7162addf
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/Checkbox_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Checkbox_Press.png b/indra/newview/skins/default/textures/widgets/Checkbox_Press.png
new file mode 100644
index 0000000000..44be193678
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/Checkbox_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_Disabled.png b/indra/newview/skins/default/textures/widgets/ComboButton_Disabled.png
new file mode 100644
index 0000000000..d0fff1b3c3
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/ComboButton_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_Off.png b/indra/newview/skins/default/textures/widgets/ComboButton_Off.png
new file mode 100644
index 0000000000..80402458b7
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/ComboButton_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_On.png b/indra/newview/skins/default/textures/widgets/ComboButton_On.png
new file mode 100644
index 0000000000..b42cc7542e
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/ComboButton_On.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ComboButton_Selected.png b/indra/newview/skins/default/textures/widgets/ComboButton_Selected.png
new file mode 100644
index 0000000000..bbc0657487
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/ComboButton_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/DisclosureArrow_Closed_Over.png b/indra/newview/skins/default/textures/widgets/DisclosureArrow_Closed_Over.png
new file mode 100644
index 0000000000..45bcb0464e
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/DisclosureArrow_Closed_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/DisclosureArrow_Opened_Off.png b/indra/newview/skins/default/textures/widgets/DisclosureArrow_Opened_Off.png
new file mode 100644
index 0000000000..75057938d2
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/DisclosureArrow_Opened_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/DisclosureArrow_Opened_Over.png b/indra/newview/skins/default/textures/widgets/DisclosureArrow_Opened_Over.png
new file mode 100644
index 0000000000..dabbd85b34
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/DisclosureArrow_Opened_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/DropDown_Disabled.png b/indra/newview/skins/default/textures/widgets/DropDown_Disabled.png
new file mode 100644
index 0000000000..b295752ea9
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/DropDown_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/DropDown_Off.png b/indra/newview/skins/default/textures/widgets/DropDown_Off.png
new file mode 100644
index 0000000000..4764ed4ee2
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/DropDown_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/DropDown_On.png b/indra/newview/skins/default/textures/widgets/DropDown_On.png
new file mode 100644
index 0000000000..10262d3979
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/DropDown_On.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/DropDown_Press.png b/indra/newview/skins/default/textures/widgets/DropDown_Press.png
new file mode 100644
index 0000000000..16cb25cc77
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/DropDown_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ListItem_Over.png b/indra/newview/skins/default/textures/widgets/ListItem_Over.png
new file mode 100644
index 0000000000..4b2b9ab3e5
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/ListItem_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ListItem_Select.png b/indra/newview/skins/default/textures/widgets/ListItem_Select.png
new file mode 100644
index 0000000000..317c672441
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/ListItem_Select.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ProgressBar.png b/indra/newview/skins/default/textures/widgets/ProgressBar.png
new file mode 100644
index 0000000000..edf11ac1f5
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/ProgressBar.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ProgressTrack.png b/indra/newview/skins/default/textures/widgets/ProgressTrack.png
new file mode 100644
index 0000000000..bb6d9f4144
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/ProgressTrack.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Disabled.png b/indra/newview/skins/default/textures/widgets/PushButton_Disabled.png
new file mode 100644
index 0000000000..04e91bdaab
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/PushButton_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Off.png b/indra/newview/skins/default/textures/widgets/PushButton_Off.png
new file mode 100644
index 0000000000..1ee0329e66
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/PushButton_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/PushButton_On.png b/indra/newview/skins/default/textures/widgets/PushButton_On.png
new file mode 100644
index 0000000000..661d1c5611
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/PushButton_On.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/PushButton_On_Over.png b/indra/newview/skins/default/textures/widgets/PushButton_On_Over.png
new file mode 100644
index 0000000000..064a4c4f7f
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/PushButton_On_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/PushButton_On_Selected.png b/indra/newview/skins/default/textures/widgets/PushButton_On_Selected.png
new file mode 100644
index 0000000000..48e8aa2eab
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/PushButton_On_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Over.png b/indra/newview/skins/default/textures/widgets/PushButton_Over.png
new file mode 100644
index 0000000000..c227f07513
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/PushButton_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Press.png b/indra/newview/skins/default/textures/widgets/PushButton_Press.png
new file mode 100644
index 0000000000..0a4a3a6ad9
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/PushButton_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Selected.png b/indra/newview/skins/default/textures/widgets/PushButton_Selected.png
new file mode 100644
index 0000000000..0a4a3a6ad9
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/PushButton_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Selected_Disabled.png b/indra/newview/skins/default/textures/widgets/PushButton_Selected_Disabled.png
new file mode 100644
index 0000000000..661d1c5611
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/PushButton_Selected_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Selected_Over.png b/indra/newview/skins/default/textures/widgets/PushButton_Selected_Over.png
new file mode 100644
index 0000000000..064a4c4f7f
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/PushButton_Selected_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/PushButton_Selected_Press.png b/indra/newview/skins/default/textures/widgets/PushButton_Selected_Press.png
new file mode 100644
index 0000000000..48e8aa2eab
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/PushButton_Selected_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_Disabled.png b/indra/newview/skins/default/textures/widgets/RadioButton_Disabled.png
new file mode 100644
index 0000000000..a1052684b9
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/RadioButton_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_Off.png b/indra/newview/skins/default/textures/widgets/RadioButton_Off.png
new file mode 100644
index 0000000000..c58e0305ef
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/RadioButton_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_On.png b/indra/newview/skins/default/textures/widgets/RadioButton_On.png
new file mode 100644
index 0000000000..c09a2197c7
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/RadioButton_On.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_On_Disabled.png b/indra/newview/skins/default/textures/widgets/RadioButton_On_Disabled.png
new file mode 100644
index 0000000000..d7d444fd0c
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/RadioButton_On_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_On_Over.png b/indra/newview/skins/default/textures/widgets/RadioButton_On_Over.png
new file mode 100644
index 0000000000..3e7d803a28
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/RadioButton_On_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_On_Press.png b/indra/newview/skins/default/textures/widgets/RadioButton_On_Press.png
new file mode 100644
index 0000000000..a707e8ceb8
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/RadioButton_On_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_Over.png b/indra/newview/skins/default/textures/widgets/RadioButton_Over.png
new file mode 100644
index 0000000000..a5c8cbe293
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/RadioButton_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/RadioButton_Press.png b/indra/newview/skins/default/textures/widgets/RadioButton_Press.png
new file mode 100644
index 0000000000..33eaa14030
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/RadioButton_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Down.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Down.png
new file mode 100644
index 0000000000..186822da43
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/ScrollArrow_Down.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Down_Over.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Down_Over.png
new file mode 100644
index 0000000000..605d159eaa
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/ScrollArrow_Down_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Left.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Left.png
new file mode 100644
index 0000000000..42f999a451
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/ScrollArrow_Left.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Left_Over.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Left_Over.png
new file mode 100644
index 0000000000..c79547dffd
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/ScrollArrow_Left_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Right.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Right.png
new file mode 100644
index 0000000000..176ffcdbb9
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/ScrollArrow_Right.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Right_Over.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Right_Over.png
new file mode 100644
index 0000000000..e353542ad9
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/ScrollArrow_Right_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Up.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Up.png
new file mode 100644
index 0000000000..4d245eb57a
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/ScrollArrow_Up.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollArrow_Up_Over.png b/indra/newview/skins/default/textures/widgets/ScrollArrow_Up_Over.png
new file mode 100644
index 0000000000..dd2fceb716
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/ScrollArrow_Up_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz.png b/indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz.png
new file mode 100644
index 0000000000..8a085aa966
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz_Over.png b/indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz_Over.png
new file mode 100644
index 0000000000..cf78ea3924
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/ScrollThumb_Horiz_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollThumb_Vert.png b/indra/newview/skins/default/textures/widgets/ScrollThumb_Vert.png
new file mode 100644
index 0000000000..fc7fd93e7a
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/ScrollThumb_Vert.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollThumb_Vert_Over.png b/indra/newview/skins/default/textures/widgets/ScrollThumb_Vert_Over.png
new file mode 100644
index 0000000000..53587197da
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/ScrollThumb_Vert_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollTrack_Horiz.png b/indra/newview/skins/default/textures/widgets/ScrollTrack_Horiz.png
new file mode 100644
index 0000000000..4f31c48c02
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/ScrollTrack_Horiz.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/ScrollTrack_Vert.png b/indra/newview/skins/default/textures/widgets/ScrollTrack_Vert.png
new file mode 100644
index 0000000000..f89ee3f68f
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/ScrollTrack_Vert.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Disabled.png
new file mode 100644
index 0000000000..3b39c51a77
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Off.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Off.png
new file mode 100644
index 0000000000..57ed79d733
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On.png
new file mode 100644
index 0000000000..7afb9c99c3
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Disabled.png
new file mode 100644
index 0000000000..77c4224539
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Over.png
new file mode 100644
index 0000000000..8b93dd551e
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Selected.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Selected.png
new file mode 100644
index 0000000000..3f207cbea2
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_On_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Over.png
new file mode 100644
index 0000000000..5b8878e0cb
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Press.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Press.png
new file mode 100644
index 0000000000..379953216b
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected.png
new file mode 100644
index 0000000000..379953216b
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Disabled.png
new file mode 100644
index 0000000000..77c4224539
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Over.png
new file mode 100644
index 0000000000..8b93dd551e
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Press.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Press.png
new file mode 100644
index 0000000000..3f207cbea2
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Left_Selected_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Disabled.png
new file mode 100644
index 0000000000..deb87c8489
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On.png
new file mode 100644
index 0000000000..220df9db25
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On_Over.png
new file mode 100644
index 0000000000..5bbcdcb0b4
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On_Press.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On_Press.png
new file mode 100644
index 0000000000..dde367f05e
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_On_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Over.png
new file mode 100644
index 0000000000..d4f30b9adb
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected.png
new file mode 100644
index 0000000000..ca7027da91
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Disabled.png
new file mode 100644
index 0000000000..220df9db25
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Over.png
new file mode 100644
index 0000000000..5bbcdcb0b4
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Press.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Press.png
new file mode 100644
index 0000000000..dde367f05e
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Middle_Selected_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Disabled.png
new file mode 100644
index 0000000000..8e6b9c8c6f
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Off.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Off.png
new file mode 100644
index 0000000000..b1521199ff
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On.png
new file mode 100644
index 0000000000..467c43fc90
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Over.png
new file mode 100644
index 0000000000..2049736897
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Selected.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Selected.png
new file mode 100644
index 0000000000..1574f48b28
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_On_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Over.png
new file mode 100644
index 0000000000..2717e7d7b0
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Press.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Press.png
new file mode 100644
index 0000000000..3883518033
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected.png
new file mode 100644
index 0000000000..3883518033
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Disabled.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Disabled.png
new file mode 100644
index 0000000000..ab31f6ded7
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Over.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Over.png
new file mode 100644
index 0000000000..2049736897
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Press.png b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Press.png
new file mode 100644
index 0000000000..1574f48b28
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SegmentedBtn_Right_Selected_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SliderThumb_Disabled.png b/indra/newview/skins/default/textures/widgets/SliderThumb_Disabled.png
new file mode 100644
index 0000000000..b627232012
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SliderThumb_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SliderThumb_Off.png b/indra/newview/skins/default/textures/widgets/SliderThumb_Off.png
new file mode 100644
index 0000000000..b627232012
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SliderThumb_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SliderThumb_Over.png b/indra/newview/skins/default/textures/widgets/SliderThumb_Over.png
new file mode 100644
index 0000000000..b6f900d3bd
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SliderThumb_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SliderThumb_Press.png b/indra/newview/skins/default/textures/widgets/SliderThumb_Press.png
new file mode 100644
index 0000000000..7081f9cfe0
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SliderThumb_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SliderTrack_Horiz.png b/indra/newview/skins/default/textures/widgets/SliderTrack_Horiz.png
new file mode 100644
index 0000000000..232006ee5a
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SliderTrack_Horiz.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/SliderTrack_Vert.png b/indra/newview/skins/default/textures/widgets/SliderTrack_Vert.png
new file mode 100644
index 0000000000..cd002b3973
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/SliderTrack_Vert.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Stepper_Down_Off.png b/indra/newview/skins/default/textures/widgets/Stepper_Down_Off.png
new file mode 100644
index 0000000000..cf0d8ee2c1
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/Stepper_Down_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Stepper_Down_Over.png b/indra/newview/skins/default/textures/widgets/Stepper_Down_Over.png
new file mode 100644
index 0000000000..01e0a2d9f1
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/Stepper_Down_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Stepper_Down_Press.png b/indra/newview/skins/default/textures/widgets/Stepper_Down_Press.png
new file mode 100644
index 0000000000..fe3a7beafd
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/Stepper_Down_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Stepper_Up_Off.png b/indra/newview/skins/default/textures/widgets/Stepper_Up_Off.png
new file mode 100644
index 0000000000..133589b8a6
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/Stepper_Up_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Stepper_Up_Over.png b/indra/newview/skins/default/textures/widgets/Stepper_Up_Over.png
new file mode 100644
index 0000000000..2ce84ea5be
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/Stepper_Up_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/Stepper_Up_Press.png b/indra/newview/skins/default/textures/widgets/Stepper_Up_Press.png
new file mode 100644
index 0000000000..e83babc519
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/Stepper_Up_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/TextField_Active.png b/indra/newview/skins/default/textures/widgets/TextField_Active.png
new file mode 100644
index 0000000000..ca6daab4e0
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/TextField_Active.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/TextField_Disabled.png b/indra/newview/skins/default/textures/widgets/TextField_Disabled.png
new file mode 100644
index 0000000000..3d205a3f2e
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/TextField_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/TextField_Off.png b/indra/newview/skins/default/textures/widgets/TextField_Off.png
new file mode 100644
index 0000000000..911d907acc
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/TextField_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/TextField_Search_Active.png b/indra/newview/skins/default/textures/widgets/TextField_Search_Active.png
new file mode 100644
index 0000000000..fa79cb6260
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/TextField_Search_Active.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/TextField_Search_Disabled.png b/indra/newview/skins/default/textures/widgets/TextField_Search_Disabled.png
new file mode 100644
index 0000000000..8b504af101
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/TextField_Search_Disabled.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/widgets/TextField_Search_Off.png b/indra/newview/skins/default/textures/widgets/TextField_Search_Off.png
new file mode 100644
index 0000000000..862b13d219
--- /dev/null
+++ b/indra/newview/skins/default/textures/widgets/TextField_Search_Off.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Flyout.png b/indra/newview/skins/default/textures/windows/Flyout.png
new file mode 100644
index 0000000000..5596b194c9
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/Flyout.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Flyout_Pointer.png b/indra/newview/skins/default/textures/windows/Flyout_Pointer.png
new file mode 100644
index 0000000000..69fc08ceaa
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/Flyout_Pointer.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Close_Foreground.png b/indra/newview/skins/default/textures/windows/Icon_Close_Foreground.png
new file mode 100644
index 0000000000..fb59f2e61e
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/Icon_Close_Foreground.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Close_Press.png b/indra/newview/skins/default/textures/windows/Icon_Close_Press.png
new file mode 100644
index 0000000000..7177c803b0
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/Icon_Close_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Close_Toast.png b/indra/newview/skins/default/textures/windows/Icon_Close_Toast.png
new file mode 100644
index 0000000000..ecf01c617a
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/Icon_Close_Toast.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Dock_Foreground.png b/indra/newview/skins/default/textures/windows/Icon_Dock_Foreground.png
new file mode 100644
index 0000000000..cadd6bc8ce
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/Icon_Dock_Foreground.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Dock_Press.png b/indra/newview/skins/default/textures/windows/Icon_Dock_Press.png
new file mode 100644
index 0000000000..08f8cfc3d4
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/Icon_Dock_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Gear_Background.png b/indra/newview/skins/default/textures/windows/Icon_Gear_Background.png
new file mode 100644
index 0000000000..db74b93afd
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/Icon_Gear_Background.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Gear_Foreground.png b/indra/newview/skins/default/textures/windows/Icon_Gear_Foreground.png
new file mode 100644
index 0000000000..1032e45f7e
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/Icon_Gear_Foreground.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Gear_Over.png b/indra/newview/skins/default/textures/windows/Icon_Gear_Over.png
new file mode 100644
index 0000000000..01dbde102b
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/Icon_Gear_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Gear_Press.png b/indra/newview/skins/default/textures/windows/Icon_Gear_Press.png
new file mode 100644
index 0000000000..6614bdd165
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/Icon_Gear_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Undock_Foreground.png b/indra/newview/skins/default/textures/windows/Icon_Undock_Foreground.png
new file mode 100644
index 0000000000..d790cf57ef
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/Icon_Undock_Foreground.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Icon_Undock_Press.png b/indra/newview/skins/default/textures/windows/Icon_Undock_Press.png
new file mode 100644
index 0000000000..fdae4b75f6
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/Icon_Undock_Press.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Resize_Corner.png b/indra/newview/skins/default/textures/windows/Resize_Corner.png
new file mode 100644
index 0000000000..16ed63e428
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/Resize_Corner.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Toast_CloseBtn.png b/indra/newview/skins/default/textures/windows/Toast_CloseBtn.png
new file mode 100644
index 0000000000..78b137cdaf
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/Toast_CloseBtn.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Toast_Over.png b/indra/newview/skins/default/textures/windows/Toast_Over.png
new file mode 100644
index 0000000000..807e8e553c
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/Toast_Over.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Window_Background.png b/indra/newview/skins/default/textures/windows/Window_Background.png
new file mode 100644
index 0000000000..e9f15e76b9
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/Window_Background.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/Window_Foreground.png b/indra/newview/skins/default/textures/windows/Window_Foreground.png
new file mode 100644
index 0000000000..e76e9f3c79
--- /dev/null
+++ b/indra/newview/skins/default/textures/windows/Window_Foreground.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/world/NoEntryLines.png b/indra/newview/skins/default/textures/world/NoEntryLines.png
new file mode 100644
index 0000000000..5a1f0ea95e
--- /dev/null
+++ b/indra/newview/skins/default/textures/world/NoEntryLines.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/world/NoEntryPassLines.png b/indra/newview/skins/default/textures/world/NoEntryPassLines.png
new file mode 100644
index 0000000000..e4b8fc6ae2
--- /dev/null
+++ b/indra/newview/skins/default/textures/world/NoEntryPassLines.png
Binary files differ
diff --git a/indra/newview/skins/default/xui/de/floater_tools.xml b/indra/newview/skins/default/xui/de/floater_tools.xml
index cef204eb5f..8084d2427e 100644
--- a/indra/newview/skins/default/xui/de/floater_tools.xml
+++ b/indra/newview/skins/default/xui/de/floater_tools.xml
@@ -1,5 +1,633 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater name="toolbox floater" title="">
+<floater name="toolbox floater" title="" short_title="Bauen">
+ <button label="" label_selected="" name="button focus" tool_tip="Fokus"/>
+ <button label="" label_selected="" name="button move" tool_tip="Verschieben"/>
+ <button label="" label_selected="" name="button edit" tool_tip="Bearbeiten"/>
+ <button label="" label_selected="" name="button create" tool_tip="Erstellen"/>
+ <button label="" label_selected="" name="button land" tool_tip="Land"/>
+ <check_box label="Zoom" name="radio zoom"/>
+ <check_box label="Orbit (Strg)" name="radio orbit"/>
+ <check_box label="Schwenken (Strg-Umschalt)" name="radio pan"/>
+ <check_box label="Verschieben" name="radio move"/>
+ <check_box label="Heben (Strg)" name="radio lift"/>
+ <check_box label="Rotieren (Strg-Umschalt)" name="radio spin"/>
+ <check_box label="Position" name="radio position"/>
+ <check_box label="Drehen (Strg)" name="radio rotate"/>
+ <check_box label="Dehnen (Strg-Umschalt)" name="radio stretch"/>
+ <check_box label="Textur auswählen" name="radio select face"/>
+ <check_box label="Verknüpfte Teile bearbeiten" name="checkbox edit linked parts"/>
+ <text name="text ruler mode">
+ Lineal:
+ </text>
+ <combo_box name="combobox grid mode">
+ <combo_item name="World">
+ Welt
+ </combo_item>
+ <combo_item name="Local">
+ Lokal
+ </combo_item>
+ <combo_item name="Reference">
+ Referenz
+ </combo_item>
+ </combo_box>
+ <check_box label="Beide Seiten dehnen" name="checkbox uniform"/>
+ <check_box label="Texturen dehnen" name="checkbox stretch textures"/>
+ <check_box label="Raster verwenden" name="checkbox snap to grid"/>
+ <button label="Optionen..." label_selected="Optionen..." name="Options..."/>
+ <text name="text status">
+ Zum Verschieben ziehen, zum Kopieren Umschalttaste-Ziehen
+ </text>
+ <button label="" label_selected="" name="ToolCube" tool_tip="Würfel"/>
+ <button label="" label_selected="" name="ToolPrism" tool_tip="Prisma"/>
+ <button label="" label_selected="" name="ToolPyramid" tool_tip="Pyramide"/>
+ <button label="" label_selected="" name="ToolTetrahedron" tool_tip="Tetraeder"/>
+ <button label="" label_selected="" name="ToolCylinder" tool_tip="Zylinder"/>
+ <button label="" label_selected="" name="ToolHemiCylinder" tool_tip="Halbzylinder"/>
+ <button label="" label_selected="" name="ToolCone" tool_tip="Kegel"/>
+ <button label="" label_selected="" name="ToolHemiCone" tool_tip="Halbkegel"/>
+ <button label="" label_selected="" name="ToolSphere" tool_tip="Kugel"/>
+ <button label="" label_selected="" name="ToolHemiSphere" tool_tip="Halbkugel"/>
+ <button label="" label_selected="" name="ToolTorus" tool_tip="Torus"/>
+ <button label="" label_selected="" name="ToolTube" tool_tip="Rohr"/>
+ <button label="" label_selected="" name="ToolRing" tool_tip="Ring"/>
+ <button label="" label_selected="" name="ToolTree" tool_tip="Baum"/>
+ <button label="" label_selected="" name="ToolGrass" tool_tip="Gras"/>
+ <check_box label="Auswahl behalten" name="checkbox sticky"/>
+ <check_box label="Auswahl kopieren" name="checkbox copy selection"/>
+ <check_box label="Zentrieren" name="checkbox copy centers"/>
+ <check_box label="Drehen" name="checkbox copy rotates"/>
+ <check_box label="Land auswählen" name="radio select land"/>
+ <check_box label="Einebnen" name="radio flatten"/>
+ <check_box label="Anheben" name="radio raise"/>
+ <check_box label="Absenken" name="radio lower"/>
+ <check_box label="Glätten" name="radio smooth"/>
+ <check_box label="Aufrauen" name="radio noise"/>
+ <check_box label="Zurücksetzen" name="radio revert"/>
+ <button label="Übernehmen" label_selected="Übernehmen" name="button apply to selection" tool_tip="Ausgewähltes Land ändern"/>
+ <text name="Bulldozer:">
+ Planierraupe:
+ </text>
+ <text name="Dozer Size:">
+ Größe
+ </text>
+ <text name="Strength:">
+ Stärke
+ </text>
+ <text name="obj_count">
+ Ausgewählte Objekte: [COUNT]
+ </text>
+ <text name="prim_count">
+ Primitive: [COUNT]
+ </text>
+ <tab_container name="Object Info Tabs">
+ <panel label="Allgemein" name="General">
+ <text name="Name:">
+ Name:
+ </text>
+ <text name="Description:">
+ Beschreibung:
+ </text>
+ <text name="Creator:">
+ Ersteller:
+ </text>
+ <text name="Creator Name">
+ Thrax Linden
+ </text>
+ <button label="Profil..." label_selected="Profil..." name="button creator profile"/>
+ <text name="Owner:">
+ Eigentümer:
+ </text>
+ <text name="Owner Name">
+ Thrax Linden
+ </text>
+ <button label="Profil..." label_selected="Profil..." name="button owner profile"/>
+ <text name="Group:">
+ Gruppe:
+ </text>
+ <text name="Group Name Proxy">
+ Die Lindens
+ </text>
+ <button label="Festlegen..." label_selected="Festlegen..." name="button set group"/>
+ <text name="Permissions:">
+ Berechtigungen:
+ </text>
+ <text name="perm_modify">
+ Sie können dieses Objekt ändern.
+ </text>
+ <check_box label="Mit Gruppe teilen" name="checkbox share with group" tool_tip="Allen Mitgliedern der zugeordneten Gruppe die Erlaubnis erteilen, Ihre Berechtigungen für dieses Objekt zu teilen und zu verwenden. Sie müssen Übereignen, um Rollenbeschränkungen zu aktivieren."/>
+ <string name="text deed continued">
+ Übertragung...
+ </string>
+ <string name="text deed">
+ Übertragung
+ </string>
+ <button label="Übertragung..." label_selected="Übertragung..." name="button deed" tool_tip="In der Gruppe gemeinsam verwendete Objekte können von einem Gruppenfunktionär übertragen werden."/>
+ <check_box label="Verschieben durch beliebige Personen zulassen" name="checkbox allow everyone move"/>
+ <check_box label="Kopieren durch beliebige Personen zulassen" name="checkbox allow everyone copy"/>
+ <check_box label="In Suche anzeigen" name="search_check" tool_tip="Dieses Objekt in Suchergebnissen anzeigen"/>
+ <check_box label="Zu verkaufen" name="checkbox for sale"/>
+ <text name="Cost">
+ Preis:L$
+ </text>
+ <radio_group name="sale type">
+ <radio_item name="Original">
+ Original
+ </radio_item>
+ <radio_item name="Copy">
+ Kopieren
+ </radio_item>
+ <radio_item name="Contents">
+ Inhalt
+ </radio_item>
+ </radio_group>
+ <text name="Next owner can:">
+ Nächster Eigentümer kann:
+ </text>
+ <check_box label="Ändern" name="checkbox next owner can modify"/>
+ <check_box label="Kopieren" name="checkbox next owner can copy"/>
+ <check_box label="Wiederverkaufen" name="checkbox next owner can transfer"/>
+ <text name="label click action">
+ Bei Linksklicken:
+ </text>
+ <combo_box name="clickaction">
+ <combo_item name="Touch/grab(default)">
+ Berühren/Greifen (Standard)
+ </combo_item>
+ <combo_item name="Sitonobject">
+ Auf Objekt sitzen
+ </combo_item>
+ <combo_item name="Buyobject">
+ Objekt kaufen
+ </combo_item>
+ <combo_item name="Payobject">
+ Objekt bezahlen
+ </combo_item>
+ <combo_item name="Open">
+ Öffnen
+ </combo_item>
+ <combo_item name="Play">
+ Parzellenmedien wiedergeben
+ </combo_item>
+ <combo_item name="Opemmedia">
+ Parzellenmedien öffnen
+ </combo_item>
+ </combo_box>
+ <text name="B:">
+ B:
+ </text>
+ <text name="O:">
+ O;
+ </text>
+ <text name="G:">
+ G:
+ </text>
+ <text name="E:">
+ E:
+ </text>
+ <text name="N:">
+ N:
+ </text>
+ <text name="F:">
+ F:
+ </text>
+ <string name="text modify info 1">
+ Sie können dieses Objekt ändern.
+ </string>
+ <string name="text modify info 2">
+ Sie können diese Objekte ändern.
+ </string>
+ <string name="text modify info 3">
+ Sie können dieses Objekt nicht ändern.
+ </string>
+ <string name="text modify info 4">
+ Sie können diese Objekte nicht ändern.
+ </string>
+ <string name="text modify warning">
+ Gesamtes Objekt muss gewählt werden, um Berechtigungen festzulegen.
+ </string>
+ <string name="Cost Default">
+ Preis:L$
+ </string>
+ <string name="Cost Total">
+ Summe:L$
+ </string>
+ <string name="Cost Per Unit">
+ Stückpreis:L$
+ </string>
+ <string name="Cost Mixed">
+ Mischpreis
+ </string>
+ <string name="Sale Mixed">
+ Mischverkauf
+ </string>
+ </panel>
+ <panel label="Objekt" name="Object">
+ <text name="select_single">
+ Wählen Sie nur ein Primitivum aus, um Parameter zu bearbeiten.
+ </text>
+ <text name="edit_object">
+ Objektparameter bearbeiten:
+ </text>
+ <check_box label="Gesperrt" name="checkbox locked" tool_tip="Verhindert, dass Objekt verschoben oder gelöscht wird. Oft beim Bauen nützlich, um unbeabsichtigte Bearbeitungen zu vermeiden."/>
+ <check_box label="Physisch" name="Physical Checkbox Ctrl" tool_tip="Gestattet, das Objekt geschoben und von Schwerkraft beeinflusst wird"/>
+ <check_box label="Temporär" name="Temporary Checkbox Ctrl" tool_tip="Verursacht, dass Objekt 1 Minute nach Erstellung gelöscht wird."/>
+ <check_box label="Phantom" name="Phantom Checkbox Ctrl" tool_tip="Verursacht, dass Objekt nicht mit anderen Objekten oder Avataren kollidiert"/>
+ <text name="label position">
+ Position (Meter)
+ </text>
+ <spinner label="X" name="Pos X"/>
+ <spinner label="Y" name="Pos Y"/>
+ <spinner label="Z" name="Pos Z"/>
+ <text name="label size">
+ Größe (Meter)
+ </text>
+ <spinner label="X" name="Scale X"/>
+ <spinner label="Y" name="Scale Y"/>
+ <spinner label="Z" name="Scale Z"/>
+ <text name="label rotation">
+ Rotation (Grad)
+ </text>
+ <spinner label="X" name="Rot X"/>
+ <spinner label="Y" name="Rot Y"/>
+ <spinner label="Z" name="Rot Z"/>
+ <text name="label material">
+ Material
+ </text>
+ <combo_box name="material">
+ <combo_item name="Stone">
+ Stein
+ </combo_item>
+ <combo_item name="Metal">
+ Metall
+ </combo_item>
+ <combo_item name="Glass">
+ Glas
+ </combo_item>
+ <combo_item name="Wood">
+ Holz
+ </combo_item>
+ <combo_item name="Flesh">
+ Fleisch
+ </combo_item>
+ <combo_item name="Plastic">
+ Kunststoff
+ </combo_item>
+ <combo_item name="Rubber">
+ Gummi
+ </combo_item>
+ </combo_box>
+ <text name="label basetype">
+ Bausteintyp
+ </text>
+ <combo_box name="comboBaseType">
+ <combo_item name="Box">
+ Quader
+ </combo_item>
+ <combo_item name="Cylinder">
+ Zylinder
+ </combo_item>
+ <combo_item name="Prism">
+ Prisma
+ </combo_item>
+ <combo_item name="Sphere">
+ Kugel
+ </combo_item>
+ <combo_item name="Torus">
+ Torus
+ </combo_item>
+ <combo_item name="Tube">
+ Rohr
+ </combo_item>
+ <combo_item name="Ring">
+ Ring
+ </combo_item>
+ <combo_item name="Sculpted">
+ Geformt
+ </combo_item>
+ </combo_box>
+ <text name="text cut">
+ Pfadschnitt Beginn und Ende
+ </text>
+ <spinner label="B" name="cut begin"/>
+ <spinner label="E" name="cut end"/>
+ <text name="text hollow">
+ Hohl
+ </text>
+ <text name="text skew">
+ Versatz
+ </text>
+ <spinner name="Scale 1"/>
+ <spinner name="Skew"/>
+ <text name="Hollow Shape">
+ Hohlform
+ </text>
+ <combo_box name="hole">
+ <combo_item name="Default">
+ Standard
+ </combo_item>
+ <combo_item name="Circle">
+ Kreis
+ </combo_item>
+ <combo_item name="Square">
+ Quadrat
+ </combo_item>
+ <combo_item name="Triangle">
+ Dreieck
+ </combo_item>
+ </combo_box>
+ <text name="text twist">
+ Torsion
+ </text>
+ <spinner label="B" name="Twist Begin"/>
+ <spinner label="E" name="Twist End"/>
+ <text name="scale_taper">
+ Verjüngung
+ </text>
+ <text name="scale_hole">
+ Lochgröße
+ </text>
+ <spinner label="X" name="Taper Scale X"/>
+ <spinner label="Y" name="Taper Scale Y"/>
+ <text name="text topshear">
+ Verscherung
+ </text>
+ <spinner label="X" name="Shear X"/>
+ <spinner label="Y" name="Shear Y"/>
+ <text name="advanced_cut">
+ Profilschnitt-Beginn und Ende
+ </text>
+ <text name="advanced_dimple">
+ Vertiefung-Beginn und Ende
+ </text>
+ <text name="advanced_slice">
+ Anfang/Ende abschneiden
+ </text>
+ <spinner label="B" name="Path Limit Begin"/>
+ <spinner label="E" name="Path Limit End"/>
+ <text name="text taper2">
+ Verjüngung
+ </text>
+ <spinner label="X" name="Taper X"/>
+ <spinner label="Y" name="Taper Y"/>
+ <text name="text radius delta">
+ Radius
+ </text>
+ <text name="text revolutions">
+ Umdrehungen
+ </text>
+ <spinner name="Radius Offset"/>
+ <texture_picker label="Textur für gestaltetes
+Primitiv" name="sculpt texture control" tool_tip="Klicken Sie hier, um ein Bild auszuwählen"/>
+ <check_box label="Spiegeln" name="sculpt mirror control" tool_tip="Geformtes Primitiv entlang der X-Achse spiegeln."/>
+ <check_box label="Wenden" name="sculpt invert control" tool_tip="Dreht die Normalen des geformten Primitivs von innen nach außen."/>
+ <text name="label sculpt type">
+ Naht
+ </text>
+ <combo_box name="sculpt type control">
+ <combo_item name="None">
+ (keiner)
+ </combo_item>
+ <combo_item name="Sphere">
+ Kugel
+ </combo_item>
+ <combo_item name="Torus">
+ Torus
+ </combo_item>
+ <combo_item name="Plane">
+ Fläche
+ </combo_item>
+ <combo_item name="Cylinder">
+ Zylinder
+ </combo_item>
+ </combo_box>
+ </panel>
+ <panel label="Eigenschaften" name="Features">
+ <text name="select_single">
+ Wählen Sie nur einen einzelnen Baustein aus, um Eigenschaften zu bearbeiten.
+ </text>
+ <text name="edit_object">
+ Objekteigenschaften bearbeiten:
+ </text>
+ <check_box label="Flexibler Weg" name="Flexible1D Checkbox Ctrl" tool_tip="Gestattet, dass Objekt um die Z-Achse gebogen wird. (nur Client-Seite)"/>
+ <spinner label="Weichheit" name="FlexNumSections"/>
+ <spinner label="Schwerkraft" name="FlexGravity"/>
+ <spinner label="Ziehen" name="FlexFriction"/>
+ <spinner label="Wind" name="FlexWind"/>
+ <spinner label="Spannung" name="FlexTension"/>
+ <spinner label="Erzwingen X" name="FlexForceX"/>
+ <spinner label="Erzwingen Y" name="FlexForceY"/>
+ <spinner label="Erzwingen Z" name="FlexForceZ"/>
+ <check_box label="Licht" name="Light Checkbox Ctrl" tool_tip="Verursacht, dass Objekt Licht emittiert"/>
+ <text name="label color">
+ Farbe
+ </text>
+ <color_swatch label="" name="colorswatch" tool_tip="Klicken, um Farbauswahl zu öffnen"/>
+ <spinner label="Intensität" name="Light Intensity"/>
+ <spinner label="Radius" name="Light Radius"/>
+ <spinner label="Abnehmend" name="Light Falloff"/>
+ </panel>
+ <panel label="Textur" name="Texture">
+ <texture_picker label="Textur" name="texture control" tool_tip="Klicken, um ein Bild zu wählen"/>
+ <color_swatch label="Farbe" name="colorswatch" tool_tip="Klicken, um Farbauswahl zu öffnen"/>
+ <text name="color trans">
+ Transparenz %
+ </text>
+ <text name="glow label">
+ Leuchten
+ </text>
+ <check_box label="Ganz hell" name="checkbox fullbright"/>
+ <text name="tex gen">
+ Zuordnung
+ </text>
+ <combo_box name="combobox texgen">
+ <combo_item name="Default">
+ Standard
+ </combo_item>
+ <combo_item name="Planar">
+ Eben
+ </combo_item>
+ </combo_box>
+ <text name="label shininess">
+ Glanz
+ </text>
+ <combo_box name="combobox shininess">
+ <combo_item name="None">
+ Kein
+ </combo_item>
+ <combo_item name="Low">
+ Niedrig
+ </combo_item>
+ <combo_item name="Medium">
+ Mittel
+ </combo_item>
+ <combo_item name="High">
+ Hoch
+ </combo_item>
+ </combo_box>
+ <text name="label bumpiness">
+ Holprigkeit
+ </text>
+ <combo_box name="combobox bumpiness">
+ <combo_item name="None">
+ Keine
+ </combo_item>
+ <combo_item name="Brightness">
+ Helligkeit
+ </combo_item>
+ <combo_item name="Darkness">
+ Dunkelheit
+ </combo_item>
+ <combo_item name="woodgrain">
+ Holzmaserung
+ </combo_item>
+ <combo_item name="bark">
+ Rinde
+ </combo_item>
+ <combo_item name="bricks">
+ Ziegel
+ </combo_item>
+ <combo_item name="checker">
+ Karo
+ </combo_item>
+ <combo_item name="concrete">
+ Beton
+ </combo_item>
+ <combo_item name="crustytile">
+ verkrustete Fliesen
+ </combo_item>
+ <combo_item name="cutstone">
+ Steinplatten
+ </combo_item>
+ <combo_item name="discs">
+ Scheiben
+ </combo_item>
+ <combo_item name="gravel">
+ Kies
+ </combo_item>
+ <combo_item name="petridish">
+ Petrischale
+ </combo_item>
+ <combo_item name="siding">
+ Verkleidung
+ </combo_item>
+ <combo_item name="stonetile">
+ Steinfliesen
+ </combo_item>
+ <combo_item name="stucco">
+ Stuck
+ </combo_item>
+ <combo_item name="suction">
+ Saugen
+ </combo_item>
+ <combo_item name="weave">
+ gewoben
+ </combo_item>
+ </combo_box>
+ <text name="tex scale">
+ Wiederholungen
+ </text>
+ <spinner label="Horizontal (U)" name="TexScaleU"/>
+ <check_box label="Umkehren" name="checkbox flip s"/>
+ <spinner label="Vertikal (V)" name="TexScaleV"/>
+ <check_box label="Umkehren" name="checkbox flip t"/>
+ <text name="tex rotate">
+ Rotation (Grad)
+ </text>
+ <string name="string repeats per meter">
+ Kacheln pro Meter
+ </string>
+ <string name="string repeats per face">
+ Wiederholungen pro Fläche
+ </string>
+ <text name="rpt">
+ Kacheln pro Meter
+ </text>
+ <button label="Übernehmen" label_selected="Übernehmen" name="button apply"/>
+ <text name="tex offset">
+ Versatz
+ </text>
+ <spinner label="Horizontal (U)" name="TexOffsetU"/>
+ <spinner label="Vertikal (V)" name="TexOffsetV"/>
+ <text name="textbox autofix">
+ Medientextur ausrichten
+(zuerst laden)
+ </text>
+ <button label="Ausrichten" label_selected="Ausrichten" name="button align"/>
+ </panel>
+ <panel label="Inhalt" name="Contents">
+ <button label="Neues Skript" label_selected="Neues Skript..." name="button new script"/>
+ <button label="Berechtigungen..." name="button permissions"/>
+ </panel>
+ </tab_container>
+ <panel name="land info panel">
+ <text name="label_parcel_info">
+ Parzelleninformation
+ </text>
+ <text name="label_area_price">
+ Preis: L$ [PRICE] für [AREA] m2.
+ </text>
+ <text name="label_area">
+ Fläche: [AREA] m2
+ </text>
+ <button label="Info zu Land..." label_selected="Info zu Land..." name="button about land"/>
+ <check_box label="Eigentümer anzeigen" name="checkbox show owners" tool_tip="Parzellen nach Eigentümer farbig kennzeichnen"/>
+ <button label="?" label_selected="?" name="button show owners help"/>
+ <text name="label_parcel_modify">
+ Parzelle ändern
+ </text>
+ <button label="Unterteilen..." label_selected="Unterteilen..." name="button subdivide land"/>
+ <button label="Zusammenlegen" label_selected="Zusammenlegen" name="button join land"/>
+ <text name="label_parcel_trans">
+ Land-Transaktionen
+ </text>
+ <button label="Land kaufen..." label_selected="Land kaufen..." name="button buy land"/>
+ <button label="Land aufgeben..." label_selected="Land aufgeben..." name="button abandon land"/>
+ </panel>
+ <string name="status_rotate">
+ An den farbigen Bändern ziehen, um das Objekt zu drehen
+ </string>
+ <string name="status_scale">
+ Klicken und ziehen, um die ausgewählte Seite zu dehnen
+ </string>
+ <string name="status_move">
+ Maus verschiebt, Umschalt-Taste und Maus kopiert
+ </string>
+ <string name="status_modifyland">
+ Klicken und halten, um das Land zu bearbeiten
+ </string>
+ <string name="status_camera">
+ Klicken und ziehen, um die Ansicht zu ändern
+ </string>
+ <string name="status_grab">
+ Ziehen, um Objekte zu verschieben, Strg zum Heben, Strg-Umschalt zum Drehen
+ </string>
+ <string name="status_place">
+ Inworld klicken, um zu bauen.
+ </string>
+ <string name="status_selectland">
+ Klicken und ziehen, um Land auszuwählen
+ </string>
+ <string name="grid_screen_text">
+ Bildschirm
+ </string>
+ <string name="grid_local_text">
+ Lokal
+ </string>
+ <string name="grid_world_text">
+ Welt
+ </string>
+ <string name="grid_reference_text">
+ Referenz
+ </string>
+ <string name="grid_attachment_text">
+ Anhang
+ </string>
+</floater>
+
+<!-- original file
+
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater name="toolbox floater" title="" short_title="Bauen">
<button label="" label_selected="" name="button focus" tool_tip="Fokus"/>
<button label="" label_selected="" name="button move" tool_tip="Verschieben"/>
<button label="" label_selected="" name="button edit" tool_tip="Bearbeiten"/>
@@ -623,3 +1251,5 @@ Primitiv" name="sculpt texture control" tool_tip="Klicken Sie hier, um ein Bild
Anhang
</string>
</floater>
+
+-->
diff --git a/indra/newview/skins/default/xui/de/panel_group_general.xml b/indra/newview/skins/default/xui/de/panel_group_general.xml
index ce19248755..2ce40e5787 100644
--- a/indra/newview/skins/default/xui/de/panel_group_general.xml
+++ b/indra/newview/skins/default/xui/de/panel_group_general.xml
@@ -47,6 +47,89 @@ Bewegen Sie die Maus über die Optionen, um weitere Informationen anzuzeigen.
<panel name="preferences_container">
<check_box label="In Suche anzeigen" name="show_in_group_list" tool_tip="Diese Gruppe in Suchergebnissen anzeigen."/>
<check_box label="Registrierung offen" name="open_enrollement" tool_tip="Festlegen, ob der Gruppenbeitritt ohne Einladung zulässig ist."/>
+ <check_box label="Beitrittsgebühr: L$" name="check_enrollment_fee" tool_tip="Festlegen, ob Neumitglieder eine Beitrittsgebühr zahlen müssen."/>
+ <spinner name="spin_enrollment_fee" tool_tip="Wenn „Beitrittsgebühr“ aktiviert ist, müssen neue Mitglieder diesen Betrag zahlen."/>
+ <combo_box name="group_mature_check" tool_tip="Festlegen, ob die Informationen Ihrer Gruppe „Mature“ sind.">
+ <combo_item name="select_mature">
+ - Mature wählen -
+ </combo_item>
+ <combo_item name="mature">
+ Mature-Inhalt
+ </combo_item>
+ <combo_item name="pg">
+ PG-Inhalt
+ </combo_item>
+ </combo_box>
+ <panel name="title_container">
+ <text name="active_title_label">
+ Mein aktiver Titel
+ </text>
+ <combo_box name="active_title" tool_tip="Legt fest, was im Namensschild Ihres Avatars angezeigt wird, wenn diese Gruppe aktiviert ist."/>
+ </panel>
+ <check_box label="Gruppenmitteilungen erhalten" name="receive_notices" tool_tip="Festlegen, ob Sie von dieser Gruppe Mitteilungen erhalten können. Deaktivieren Sie diese Option, wenn Sie von der Gruppe Spam erhalten."/>
+ <check_box label="Gruppe im Profil anzeigen" name="list_groups_in_profile" tool_tip="Steuert, ob diese Gruppe in Ihrem Profil angezeigt wird"/>
+ </panel>
+ <string name="incomplete_member_data_str">
+ Mitgliedsdaten werden abgerufen
+ </string>
+ <string name="confirm_group_create_str">
+ Die Gründung dieser Gruppe kostet 100 L$.
+Sind Sie wirklich, WIRKLICH sicher, dass Sie 100 L$ für die Gründung dieser Gruppe ausgeben möchten?
+Falls in den nächsten 48 Stunden niemand sonst dieser Gruppe beitritt, wird sie aufgelöst und der Name der Gruppe wird nicht mehr verfügbar sein.
+ </string>
+</panel>
+
+<!-- original file
+
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Allgemein" name="general_tab">
+ <string name="help_text">
+ Die Registerkarte „Allgemein“ enthält Informationen über
+diese Gruppe, eine Liste der Eigentümer und sichtbaren Mitglieder,
+allgemeine Gruppeneinstellungen und Mitgliederoptionen.
+
+Bewegen Sie die Maus über die Optionen, um weitere Informationen anzuzeigen.
+ </string>
+ <string name="group_info_unchanged">
+ Die allgemeine Gruppeninfo wurde geändert.
+ </string>
+ <button label="?" label_selected="?" name="help_button"/>
+ <line_editor label="Neuen Gruppennamen hier eingeben" name="group_name_editor"/>
+ <text name="group_name">
+ Neuen Gruppennamen hier eingeben
+ </text>
+ <text name="prepend_founded_by">
+ Gegründet von
+ </text>
+ <text left_delta="79" name="founder_name">
+ (wartet)
+ </text>
+ <text name="group_charter_label">
+ Gruppencharta
+ </text>
+ <texture_picker label="Gruppeninsignien" name="insignia" tool_tip="Klicken Sie hier, um ein Bild auszuwählen"/>
+ <text_editor name="charter">
+ Gruppencharta
+ </text_editor>
+ <button label="Beitreten (0 L$)" label_selected="Beitreten (0 L$)" name="join_button"/>
+ <button label="Detailansicht" label_selected="Detailansicht" name="info_button"/>
+ <text name="text_owners_and_visible_members">
+ Eigentümer und sichtbare Mitglieder
+ </text>
+ <text name="text_owners_are_shown_in_bold">
+ (Eigentümer werden fettgedruckt angezeigt)
+ </text>
+ <name_list name="visible_members">
+ <column label="Mitgliedsname" name="name" relwidth="0.40"/>
+ <column label="Titel" name="title" relwidth="0.25"/>
+ <column label="Letzte Anmeldung" name="online" relwidth="0.35"/>
+ </name_list>
+ <text name="text_group_preferences">
+ Gruppeneinstellungen
+ </text>
+ <panel name="preferences_container">
+ <check_box label="In Suche anzeigen" name="show_in_group_list" tool_tip="Diese Gruppe in Suchergebnissen anzeigen."/>
+ <check_box label="Registrierung offen" name="open_enrollement" tool_tip="Festlegen, ob der Gruppenbeitritt ohne Einladung zulässig ist."/>
<check_box label="Beitrittsgebühr: L$" name="check_enrollment_fee" tool_tip="Festlegen, ob Neumitglieder eine Beitrittsgebühr zahlen müssen." width="125"/>
<spinner name="spin_enrollment_fee" tool_tip="Wenn „Beitrittsgebühr“ aktiviert ist, müssen neue Mitglieder diesen Betrag zahlen."/>
<combo_box name="group_mature_check" tool_tip="Festlegen, ob die Informationen Ihrer Gruppe „Mature“ sind.">
@@ -78,3 +161,5 @@ Sind Sie wirklich, WIRKLICH sicher, dass Sie 100 L$ für die Gründung dieser Gr
Falls in den nächsten 48 Stunden niemand sonst dieser Gruppe beitritt, wird sie aufgelöst und der Name der Gruppe wird nicht mehr verfügbar sein.
</string>
</panel>
+
+-->
diff --git a/indra/newview/skins/default/xui/de/panel_group_land_money.xml b/indra/newview/skins/default/xui/de/panel_group_land_money.xml
index c038d97822..e2e30b7479 100644
--- a/indra/newview/skins/default/xui/de/panel_group_land_money.xml
+++ b/indra/newview/skins/default/xui/de/panel_group_land_money.xml
@@ -52,6 +52,90 @@
qm (max. [AMOUNT])
</text>
<text name="group_over_limit_text">
+ Die Gruppenmitglieder müssen mehr Landnutzungsrechte spenden, damit das verwendete Land gehalten werden kann.
+ </text>
+ <text name="group_money_heading">
+ Gruppen-L$
+ </text>
+ <tab_container name="group_money_tab_container">
+ <panel label="Planung" name="group_money_planning_tab">
+ <text_editor name="group_money_planning_text">
+ Wird berechnet...
+ </text_editor>
+ </panel>
+ <panel label="Details" name="group_money_details_tab">
+ <text_editor name="group_money_details_text">
+ Wird berechnet...
+ </text_editor>
+ <button label="&lt; Früher" label_selected="&lt; Früher" name="earlier_details_button" tool_tip="Zurück in der Zeit"/>
+ <button label="Später &gt;" label_selected="Später &gt;" name="later_details_button" tool_tip="Weiter in der Zeit"/>
+ </panel>
+ <panel label="Verkäufe" name="group_money_sales_tab">
+ <text_editor name="group_money_sales_text">
+ Wird berechnet...
+ </text_editor>
+ <button label="&lt; Früher" label_selected="&lt; Früher" name="earlier_sales_button" tool_tip="Zurück in der Zeit"/>
+ <button label="Später &gt;" label_selected="Später &gt;" name="later_sales_button" tool_tip="Weiter in der Zeit"/>
+ </panel>
+ </tab_container>
+</panel>
+
+<!--
+
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Land und L$" name="land_money_tab">
+ <string name="help_text">
+ Parzellen in Gruppenbesitz werden zusammen mit Beitragsdetails angezeigt. Ein Warnhinweis wird angezeigt, solange der Wert für das insgesamt verwendete Land gleich oder weniger ist als der Gesamtbeitrag. Die Registerkarten „Planung“, „Details“ und „Verkäufe“ enthalten Informationen über die Gruppenfinanzen.
+ </string>
+ <button label="?" name="help_button"/>
+ <string name="cant_view_group_land_text">
+ Sie sind nicht berechtigt, Landeigentum der Gruppe anzuzeigen.
+ </string>
+ <string name="cant_view_group_accounting_text">
+ Sie sind nicht berechtigt, die Finanzinformationen der Gruppe anzuzeigen.
+ </string>
+ <string name="loading_txt">
+ Wird geladen...
+ </string>
+ <text name="group_land_heading">
+ Land in Gruppenbesitz
+ </text>
+ <scroll_list name="group_parcel_list">
+ <column label="Parzellenname" name="name"/>
+ <column label="Region" name="location"/>
+ <column label="Typ" name="type"/>
+ <column label="Gebiet" name="area"/>
+ <column label="" name="hidden"/>
+ </scroll_list>
+ <button label="Auf Karte" label_selected="Auf Karte" name="map_button"/>
+ <text name="total_contributed_land_label">
+ Gesamtbeitrag:
+ </text>
+ <text name="total_contributed_land_value">
+ [AREA] qm
+ </text>
+ <text name="total_land_in_use_label">
+ Insgesamt verwendetes Land:
+ </text>
+ <text name="total_land_in_use_value">
+ [AREA] qm
+ </text>
+ <text name="land_available_label">
+ Land verfügbar:
+ </text>
+ <text name="land_available_value">
+ [AREA] qm
+ </text>
+ <text name="your_contribution_label">
+ Ihr Beitrag:
+ </text>
+ <string name="land_contrib_error">
+ Ihr Landbeitrag kann nicht festgelegt werden.
+ </string>
+ <text name="your_contribution_max_value">
+ qm (max. [AMOUNT])
+ </text>
+ <text name="group_over_limit_text">
Die Gruppenmitglieder müssen mehr Landnutzungsrechte spenden, damit
das verwendete Land gehalten werden kann.
</text>
@@ -80,3 +164,5 @@ das verwendete Land gehalten werden kann.
</panel>
</tab_container>
</panel>
+
+-->
diff --git a/indra/newview/skins/default/xui/de/panel_group_notices.xml b/indra/newview/skins/default/xui/de/panel_group_notices.xml
index 12dcbb1321..8d4afd356e 100644
--- a/indra/newview/skins/default/xui/de/panel_group_notices.xml
+++ b/indra/newview/skins/default/xui/de/panel_group_notices.xml
@@ -16,6 +16,81 @@ gesendet. Mitteilungen können unter
Gruppenmitteilungsarchiv
</text>
<text name="lbl2">
+ Mitteilungen werden 14 Tage lang aufbewahrt. Klicken Sie auf eine Mitteilung, um sie anzuzeigen. Klicken Sie „Aktualisieren“, um neue Mitteilungen zu suchen. Eine Mitteilungsliste speichert maximal 200 Mitteilungen pro Gruppe täglich.
+ </text>
+ <scroll_list name="notice_list">
+ <column label="" name="icon" />
+ <column label="Thema" name="subject" />
+ <column label="Von" name="from" />
+ <column label="Datum" name="date" />
+ </scroll_list>
+ <text name="notice_list_none_found">
+ Nicht gefunden.
+ </text>
+ <button label="Neue Mitteilung" label_selected="Neue Mitteilung"
+ name="create_new_notice" />
+ <button label="Aktualisieren" label_selected="Liste aktualisieren"
+ name="refresh_notices" />
+ <panel label="Neue Mitteilung" name="panel_create_new_notice">
+ <text name="lbl">
+ Mitteilung schreiben
+ </text>
+ <text name="lbl2">
+ Geben Sie einen Betreff für die Mitteilung ein. Sie können der Mitteilung ein Objekt anfügen, indem Sie es aus dem Inventar in dieses Feld ziehen. Angehängte Objekte müssen kopier-und transferierbar sein. Ordner können nicht gesendet werden.
+ </text>
+ <text name="lbl3">
+ Betreff:
+ </text>
+ <text name="lbl4">
+ Nachricht:
+ </text>
+ <text name="lbl5">
+ Anhängen:
+ </text>
+ <button label="Anhang entfernen" label_selected="Anhang entfernen"
+ name="remove_attachment" />
+ <button label="Mitteilung senden" label_selected="Mitteilung senden" name="send_notice" />
+ <panel name="drop_target"
+ tool_tip="Drag an inventory item onto the message box to send it with the notice. You must have permission to copy and transfer the object to send it with the notice." />
+ </panel>
+ <panel label="Ältere Notiz anzeigen" name="panel_view_past_notice">
+ <text name="lbl">
+ Archivierte Mitteilung
+ </text>
+ <text name="lbl2">
+ Klicken Sie zum Senden einer Mitteilung auf „Neue Mitteilung“.
+ </text>
+ <text name="lbl3">
+ Betreff:
+ </text>
+ <text name="lbl4">
+ Nachricht:
+ </text>
+ <button label="Anlage öffnen" label_selected="Anlage öffnen" name="open_attachment" />
+ </panel>
+</panel>
+
+
+<!-- original file
+
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel label="Mitteilungen" name="notices_tab">
+ <text name="help_text">
+ Mitteilungen sind eine schnelle Möglichkeit,
+Mitglieder auf dem Laufenden zu halten und
+Objekte im Anhang zu versenden. Mitteilungen werden
+nur an Mitglieder mit einer entsprechenden Rolle
+gesendet. Mitteilungen können unter
+„Allgemein“ ausgeschaltet werden.
+ </text>
+ <text name="no_notices_text">
+ Keine älteren Mitteilungen.
+ </text>
+ <button label="?" label_selected="?" name="help_button" />
+ <text name="lbl">
+ Gruppenmitteilungsarchiv
+ </text>
+ <text name="lbl2">
Mitteilungen werden 14 Tage lang aufbewahrt. Klicken Sie auf eine Mitteilung,
um sie anzuzeigen. Klicken Sie „Aktualisieren“, um neue Mitteilungen zu suchen.
Eine Mitteilungsliste speichert maximal 200 Mitteilungen pro Gruppe täglich.
@@ -74,3 +149,8 @@ und transferierbar sein. Ordner können nicht gesendet werden.
<button label="Anlage öffnen" label_selected="Anlage öffnen" name="open_attachment" />
</panel>
</panel>
+
+-->
+
+
+
diff --git a/indra/newview/skins/default/xui/de/panel_group_roles.xml b/indra/newview/skins/default/xui/de/panel_group_roles.xml
index d4589f83e4..d7f47de46f 100644
--- a/indra/newview/skins/default/xui/de/panel_group_roles.xml
+++ b/indra/newview/skins/default/xui/de/panel_group_roles.xml
@@ -12,8 +12,165 @@
Mitglieder und Rollen
</text>
<text name="static2">
- Gruppenmitgliedern werden Rollen mit Fähigkeiten zugewiesen. Diese
-Einstellungen können zur flexibleren Organisation angepasst werden.
+ Gruppenmitgliedern werden Rollen mit Fähigkeiten zugewiesen. Diese Einstellungen können zur flexibleren Organisation angepasst werden.
+ </text>
+ </panel>
+ <panel name="roles_header">
+ <text name="static">
+ Rollen
+ </text>
+ <text name="role_properties_modifiable">
+ Wählen Sie eine Rolle. Sie können ihren Namen, ihre Beschreibung und den Mitgliedstitel ändern.
+ </text>
+ <text name="role_properties_not_modifiable">
+ Rolle anklicken um Mitglieder und Fähigkeiten anzuzeigen.
+ </text>
+ <text name="role_actions_modifiable">
+ Sie können der Rolle auch Fähigkeiten zuweisen.
+ </text>
+ <text name="role_actions_not_modifiable">
+ Sie können zugewiesene Fähigkeiten anzeigen, aber nicht bearbeiten.
+ </text>
+ </panel>
+ <panel name="actions_header">
+ <text name="static">
+ Fähigkeiten
+ </text>
+ <text name="static2">
+ Sie können Fähigkeiten-Beschreibungen anzeigen und welche Rollen bzw. Mitglieder diese Fähigkeit haben.
+ </text>
+ </panel>
+ <tab_container name="roles_tab_container">
+ <panel label="Mitglieder" name="members_sub_tab" tool_tip="Mitglieder">
+ <button label="Suchen" name="search_button"/>
+ <button label="Alle anzeigen" name="show_all_button"/>
+ <name_list name="member_list">
+ <column label="Mitgliedsname" name="name"/>
+ <column label="Übertragene Landanteile" name="donated"/>
+ <column label="Letzte Anmeldung" name="online"/>
+ </name_list>
+ <button label="Neues Mitglied einladen..." name="member_invite"/>
+ <button label="Aus Gruppe werfen" name="member_eject"/>
+ <string name="help_text">
+ Sie können Mitgliedern Rollen zuweisen und entziehen.
+Drücken Sie die Strg-Taste und klicken Sie auf Namen,
+um mehrere Mitglieder auszuwählen.
+ </string>
+ </panel>
+ <panel label="Rollen" name="roles_sub_tab">
+ <button label="Suchen" name="search_button"/>
+ <button label="Alle anzeigen" name="show_all_button"/>
+ <scroll_list name="role_list">
+ <column label="Rolle" name="name"/>
+ <column label="Titel" name="title"/>
+ <column label="Mitglieder" name="members"/>
+ </scroll_list>
+ <button label="Neue Rolle erstellen..." name="role_create"/>
+ <button label="Rolle löschen" name="role_delete"/>
+ <string name="help_text">
+ Rollen haben einen Titel und umfassen bestimmte
+Fähigkeiten. Mitglieder können mehrere
+Rollen innehaben. Eine Gruppe kann bis zu 10 Rollen
+definieren, darunter „Jeder“ und „Eigentümer“.
+ </string>
+ <string name="cant_delete_role">
+ Die Rollen „Jeder“ und „Eigentümer“ können nicht gelöscht werden.
+ </string>
+ </panel>
+ <panel label="Fähigkeiten" name="actions_sub_tab">
+ <button label="Suchen" name="search_button"/>
+ <button label="Alle anzeigen" name="show_all_button"/>
+ <scroll_list name="action_list" tool_tip="Select an Ability to view more details.">
+ <column label="" name="icon"/>
+ <column label="" name="action"/>
+ </scroll_list>
+ <string name="help_text">
+ Fähigkeiten verleihen Mitgliedern in Rollen bestimmte
+Rechte in einer Gruppe. Es gibt viele verschiedene Fähigkeiten.
+ </string>
+ </panel>
+ </tab_container>
+ <panel name="members_footer">
+ <text name="static">
+ Rollen
+ </text>
+ <text name="static2">
+ Zulässige Fähigkeiten
+ </text>
+ <scroll_list name="member_assigned_roles">
+ <column label="" name="checkbox"/>
+ <column label="" name="role"/>
+ </scroll_list>
+ <scroll_list name="member_allowed_actions" tool_tip="Um detaillierte Informationen zu erlaubten Fähigkeiten anzuzeigen, siehe Reiter Fähigkeiten.">
+ <column label="" name="icon"/>
+ <column label="" name="action"/>
+ </scroll_list>
+ </panel>
+ <panel name="roles_footer">
+ <text name="static">
+ Name
+ </text>
+ <text name="static2">
+ Beschreibung
+ </text>
+ <line_editor name="role_name">
+ Angestellte
+ </line_editor>
+ <text name="static3">
+ Titel
+ </text>
+ <line_editor name="role_title">
+ (wartet)
+ </line_editor>
+ <text_editor name="role_description">
+ (wartet)
+ </text_editor>
+ <text name="static4">
+ Mitglieder in Rolle
+ </text>
+ <text name="static5" tool_tip="Eine Liste der Fähigkeiten der aktuell ausgewählten Rolle.">
+ Zulässige Fähigkeiten
+ </text>
+ <check_box label="Mitglieder sind sichtbar" name="role_visible_in_list" tool_tip="Festlegen, ob Mitglieder in dieser Rolle auf der Registerkarte „Allgemein“ für Personen außerhalb der Gruppe sichtbar sind."/>
+ <scroll_list name="role_allowed_actions" tool_tip="Um detaillierte Informationen zu erlaubten Fähigkeiten anzuzeigen, siehe Reiter Fähigkeiten.">
+ <column label="" name="icon"/>
+ <column label="" name="checkbox"/>
+ <column label="" name="action"/>
+ </scroll_list>
+ </panel>
+ <panel name="actions_footer">
+ <text name="static">
+ Beschreibung
+ </text>
+ <text_editor name="action_description">
+ Diese Fähigkeit heißt „Mitglieder aus dieser Gruppe werfen“. Eigentümer können nur von anderen Eigentümern hinausgeworfen werden.
+ </text_editor>
+ <text name="static2">
+ Rollen mit Fähigkeit
+ </text>
+ <text name="static3">
+ Mitglieder mit Fähigkeit
+ </text>
+ </panel>
+</panel>
+
+<!-- original file
+
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel label="Mitglieder und Rollen" name="roles_tab">
+ <string name="default_needs_apply_text">
+ Das Unterregister enthält nicht übernommene Änderungen.
+ </string>
+ <string name="want_apply_text">
+ Diese Änderungen übernehmen?
+ </string>
+ <button label="?" name="help_button"/>
+ <panel name="members_header">
+ <text name="static">
+ Mitglieder und Rollen
+ </text>
+ <text name="static2">
+ Gruppenmitgliedern werden Rollen mit Fähigkeiten zugewiesen. Diese Einstellungen können zur flexibleren Organisation angepasst werden.
</text>
</panel>
<panel name="roles_header">
@@ -155,3 +312,5 @@ Rechte in einer Gruppe. Es gibt viele verschiedene Fähigkeiten.
</text>
</panel>
</panel>
+
+-->
diff --git a/indra/newview/skins/default/xui/en/accordion_drag.xml b/indra/newview/skins/default/xui/en/accordion_drag.xml
new file mode 100644
index 0000000000..94839a7593
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/accordion_drag.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<panel border_thickness="2" visible ="true" name="splitter_drag"
+ width="100"
+ height="5"
+ left="50"
+ top="50"
+ follows="left|bottom|right" background_visible="true" label="splitter_drag" title="">
+</panel>
diff --git a/indra/newview/skins/default/xui/en/accordion_parent.xml b/indra/newview/skins/default/xui/en/accordion_parent.xml
index 632752b1c4..914a6eddb9 100644
--- a/indra/newview/skins/default/xui/en/accordion_parent.xml
+++ b/indra/newview/skins/default/xui/en/accordion_parent.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel border_thickness="2" name="splitter_parent"
- can_resize="true" background_visible="true"
+ background_visible="true"
label="splitter_parent"
title=""
>
diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml
index f52c5d6175..ece0cf737f 100644
--- a/indra/newview/skins/default/xui/en/floater_about.xml
+++ b/indra/newview/skins/default/xui/en/floater_about.xml
@@ -101,7 +101,7 @@
Voice chat Audio coding: Polycom(R) Siren14(TM) (ITU-T Rec. G.722.1 Annex C)
- To be a success in business, be daring, be first, be different. --Henry Marchant
+ Oh, Parabuild, why hast thou forsaken me?
</text_editor>
<text_editor
follows="left|top|right|bottom"
diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml
index 3563780f8b..cb3388ccbc 100644
--- a/indra/newview/skins/default/xui/en/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_about_land.xml
@@ -56,7 +56,7 @@
</panel.string>
<panel.string
name="area_size_text">
- [AREA] sq.m.
+ [AREA] m²
</panel.string>
<panel.string
name="auction_id_text">
@@ -264,7 +264,7 @@ Go to World menu &gt; About Land or select another parcel to show its details.
layout="topleft"
left="96"
name="check deed"
- tool_tip="A group officer can deed this land to the group, so it will be supported by the group&amp;apos;s land allocation."
+ tool_tip="A group officer can deed this land to the group, so it will be supported by the group&apos;s land allocation."
top="164"
width="116" />
<button
@@ -324,7 +324,7 @@ Go to World menu &gt; About Land or select another parcel to show its details.
name="For Sale: Price L$[PRICE]."
top_delta="0"
width="226">
- Price: L$[PRICE] (L$[PRICE_PER_SQM]/sq.m.).
+ Price: L$[PRICE] (L$[PRICE_PER_SQM]/m²).
</text>
<text
enabled="false"
@@ -437,7 +437,7 @@ Go to World menu &gt; About Land or select another parcel to show its details.
name="PriceText"
top_delta="0"
width="186">
- 4048 sq.m.
+ 4048 m²
</text>
<text
type="string"
@@ -1147,7 +1147,7 @@ Go to World menu &gt; About Land or select another parcel to show its details.
name="online_status"
width="-1" />
<name_list.columns
- dynamicwidth="true"
+ dynamic_width="true"
label="Name"
name="name" />
<name_list.columns
@@ -1176,7 +1176,7 @@ Go to World menu &gt; About Land or select another parcel to show its details.
</panel.string>
<panel.string
name="search_disabled_small_tooltip">
- This option is disabled because this parcel&apos;s area is 128 sq.m. or smaller.
+ This option is disabled because this parcel&apos;s area is 128 m² or smaller.
Only large parcels can be listed in search.
</panel.string>
<panel.string
@@ -1234,14 +1234,6 @@ Only large parcels can be listed in search.
width="268" />
<check_box
height="16"
- label="Create Landmarks"
- layout="topleft"
- left_delta="0"
- name="check landmark"
- top_pad="4"
- width="268" />
- <check_box
- height="16"
label="Fly"
layout="topleft"
left_delta="0"
@@ -1383,42 +1375,55 @@ Only large parcels can be listed in search.
width="130">
<combo_box.item
label="Any Category"
+ name="item0"
value="any" />
<combo_box.item
label="Linden Location"
+ name="item1"
value="linden" />
<combo_box.item
label="Adult"
+ name="item2"
value="adult" />
<combo_box.item
label="Arts &amp; Culture"
+ name="item3"
value="arts" />
<combo_box.item
label="Business"
+ name="item4"
value="store" />
<combo_box.item
label="Educational"
+ name="item5"
value="educational" />
<combo_box.item
label="Gaming"
+ name="item6"
value="game" />
<combo_box.item
label="Hangout"
+ name="item7"
value="gather" />
<combo_box.item
label="Newcomer Friendly"
+ name="item8"
value="newcomer" />
<combo_box.item
label="Parks &amp; Nature"
+ name="item9"
value="park" />
<combo_box.item
label="Residential"
+ name="item10"
value="home" />
<combo_box.item
label="Shopping"
+ name="item11"
value="shopping" />
<combo_box.item
label="Other"
+ name="item12"
value="other" />
</combo_box>
<combo_box
@@ -1432,39 +1437,51 @@ Only large parcels can be listed in search.
width="130">
<combo_box.item
label="Any Category"
+ name="item0"
value="any" />
<combo_box.item
label="Linden Location"
+ name="item1"
value="linden" />
<combo_box.item
label="Arts &amp; Culture"
+ name="item3"
value="arts" />
<combo_box.item
label="Business"
+ name="item4"
value="store" />
<combo_box.item
label="Educational"
+ name="item5"
value="educational" />
<combo_box.item
label="Gaming"
+ name="item6"
value="game" />
<combo_box.item
label="Hangout"
+ name="item7"
value="gather" />
<combo_box.item
label="Newcomer Friendly"
+ name="item8"
value="newcomer" />
<combo_box.item
label="Parks &amp; Nature"
+ name="item9"
value="park" />
<combo_box.item
label="Residential"
+ name="item10"
value="home" />
<combo_box.item
label="Shopping"
+ name="item11"
value="shopping" />
<combo_box.item
label="Other"
+ name="item12"
value="other" />
</combo_box>
<button
@@ -1566,14 +1583,17 @@ Only large parcels can be listed in search.
<combo_box.item
enabled="true"
label="Blocked"
+ name="Blocked"
value="Blocked" />
<combo_box.item
enabled="true"
label="Landing Point"
+ name="LandingPoint"
value="Landing Point" />
<combo_box.item
enabled="true"
label="Anywhere"
+ name="Anywhere"
value="Anywhere" />
</combo_box>
</panel>
@@ -2004,9 +2024,11 @@ Options:
width="100">
<combo_box.item
label="Anyone"
+ name="Anyone"
value="anyone" />
<combo_box.item
label="Group"
+ name="Group"
value="group" />
</combo_box>
<spinner
diff --git a/indra/newview/skins/default/xui/en/floater_animation_preview.xml b/indra/newview/skins/default/xui/en/floater_animation_preview.xml
index 59d0d45425..846dda802d 100644
--- a/indra/newview/skins/default/xui/en/floater_animation_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_animation_preview.xml
@@ -4,7 +4,7 @@
height="556"
layout="topleft"
name="Animation Preview"
- width="300">
+ width="280">
<floater.string
name="failed_to_initialize">
Failed to initialize motion
@@ -252,42 +252,55 @@ Maximum animation length is [MAX_LENGTH] seconds.
width="104">
<combo_box.item
label="Spread"
+ name="Spread"
value="" />
<combo_box.item
label="Relaxed"
+ name="Relaxed"
value="Hands_Relaxed" />
<combo_box.item
label="Point Both"
+ name="PointBoth"
value="Hands_Point" />
<combo_box.item
label="Fist"
+ name="Fist"
value="Hands_Fist" />
<combo_box.item
label="Relaxed Left"
+ name="RelaxedLeft"
value="Hands_Relaxed_L" />
<combo_box.item
label="Point Left"
+ name="PointLeft"
value="Hands_Point_L" />
<combo_box.item
label="Fist Left"
+ name="FistLeft"
value="Hands_Fist_L" />
<combo_box.item
label="Relaxed Right"
+ name="RelaxedRight"
value="Hands_Relaxed_R" />
<combo_box.item
label="Point Right"
+ name="PointRight"
value="Hands_Point_R" />
<combo_box.item
label="Fist Right"
+ name="FistRight"
value="Hands_Fist_R" />
<combo_box.item
label="Salute Right"
+ name="SaluteRight"
value="Hands_Salute_R" />
<combo_box.item
label="Typing"
+ name="Typing"
value="Hands_Typing" />
<combo_box.item
label="Peace Right"
+ name="PeaceRight"
value="Hands_Peace_R" />
</combo_box>
<text
@@ -310,45 +323,65 @@ Maximum animation length is [MAX_LENGTH] seconds.
top_delta="-1"
width="104">
<combo_box.item
- label="None]" />
+ label="(None)"
+ name="[None]" />
<combo_box.item
- label="Aaaaah" />
+ label="Aaaaah"
+ name="Aaaaah" />
<combo_box.item
- label="Afraid" />
+ label="Afraid"
+ name="Afraid" />
<combo_box.item
- label="Angry" />
+ label="Angry"
+ name="Angry" />
<combo_box.item
- label="Big Smile" />
+ label="Big Smile"
+ name="BigSmile" />
<combo_box.item
- label="Bored" />
+ label="Bored"
+ name="Bored" />
<combo_box.item
- label="Cry" />
+ label="Cry"
+ name="Cry" />
<combo_box.item
- label="Disdain" />
+ label="Disdain"
+ name="Disdain" />
<combo_box.item
- label="Embarrassed" />
+ label="Embarrassed"
+ name="Embarrassed" />
<combo_box.item
- label="Frown" />
+ label="Frown"
+ name="Frown" />
<combo_box.item
- label="Kiss" />
+ label="Kiss"
+ name="Kiss" />
<combo_box.item
- label="Laugh" />
+ label="Laugh"
+ name="Laugh" />
<combo_box.item
- label="Plllppt" />
+ label="Plllppt"
+ name="Plllppt" />
<combo_box.item
- label="Repulsed" />
+ label="Repulsed"
+ name="Repulsed" />
<combo_box.item
- label="Sad" />
+ label="Sad"
+ name="Sad" />
<combo_box.item
- label="Shrug" />
+ label="Shrug"
+ name="Shrug" />
<combo_box.item
- label="Smile" />
+ label="Smile"
+ name="Smile" />
<combo_box.item
- label="Surprise" />
+ label="Surprise"
+ name="Surprise" />
<combo_box.item
- label="Wink" />
+ label="Wink"
+ name="Wink" />
<combo_box.item
- label="Worry" />
+ label="Worry"
+ name="Worry" />
</combo_box>
<text
type="string"
@@ -371,13 +404,17 @@ Maximum animation length is [MAX_LENGTH] seconds.
top_delta="-1"
width="104">
<combo_box.item
- label="Standing" />
+ label="Standing"
+ name="Standing" />
<combo_box.item
- label="Walking" />
+ label="Walking"
+ name="Walking" />
<combo_box.item
- label="Sitting" />
+ label="Sitting"
+ name="Sitting" />
<combo_box.item
- label="Flying" />
+ label="Flying"
+ name="Flying" />
</combo_box>
<spinner
follows="left|top"
@@ -385,7 +422,7 @@ Maximum animation length is [MAX_LENGTH] seconds.
increment="0.01"
initial_value="0"
label="Ease In (sec)"
- label_width="65"
+ label_width="75"
layout="topleft"
left="10"
max_val="10"
@@ -399,14 +436,14 @@ Maximum animation length is [MAX_LENGTH] seconds.
increment="0.01"
initial_value="0"
label="Ease Out (sec)"
- label_width="75"
+ label_width="80"
layout="topleft"
- left_pad="15"
+ left_pad="10"
max_val="10"
name="ease_out_time"
tool_tip="Amount of time (in seconds) over which animations blends out."
top_delta="0"
- width="135" />
+ width="130" />
<button
follows="top|right"
height="28"
@@ -440,7 +477,7 @@ Maximum animation length is [MAX_LENGTH] seconds.
layout="topleft"
left="80"
name="playback_slider"
- right="290"
+ right="275"
show_text="false" />
<text
type="string"
@@ -461,7 +498,7 @@ We recommend BVH files exported from Poser 4.
label="Cancel"
layout="topleft"
name="cancel_btn"
- right="290"
+ right="265"
width="123" />
<button
follows="bottom|left"
diff --git a/indra/newview/skins/default/xui/en/floater_auction.xml b/indra/newview/skins/default/xui/en/floater_auction.xml
index 076332e062..32d3f4fd7e 100644
--- a/indra/newview/skins/default/xui/en/floater_auction.xml
+++ b/indra/newview/skins/default/xui/en/floater_auction.xml
@@ -48,7 +48,7 @@
left_delta="0"
name="snapshot_btn"
top_pad="4"
- width="96" >
+ width="96">
<button.commit_callback
function="ClickSnapshot" />
</button>
diff --git a/indra/newview/skins/default/xui/en/floater_beacons.xml b/indra/newview/skins/default/xui/en/floater_beacons.xml
index 41ddec6395..049ea9ab14 100644
--- a/indra/newview/skins/default/xui/en/floater_beacons.xml
+++ b/indra/newview/skins/default/xui/en/floater_beacons.xml
@@ -20,43 +20,64 @@
control_name="scripttouchbeacon"
label="Scripted Objects with Touch Only"
layout="topleft"
- name="touch_only" />
+ name="touch_only" >
+ <check_box.commit_callback
+ function="Beacons.UICheck" />
+ </check_box>
<check_box
bottom_delta="20"
control_name="scriptsbeacon"
label="Scripted Objects"
layout="topleft"
- name="scripted" />
+ name="scripted">
+ <check_box.commit_callback
+ function="Beacons.UICheck" />
+ </check_box>
<check_box
bottom_delta="20"
control_name="physicalbeacon"
label="Physical Objects"
layout="topleft"
- name="physical" />
+ name="physical" >
+ <check_box.commit_callback
+ function="Beacons.UICheck" />
+ </check_box>
<check_box
bottom_delta="20"
control_name="soundsbeacon"
label="Sound Sources"
layout="topleft"
- name="sounds" />
+ name="sounds" >
+ <check_box.commit_callback
+ function="Beacons.UICheck" />
+ </check_box>
<check_box
bottom_delta="20"
control_name="particlesbeacon"
label="Particle Sources"
layout="topleft"
- name="particles" />
+ name="particles" >
+ <check_box.commit_callback
+ function="Beacons.UICheck" />
+ </check_box>
<check_box
bottom_delta="20"
control_name="renderhighlights"
label="Render Highlights"
layout="topleft"
- name="highlights" />
+ name="highlights" >
+ <check_box.commit_callback
+ function="Beacons.UICheck" />
+ </check_box>
<check_box
bottom_delta="20"
control_name="renderbeacons"
label="Render Beacons"
layout="topleft"
- name="beacons" />
+ name="beacons" >
+ <check_box.commit_callback
+ function="Beacons.UICheck" />
+ </check_box>
<text
type="string"
length="1"
diff --git a/indra/newview/skins/default/xui/en/floater_bulk_perms.xml b/indra/newview/skins/default/xui/en/floater_bulk_perms.xml
index cf75da078e..0414ab5fa6 100644
--- a/indra/newview/skins/default/xui/en/floater_bulk_perms.xml
+++ b/indra/newview/skins/default/xui/en/floater_bulk_perms.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
can_tear_off="false"
- height="340"
+ height="360"
layout="topleft"
name="floaterbulkperms"
title="Bulk change content permissions"
- width="480">
+ width="280">
<floater.string
name="nothing_to_modify_text">
Selection contains no editable contents.
@@ -109,30 +109,12 @@
width="126" />
<icon
height="16"
- image_name="inv_item_landmark_visited.tga"
- layout="topleft"
- left="12"
- mouse_opaque="true"
- name="icon_landmark"
- top="134"
- width="16" />
- <check_box
- control_name="BulkChangeIncludeLandmarks"
- height="16"
- label="Landmarks"
- layout="topleft"
- left_pad="2"
- name="check_landmark"
- top_delta="0"
- width="126" />
- <icon
- height="16"
image_name="inv_item_notecard.tga"
layout="topleft"
left="12"
mouse_opaque="true"
name="icon_notecard"
- top="154"
+ top="134"
width="16" />
<check_box
control_name="BulkChangeIncludeNotecards"
@@ -150,7 +132,7 @@
left="12"
mouse_opaque="true"
name="icon_object"
- top="174"
+ top="154"
width="16" />
<check_box
control_name="BulkChangeIncludeObjects"
@@ -168,7 +150,7 @@
left="12"
mouse_opaque="true"
name="icon_script"
- top="194"
+ top="174"
width="16" />
<check_box
control_name="BulkChangeIncludeScripts"
@@ -186,7 +168,7 @@
left="12"
mouse_opaque="true"
name="icon_sound"
- top="214"
+ top="194"
width="16" />
<check_box
control_name="BulkChangeIncludeSounds"
@@ -204,7 +186,7 @@
left="12"
mouse_opaque="true"
name="icon_texture"
- top="234"
+ top="214"
width="16" />
<check_box
control_name="BulkChangeIncludeTextures"
@@ -224,7 +206,10 @@
left="8"
name="check_all"
top="257"
- width="100" />
+ width="100">
+ <button.commit_callback
+ function="BulkPermission.CheckAll" />
+ </button>
<button
follows="left|top"
height="20"
@@ -234,7 +219,10 @@
left_delta="0"
name="check_none"
top_pad="4"
- width="100" />
+ width="100" >
+ <button.commit_callback
+ function="BulkPermission.UncheckAll"/>
+ </button>
<text
type="string"
length="1"
@@ -242,7 +230,7 @@
font="SansSerif"
height="10"
layout="topleft"
- left="165"
+ left="140"
name="newperms"
top="30"
width="206">
@@ -253,7 +241,7 @@
height="16"
label="Share with group"
layout="topleft"
- left="170"
+ left="140"
name="share_with_group"
top="54"
width="106" />
@@ -295,36 +283,42 @@
left_delta="78"
name="next_owner_copy"
top_delta="0"
- width="88" />
- <check_box
+ width="88">
+ <check_box.commit_callback
+ function="BulkPermission.CommitCopy"/>
+ </check_box>
+ <check_box
control_name="BulkChangeNextOwnerTransfer"
- enabled="false"
+ enabled_control="BulkChangeNextOwnerCopy"
height="16"
initial_value="true"
label="Resell/Give away"
layout="topleft"
- left_delta="88"
+ left="145"
name="next_owner_transfer"
- top_delta="0"
+ top_delta="20"
width="106" />
<scroll_list
enabled="false"
follows="left|top|right|bottom"
height="130"
layout="topleft"
- left="130"
+ left="120"
name="queue output"
- top="170"
- width="335" />
+ top="185"
+ width="150" />
<button
follows="left|top"
height="20"
label="Apply"
layout="topleft"
- left="265"
+ left="65"
name="apply"
- top="310"
- width="100" />
+ top_pad="10"
+ width="100">
+ <button.commit_callback
+ function="BulkPermission.Apply"/>
+ </button>
<button
follows="left|top"
height="20"
@@ -333,5 +327,8 @@
left_pad="5"
name="close"
top_delta="0"
- width="100" />
+ width="100" >
+ <button.commit_callback
+ function="BulkPermission.Close"/>
+ </button>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_buy_contents.xml b/indra/newview/skins/default/xui/en/floater_buy_contents.xml
index 174337480a..0930043659 100644
--- a/indra/newview/skins/default/xui/en/floater_buy_contents.xml
+++ b/indra/newview/skins/default/xui/en/floater_buy_contents.xml
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
can_resize="true"
- height="250"
+ height="300"
layout="topleft"
min_height="150"
min_width="200"
name="floater_buy_contents"
save_rect="true"
title="Buy Contents"
- width="300">
+ width="280">
<floater.string
name="no_copy_text">
(no copy)
@@ -41,7 +41,7 @@
left_delta="0"
name="item_list"
top_pad="4"
- width="281">
+ width="250">
<scroll_list.columns
name="icon"
width="16" />
@@ -62,33 +62,33 @@
width="281">
Buy for L$[AMOUNT] from [NAME]?
</text>
- <button
- follows="right|bottom"
+ <check_box
+ follows="left|bottom"
height="20"
- label="Cancel"
- label_selected="Cancel"
+ label="Wear clothing now"
layout="topleft"
- left="216"
- name="cancel_btn"
+ left_delta="0"
+ name="wear_check"
top="224"
- width="60" />
+ width="135" />
<button
follows="right|bottom"
height="20"
label="Buy"
label_selected="Buy"
layout="topleft"
- left_delta="-64"
+ left_delta="0"
name="buy_btn"
- top_delta="0"
- width="60" />
- <check_box
- follows="left|bottom"
+ top_pad="10"
+ width="125" />
+ <button
+ follows="right|bottom"
height="20"
- label="Wear clothing now"
+ label="Cancel"
+ label_selected="Cancel"
layout="topleft"
- left_delta="-139"
- name="wear_check"
+ left_pad="5"
+ name="cancel_btn"
top_delta="0"
- width="135" />
+ width="125" />
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_buy_land.xml b/indra/newview/skins/default/xui/en/floater_buy_land.xml
index e11534cc13..ca025346fd 100644
--- a/indra/newview/skins/default/xui/en/floater_buy_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_buy_land.xml
@@ -104,7 +104,7 @@ Try selecting a smaller area.
</floater.string>
<floater.string
name="land_holdings">
- You hold [BUYER] sq.m. of land.
+ You hold [BUYER] m² of land.
</floater.string>
<floater.string
name="pay_to_for_land">
@@ -116,19 +116,19 @@ Try selecting a smaller area.
</floater.string>
<floater.string
name="parcel_meters">
- This parcel is [AMOUNT] sq.m.
+ This parcel is [AMOUNT] m²
</floater.string>
<floater.string
name="premium_land">
- This land is premium, and will charge as [AMOUNT] sq.m.
+ This land is premium, and will charge as [AMOUNT] m².
</floater.string>
<floater.string
name="discounted_land">
- This land is discounted, and will charge as [AMOUNT] sq.m.
+ This land is discounted, and will charge as [AMOUNT] m².
</floater.string>
<floater.string
name="meters_supports_object">
- [AMOUNT] sq.m.
+ [AMOUNT] m²
supports [AMOUNT2] objects
</floater.string>
<floater.string
@@ -142,7 +142,7 @@ supports [AMOUNT2] objects
<floater.string
name="info_price_string">
L$ [PRICE]
-(L$ [PRICE_PER_SQM]/sq.m.)
+(L$ [PRICE_PER_SQM]/m²)
[SOLD_WITH_OBJECTS]
</floater.string>
<floater.string
@@ -413,7 +413,7 @@ supports [AMOUNT2] objects
name="info_size"
top_delta="-1"
width="180">
- 1024 sq.m.
+ 1024 m²
</text>
<text
type="string"
@@ -437,7 +437,7 @@ supports [AMOUNT2] objects
top_delta="-1"
width="180">
L$ 1500
-(L$ 1.1/sq.m.)
+(L$ 1.1/m²)
sold with objects
</text>
<text
@@ -531,11 +531,14 @@ sold with objects
name="account_level"
width="336">
<combo_box.item
- label="US$9.95/month, billed monthly" />
+ label="US$9.95/month, billed monthly"
+ name="US$9.95/month,billedmonthly" />
<combo_box.item
- label="US$7.50/month, billed quarterly" />
+ label="US$7.50/month, billed quarterly"
+ name="US$7.50/month,billedquarterly" />
<combo_box.item
- label="US$6.00/month, billed annually" />
+ label="US$6.00/month, billed annually"
+ name="US$6.00/month,billedannually" />
</combo_box>
<locate
height="10"
@@ -572,8 +575,8 @@ sold with objects
name="land_use_reason"
right="435"
width="215">
- You hold 1309 sq.m. of land.
- This parcel is 512 sq.m. of land.
+ You hold 1309 m² of land.
+ This parcel is 512 m² of land.
</text>
<locate
height="10"
@@ -668,7 +671,7 @@ sold with objects
<check_box
follows="bottom|left"
height="20"
- label="Remove [AMOUNT] square meters of contribution from group."
+ label="Remove [AMOUNT] m² of contribution from group."
layout="topleft"
left_delta="3"
name="remove_contribution"
diff --git a/indra/newview/skins/default/xui/en/floater_buy_object.xml b/indra/newview/skins/default/xui/en/floater_buy_object.xml
index 44ef32ee36..24010dda93 100644
--- a/indra/newview/skins/default/xui/en/floater_buy_object.xml
+++ b/indra/newview/skins/default/xui/en/floater_buy_object.xml
@@ -8,7 +8,7 @@
name="contents"
save_rect="true"
title="Buy Copy of Object"
- width="300">
+ width="280">
<floater.string
name="title_buy_text">
Buy
@@ -36,13 +36,13 @@
left="15"
name="object_list"
top="24"
- width="281">
+ width="250">
<scroll_list.columns
name="icon"
width="16" />
<scroll_list.columns
name="text"
- width="300" />
+ width="234" />
</scroll_list>
<text
type="string"
@@ -54,7 +54,7 @@
left_delta="0"
name="contents_text"
top_pad="4"
- width="281">
+ width="250">
and its contents:
</text>
<scroll_list
@@ -64,13 +64,13 @@
left_delta="0"
name="item_list"
top_pad="4"
- width="281">
+ width="250">
<scroll_list.columns
name="icon"
width="16" />
<scroll_list.columns
name="text"
- width="300" />
+ width="234" />
</scroll_list>
<text
type="string"
@@ -88,21 +88,21 @@
<button
follows="right|bottom"
height="20"
- label="Cancel"
- label_selected="Cancel"
+ label="Buy"
+ label_selected="Buy"
layout="topleft"
- left="216"
- name="cancel_btn"
- top="224"
- width="60" />
+ left="10"
+ name="buy_btn"
+ top_pad="5"
+ width="125" />
<button
follows="right|bottom"
height="20"
- label="Buy"
- label_selected="Buy"
+ label="Cancel"
+ label_selected="Cancel"
layout="topleft"
- left_delta="-64"
- name="buy_btn"
+ left_pad="5"
+ name="cancel_btn"
top_delta="0"
- width="60" />
+ width="125" />
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml
index 7f24b11d14..343ff893e8 100644
--- a/indra/newview/skins/default/xui/en/floater_camera.xml
+++ b/indra/newview/skins/default/xui/en/floater_camera.xml
@@ -7,6 +7,7 @@
layout="topleft"
name="camera_floater"
save_rect="true"
+ save_visibility="true"
width="176">
<floater.string
name="rotate_tooltip">
diff --git a/indra/newview/skins/default/xui/en/floater_gesture.xml b/indra/newview/skins/default/xui/en/floater_gesture.xml
index c4d024ae8b..f042385fb4 100644
--- a/indra/newview/skins/default/xui/en/floater_gesture.xml
+++ b/indra/newview/skins/default/xui/en/floater_gesture.xml
@@ -4,10 +4,10 @@
height="465"
layout="topleft"
min_height="200"
- min_width="350"
+ min_width="280"
name="gestures"
title="Active Gestures"
- width="350">
+ width="280">
<floater.string
name="loading">
Loading...
@@ -24,7 +24,7 @@
layout="topleft"
left="15"
name="help_label">
- Double-click a gesture to play animations and sounds.
+ Double-click a gesture to play.
</text>
<scroll_list
bottom_delta="390"
@@ -36,21 +36,21 @@
name="gesture_list"
right="-15">
<scroll_list.columns
+ label="Name"
+ name="name"
+ width="90" />
+ <scroll_list.columns
label="Trigger"
name="trigger"
- width="70" />
- <scroll_list.columns
- label="Key"
- name="shortcut"
- width="70" />
- <scroll_list.columns
+ width="80" />
+ <scroll_list.columns
label=""
name="key"
width="-1" />
<scroll_list.columns
- label="Name"
- name="name"
- width="160" />
+ label="Key"
+ name="shortcut"
+ width="50" />
</scroll_list>
<button
follows="bottom|right"
@@ -89,3 +89,4 @@
top_delta="0"
width="83" />
</floater>
+
diff --git a/indra/newview/skins/default/xui/en/floater_god_tools.xml b/indra/newview/skins/default/xui/en/floater_god_tools.xml
index e35ab3ea49..e421b1bb5d 100644
--- a/indra/newview/skins/default/xui/en/floater_god_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_god_tools.xml
@@ -34,7 +34,10 @@
left="10"
name="Kick all users"
top="8"
- width="100" />
+ width="100">
+ <button.commit_callback
+ function="GridTools.KickAll" />
+ </button>
<button
follows="left|top"
height="20"
@@ -44,7 +47,10 @@
left_delta="0"
name="Flush This Region&apos;s Map Visibility Caches"
top_pad="8"
- width="250" />
+ width="250">
+ <button.commit_callback
+ function="GridTools.FlushMapVisibilityCaches" />
+ </button>
</panel>
<panel
border="true"
@@ -79,7 +85,10 @@
max_length="63"
name="region name"
top_delta="0"
- width="208" />
+ width="208">
+ <line_editor.commit_callback
+ function="RegionTools.ChangeAnything" />
+ </line_editor>
<check_box
height="16"
label="Prelude"
@@ -88,7 +97,10 @@
name="check prelude"
tool_tip="Set this to make the region a prelude."
top="30"
- width="180" />
+ width="180">
+ <check_box.commit_callback
+ function="RegionTools.ChangePrelude" />
+ </check_box>
<check_box
height="16"
label="Fixed Sun"
@@ -97,7 +109,10 @@
name="check fixed sun"
tool_tip="Fix the sun position (like in Region/Estate &gt; Terrain."
top_pad="4"
- width="180" />
+ width="180">
+ <check_box.commit_callback
+ function="RegionTools.ChangeAnything" />
+ </check_box>
<check_box
height="16"
label="Reset Home On Teleport"
@@ -106,7 +121,10 @@
name="check reset home"
tool_tip="When resident teleports out, reset their home to the destination position."
top_pad="4"
- width="180" />
+ width="180">
+ <check_box.commit_callback
+ function="RegionTools.ChangeAnything" />
+ </check_box>
<check_box
height="16"
label="Visible"
@@ -115,7 +133,10 @@
name="check visible"
tool_tip="Set this to make the region visible to non-gods."
top_pad="4"
- width="180" />
+ width="180">
+ <check_box.commit_callback
+ function="RegionTools.ChangeAnything" />
+ </check_box>
<check_box
height="16"
label="Damage"
@@ -124,7 +145,10 @@
name="check damage"
tool_tip="Set this to enable damage in this region."
top_pad="4"
- width="180" />
+ width="180">
+ <check_box.commit_callback
+ function="RegionTools.ChangeAnything" />
+ </check_box>
<check_box
height="16"
label="Block Traffic Tracking"
@@ -133,7 +157,10 @@
name="block dwell"
tool_tip="Set this to make the region not compute traffic."
top_pad="4"
- width="180" />
+ width="180">
+ <check_box.commit_callback
+ function="RegionTools.ChangeAnything" />
+ </check_box>
<check_box
height="16"
label="Block Terraform"
@@ -142,7 +169,10 @@
name="block terraform"
tool_tip="Set this to disallow people terraforming their land"
top_pad="4"
- width="180" />
+ width="180">
+ <check_box.commit_callback
+ function="RegionTools.ChangeAnything" />
+ </check_box>
<check_box
height="16"
label="Sandbox"
@@ -151,7 +181,10 @@
name="is sandbox"
tool_tip="Toggle whether this is a sandbox region."
top_pad="4"
- width="180" />
+ width="180">
+ <check_box.commit_callback
+ function="RegionTools.ChangeAnything" />
+ </check_box>
<button
follows="top|right"
font="SansSerifSmall"
@@ -163,7 +196,10 @@
name="Bake Terrain"
tool_tip="Save the current terrain as default."
top_pad="32"
- width="110" />
+ width="110">
+ <button.commit_callback
+ function="RegionTools.BakeTerrain" />
+ </button>
<button
follows="top|right"
font="SansSerifSmall"
@@ -175,7 +211,10 @@
name="Revert Terrain"
tool_tip="Replace the current terrain with default."
top_pad="4"
- width="110" />
+ width="110">
+ <button.commit_callback
+ function="RegionTools.RevertTerrain" />
+ </button>
<button
follows="top|right"
font="SansSerifSmall"
@@ -187,7 +226,10 @@
name="Swap Terrain"
tool_tip="Swap current terrain with default."
top_pad="4"
- width="110" />
+ width="110">
+ <button.commit_callback
+ function="RegionTools.SwapTerrain" />
+ </button>
<text
type="string"
length="1"
@@ -236,7 +278,10 @@
name="parentestate"
tool_tip="This is the parent estate for this region"
top_delta="0"
- width="50" />
+ width="50">
+ <line_editor.commit_callback
+ function="RegionTools.ChangeAnything" />
+ </line_editor>
<text
type="string"
length="1"
@@ -260,7 +305,10 @@
name="gridposx"
tool_tip="This is the grid x position for this region"
top_delta="0"
- width="50" />
+ width="50">
+ <line_editor.commit_callback
+ function="RegionTools.ChangeAnything" />
+ </line_editor>
<line_editor
border_style="line"
border_thickness="1"
@@ -272,7 +320,10 @@
name="gridposy"
tool_tip="This is the grid y position for this region"
top_delta="0"
- width="40" />
+ width="40">
+ <line_editor.commit_callback
+ function="RegionTools.ChangeAnything" />
+ </line_editor>
<text
type="string"
length="1"
@@ -295,7 +346,10 @@
max_length="10"
name="redirectx"
top_delta="0"
- width="50" />
+ width="50">
+ <line_editor.commit_callback
+ function="RegionTools.ChangeAnything" />
+ </line_editor>
<line_editor
border_style="line"
border_thickness="1"
@@ -306,7 +360,10 @@
max_length="10"
name="redirecty"
top_delta="0"
- width="40" />
+ width="40">
+ <line_editor.commit_callback
+ function="RegionTools.ChangeAnything" />
+ </line_editor>
<spinner
follows="top|right"
height="16"
@@ -316,7 +373,10 @@
max_val="4"
name="billable factor"
top="110"
- width="80" />
+ width="80">
+ <spinner.commit_callback
+ function="RegionTools.ChangeAnything" />
+ </spinner>
<text
type="string"
length="1"
@@ -340,7 +400,10 @@
max_val="100"
name="land cost"
top="130"
- width="80" />
+ width="80">
+ <spinner.commit_callback
+ function="RegionTools.ChangeAnything" />
+ </spinner>
<text
type="string"
length="1"
@@ -352,7 +415,7 @@
name="land cost text"
top_delta="0"
width="110">
- L$ per sq. meter:
+ L$ per m²:
</text>
<button
follows="top|right"
@@ -365,7 +428,10 @@
name="Refresh"
tool_tip="Click here to refresh the above information."
top="150"
- width="110" />
+ width="110">
+ <button.commit_callback
+ function="RegionTools.Refresh" />
+ </button>
<button
follows="top|right"
font="SansSerifSmall"
@@ -377,7 +443,10 @@
name="Apply"
tool_tip="Click here to apply any changes from above."
top_pad="36"
- width="110" />
+ width="110">
+ <button.commit_callback
+ function="RegionTools.ApplyChanges" />
+ </button>
<button
follows="top|right"
font="SansSerifSmall"
@@ -389,7 +458,10 @@
name="Select Region"
tool_tip="Select the whole region with the land tool."
top="238"
- width="110" />
+ width="110">
+ <button.commit_callback
+ function="RegionTools.SelectRegion" />
+ </button>
<button
follows="top|right"
font="SansSerifSmall"
@@ -401,7 +473,10 @@
name="Autosave now"
tool_tip="Save gzipped state to autosave directory."
top_pad="4"
- width="110" />
+ width="110">
+ <button.commit_callback
+ function="RegionTools.SaveState" />
+ </button>
</panel>
<panel
border="true"
@@ -450,7 +525,10 @@
name="disable scripts"
tool_tip="Set this to disable all scripts in this region"
top="30"
- width="110" />
+ width="110">
+ <check_box.commit_callback
+ function="ObjectTools.ChangeAnything" />
+ </check_box>
<check_box
height="16"
label="Disable Collisions"
@@ -459,7 +537,10 @@
name="disable collisions"
tool_tip="Set this to disable non-agent collisions in this region"
top_delta="0"
- width="121" />
+ width="121">
+ <check_box.commit_callback
+ function="ObjectTools.ChangeAnything" />
+ </check_box>
<check_box
height="16"
label="Disable Physics"
@@ -468,7 +549,10 @@
name="disable physics"
tool_tip="Set this to disable all physics in this region"
top_delta="0"
- width="130" />
+ width="130">
+ <check_box.commit_callback
+ function="ObjectTools.ChangeAnything" />
+ </check_box>
<button
follows="top|right"
font="SansSerifSmall"
@@ -480,8 +564,11 @@
name="Apply"
tool_tip="Click here to apply any changes from above."
top="54"
- width="110" />
- <button
+ width="110">
+ <button.commit_callback
+ function="ObjectTools.ApplyChanges" />
+ </button>
+ <button
follows="top|right"
font="SansSerifSmall"
height="20"
@@ -492,7 +579,10 @@
name="Set Target"
tool_tip="Set the target avatar for object deletion."
top="78"
- width="110" />
+ width="110">
+ <button.commit_callback
+ function="ObjectTools.Set" />
+ </button>
<text
type="string"
length="1"
@@ -516,7 +606,10 @@
name="Delete Target&apos;s Scripted Objects On Others Land"
tool_tip="Delete all scripted objects owned by the target on land not owned by the target. (no copy) objects will be returned."
top="126"
- width="380" />
+ width="380">
+ <button.commit_callback
+ function="ObjectTools.DeletePublicOwnedBy" />
+ </button>
<button
follows="top|right"
font="SansSerifSmall"
@@ -528,7 +621,10 @@
name="Delete Target&apos;s Scripted Objects On *Any* Land"
tool_tip="Delete all scripted objects owned by the target in this region. (no copy) objects will be returned."
top_pad="28"
- width="380" />
+ width="380">
+ <button.commit_callback
+ function="ObjectTools.DeleteAllScriptedOwnedBy" />
+ </button>
<button
follows="top|right"
font="SansSerifSmall"
@@ -540,8 +636,11 @@
name="Delete *ALL* Of Target&apos;s Objects"
tool_tip="Delete all objects owned by the target in this region. (no copy) objects will be returned."
top_pad="28"
- width="380" />
- <button
+ width="380">
+ <button.commit_callback
+ function="ObjectTools.DeleteAllOwnedBy" />
+ </button>
+ <button
follows="top|right"
font="SansSerifSmall"
height="20"
@@ -552,7 +651,10 @@
name="Get Top Colliders"
tool_tip="Gets list of objects experiencing the most narrowphase callbacks."
top_pad="28"
- width="110" />
+ width="110">
+ <button.commit_callback
+ function="ObjectTools.GetTopColliders" />
+ </button>
<button
follows="top|right"
font="SansSerifSmall"
@@ -564,7 +666,10 @@
name="Get Top Scripts"
tool_tip="Gets list of objects spending the most time running scripts."
top_pad="4"
- width="110" />
+ width="110">
+ <button.commit_callback
+ function="ObjectTools.GetTopScripts" />
+ </button>
<button
follows="top|right"
font="SansSerifSmall"
@@ -576,7 +681,10 @@
name="Scripts digest"
tool_tip="Gets a list of all scripts and number of occurences of each."
top_pad="4"
- width="110" />
+ width="110" >
+ <button.commit_callback
+ function="ObjectTools.GetScriptDigest" />
+ </button>
</panel>
<panel
border="true"
@@ -609,9 +717,11 @@
width="290">
<combo_box.item
label="Selection"
+ name="item1"
value="Selection" />
<combo_box.item
label="Agent Region"
+ name="item2"
value="Agent Region" />
</combo_box>
<text
@@ -636,15 +746,19 @@
width="290">
<combo_box.item
label="colliders &lt;steps&gt;"
+ name="item1"
value="colliders &lt;steps&gt;" />
<combo_box.item
label="scripts &lt;count&gt;,&lt;optional pattern&gt;"
+ name="item2"
value="scripts &lt;count&gt;,&lt;optional pattern&gt;" />
<combo_box.item
label="objects &lt;pattern&gt;"
+ name="item3"
value="objects &lt;pattern&gt;" />
<combo_box.item
label="rez &lt;asset_id&gt;"
+ name="item4"
value="rez &lt;asset_id&gt;" />
</combo_box>
<text
@@ -679,7 +793,10 @@
left="10"
name="Make Request"
top="96"
- width="100" />
+ width="100">
+ <button.commit_callback
+ function="GodTools.Request" />
+ </button>
</panel>
</tab_container>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml
index f0e2911fd8..19fba52500 100644
--- a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml
+++ b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml
@@ -50,18 +50,23 @@
width="64">
<combo_box.item
label="Disabled"
+ name="FSAADisabled"
value="0" />
<combo_box.item
label="2x"
+ name="2x"
value="2" />
<combo_box.item
label="4x"
+ name="4x"
value="4" />
<combo_box.item
label="8x"
+ name="8x"
value="8" />
<combo_box.item
label="16x"
+ name="16x"
value="16" />
</combo_box>
<spinner
diff --git a/indra/newview/skins/default/xui/en/floater_im.xml b/indra/newview/skins/default/xui/en/floater_im.xml
index 7493a9a90d..e8b8fee678 100644
--- a/indra/newview/skins/default/xui/en/floater_im.xml
+++ b/indra/newview/skins/default/xui/en/floater_im.xml
@@ -24,7 +24,7 @@
</multi_floater.string>
<multi_floater.string
name="muted_message">
- You have muted this resident. Sending a message will automatically unmute them.
+ You have blocked this resident. Sending a message will automatically unblock them.
</multi_floater.string>
<multi_floater.string
name="generic_request_error">
diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml
new file mode 100644
index 0000000000..44c56e4207
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_im_session.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ background_visible="true"
+ follows="left|top|right|bottom"
+ height="250"
+ layout="topleft"
+ left="0"
+ name="panel_im"
+ top="0"
+ can_dock="true"
+ can_minimize="false"
+ visible="false"
+ width="315">
+ <layout_stack follows="left|top|right|bottom"
+ height="235"
+ width="315"
+ layout="topleft"
+ orientation="horizontal"
+ name="im_panels"
+ top="16"
+ left="2">
+ <layout_panel
+ class="panel_im_control_panel"
+ name="panel_im_control_panel"
+ filename="panel_im_control_panel.xml"
+ layout="topleft"
+ top_delta="-3"
+ min_width="96"
+ width="96"
+ height="225"
+ label="IM Control Panel"
+ user_resize="false" />
+ <layout_panel height="235"
+ width="200"
+ left_delta="96"
+ top="0"
+ user_resize="false">
+ <button height="12"
+ top="8"
+ label="&lt;&lt;"
+ layout="topleft"
+ width="35"
+ name="slide_left_btn" />
+ <button height="12"
+ top="8"
+ label="&gt;&gt;"
+ layout="topleft"
+ width="35"
+ name="slide_right_btn" />
+ <text_editor
+ enabled="false"
+ type="string"
+ length="1"
+ follows="left|top|right"
+ font="SansSerif"
+ height="185"
+ layout="topleft"
+ max_length="2147483647"
+ name="im_text"
+ width="195"
+ word_wrap="true">
+ </text_editor>
+ <line_editor name="chat_editor" height="20" layout="topleft" width="190">
+ </line_editor>
+ </layout_panel>
+ </layout_stack>
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_image_preview.xml b/indra/newview/skins/default/xui/en/floater_image_preview.xml
index 907376b1e9..6fface12a3 100644
--- a/indra/newview/skins/default/xui/en/floater_image_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_image_preview.xml
@@ -61,25 +61,35 @@
top_delta="3"
width="160">
<combo_box.item
- label="Image" />
+ label="Image"
+ name="Image" />
<combo_box.item
- label="Hair" />
+ label="Hair"
+ name="Hair" />
<combo_box.item
- label="Female Head" />
+ label="Female Head"
+ name="FemaleHead" />
<combo_box.item
- label="Female Upper Body" />
+ label="Female Upper Body"
+ name="FemaleUpperBody" />
<combo_box.item
- label="Female Lower Body" />
+ label="Female Lower Body"
+ name="FemaleLowerBody" />
<combo_box.item
- label="Male Head" />
+ label="Male Head"
+ name="MaleHead" />
<combo_box.item
- label="Male Upper Body" />
+ label="Male Upper Body"
+ name="MaleUpperBody" />
<combo_box.item
- label="Male Lower Body" />
+ label="Male Lower Body"
+ name="MaleLowerBody" />
<combo_box.item
- label="Skirt" />
+ label="Skirt"
+ name="Skirt" />
<combo_box.item
- label="Sculpted Prim" />
+ label="Sculpted Prim"
+ name="SculptedPrim" />
</combo_box>
<text
type="string"
diff --git a/indra/newview/skins/default/xui/en/floater_inspect.xml b/indra/newview/skins/default/xui/en/floater_inspect.xml
index ed3b4f00f2..b43cdca0d1 100644
--- a/indra/newview/skins/default/xui/en/floater_inspect.xml
+++ b/indra/newview/skins/default/xui/en/floater_inspect.xml
@@ -25,21 +25,23 @@
tool_tip="Select an object from this list to highlight it in-world"
top="20">
<scroll_list.columns
- dynamicwidth="true"
+ dynamic_width="true"
label="Object Name"
name="object_name" />
<scroll_list.columns
- dynamicwidth="true"
+ dynamic_width="true"
label="Owner Name"
name="owner_name" />
<scroll_list.columns
- dynamicwidth="true"
+ dynamic_width="true"
label="Creator Name"
name="creator_name" />
<scroll_list.columns
label="Creation Date"
name="creation_date"
width="150" />
+ <scroll_list.commit_callback
+ function="Inspect.SelectObject" />
</scroll_list>
<button
follows="left|bottom"
@@ -50,7 +52,10 @@
name="button owner"
tool_tip="See profile of the highlighted object&apos;s owner"
top_pad="5"
- width="150" />
+ width="150">
+ <button.commit_callback
+ function="Inspect.OwnerProfilet" />
+ </button>
<button
follows="left|bottom"
height="20"
@@ -60,5 +65,8 @@
name="button creator"
tool_tip="See profile of the highlighted object&apos;s original creator"
top_delta="0"
- width="150" />
+ width="150">
+ <button.commit_callback
+ function="Inspect.CreatorProfile" />
+ </button>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_inventory.xml b/indra/newview/skins/default/xui/en/floater_inventory.xml
index eb05fe1883..6a54c187cb 100644
--- a/indra/newview/skins/default/xui/en/floater_inventory.xml
+++ b/indra/newview/skins/default/xui/en/floater_inventory.xml
@@ -23,7 +23,7 @@
name="Fetched">
Fetched
</floater.string>
- <search_editor
+ <filter_editor
follows="left|top|right"
height="16"
label="Type here to search"
diff --git a/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml
index 8bff916f9d..f07a146471 100644
--- a/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml
+++ b/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml
@@ -5,7 +5,7 @@
layout="topleft"
name="Inventory Finder"
title="inventory_recent_items"
- width="160">
+ width="280">
<icon
height="16"
image_name="inv_item_animation.tga"
diff --git a/indra/newview/skins/default/xui/en/floater_joystick.xml b/indra/newview/skins/default/xui/en/floater_joystick.xml
index 032ff21b58..b9c1b08c68 100644
--- a/indra/newview/skins/default/xui/en/floater_joystick.xml
+++ b/indra/newview/skins/default/xui/en/floater_joystick.xml
@@ -121,21 +121,24 @@
label="Direct Zoom"
layout="topleft"
left="185"
- name="ZoomDirect" />
+ name="ZoomDirect"
+ width="60" />
<check_box
bottom_delta="0"
control_name="Cursor3D"
label="3D Cursor"
layout="topleft"
left="310"
- name="Cursor3D" />
+ name="Cursor3D"
+ width="60" />
<check_box
bottom_delta="0"
control_name="AutoLeveling"
label="Auto Level"
layout="topleft"
left="420"
- name="AutoLeveling" />
+ name="AutoLeveling"
+ width="60" />
<text
type="string"
length="1"
diff --git a/indra/newview/skins/default/xui/en/floater_lagmeter.xml b/indra/newview/skins/default/xui/en/floater_lagmeter.xml
index 8af4f74aa3..a326cd006f 100644
--- a/indra/newview/skins/default/xui/en/floater_lagmeter.xml
+++ b/indra/newview/skins/default/xui/en/floater_lagmeter.xml
@@ -201,7 +201,7 @@
Client:
</text>
<text
- make_visible_control="LagMeterShrunk"
+ visiblity_control="LagMeterShrunk"
type="string"
length="1"
bottom="40"
@@ -215,7 +215,7 @@
Normal
</text>
<text
- make_visible_control="LagMeterShrunk"
+ visiblity_control="LagMeterShrunk"
bottom="56"
follows="left|top"
height="16"
@@ -250,7 +250,7 @@
Network:
</text>
<text
- make_visible_control="LagMeterShrunk"
+ visiblity_control="LagMeterShrunk"
type="string"
length="1"
bottom="80"
@@ -264,7 +264,7 @@
Normal
</text>
<text
- make_visible_control="LagMeterShrunk"
+ visiblity_control="LagMeterShrunk"
bottom="96"
follows="left|top"
height="16"
diff --git a/indra/newview/skins/default/xui/en/floater_land_holdings.xml b/indra/newview/skins/default/xui/en/floater_land_holdings.xml
index 0ed4bb4e07..0a97a96ee3 100644
--- a/indra/newview/skins/default/xui/en/floater_land_holdings.xml
+++ b/indra/newview/skins/default/xui/en/floater_land_holdings.xml
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
- height="383"
+ height="400"
layout="topleft"
name="land holdings floater"
title="My Land"
- width="600">
+ width="280">
<floater.string
name="area_string">
- [AREA] sq. meters
+ [AREA] m²
</floater.string>
<scroll_list
draw_heading="true"
@@ -16,23 +16,23 @@
left="8"
name="parcel list"
top="24"
- width="584">
+ width="270">
<scroll_list.columns
- label="Parcel Name"
+ label="Parcel"
name="name"
- width="163" />
+ width="69" />
<scroll_list.columns
label="Region"
name="location"
- width="175" />
+ width="74" />
<scroll_list.columns
label="Type"
name="type"
- width="140" />
+ width="55" />
<scroll_list.columns
label="Area"
name="area"
- width="87" />
+ width="10" />
<scroll_list.columns
label=""
name="hidden"
@@ -40,6 +40,7 @@
</scroll_list>
<button
height="20"
+ font="SansSerifSmall"
label="Teleport"
label_selected="Teleport"
layout="topleft"
@@ -50,6 +51,7 @@
width="100" />
<button
height="20"
+ font="SansSerifSmall"
label="Show on Map"
label_selected="Show on Map"
layout="topleft"
@@ -77,15 +79,15 @@
left_delta="-4"
name="grant list"
top_pad="4"
- width="584">
+ width="270">
<scroll_list.columns
label="Group"
name="group"
- width="330" />
+ width="125" />
<scroll_list.columns
label="Area"
name="area"
- width="220" />
+ width="125" />
</scroll_list>
<text
type="string"
@@ -96,8 +98,9 @@
left_delta="4"
name="allowed_label"
top_pad="4"
- width="348">
- Allowed land holdings at current payment plan:
+ width="150">
+ Allowed land holdings at
+current payment plan:
</text>
<text
type="string"
@@ -105,11 +108,11 @@
follows="left|top"
height="16"
layout="topleft"
- left_delta="340"
+ left_pad="5"
name="allowed_text"
- top_delta="0"
+ top_delta="10"
width="132">
- [AREA] sq. meters
+ [AREA] m²
</text>
<text
type="string"
@@ -119,8 +122,8 @@
layout="topleft"
left="12"
name="current_label"
- top="341"
- width="348">
+ top_pad="5"
+ width="150">
Current land holdings:
</text>
<text
@@ -129,11 +132,11 @@
follows="left|top"
height="16"
layout="topleft"
- left_delta="340"
+ left_pad="5"
name="current_text"
top_delta="0"
width="132">
- [AREA] sq. meters
+ [AREA] m²
</text>
<text
type="string"
@@ -144,9 +147,10 @@
layout="topleft"
left="12"
name="available_label"
- top="361"
- width="348">
- Available for land purchases:
+ top_pad="5"
+ width="150">
+ Available for land
+purchases:
</text>
<text
type="string"
@@ -155,10 +159,10 @@
font="SansSerifBold"
height="16"
layout="topleft"
- left_delta="340"
+ left_pad="5"
name="available_text"
- top_delta="0"
+ top_delta="5"
width="140">
- [AREA] sq. meters
+ [AREA] m²
</text>
-</floater>
+</floater> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml b/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml
index 0735ac160a..6d6c6c6644 100644
--- a/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml
+++ b/indra/newview/skins/default/xui/en/floater_live_lsleditor.xml
@@ -14,7 +14,7 @@
width="500">
<floater.string
name="not_allowed">
- You are not allowed to view this script.
+ You can not view or edit this script, since it has been set as &quot;no copy&quot;. You need full permissions to view or edit a script inside an object.
</floater.string>
<floater.string
name="script_running">
diff --git a/indra/newview/skins/default/xui/en/floater_media_browser.xml b/indra/newview/skins/default/xui/en/floater_media_browser.xml
index a073c3443a..a277294be1 100644
--- a/indra/newview/skins/default/xui/en/floater_media_browser.xml
+++ b/indra/newview/skins/default/xui/en/floater_media_browser.xml
@@ -9,41 +9,71 @@
save_rect="true"
title="Media Browser"
width="820">
+ <!--TODO: ADD CLOSE X TO WINDOW-->
+ <!-- <button
+ follows="bottom|right"
+ height="20"
+ label="Close"
+ layout="topleft"
+ left_pad="80"
+ name="close"
+ top_delta="0"
+ width="70">
+ <button.commit_callback
+ function="MediaBrowser.Close" />
+ </button>-->
<layout_stack
- bottom="440"
follows="left|right|top|bottom"
layout="topleft"
left="10"
name="stack1"
top="20"
- width="800">
+ width="800"
+ height="400"
+ >
<layout_panel
auto_resize="false"
- height="20"
layout="topleft"
- left="0"
name="nav_controls"
- top="400"
- user_resize="false"
- width="800">
+ user_resize="false">
<button
- follows="left|top"
- height="20"
- label="Back"
- layout="topleft"
- left="0"
- name="back"
- top="0"
- width="55" />
+ left="1"
+ follows="left|top"
+ font="SansSerifSmall"
+ height="20"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_overlay="Arrow_Left_Off"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ hover_glow_amount="0.15"
+ layout="topleft"
+ name="back"
+ picture_style="true"
+ tool_tip="Go back to previous location"
+ width="20">
+ <button.commit_callback
+ function="MediaBrowser.Back" />
+ </button>
<button
- follows="left|top"
- height="20"
- label="Forward"
- layout="topleft"
- left_pad="3"
- name="forward"
- top_delta="0"
- width="68" />
+ follows="left|top"
+ font="SansSerifSmall"
+ height="20"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_overlay="Arrow_Right_Off"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ hover_glow_amount="0.15"
+ layout="topleft"
+ left_pad="2"
+ name="forward"
+ picture_style="true"
+ tool_tip="Go forward one location"
+ width="20">
+ <button.commit_callback
+ function="MediaBrowser.Forward" />
+ </button>
<button
enabled="false"
follows="left|top"
@@ -52,18 +82,26 @@
layout="topleft"
left_pad="2"
name="reload"
- top_delta="0"
- width="70" />
+ width="70">
+ <button.commit_callback
+ function="MediaBrowser.Refresh" />
+ </button>
<combo_box
allow_text_entry="true"
- follows="left|top|right"
- height="20"
- layout="topleft"
- left_pad="5"
- max_chars="255"
name="address"
- top_delta="0"
- width="540" />
+ follows="left|right|top"
+ halign="right"
+ height="20"
+ label="Location"
+ layout="topleft"
+ left_pad="5"
+ max_chars="254"
+ mouse_opaque="false"
+ top_delta="0"
+ width="340">
+ <combo_box.commit_callback
+ function="MediaBrowser.EnterAddress" />
+ </combo_box>
<button
enabled="false"
follows="right|top"
@@ -72,19 +110,31 @@
layout="topleft"
left_pad="5"
name="go"
- top_delta="0"
- width="55" />
- </layout_panel>
- <layout_panel
- auto_resize="false"
- height="20"
- layout="topleft"
- left_delta="0"
- name="parcel_owner_controls"
- top_delta="0"
- user_resize="false"
- width="540">
+ width="50">
+ <button.commit_callback
+ function="MediaBrowser.Go" />
+ </button>
<button
+ follows="right|top"
+ height="20"
+ left_pad="20"
+ label="Open in My Browser"
+ layout="topleft"
+ name="open_browser"
+ width="145">
+ <button.commit_callback
+ function="MediaBrowser.OpenWebBrowser" />
+ </button>
+ <check_box
+ control_name="UseExternalBrowser"
+ follows="right|top"
+ label="Always"
+ layout="topleft"
+ left_pad="5"
+ width="140"
+ name="open_always" />
+ <!--
+ <button
enabled="false"
follows="left|top"
height="20"
@@ -93,52 +143,23 @@
left="0"
name="assign"
top="0"
- width="200" />
- </layout_panel>
+ width="200">
+ <button.commit_callback
+ function="MediaBrowser.Assign" />
+ </button>
+ </layout_panel>
<layout_panel
- height="20"
+ auto_resize="false"
layout="topleft"
- left_delta="0"
- name="external_controls"
- top_delta="0"
- user_resize="false"
- width="540">
- <web_browser
- bottom="-10"
+ name="browser"
+ left="0"
+ top="0"
+ user_resize="false">-->
+ <web_browser
follows="left|right|top|bottom"
layout="topleft"
left="0"
- name="browser"
- top="0"
- width="540" />
- <button
- follows="bottom|left"
- height="20"
- label="Open in My Web Browser"
- layout="topleft"
- left_delta="0"
- name="open_browser"
- top_pad="5"
- width="185" />
- <check_box
- control_name="UseExternalBrowser"
- follows="bottom|left"
- height="20"
- label="Always open in my web browser"
- layout="topleft"
- left_pad="5"
- name="open_always"
- top_delta="0"
- width="200" />
- <button
- follows="bottom|right"
- height="20"
- label="Close"
- layout="topleft"
- left_pad="80"
- name="close"
- top_delta="0"
- width="70" />
+ name="browser" />
</layout_panel>
</layout_stack>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_mem_leaking.xml b/indra/newview/skins/default/xui/en/floater_mem_leaking.xml
index e2a99e6614..da698f276b 100644
--- a/indra/newview/skins/default/xui/en/floater_mem_leaking.xml
+++ b/indra/newview/skins/default/xui/en/floater_mem_leaking.xml
@@ -20,7 +20,10 @@
max_val="4.29497e+009"
name="leak_speed"
top="30"
- width="330" />
+ width="330">
+ <spinner.commit_callback
+ function="MemLeak.ChangeLeakingSpeed" />
+ </spinner>
<spinner
decimal_digits="0"
follows="left|top"
@@ -34,7 +37,10 @@
max_val="4096"
name="max_leak"
top_pad="5"
- width="330" />
+ width="330">
+ <spinner.commit_callback
+ function="MemLeak.ChangeMaxMemLeaking" />
+ </spinner>
<text
type="string"
length="1"
@@ -79,7 +85,10 @@
left_delta="0"
name="start_btn"
top_delta="20"
- width="70" />
+ width="70">
+ <button.commit_callback
+ function="MemLeak.Start" />
+ </button>
<button
follows="left|top"
height="20"
@@ -88,7 +97,10 @@
left_pad="7"
name="stop_btn"
top_delta="0"
- width="70" />
+ width="70">
+ <button.commit_callback
+ function="MemLeak.Stop" />
+ </button>
<button
follows="left|top"
height="20"
@@ -97,7 +109,10 @@
left_pad="7"
name="release_btn"
top_delta="0"
- width="70" />
+ width="70">
+ <button.commit_callback
+ function="MemLeak.Release" />
+ </button>
<button
follows="left|top"
height="20"
@@ -106,5 +121,8 @@
left_pad="36"
name="close_btn"
top_delta="0"
- width="70" />
+ width="70">
+ <button.commit_callback
+ function="MemLeak.Close" />
+ </button>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_moveview.xml b/indra/newview/skins/default/xui/en/floater_moveview.xml
index 47342ffc5b..7666a2494d 100644
--- a/indra/newview/skins/default/xui/en/floater_moveview.xml
+++ b/indra/newview/skins/default/xui/en/floater_moveview.xml
@@ -7,6 +7,7 @@
layout="topleft"
name="move_floater"
save_rect="true"
+ save_visibility="true"
width="135">
<button
follows="left|bottom"
diff --git a/indra/newview/skins/default/xui/en/floater_mute_object.xml b/indra/newview/skins/default/xui/en/floater_mute_object.xml
index 7a0ec8282c..6b6b2c80ba 100644
--- a/indra/newview/skins/default/xui/en/floater_mute_object.xml
+++ b/indra/newview/skins/default/xui/en/floater_mute_object.xml
@@ -4,7 +4,7 @@
height="140"
layout="topleft"
name="mute by name"
- title="Mute object by name"
+ title="Block object by name"
width="375">
<text
type="string"
@@ -18,7 +18,7 @@
left_delta="25"
name="message"
right="380">
- Mute by name only affects object chat and IM, not sounds.
+ Block by name only affects object chat and IM, not sounds.
You must type the object&apos;s name exactly.
</text>
<line_editor
diff --git a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml
index afac4a4051..2d67e3d5a9 100644
--- a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml
@@ -28,5 +28,21 @@
color="1 1 1 1" enabled="true" image_name="closebox.tga"
name="close_btn"/>
</panel>
- <chat_history_view bottom="0" width="250" height="320" follows="left|right|top|bottom" name="chat_scroll" />
+ <text_editor
+ bg_readonly_color="ChatHistoryBgColor"
+ bg_writeable_color="ChatHistoryBgColor"
+ follows="left|top|right|bottom"
+ font="SansSerif"
+ layout="topleft"
+ height="320"
+ max_length="2147483647"
+ name="Chat History Editor"
+ read_only="true"
+ text_color="ChatHistoryTextColor"
+ text_readonly_color="ChatHistoryTextColor"
+ bottom="0"
+ track_bottom="true"
+ width="250"
+ word_wrap="true" />
+
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_openobject.xml b/indra/newview/skins/default/xui/en/floater_openobject.xml
index 742934b57b..e0ac2c1d51 100644
--- a/indra/newview/skins/default/xui/en/floater_openobject.xml
+++ b/indra/newview/skins/default/xui/en/floater_openobject.xml
@@ -42,7 +42,10 @@
name="copy_to_inventory_button"
tab_group="1"
top_pad="285"
- width="120" />
+ width="120">
+ <button.commit_callback
+ function="OpenObject.MoveToInventory" />
+ </button>
<button
follows="bottom|left"
font="SansSerifSmall"
@@ -53,5 +56,8 @@
left_pad="10"
name="copy_and_wear_button"
top_delta="0"
- width="120" />
+ width="120">
+ <button.commit_callback
+ function="OpenObject.MoveAndWear" />
+ </button>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_perm_prefs.xml b/indra/newview/skins/default/xui/en/floater_perm_prefs.xml
index 430cb940e5..e4cb97035c 100644
--- a/indra/newview/skins/default/xui/en/floater_perm_prefs.xml
+++ b/indra/newview/skins/default/xui/en/floater_perm_prefs.xml
@@ -24,7 +24,11 @@
left="260"
name="help"
top="7"
- width="22" />
+ width="22">
+ <button.commit_callback
+ function="Notification.Show"
+ parameter="ClickUploadHelpPermissions" />
+ </button>
<check_box
control_name="ShareWithGroup"
height="16"
@@ -72,8 +76,12 @@
left_delta="78"
name="next_owner_copy"
top_delta="0"
- width="88" />
+ width="88" >
+ <check_box.commit_callback
+ function="Perms.Copy" />
+ </check_box>
<check_box
+ enabled_control="NextOwnerCopy"
control_name="NextOwnerTransfer"
enabled="false"
height="16"
@@ -93,7 +101,10 @@
left="90"
name="ok"
top="150"
- width="100" />
+ width="100">
+ <button.commit_callback
+ function="Perms.OK" />
+ </button>
<button
height="20"
label="Cancel"
@@ -102,5 +113,8 @@
left_pad="5"
name="cancel"
top_delta="0"
- width="100" />
+ width="100">
+ <button.commit_callback
+ function="Perms.Cancel" />
+ </button>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml
index 1760d5b818..8a76c2167f 100644
--- a/indra/newview/skins/default/xui/en/floater_preferences.xml
+++ b/indra/newview/skins/default/xui/en/floater_preferences.xml
@@ -15,7 +15,7 @@
label="OK"
label_selected="OK"
layout="topleft"
- left="335"
+ left="427"
name="OK"
top="435"
width="90">
@@ -35,44 +35,6 @@
<button.commit_callback
function="Pref.Cancel" />
</button>
- <button
- follows="right|bottom"
- height="20"
- label="Apply"
- label_selected="Apply"
- layout="topleft"
- left_pad="3"
- name="Apply"
- top_delta="0"
- width="90">
- <button.commit_callback
- function="Pref.Apply" />
- </button>
- <button
- follows="left|bottom"
- height="20"
- label="About"
- label_selected="About"
- layout="topleft"
- left_delta="-512"
- name="About..."
- top_delta="0"
- width="90">
- <button.commit_callback
- function="Floater.Show"
- parameter="sl_about" />
- </button>
- <button
- follows="left|bottom"
- height="20"
- help_url="https://support.secondlife.com/ics/support/default.asp?deptID=4417"
- label="Help"
- label_selected="Help"
- layout="topleft"
- left_pad="3"
- name="Help"
- top_delta="0"
- width="90" />
<tab_container
follows="left|top|right|bottom"
height="410"
@@ -91,64 +53,116 @@
layout="topleft"
name="general" />
<panel
+ filename="panel_preferences_graphics1.xml"
+ label="Graphics"
+ layout="topleft"
+ name="display" />
+ <panel
class="panel_preference"
- filename="panel_preferences_input.xml"
- label="Input &amp; Camera"
+ filename="panel_preferences_im.xml"
+ label="Privacy"
layout="topleft"
- name="input" />
+ name="im" />
<panel
class="panel_preference"
- filename="panel_preferences_network.xml"
- label="Network"
+ filename="panel_preferences_audio.xml"
+ label="Sound"
layout="topleft"
- name="network" />
+ name="audio" />
<panel
class="panel_preference"
- filename="panel_preferences_web.xml"
- label="Web"
+ filename="panel_preferences_chat.xml"
+ label="Chat"
layout="topleft"
- name="web" />
+ name="chat" />
<panel
class="panel_preference"
- filename="panel_preferences_graphics1.xml"
- label="Graphics"
+ filename="panel_preferences_popups.xml"
+ label="Alerts"
layout="topleft"
- name="display" />
+ name="msgs" />
<panel
class="panel_preference"
- filename="panel_preferences_audio.xml"
- label="Audio &amp; Video"
+ filename="panel_preferences_input.xml"
+ label="Setup"
layout="topleft"
- name="audio" />
+ name="input" />
+ <!-- I put back the commented out panels for now, pending
+ implementation of new default settings. James -->
<panel
class="panel_preference"
- filename="panel_preferences_chat.xml"
- label="Text Chat"
+ filename="panel_preferences_advanced.xml"
+ label="Advanced"
layout="topleft"
- name="chat" />
+ name="advanced1" />
<panel
class="panel_preference"
- filename="panel_preferences_voice.xml"
- label="Voice Chat"
+ filename="panel_preferences_advanced2.xml"
+ label="Move, not to Advanced"
layout="topleft"
- name="voice" />
+ name="advanced2" />
<panel
class="panel_preference"
- filename="panel_preferences_im.xml"
- label="Communication"
+ filename="panel_preferences_advanced3.xml"
+ label="Not in specs"
layout="topleft"
- name="im" />
+ name="advanced3" />
<panel
class="panel_preference"
- filename="panel_preferences_popups.xml"
- label="Popups"
+ filename="panel_preferences_advanced4.xml"
+ label="Storage/Kill"
layout="topleft"
- name="msgs" />
+ name="advanced4" />
+ <!--panel
+ class="panel_preference"
+ filename="panel_preferences_network.xml"
+ label="Network"
+ layout="topleft"
+ name="network" />
+ <panel
+ class="panel_preference"
+ filename="panel_preferences_web.xml"
+ label="Web"
+ layout="topleft"
+ name="web" />
+ <panel
+ class="panel_preference"
+ filename="panel_preferences_voice.xml"
+ label="Voice Chat"
+ layout="topleft"
+ name="voice" />
<panel
class="panel_preference"
filename="panel_preferences_skins.xml"
label="Skins"
layout="topleft"
- name="skins" />
+ name="skins" /-->
</tab_container>
+
+ <!--button
+ follows="left|bottom"
+ height="20"
+ label="About"
+ label_selected="About"
+ layout="topleft"
+ left_delta="-512"
+ name="About..."
+ top_delta="0"
+ width="90">
+ <button.commit_callback
+ function="Floater.Show"
+ parameter="sl_about" />
+ </button-->
+ <!--bottom"
+ height="20"
+ help_url="https://support.secondlife.com/ics/support/default.asp?deptID=4417"
+ label="Help"
+ label_selected="Help"
+ layout="topleft"
+ left_pad="3"
+ name="Help"
+ top_delta="0"
+ width="90" /-->
+
+
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_preview_animation.xml b/indra/newview/skins/default/xui/en/floater_preview_animation.xml
index 50aabfc895..e9342b772f 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_animation.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_animation.xml
@@ -4,23 +4,11 @@
height="85"
layout="topleft"
name="preview_anim"
- width="300">
+ width="280">
<floater.string
name="Title">
Animation: [NAME]
</floater.string>
- <line_editor
- border_style="line"
- border_thickness="1"
- follows="left|top|right"
- font="SansSerif"
- height="19"
- layout="topleft"
- left="93"
- max_length="127"
- name="desc"
- top="19"
- width="194" />
<text
type="string"
length="1"
@@ -28,30 +16,44 @@
font="SansSerif"
height="19"
layout="topleft"
- left_delta="-80"
+ left="10"
name="desc txt"
- top_delta="0"
+ top="25"
width="80">
Description:
</text>
- <button
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ follows="left|top|right"
+ font="SansSerifSmall"
height="19"
+ layout="topleft"
+ left_delta="95"
+ max_length="127"
+ name="desc"
+ top="19"
+ width="170" />
+ <button
+ height="20"
+ font="SansSerifSmall"
label="Play in World"
label_selected="Stop"
layout="topleft"
- left="27"
+ left="10"
name="Anim play btn"
tool_tip="Play this animation so that others can see it."
top="47"
- width="96" />
+ width="125" />
<button
- height="19"
+ height="20"
+ font="SansSerifSmall"
label="Play Locally"
label_selected="Stop"
layout="topleft"
- left_pad="54"
+ left_pad="5"
name="Anim audition btn"
tool_tip="Play this animation so that only you can see it."
top_delta="0"
- width="96" />
+ width="125" />
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
index 9d183d8103..a463b2274d 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
auto_tile="true"
- height="350"
+ height="400"
layout="topleft"
name="gesture_preview"
- width="450">
+ width="280">
<floater.string
name="step_anim">
Animation to play:
@@ -41,10 +41,10 @@
type="string"
length="1"
follows="top|left"
- font="SansSerif"
+ font="SansSerifSmall"
height="10"
layout="topleft"
- left="16"
+ left="10"
name="desc_label"
top="25"
width="100">
@@ -57,15 +57,15 @@
left_delta="84"
name="desc"
top_delta="-4"
- width="330" />
+ width="180" />
<text
type="string"
length="1"
follows="top|left"
- font="SansSerif"
+ font="SansSerifSmall"
height="10"
layout="topleft"
- left="16"
+ left="10"
name="trigger_label"
top="54"
width="100">
@@ -79,18 +79,18 @@
max_length="31"
name="trigger_editor"
top_delta="-4"
- width="105" />
+ width="100" />
<text
type="string"
length="1"
follows="top|left"
- font="SansSerif"
+ font="SansSerifSmall"
height="10"
layout="topleft"
- left_pad="15"
+ left="10"
name="replace_text"
tool_tip="Replace the trigger word(s) with these words. For example, trigger &apos;hello&apos; replace with &apos;howdy&apos; will turn the chat &apos;I wanted to say hello&apos; into &apos;I wanted to say howdy&apos; as well as playing the gesture!"
- top_delta="4"
+ top="79"
width="200">
Replace with:
</text>
@@ -98,7 +98,7 @@
follows="left|top"
height="20"
layout="topleft"
- left_delta="80"
+ left_delta="84"
max_length="31"
name="replace_editor"
tool_tip="Replace the trigger word(s) with these words. For example, trigger &apos;hello&apos; replace with &apos;howdy&apos; will turn the chat &apos;I wanted to say hello&apos; into &apos;I wanted to say howdy&apos; as well as playing the gesture"
@@ -108,12 +108,12 @@
type="string"
length="1"
follows="top|left"
- font="SansSerif"
+ font="SansSerifSmall"
height="10"
layout="topleft"
- left="16"
+ left="10"
name="key_label"
- top="83"
+ top="104"
width="100">
Shortcut Key:
</text>
@@ -137,12 +137,12 @@
type="string"
length="1"
follows="top|left"
- font="SansSerif"
+ font="SansSerifSmall"
height="10"
layout="topleft"
- left="16"
+ left="10"
name="library_label"
- top="112"
+ top="135"
width="100">
Library:
</text>
@@ -150,10 +150,10 @@
type="string"
length="1"
follows="top|left"
- font="SansSerif"
+ font="SansSerifSmall"
height="10"
layout="topleft"
- left_pad="104"
+ left_pad="75"
name="steps_label"
top_delta="0"
width="100">
@@ -163,10 +163,10 @@
follows="top|left"
height="110"
layout="topleft"
- left="16"
+ left="10"
name="library_list"
- top="132"
- width="100">
+ top="150"
+ width="80">
<scroll_list.rows
value="Animation" />
<scroll_list.rows
@@ -179,57 +179,61 @@
<button
follows="top|left"
height="20"
+ font="SansSerifSmall"
label="Add &gt;&gt;"
layout="topleft"
left_pad="14"
name="add_btn"
top_delta="0"
- width="80" />
+ width="70" />
<button
follows="top|left"
height="20"
- label="Move Up"
+ font="SansSerifSmall"
+ label="Up"
layout="topleft"
left_delta="0"
name="up_btn"
top_pad="10"
- width="80" />
+ width="70" />
<button
follows="top|left"
height="20"
- label="Move Down"
+ font="SansSerifSmall"
+ label="Down"
layout="topleft"
left_delta="0"
name="down_btn"
top_pad="10"
- width="80" />
+ width="70" />
<button
follows="top|left"
height="20"
+ font="SansSerifSmall"
label="Remove"
layout="topleft"
left_delta="0"
name="delete_btn"
top_pad="10"
- width="80" />
+ width="70" />
<scroll_list
follows="top|left"
height="110"
layout="topleft"
- left="220"
+ left="185"
name="step_list"
- top="132"
- width="210" />
+ top="150"
+ width="85" />
<text
type="string"
length="1"
follows="top|left"
- font="SansSerif"
+ font="SansSerifSmall"
height="60"
layout="topleft"
- left="16"
+ left="10"
name="help_label"
- top="252"
+ top="270"
width="200">
All steps happen simultaneously,
unless you add wait steps.
@@ -238,9 +242,9 @@ unless you add wait steps.
follows="top|left"
height="60"
layout="topleft"
- left_pad="6"
+ left="10"
name="options_text"
- top_delta="0"
+ top="300"
width="205" />
<combo_box
follows="top|left"
@@ -248,7 +252,7 @@ unless you add wait steps.
layout="topleft"
left_delta="10"
name="animation_list"
- top="272"
+ top="320"
width="100" />
<combo_box
follows="top|left"
@@ -298,9 +302,9 @@ unless you add wait steps.
height="20"
label="until animations are done"
layout="topleft"
- left="232"
+ left="16"
name="wait_anim_check"
- top="267"
+ top="315"
width="100" />
<check_box
follows="top|left"
@@ -325,10 +329,10 @@ unless you add wait steps.
height="20"
label="Active"
layout="topleft"
- left="140"
+ left="20"
name="active_check"
tool_tip="Active gestures can be triggered by chatting their trigger phrases or pressing their hot keys. Gestures usually become inactive when there is a key binding conflict."
- top="323"
+ top="365"
width="100" />
<button
follows="top|left"
@@ -348,4 +352,4 @@ unless you add wait steps.
name="save_btn"
top_delta="0"
width="80" />
-</floater>
+</floater> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/floater_preview_sound.xml b/indra/newview/skins/default/xui/en/floater_preview_sound.xml
index 07a50ac589..19f21090ca 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_sound.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_sound.xml
@@ -4,7 +4,7 @@
height="85"
layout="topleft"
name="preview_sound"
- width="300">
+ width="280">
<floater.string
name="Title">
Sound: [NAME]
@@ -16,11 +16,11 @@
font="SansSerif"
height="19"
layout="topleft"
- left="95"
+ left="85"
max_length="127"
name="desc"
top="19"
- width="192" />
+ width="127" />
<text
type="string"
length="1"
@@ -28,7 +28,7 @@
font="SansSerif"
height="19"
layout="topleft"
- left_delta="-82"
+ left="10"
name="desc txt"
top_delta="0"
width="80">
@@ -37,10 +37,11 @@
<button
follows="left|top"
height="19"
+ font="SansSerifSmall"
label="Play Locally"
label_selected="Play Locally"
layout="topleft"
- left="168"
+ left="145"
name="Sound audition btn"
sound_flags="0"
tool_tip="Play this sound so that only you can hear it."
diff --git a/indra/newview/skins/default/xui/en/floater_region_info.xml b/indra/newview/skins/default/xui/en/floater_region_info.xml
index 48694e5fb6..a890de3e28 100644
--- a/indra/newview/skins/default/xui/en/floater_region_info.xml
+++ b/indra/newview/skins/default/xui/en/floater_region_info.xml
@@ -5,7 +5,7 @@
name="regioninfo"
save_rect="true"
title="Region/Estate"
- width="480">
+ width="280">
<tab_container
bottom="512"
follows="left|right|top|bottom"
diff --git a/indra/newview/skins/default/xui/en/floater_report_abuse.xml b/indra/newview/skins/default/xui/en/floater_report_abuse.xml
index 4c036f98e5..fcbc27a5f9 100644
--- a/indra/newview/skins/default/xui/en/floater_report_abuse.xml
+++ b/indra/newview/skins/default/xui/en/floater_report_abuse.xml
@@ -178,120 +178,159 @@
width="356">
<combo_box.item
label="Select category"
+ name="Select_category"
value="0" />
<combo_box.item
label="Age &gt; Age play"
+ name="Age__Age_play"
value="31" />
<combo_box.item
label="Age &gt; Adult resident on Teen Second Life"
+ name="Age__Adult_resident_on_Teen_Second_Life"
value="32" />
<combo_box.item
label="Age &gt; Underage resident outside of Teen Second Life"
+ name="Age__Underage_resident_outside_of_Teen_Second_Life"
value="33" />
<combo_box.item
label="Assault &gt; Combat sandbox / unsafe area"
+ name="Assault__Combat_sandbox___unsafe_area"
value="34" />
<combo_box.item
label="Assault &gt; Safe area"
+ name="Assault__Safe_area"
value="35" />
<combo_box.item
label="Assault &gt; Weapons testing sandbox"
+ name="Assault__Weapons_testing_sandbox"
value="36" />
<combo_box.item
label="Commerce &gt; Failure to deliver product or service"
+ name="Commerce__Failure_to_deliver_product_or_service"
value="38" />
<combo_box.item
label="Disclosure &gt; Real world information"
+ name="Disclosure__Real_world_information"
value="39" />
<combo_box.item
label="Disclosure &gt; Remotely monitoring chat"
+ name="Disclosure__Remotely_monitoring chat"
value="40" />
<combo_box.item
label="Disclosure &gt; Second Life information/chat/IMs"
+ name="Disclosure__Second_Life_information_chat_IMs"
value="41" />
<combo_box.item
label="Disturbing the peace &gt; Unfair use of region resources"
+ name="Disturbing_the_peace__Unfair_use_of_region_resources"
value="42" />
<combo_box.item
label="Disturbing the peace &gt; Excessive scripted objects"
+ name="Disturbing_the_peace__Excessive_scripted_objects"
value="43" />
<combo_box.item
label="Disturbing the peace &gt; Object littering"
+ name="Disturbing_the_peace__Object_littering"
value="44" />
<combo_box.item
label="Disturbing the peace &gt; Repetitive spam"
+ name="Disturbing_the_peace__Repetitive_spam"
value="45" />
<combo_box.item
label="Disturbing the peace &gt; Unwanted advert spam"
+ name="Disturbing_the_peace__Unwanted_advert_spam"
value="46" />
<combo_box.item
label="Fraud &gt; L$"
+ name="Fraud__L$"
value="47" />
<combo_box.item
label="Fraud &gt; Land"
+ name="Fraud__Land"
value="48" />
<combo_box.item
label="Fraud &gt; Pyramid scheme or chain letter"
+ name="Fraud__Pyramid_scheme_or_chain_letter"
value="49" />
<combo_box.item
label="Fraud &gt; US$"
+ name="Fraud__US$"
value="50" />
<combo_box.item
label="Harassment &gt; Advert farms / visual spam"
+ name="Harassment__Advert_farms___visual_spam"
value="51" />
<combo_box.item
label="Harassment &gt; Defaming individuals or groups"
+ name="Harassment__Defaming_individuals_or_groups"
value="52" />
<combo_box.item
label="Harassment &gt; Impeding movement"
+ name="Harassment__Impeding_movement"
value="53" />
<combo_box.item
label="Harassment &gt; Sexual harassment"
+ name="Harassment__Sexual_harassment"
value="54" />
<combo_box.item
label="Harassment &gt; Solicting/inciting others to violate ToS"
+ name="Harassment__Solicting_inciting_others_to_violate_ToS"
value="55" />
<combo_box.item
label="Harassment &gt; Verbal abuse"
+ name="Harassment__Verbal_abuse"
value="56" />
<combo_box.item
label="Indecency &gt; Broadly offensive content or conduct"
+ name="Indecency__Broadly_offensive_content_or_conduct"
value="57" />
<combo_box.item
label="Indecency &gt; Inappropriate avatar name"
+ name="Indecency__Inappropriate_avatar_name"
value="59" />
<combo_box.item
label="Indecency &gt; Inappropriate content or conduct in a PG region"
+ name="Indecency__Mature_content_in_PG_region"
value="60" />
<combo_box.item
label="Indecency &gt; Inappropriate content or conduct in a Mature region"
+ name="Indecency__Inappropriate_content_in_Mature_region"
value="69" />
<combo_box.item
label="Intellectual property infringement &gt; Content Removal"
+ name="Intellectual_property_infringement_Content_Removal"
value="66" />
<combo_box.item
label="Intellectual property infringement &gt; CopyBot or Permissions Exploit"
+ name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit"
value="37" />
<combo_box.item
label="Intolerance"
+ name="Intolerance"
value="61" />
<combo_box.item
label="Land &gt; Abuse of sandbox resources"
+ name="Land__Abuse_of_sandbox_resources"
value="62" />
<combo_box.item
label="Land &gt; Encroachment &gt; Objects/textures"
+ name="Land__Encroachment__Objects_textures"
value="63" />
<combo_box.item
label="Land &gt; Encroachment &gt; Particles"
+ name="Land__Encroachment__Particles"
value="64" />
<combo_box.item
label="Land &gt; Encroachment &gt; Trees/plants"
+ name="Land__Encroachment__Trees_plants"
value="65" />
<combo_box.item
label="Wagering/gambling"
+ name="Wagering_gambling"
value="67" />
<combo_box.item
label="Other"
+ name="Other"
value="68" />
</combo_box>
<text
diff --git a/indra/newview/skins/default/xui/en/floater_sell_land.xml b/indra/newview/skins/default/xui/en/floater_sell_land.xml
index 26c805c0f7..85e35926ab 100644
--- a/indra/newview/skins/default/xui/en/floater_sell_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_sell_land.xml
@@ -1,25 +1,25 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
can_minimize="false"
- height="485"
+ height="600"
layout="topleft"
name="sell land"
title="Sell Land"
- width="450">
+ width="280">
<texture_picker
enabled="false"
follows="top|left"
height="135"
layout="topleft"
- left="244"
+ left="50"
name="info_image"
- right="424"
- top="40"
+ right="230"
+ top="20"
width="180" />
<text
type="string"
length="1"
- bottom_delta="-144"
+ top="145"
follows="top|left"
layout="topleft"
left="16"
@@ -61,19 +61,19 @@
left="56"
name="info_size"
right="-20">
- [AREA] sq. m.
+ [AREA] m²
</text>
<text
type="string"
length="1"
follows="top|left"
- font="SansSerifHuge"
+ font="SansSerifBig"
height="24"
layout="topleft"
left="16"
name="info_action"
text_color="white"
- top="141"
+ top="190"
width="200">
To sell this parcel:
</text>
@@ -84,14 +84,14 @@
layout="topleft"
left="0"
name="step_price"
- top="167"
+ top="211"
width="64" />
<text
type="string"
length="1"
bottom_delta="-38"
follows="top|left"
- font="SansSerifBig"
+ font="SansSerif"
height="16"
layout="topleft"
left="72"
@@ -108,7 +108,7 @@
left="72"
name="price_text"
right="-20">
- Choose an appropriate price for this land.
+ Choose an appropriate price.
</text>
<text
type="string"
@@ -137,11 +137,11 @@
length="1"
height="16"
layout="topleft"
- left_pad="10"
+ left="72"
name="price_per_m"
- top_delta="0"
+ top_delta="25"
width="200">
- (L$[PER_METER] per square meter)
+ (L$[PER_METER] per m²)
</text>
<icon
follows="top|left"
@@ -156,7 +156,7 @@
length="1"
bottom_delta="-38"
follows="top|left"
- font="SansSerifBig"
+ font="SansSerif"
height="16"
layout="topleft"
left="72"
@@ -173,7 +173,8 @@
left="72"
name="sell_to_text"
right="-20">
- Choose whether to sell to anyone or a particular buyer.
+ Choose whether to sell to anyone
+or a particular buyer.
</text>
<combo_box
follows="top|right"
@@ -181,17 +182,20 @@
layout="topleft"
left_delta="0"
name="sell_to"
- top_delta="16"
- width="140">
+ top_delta="32"
+ width="130">
<combo_box.item
enabled="false"
- label="select one --"
+ label="-- select one --"
+ name="--selectone--"
value="select" />
<combo_box.item
label="Anyone"
+ name="Anyone"
value="anyone" />
<combo_box.item
label="Specific user:"
+ name="Specificuser:"
value="user" />
</combo_box>
<line_editor
@@ -202,10 +206,11 @@
left_delta="0"
name="sell_to_agent"
top_pad="4"
- width="150" />
+ width="130" />
<button
height="16"
- label="Select..."
+ font="SansSerifSmall"
+ label="Select"
layout="topleft"
left_pad="5"
name="sell_to_select_agent"
@@ -224,7 +229,7 @@
length="1"
bottom_delta="-38"
follows="top|left"
- font="SansSerifBig"
+ font="SansSerif"
height="16"
layout="topleft"
left="72"
@@ -235,16 +240,18 @@
<text
type="string"
length="1"
+ font="SansSerifSmall"
bottom_delta="20"
follows="top|left"
height="16"
layout="topleft"
left="72"
name="sell_objects_text">
- Land owner&apos;s transferable objects on parcel will change ownership.
+ Land owner&apos;s transferable objects
+on parcel will change ownership.
</text>
<radio_group
- bottom_delta="44"
+ top_pad="15"
follows="top|right"
height="40"
layout="topleft"
@@ -275,21 +282,22 @@
</radio_group>
<button
height="16"
+ font="SansSerifSmall"
label="Show Objects"
layout="topleft"
name="show_objects"
- right="414"
- top="393"
+ left="100"
+ top_pad="10"
width="110" />
<text
type="string"
length="1"
- bottom_delta="35"
+ bottom_delta="30"
follows="top|left"
font="SansSerifBig"
height="16"
layout="topleft"
- left="72"
+ left="16"
name="nag_message_label"
right="-20">
REMEMBER: All sales are final.
@@ -297,19 +305,21 @@
<button
follows="bottom|left"
height="20"
+ font="SansSerifSmall"
label="Set Land For Sale"
layout="topleft"
left_delta="0"
name="sell_btn"
- top_pad="15"
+ top_pad="10"
width="130" />
<button
follows="bottom|right"
height="20"
+ font="SansSerifSmall"
label="Cancel"
layout="topleft"
- left_pad="152"
+ left_pad="30"
name="cancel_btn"
top_delta="0"
width="90" />
-</floater>
+</floater> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/floater_settings_debug.xml b/indra/newview/skins/default/xui/en/floater_settings_debug.xml
index 9a73ffb1a2..3c046fa5d7 100644
--- a/indra/newview/skins/default/xui/en/floater_settings_debug.xml
+++ b/indra/newview/skins/default/xui/en/floater_settings_debug.xml
@@ -40,9 +40,11 @@
width="100">
<combo_box.item
label="TRUE"
+ name="TRUE"
value="true" />
<combo_box.item
label="FALSE"
+ name="FALSE"
value="" />
<combo_box.commit_callback
function="CommitSettings" />
diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml
index f3d8938ea2..1d2978adb8 100644
--- a/indra/newview/skins/default/xui/en/floater_snapshot.xml
+++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml
@@ -172,18 +172,23 @@
width="115">
<combo_box.item
label="Current Window"
+ name="CurrentWindow"
value="[i0,i0]" />
<combo_box.item
label="640x480"
+ name="640x480"
value="[i640,i480]" />
<combo_box.item
label="800x600"
+ name="800x600"
value="[i800,i600]" />
<combo_box.item
label="1024x768"
+ name="1024x768"
value="[i1024,i768]" />
<combo_box.item
label="Custom"
+ name="Custom"
value="[i-1,i-1]" />
</combo_box>
<combo_box
@@ -196,18 +201,23 @@
width="115">
<combo_box.item
label="Current Window"
+ name="CurrentWindow"
value="[i0,i0]" />
<combo_box.item
label="Small (128x128)"
+ name="Small(128x128)"
value="[i128,i128]" />
<combo_box.item
label="Medium (256x256)"
+ name="Medium(256x256)"
value="[i256,i256]" />
<combo_box.item
label="Large (512x512)"
+ name="Large(512x512)"
value="[i512,i512]" />
<combo_box.item
label="Custom"
+ name="Custom"
value="[i-1,i-1]" />
</combo_box>
<combo_box
@@ -220,27 +230,35 @@
width="115">
<combo_box.item
label="Current Window"
+ name="CurrentWindow"
value="[i0,i0]" />
<combo_box.item
label="320x240"
+ name="320x240"
value="[i320,i240]" />
<combo_box.item
label="640x480"
+ name="640x480"
value="[i640,i480]" />
<combo_box.item
label="800x600"
+ name="800x600"
value="[i800,i600]" />
<combo_box.item
label="1024x768"
+ name="1024x768"
value="[i1024,i768]" />
<combo_box.item
label="1280x1024"
+ name="1280x1024"
value="[i1280,i1024]" />
<combo_box.item
label="1600x1200"
+ name="1600x1200"
value="[i1600,i1200]" />
<combo_box.item
label="Custom"
+ name="Custom"
value="[i-1,i-1]" />
</combo_box>
<combo_box
@@ -252,11 +270,14 @@
top_delta="0"
width="70">
<combo_box.item
- label="PNG" />
+ label="PNG"
+ name="PNG" />
<combo_box.item
- label="JPEG" />
+ label="JPEG"
+ name="JPEG" />
<combo_box.item
- label="BMP" />
+ label="BMP"
+ name="BMP" />
</combo_box>
<spinner
allow_text_entry="false"
@@ -329,12 +350,15 @@
width="145">
<combo_box.item
label="Colors"
+ name="Colors"
value="colors" />
<combo_box.item
label="Depth"
+ name="Depth"
value="depth" />
<combo_box.item
label="Object Mattes"
+ name="ObjectMattes"
value="objects" />
</combo_box>
<check_box
diff --git a/indra/newview/skins/default/xui/en/floater_telehub.xml b/indra/newview/skins/default/xui/en/floater_telehub.xml
index bcec046456..ef9aef7f6f 100644
--- a/indra/newview/skins/default/xui/en/floater_telehub.xml
+++ b/indra/newview/skins/default/xui/en/floater_telehub.xml
@@ -4,7 +4,7 @@
layout="topleft"
name="telehub"
title="Telehub"
- width="272">
+ width="280">
<text
type="string"
length="1"
diff --git a/indra/newview/skins/default/xui/en/floater_test_checkbox.xml b/indra/newview/skins/default/xui/en/floater_test_checkbox.xml
index 5a17ffefac..021474d7ab 100644
--- a/indra/newview/skins/default/xui/en/floater_test_checkbox.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_checkbox.xml
@@ -69,15 +69,4 @@
name="font_checkbox"
top_pad="14"
width="150" />
- <check_box
- height="16"
- label="Custom Button"
- layout="topleft"
- left_delta="0"
- name="check_button_checkbox"
- top_pad="14"
- width="150">
- <check_box.check_button
- image_unselected="close_in_blue.tga" />
- </check_box>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_test_combobox.xml b/indra/newview/skins/default/xui/en/floater_test_combobox.xml
index 4bc1b8b644..06422d6a26 100644
--- a/indra/newview/skins/default/xui/en/floater_test_combobox.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_combobox.xml
@@ -28,12 +28,15 @@
width="155">
<combo_box.item
label="My Last Location"
+ name="MyLastLocation"
value="last" />
<combo_box.item
label="My Home"
+ name="MyHome"
value="home" />
<combo_box.item
label="&lt;Type region name&gt;"
+ name="Typeregionname"
value="" />
</combo_box>
<text
@@ -55,9 +58,11 @@
width="150">
<combo_box.item
label="First Item"
+ name="item1"
value="first" />
<combo_box.item
label="Second Item"
+ name="item2"
value="second" />
</combo_box>
<text
@@ -80,9 +85,11 @@
width="150">
<combo_box.item
label="First Item"
+ name="item1"
value="first" />
<combo_box.item
label="Second Item"
+ name="item2"
value="second" />
</combo_box>
<text
@@ -101,14 +108,16 @@
initial_value="second"
layout="topleft"
left_delta="0"
- name="text_entry_combo"
+ name="text_entry_combo2"
top_pad="2"
width="150">
<combo_box.item
label="First Item"
+ name="item1"
value="first" />
<combo_box.item
label="Second Item"
+ name="item2"
value="second" />
</combo_box>
<text
@@ -132,12 +141,15 @@
width="150">
<combo_box.item
label="CA"
+ name="item1"
value="ca" />
<combo_box.item
label="NY"
+ name="item2"
value="ny" />
<combo_box.item
label="TX"
+ name="item3"
value="tx" />
</combo_box>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_test_line_editor.xml b/indra/newview/skins/default/xui/en/floater_test_line_editor.xml
new file mode 100644
index 0000000000..a17e3ea949
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_test_line_editor.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ can_resize="true"
+ height="400"
+ layout="topleft"
+ name="floater_test_line_editor"
+ width="400">
+ <line_editor
+ height="20"
+ layout="topleft"
+ left="10"
+ name="enabled_line_editor"
+ top="40"
+ tool_tip="enabled line editor"
+ width="200">
+ Enabled line editor
+ </line_editor>
+ <line_editor
+ enabled="false"
+ height="20"
+ layout="topleft"
+ left_delta="0"
+ name="disabled_line_editor"
+ top_pad="10"
+ tool_tip="disabled line editor"
+ width="200">
+ Disabled line editor
+ </line_editor>
+ <line_editor
+ height="20"
+ layout="topleft"
+ left_delta="0"
+ name="enabled_colored_line_editor"
+ text_color="1 0 0 1"
+ top_pad="10"
+ tool_tip="enabled colored line editor"
+ width="200">
+ Enabled red-text line editor
+ </line_editor>
+ <line_editor
+ enabled="false"
+ height="20"
+ layout="topleft"
+ left_delta="0"
+ name="disabled_colored_line_editor"
+ text_readonly_color="1 0 0 1"
+ top_pad="10"
+ tool_tip="disabled colored line editor"
+ width="200">
+ Disabled red-text line editor
+ </line_editor>
+ <!-- "search_editor" is a specialized line_editor that shows read-only
+ help text until the user clicks in the widget. -->
+ <search_editor
+ follows="left|top|right"
+ height="20"
+ label="Type here to search"
+ layout="topleft"
+ left_delta="0"
+ name="search editor"
+ tool_tip="search editor"
+ top_pad="10"
+ width="200" />
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_test_list_view.xml b/indra/newview/skins/default/xui/en/floater_test_list_view.xml
new file mode 100644
index 0000000000..3991a4a82b
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_test_list_view.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ can_resize="true"
+ height="400"
+ layout="topleft"
+ name="floater_test_list_view"
+ width="400">
+ <list_view
+ height="300"
+ left="10"
+ name="test_list_view"
+ top="28"
+ width="300" />
+ <button
+ name="test_1_btn"
+ label="Test 1"
+ top="350"
+ left="10"
+ height="20"
+ width="80"
+ commit_callback.function="TestListView.Test1" />
+ <button
+ name="test_2_btn"
+ label="Test 2"
+ top_delta="0"
+ left_pad="10"
+ height="20"
+ width="80"
+ commit_callback.function="TestListView.Test2" />
+
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_test_navigation_bar.xml b/indra/newview/skins/default/xui/en/floater_test_navigation_bar.xml
new file mode 100644
index 0000000000..21956c2eac
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_test_navigation_bar.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ can_resize="true"
+ height="200"
+ layout="topleft"
+ name="floater_test_navigation_bar"
+ width="900">
+ <panel
+ name="navigation_bar"
+ filename="panel_navigation_bar.xml"
+ left="10"
+ right="-10"
+ top="30"
+ height="100"
+ border="true"
+ />
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_test_widgets.xml b/indra/newview/skins/default/xui/en/floater_test_widgets.xml
index 9a2602db75..c6c561b497 100644
--- a/indra/newview/skins/default/xui/en/floater_test_widgets.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_widgets.xml
@@ -126,8 +126,10 @@
tool_tip="combo box"
name="test_combo_box">
<combo_box.item
+ name="item1"
label="Combobox Item 1" />
<combo_box.item
+ name="item2"
label="Combobox Item 2" />
</combo_box>
<!-- "icon" is a read-only image. The image_name must match an entry
@@ -154,9 +156,9 @@
width="200">
Line Editor Sample Text
</line_editor>
- <!-- "search_editor" is a specialized line_editor that shows read-only
+ <!-- "filter_editor" is a specialized line_editor that shows read-only
help text until the user clicks in the widget. -->
- <search_editor
+ <filter_editor
follows="left|top|right"
height="20"
label="Type here to search"
@@ -228,11 +230,11 @@
tool_tip="scroll list"
layout="topleft">
<scroll_list.columns
- dynamicwidth="true"
+ dynamic_width="true"
name="first_column"
label="Column A"/>
<scroll_list.columns
- dynamicwidth="true"
+ dynamic_width="true"
name="second_column"
label="Column B"/>
</scroll_list>
diff --git a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml
index 8d85519610..dc048eb352 100644
--- a/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml
+++ b/indra/newview/skins/default/xui/en/floater_texture_ctrl.xml
@@ -86,7 +86,7 @@
name="show_folders_check"
top="20"
width="201" />
- <search_editor
+ <filter_editor
follows="left|top|right"
height="16"
label="Type here to search"
diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml
index 17b73b47ab..51e4d15e5d 100644
--- a/indra/newview/skins/default/xui/en/floater_tools.xml
+++ b/indra/newview/skins/default/xui/en/floater_tools.xml
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
- follows="left|top"
- height="550"
+ follows="left|top|right"
+ height="615"
layout="topleft"
name="toolbox floater"
save_rect="true"
- short_title="Build"
+ short_title="Build Tools"
single_instance="true"
sound_flags="0"
- width="272">
+ width="280">
<floater.string
name="status_rotate">
Drag colored bands to rotate object
@@ -69,11 +69,10 @@
image_selected="tool_zoom_active.tga"
image_unselected="tool_zoom.tga"
layout="topleft"
- left="4"
+ left="10"
name="button focus"
picture_style="true"
tool_tip="Focus"
- top="2"
width="32" />
<button
follows="left|top"
@@ -83,11 +82,10 @@
image_selected="tool_grab_active.tga"
image_unselected="tool_grab.tga"
layout="topleft"
- left_pad="4"
+ left_pad="8"
name="button move"
picture_style="true"
tool_tip="Move"
- top_delta="0"
width="32" />
<button
follows="left|top"
@@ -97,11 +95,10 @@
image_selected="tool_face_active.tga"
image_unselected="tool_face.tga"
layout="topleft"
- left_pad="4"
+ left_pad="8"
name="button edit"
picture_style="true"
tool_tip="Edit"
- top_delta="0"
width="32" />
<button
follows="left|top"
@@ -111,11 +108,10 @@
image_selected="tool_create_active.tga"
image_unselected="tool_create.tga"
layout="topleft"
- left_pad="4"
+ left_pad="8"
name="button create"
picture_style="true"
tool_tip="Create"
- top_delta="0"
width="32" />
<button
follows="left|top"
@@ -125,221 +121,179 @@
image_selected="tool_dozer_active.tga"
image_unselected="tool_dozer.tga"
layout="topleft"
- left_pad="4"
+ left_pad="8"
name="button land"
picture_style="true"
tool_tip="Land"
- top_delta="0"
width="32" />
- <slider_bar
+ <text
+ type="string"
+ text_color="LabelSelectedDisabledColor"
+ length="1"
follows="left|top"
- height="14"
- increment="0.01"
- initial_value="0.125"
layout="topleft"
- left="114"
- max_val="0.5"
- name="slider zoom"
- top="55"
- width="134" />
- <radio_group
- draw_border="false"
- height="45"
+ left="8"
+ name="text status"
+ top_pad="3"
+ width="280">
+ Drag to move, shift-drag to copy
+ </text>
+ <radio_group
layout="topleft"
- left_delta="-110"
- name="focus_radio_group"
- top_delta="0"
- width="114">
+ left="10"
+ height="70"
+ top="54"
+ name="focus_radio_group">
<radio_item
- height="16"
+ top_pad="6"
label="Zoom"
layout="topleft"
- left="0"
- name="radio zoom"
- top="-1"
- width="114" />
+ name="radio zoom" />
<radio_item
- height="16"
+ top_pad="6"
label="Orbit (Ctrl)"
layout="topleft"
- left_delta="0"
- name="radio orbit"
- top_delta="15"
- width="114" />
+ name="radio orbit" />
<radio_item
- height="16"
+ top_pad="6"
label="Pan (Ctrl-Shift)"
layout="topleft"
- left_delta="0"
- name="radio pan"
- top_delta="15"
- width="114" />
+ name="radio pan" />
</radio_group>
- <radio_group
- draw_border="false"
- height="45"
+ <slider_bar
+ follows="left|top"
+ height="14"
+ increment="0.01"
+ initial_value="0.125"
layout="topleft"
- left_delta="0"
- name="move_radio_group"
- top_delta="0"
- width="114">
+ max_val="0.5"
+ top_delta="-2"
+ left_delta="100"
+ name="slider zoom"
+ width="134" />
+ <radio_group
+ left="10"
+ height="70"
+ top="54"
+ layout="topleft"
+ name="move_radio_group">
<radio_item
- height="16"
+ top_pad="6"
label="Move"
layout="topleft"
- left="0"
- name="radio move"
- top="-1"
- width="114" />
+ name="radio move" />
<radio_item
- height="16"
+ top_pad="6"
label="Lift (Ctrl)"
layout="topleft"
- left_delta="0"
- name="radio lift"
- top_delta="15"
- width="114" />
+ name="radio lift" />
<radio_item
- height="16"
+ top_pad="6"
label="Spin (Ctrl-Shift)"
layout="topleft"
- left_delta="0"
- name="radio spin"
- top_delta="15"
- width="114" />
- </radio_group>
+ name="radio spin" />
+ </radio_group>
<radio_group
- draw_border="false"
- height="60"
+ follows="left|top"
+ left="10"
+ top="54"
+ height="70"
layout="topleft"
- left_delta="0"
- name="edit_radio_group"
- top_delta="0"
- width="114">
+ name="edit_radio_group">
<radio_item
- height="16"
- label="Position"
+ label="Move"
layout="topleft"
- left="0"
- name="radio position"
- top="-1"
- width="114" />
+ name="radio position" />
<radio_item
- height="16"
+ top_pad="6"
label="Rotate (Ctrl)"
layout="topleft"
- left_delta="0"
- name="radio rotate"
- top_delta="15"
- width="114" />
+ name="radio rotate" />
<radio_item
- height="16"
+ top_pad="6"
label="Stretch (Ctrl-Shift)"
layout="topleft"
- left_delta="0"
- name="radio stretch"
- top_delta="15"
- width="123" />
+ name="radio stretch" />
<radio_item
- height="16"
+ top_pad="6"
label="Select Texture"
layout="topleft"
- left_delta="0"
- name="radio select face"
- top_delta="15"
- width="114" />
+ name="radio select face" />
</radio_group>
<check_box
- control_name="EditLinkedParts"
- height="16"
- label="Edit linked parts"
- layout="topleft"
- left_delta="0"
- name="checkbox edit linked parts"
- top_pad="3"
- width="114" />
- <text
- type="string"
- length="1"
+ left="10"
follows="left|top"
- height="14"
+ control_name="EditLinkedParts"
+ label="Edit linked prims"
layout="topleft"
- left_delta="2"
- name="text ruler mode"
- top_pad="6"
- width="68">
+ name="checkbox edit linked parts" />
+ <text
+ left="10"
+ type="string"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ name="text ruler mode">
Ruler:
</text>
<combo_box
- height="20"
+ height="19"
+ left="30"
layout="topleft"
- left_delta="40"
+ follows="left|top"
name="combobox grid mode"
- top_delta="-2"
- width="86">
+ width="90">
<combo_box.item
label="World"
+ name="World"
value="World" />
<combo_box.item
label="Local"
+ name="Local"
value="Local" />
<combo_box.item
label="Reference"
+ name="Reference"
value="Reference" />
</combo_box>
<check_box
control_name="ScaleUniform"
- height="16"
+ height="19"
label="Stretch Both Sides"
layout="topleft"
left="143"
name="checkbox uniform"
- top="54"
+ top="54"
width="134" />
<check_box
control_name="ScaleStretchTextures"
- height="16"
+ height="19"
initial_value="true"
label="Stretch Textures"
layout="topleft"
- left_delta="0"
name="checkbox stretch textures"
top_pad="1"
width="134" />
<check_box
control_name="SnapEnabled"
- height="16"
+ height="19"
initial_value="true"
label="Use Grid"
layout="topleft"
- left_delta="0"
name="checkbox snap to grid"
top_pad="1"
width="134" />
<button
follows="left|top"
font="SansSerifSmall"
- height="20"
+ height="19"
+ left_delta="40"
+ top_delta="20"
label="Options..."
label_selected="Options..."
layout="topleft"
- left_delta="20"
name="Options..."
- top="103"
- valign="center"
- width="80" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="4"
- name="text status"
- top="36"
- width="264">
- Drag to move, shift-drag to copy
- </text>
+ width="78" />
<button
follows="left|top"
height="24"
@@ -348,11 +302,11 @@
image_selected="object_cube_active.tga"
image_unselected="object_cube.tga"
layout="topleft"
- left_delta="0"
+ left="4"
name="ToolCube"
picture_style="true"
tool_tip="Cube"
- top_delta="15"
+ top="51"
width="24" />
<button
follows="left|top"
@@ -552,8 +506,8 @@
width="24" />
<check_box
control_name="CreateToolKeepSelected"
- height="16"
- label="Keep selected"
+ height="19"
+ label="Keep Tool selected"
layout="topleft"
left="4"
name="checkbox sticky"
@@ -561,8 +515,8 @@
width="128" />
<check_box
control_name="CreateToolCopySelection"
- height="16"
- label="Copy selected"
+ height="19"
+ label="Copy selection"
layout="topleft"
left_delta="0"
name="checkbox copy selection"
@@ -570,9 +524,9 @@
width="134" />
<check_box
control_name="CreateToolCopyCenters"
- height="16"
+ height="19"
initial_value="true"
- label="Center"
+ label="Center Copy"
layout="topleft"
left_delta="18"
name="checkbox copy centers"
@@ -580,15 +534,14 @@
width="134" />
<check_box
control_name="CreateToolCopyRotates"
- height="16"
- label="Rotate"
+ height="19"
+ label="Rotate Copy"
layout="topleft"
left_delta="0"
name="checkbox copy rotates"
top_delta="16"
width="134" />
<radio_group
- draw_border="false"
height="105"
layout="topleft"
left="4"
@@ -596,7 +549,7 @@
top="54"
width="114">
<radio_item
- height="16"
+ height="19"
label="Select Land"
layout="topleft"
left="0"
@@ -604,7 +557,7 @@
top="-1"
width="114" />
<radio_item
- height="16"
+ height="19"
label="Flatten"
layout="topleft"
left_delta="0"
@@ -612,7 +565,7 @@
top_delta="15"
width="114" />
<radio_item
- height="16"
+ height="19"
label="Raise"
layout="topleft"
left_delta="0"
@@ -620,7 +573,7 @@
top_delta="15"
width="114" />
<radio_item
- height="16"
+ height="19"
label="Lower"
layout="topleft"
left_delta="0"
@@ -628,7 +581,7 @@
top_delta="15"
width="114" />
<radio_item
- height="16"
+ height="19"
label="Smooth"
layout="topleft"
left_delta="0"
@@ -636,7 +589,7 @@
top_delta="15"
width="114" />
<radio_item
- height="16"
+ height="19"
label="Roughen"
layout="topleft"
left_delta="0"
@@ -644,7 +597,7 @@
top_delta="15"
width="114" />
<radio_item
- height="16"
+ height="19"
label="Revert"
layout="topleft"
left_delta="0"
@@ -652,27 +605,16 @@
top_delta="15"
width="114" />
</radio_group>
- <button
- follows="left|top"
- font="SansSerifSmall"
- height="20"
- label="Apply"
- label_selected="Apply"
- layout="topleft"
- left_delta="112"
- name="button apply to selection"
- tool_tip="Modify Selected Land"
- top_delta="-2"
- width="78" />
+
<text
type="string"
length="1"
follows="left|top"
height="12"
layout="topleft"
- left_delta="2"
+ left="125"
name="Bulldozer:"
- top_pad="4"
+ top="57"
width="100">
Bulldozer:
</text>
@@ -682,22 +624,22 @@
follows="left|top"
height="12"
layout="topleft"
- left="132"
name="Dozer Size:"
- top="94"
- width="100">
+ left="135"
+ top_pad="5"
+ width="50">
Size
</text>
<slider_bar
follows="left|top"
- height="16"
+ height="19"
initial_value="2.0"
layout="topleft"
- left_delta="46"
max_val="11"
min_val="1"
+ left_pad="0"
name="slider brush size"
- top_delta="0"
+ top_delta="-3"
width="80" />
<text
type="string"
@@ -705,71 +647,79 @@
follows="left|top"
height="12"
layout="topleft"
- left="132"
name="Strength:"
- top="116"
- width="100">
+ left="135"
+ top_pad="5"
+ width="50">
Strength
</text>
<slider_bar
follows="left|top"
- height="16"
+ height="19"
+ left_pad="0"
initial_value="0.00"
layout="topleft"
- left_delta="46"
max_val="2"
min_val="-1"
name="slider force"
- top_delta="0"
+ top_delta="-3"
width="80" />
+ <button
+ follows="left|top"
+ font="SansSerifSmall"
+ height="19"
+ label="Apply"
+ label_selected="Apply"
+ top_pad="5"
+ layout="topleft"
+ left="135"
+ name="button apply to selection"
+ tool_tip="Modify Selected Land"
+ width="78" />
<text
type="string"
+ text_color="LabelSelectedDisabledColor"
length="1"
+ top_pad="7"
+ height="12"
follows="left|top"
halign="right"
- height="16"
layout="topleft"
- left="118"
+ left="115"
name="obj_count"
- top="135"
width="143">
- Selected objects: [COUNT]
+ Objects: [COUNT]
</text>
<text
type="string"
+ text_color="LabelSelectedDisabledColor"
length="1"
follows="left|top"
halign="right"
- height="16"
layout="topleft"
- left_delta="0"
name="prim_count"
- top_delta="12"
width="143">
- primitives: [COUNT]
+ Prims: [COUNT]
</text>
<tab_container
follows="left|top"
- height="384"
+ height="400"
layout="topleft"
left="0"
name="Object Info Tabs"
- tab_max_width="52"
+ tab_max_width="55"
tab_min_width="40"
tab_position="top"
- top="166"
- width="272">
+ top="180"
+ width="280">
<panel
- border="true"
+ border="false"
follows="left|top|right|bottom"
- height="367"
label="General"
layout="topleft"
- left="1"
mouse_opaque="false"
name="General"
- top="16"
- width="270">
+ top="16">
<panel.string
name="text deed continued">
Deed...
@@ -780,35 +730,35 @@
</panel.string>
<panel.string
name="text modify info 1">
- You can modify this object.
+ You can modify this object
</panel.string>
<panel.string
name="text modify info 2">
- You can modify these objects.
+ You can modify these objects
</panel.string>
<panel.string
name="text modify info 3">
- You cannot modify this object.
+ You can't modify this object
</panel.string>
<panel.string
name="text modify info 4">
- You cannot modify these objects.
+ You can't modify these objects
</panel.string>
<panel.string
name="text modify warning">
- Must select entire object to set permissions.
+ This object has linked parts
</panel.string>
<panel.string
name="Cost Default">
- Price: L$
+ Price: L$
</panel.string>
<panel.string
name="Cost Total">
- Total Price: L$
+ Total Price: L$
</panel.string>
<panel.string
name="Cost Per Unit">
- Price Per: L$
+ Price Per: L$
</panel.string>
<panel.string
name="Cost Mixed">
@@ -826,17 +776,15 @@
layout="topleft"
left="10"
name="Name:"
- top="10"
- width="78">
+ top_pad="8"
+ width="90">
Name:
</text>
<line_editor
- border_style="line"
- border_thickness="1"
follows="left|top|right"
- height="16"
+ height="19"
layout="topleft"
- left_delta="78"
+ left_pad="0"
max_length="63"
name="Object Name"
select_on_focus="true"
@@ -850,414 +798,447 @@
layout="topleft"
left="10"
name="Description:"
- top="30"
- width="78">
+ top_pad="3"
+ width="90">
Description:
</text>
<line_editor
- border_style="line"
- border_thickness="1"
follows="left|top|right"
- height="16"
+ height="19"
layout="topleft"
- left_delta="78"
+ left_pad="0"
max_length="127"
name="Object Description"
select_on_focus="true"
top_delta="0"
width="172" />
+
<text
type="string"
+ left="10"
length="1"
follows="left|top"
- height="16"
+ height="19"
layout="topleft"
- left="10"
name="Creator:"
- top="50"
- width="78">
+ width="90">
Creator:
</text>
+<!-- TODO: add person inspector to creator name -->
<text
type="string"
length="1"
follows="left|top"
- height="16"
+ left_pad="0"
+ height="19"
layout="topleft"
- left_delta="78"
name="Creator Name"
- top_delta="0"
- width="88">
+ width="150">
Thrax Linden
</text>
- <button
+<!--TODO: Kill this-->
+<!-- <button
follows="top|right"
font="SansSerifSmall"
- height="20"
+ height="19"
label="Profile..."
label_selected="Profile..."
layout="topleft"
left_pad="6"
name="button creator profile"
- top_delta="-4"
- width="78" />
+ tool_tip="View creator profile"
+ width="78" />-->
<text
type="string"
length="1"
+ left="10"
follows="left|top"
- height="16"
+ height="19"
layout="topleft"
- left="10"
name="Owner:"
- top="70"
- width="78">
+ width="90">
Owner:
</text>
+<!--TODO: add person inspector to creator name-->
<text
type="string"
length="1"
follows="left|top"
- height="16"
+ height="19"
layout="topleft"
- left_delta="78"
name="Owner Name"
- top_delta="0"
- width="88">
+ left_pad="0"
+ width="150">
Thrax Linden
</text>
- <button
+<!--TODO: Kill this-->
+<!--<button
follows="top|right"
font="SansSerifSmall"
- height="20"
+ height="19"
label="Profile..."
label_selected="Profile..."
layout="topleft"
left_pad="6"
name="button owner profile"
- top_delta="-4"
- width="78" />
- <text
+ tool_tip="View owner profile"
+ width="78" />-->
+ <text
type="string"
length="1"
follows="left|top"
- height="16"
layout="topleft"
left="10"
+ height="19"
name="Group:"
- top="90"
- width="78">
+ width="90">
Group:
</text>
<name_box
- follows="left|top"
- height="16"
- initial_value="(retrieving)"
- layout="topleft"
- left_delta="78"
- name="Group Name Proxy"
- top_delta="0"
- width="88" />
- <button
- follows="top|right"
- font="SansSerifSmall"
- height="20"
- label="Set..."
- label_selected="Set..."
- layout="topleft"
- left_pad="6"
- name="button set group"
- top_delta="-4"
- width="78" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="10"
- name="Permissions:"
- top="110"
- width="85">
- Permissions:
- </text>
- <text
- type="string"
- length="1"
follows="left|top|right"
- height="16"
+ height="19"
+ initial_value="Loading..."
layout="topleft"
- left_delta="0"
- name="perm_modify"
- top_pad="4"
- width="250">
- You can modify this object.
- </text>
- <check_box
- height="16"
- label="Share with group"
- layout="topleft"
- left_delta="0"
- name="checkbox share with group"
- tool_tip="Allow all members of the set group to share and use your permissions for this object. You must Deed to enable role restrictions."
- top_pad="4"
- width="166" />
+ left_pad="0"
+ name="Group Name Proxy"
+ width="170" />
<button
follows="top|right"
font="SansSerifSmall"
- height="20"
+ height="19"
label="Deed..."
label_selected="Deed..."
layout="topleft"
- left_delta="172"
name="button deed"
- tool_tip="Group shared objects can be deeded by a group officer."
- top="166"
- width="78" />
- <check_box
- height="16"
- label="Allow anyone to move"
- layout="topleft"
- left="10"
- name="checkbox allow everyone move"
- top="190"
- width="142" />
- <check_box
- height="16"
- label="Allow anyone to copy"
- layout="topleft"
- left_delta="0"
- name="checkbox allow everyone copy"
- top_pad="4"
- width="141" />
- <check_box
- height="16"
- label="Show in search"
+ top_pad="0"
+ left="102"
+ tool_tip="Deeding gives this item away with Next Owner permissions. Group shared objects can be deeded by a group officer."
+ width="80" />
+ <button
+ follows="left|top"
+ font="SansSerifSmall"
+ height="19"
+ label="Set..."
+ label_selected="Set..."
layout="topleft"
- left_delta="0"
- name="search_check"
- tool_tip="Let people see this object in search results"
- top_pad="4"
- width="78" />
+ left_pad="7"
+ name="button set group"
+ tool_tip="Choose a group to share this object's permissions"
+ width="80" />
<check_box
- height="16"
- label="For Sale"
- layout="topleft"
- left_delta="0"
- name="checkbox for sale"
- top_pad="4"
- width="78" />
- <text
- type="string"
- length="1"
+ height="19"
follows="left|top"
- height="16"
- layout="topleft"
- left_pad="12"
- name="Cost"
- top_delta="0"
- width="78">
- Price: L$
- </text>
- <line_editor
- border_style="line"
- border_thickness="1"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left_pad="2"
- max_length="25"
- name="Edit Cost"
- top_delta="0"
- width="75" />
- <radio_group
- draw_border="false"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left="42"
- name="sale type"
- top="270"
- width="218">
- <radio_item
- height="16"
- label="Original"
- layout="topleft"
- left="0"
- name="Original"
- top="0"
- width="70" />
- <radio_item
- height="16"
- label="Copy"
- layout="topleft"
- left_delta="70"
- name="Copy"
- top_delta="0"
- width="70" />
- <radio_item
- height="16"
- label="Contents"
- layout="topleft"
- left_delta="70"
- name="Contents"
- top_delta="0"
- width="76" />
- </radio_group>
- <text
- type="string"
- length="1"
- follows="left|top|right"
- height="10"
- layout="topleft"
- left="10"
- name="Next owner can:"
- top="288"
- width="250">
- Next owner can:
- </text>
- <check_box
- follows="left|top|right"
- height="16"
- label="Modify"
- layout="topleft"
- left_delta="0"
- name="checkbox next owner can modify"
- top_pad="6"
- width="250" />
- <check_box
- follows="left|top|right"
- height="16"
- label="Copy"
- layout="topleft"
- left_delta="60"
- name="checkbox next owner can copy"
- top_delta="0"
- width="190" />
- <check_box
- follows="left|top|right"
- height="16"
- label="Resell/Give away"
+ label="Share"
layout="topleft"
- left_delta="60"
- name="checkbox next owner can transfer"
- top_delta="0"
- width="130" />
+ name="checkbox share with group"
+ tool_tip="Allow all members of the set group to share your modify permissions for this object. You must Deed to enable role restrictions."
+ left="100"
+ width="93" />
<text
type="string"
length="1"
follows="left|top"
- height="10"
+ height="19"
layout="topleft"
+ top_pad="7"
left="10"
name="label click action"
- top="322"
- width="150">
- When Left-Clicked:
+ width="90">
+ Click to:
</text>
<combo_box
- height="18"
+ follows="left|top"
+ height="22"
layout="topleft"
- left_delta="0"
name="clickaction"
- top_pad="7"
- width="150">
+ width="170"
+ left_pad="0">
<combo_box.item
- label="Touch/grab (default)"
+ label="Touch (default)"
+ name="Touch/grab(default)"
value="Touch/grab (default)" />
<combo_box.item
label="Sit on object"
+ name="Sitonobject"
value="Sit on object" />
<combo_box.item
label="Buy object"
+ name="Buyobject"
value="Buy object" />
<combo_box.item
label="Pay object"
+ name="Payobject"
value="Pay object" />
<combo_box.item
label="Open"
+ name="Open"
value="Open" />
- <combo_box.item
+<!--TODO: Kill this-->
+<!-- <combo_box.item
label="Play parcel media"
+ name="Play"
value="Play" />
<combo_box.item
label="Open parcel media"
- value="Open Media" />
+ name="Opemmedia"
+ value="Open Media" />-->
</combo_box>
+ <check_box
+ height="20"
+ label="For Sale:"
+ layout="topleft"
+ name="checkbox for sale"
+ left="10"
+ width="90" />
+<!-- NEW SALE TYPE COMBO BOX -->
+ <combo_box
+ left_pad="0"
+ layout="topleft"
+ follows="left|top"
+ allow_text_entry="false"
+ height="22"
+ width="170"
+ max_chars="20"
+ mouse_opaque="true"
+ name="sale type"
+ intial_value="2">
+ <combo_item
+ label="Copy"
+ value="2" />
+ <combo_item
+ label="Contents"
+ value="3" />
+ <combo_item
+ label="Original"
+ value="1" />
+ </combo_box>
+<!-- NEW PRICE SPINNER -->
+ <spinner
+ follows="left|top"
+ decimal_digits="0"
+ increment="1"
+ control_name="Edit Cost"
+ name="Edit Cost"
+ label="Price: L$"
+ label_width="60"
+ width="170"
+ min_val="1"
+ height="19"
+ max_val="999999999" />
+ <panel
+ border="false"
+ follows="left|top|right"
+ layout="topleft"
+ mouse_opaque="false"
+ background_visible="true"
+ bg_alpha_color="FloaterUnfocusBorderColor"
+ name="perms_build"
+ left="0"
+ height="140"
+ width="280">
<text
type="string"
length="1"
+ left="10"
+ top_pad="6"
+ height="19"
+ follows="left|top|right"
+ layout="topleft"
+ name="perm_modify"
+ width="180">
+ You can modify this object
+ </text>
+ <text
+ type="string"
+ text_color="LabelSelectedDisabledColor"
+ length="1"
+ top_pad="0"
follows="left|top"
- height="10"
layout="topleft"
- left="88"
+ left="17"
name="B:"
- top="105"
- width="174">
+ width="30">
B:
</text>
<text
type="string"
+ text_color="LabelSelectedDisabledColor"
length="1"
follows="left|top"
- height="10"
layout="topleft"
- left_delta="50"
+ left_pad="0"
name="O:"
- top_delta="0"
- width="124">
- O;
+ width="30">
+ O:
</text>
<text
type="string"
+ text_color="LabelSelectedDisabledColor"
length="1"
follows="left|top"
- height="10"
layout="topleft"
- left_delta="50"
+ left_pad="0"
name="G:"
- top_delta="0"
- width="74">
+ width="30">
G:
</text>
<text
type="string"
+ text_color="LabelSelectedDisabledColor"
length="1"
follows="left|top"
- height="10"
+ left_pad="0"
layout="topleft"
- left="88"
name="E:"
- top="117"
- width="174">
+ width="30">
E:
</text>
<text
type="string"
+ text_color="LabelSelectedDisabledColor"
length="1"
follows="left|top"
- height="10"
layout="topleft"
- left_delta="50"
+ left_pad="0"
name="N:"
- top_delta="0"
- width="124">
+ width="30">
N:
</text>
<text
type="string"
+ text_color="LabelSelectedDisabledColor"
length="1"
follows="left|top"
- height="10"
layout="topleft"
- left_delta="50"
+ left_pad="0"
name="F:"
- top_delta="0"
- width="74">
+ width="30">
F:
</text>
+ <check_box
+ left="15"
+ height="19"
+ label="Show in search"
+ layout="topleft"
+ name="search_check"
+ tool_tip="Let people see this object in search results"
+ />
+ <text
+ type="string"
+ follows="left|top"
+ name="Anyone can:"
+ width="250"
+ top_pad="7"
+ left="10">
+ Anyone:
+ </text>
+ <check_box
+ height="19"
+ label="Move"
+ layout="topleft"
+ name="checkbox allow everyone move"
+ left="15"
+ width="85" />
+ <check_box
+ height="19"
+ label="Copy"
+ layout="topleft"
+ left_pad="0"
+ name="checkbox allow everyone copy"
+ width="260" />
+ <text
+ type="string"
+ follows="left|top"
+ height="19"
+ name="Next owner can:"
+ width="270"
+ left="10">
+ Next owner:
+ </text>
+ <check_box
+ follows="left|top|right"
+ label="Modify"
+ layout="topleft"
+ left="15"
+ name="checkbox next owner can modify"
+ width="85" />
+ <check_box
+ follows="left|top|right"
+ height="19"
+ label="Copy"
+ layout="topleft"
+ left_pad="0"
+ name="checkbox next owner can copy"
+ width="90" />
+ <check_box
+ follows="left|top|right"
+ height="19"
+ label="Transfer"
+ layout="topleft"
+ name="checkbox next owner can transfer"
+ left_pad="0"
+ top_delta="0"
+ tool_tip="Next owner can give away or resell this object"
+ width="90" />
+ </panel>
+<!--TODO: KILL THIS-->
+<!--<text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="19"
+ layout="topleft"
+ left_pad="12"
+ name="Cost"
+ top_delta="0"
+ width="78">
+ Price: L$
+ </text>
+ <line_editor
+ follows="left|top|right"
+ height="19"
+ layout="topleft"
+ left_pad="0"
+ max_length="25"
+ name="Edit Cost"
+ top_delta="0"
+ width="75" />-->
+<!--TODO: KILL THIS-->
+<!--<radio_group
+ follows="left|top|right"
+ height="19"
+ left="15"
+ layout="topleft"
+ name="sale type"
+ width="218">
+ <radio_item
+ height="19"
+ label="Original"
+ layout="topleft"
+ left="0"
+ name="Original"
+ top="0"
+ width="70" />
+ <radio_item
+ height="19"
+ label="Copy"
+ layout="topleft"
+ left_delta="70"
+ name="Copy"
+ top_delta="0"
+ width="70" />
+ <radio_item
+ height="19"
+ label="Contents"
+ layout="topleft"
+ left_delta="70"
+ name="Contents"
+ top_delta="0"
+ width="76" />
+ </radio_group>-->
</panel>
<panel
- border="true"
+ border="false"
follows="left|top|right|bottom"
height="367"
label="Object"
@@ -1266,7 +1247,7 @@
mouse_opaque="false"
name="Object"
top_delta="0"
- width="270">
+ width="280">
<text
type="string"
length="1"
@@ -1292,7 +1273,7 @@
Edit object parameters:
</text>
<check_box
- height="16"
+ height="19"
label="Locked"
layout="topleft"
left_delta="-2"
@@ -1301,7 +1282,7 @@
top_pad="10"
width="123" />
<check_box
- height="16"
+ height="19"
label="Physical"
layout="topleft"
left_delta="0"
@@ -1310,7 +1291,7 @@
top_pad="2"
width="123" />
<check_box
- height="16"
+ height="19"
label="Temporary"
layout="topleft"
left_delta="0"
@@ -1319,7 +1300,7 @@
top_pad="2"
width="123" />
<check_box
- height="16"
+ height="19"
label="Phantom"
layout="topleft"
left_delta="0"
@@ -1327,6 +1308,55 @@
tool_tip="Causes object to not collide with other objects or avatars"
top_pad="2"
width="123" />
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left_delta="0"
+ name="label material"
+ top_pad="9"
+ width="121">
+ Material
+ </text>
+ <combo_box
+ height="19"
+ layout="topleft"
+ left_delta="0"
+ name="material"
+ top_pad="4"
+ width="95">
+ <combo_box.item
+ label="Stone"
+ name="Stone"
+ value="Stone" />
+ <combo_box.item
+ label="Metal"
+ name="Metal"
+ value="Metal" />
+ <combo_box.item
+ label="Glass"
+ name="Glass"
+ value="Glass" />
+ <combo_box.item
+ label="Wood"
+ name="Wood"
+ value="Wood" />
+ <combo_box.item
+ label="Flesh"
+ name="Flesh"
+ value="Flesh" />
+ <combo_box.item
+ label="Plastic"
+ name="Plastic"
+ value="Plastic" />
+ <combo_box.item
+ label="Rubber"
+ name="Rubber"
+ value="Rubber" />
+ </combo_box>
<text
type="string"
length="1"
@@ -1335,13 +1365,13 @@
layout="topleft"
left_delta="2"
name="label position"
- top_pad="4"
+ top_pad="8"
width="121">
Position (meters)
</text>
<spinner
follows="left|top"
- height="16"
+ height="19"
increment="0.01"
initial_value="0"
label="X"
@@ -1352,11 +1382,11 @@
min_val="-256"
name="Pos X"
text_enabled_color="0.43 0.06 0.06 1"
- top_pad="4"
+ top_pad="5"
width="87" />
<spinner
follows="left|top"
- height="16"
+ height="19"
increment="0.01"
initial_value="0"
label="Y"
@@ -1367,11 +1397,11 @@
min_val="-256"
name="Pos Y"
text_enabled_color="0 0.39 0.15 1"
- top_pad="2"
+ top_pad="3"
width="87" />
<spinner
follows="left|top"
- height="16"
+ height="19"
increment="0.01"
initial_value="0"
label="Z"
@@ -1381,7 +1411,7 @@
max_val="4096"
name="Pos Z"
text_enabled_color="0 0.26 0.51 1"
- top_pad="2"
+ top_pad="3"
width="87" />
<text
type="string"
@@ -1397,7 +1427,7 @@
</text>
<spinner
follows="left|top"
- height="16"
+ height="19"
increment="0.01"
initial_value="0"
label="X"
@@ -1408,11 +1438,11 @@
min_val="0.01"
name="Scale X"
text_enabled_color="1 1 1 1"
- top_pad="4"
+ top_pad="5"
width="87" />
<spinner
follows="left|top"
- height="16"
+ height="19"
increment="0.01"
initial_value="0"
label="Y"
@@ -1423,11 +1453,11 @@
min_val="0.01"
name="Scale Y"
text_enabled_color="1 1 1 1"
- top_pad="2"
+ top_pad="3"
width="87" />
<spinner
follows="left|top"
- height="16"
+ height="19"
increment="0.01"
initial_value="0"
label="Z"
@@ -1438,7 +1468,7 @@
min_val="0.01"
name="Scale Z"
text_enabled_color="1 1 1 1"
- top_pad="2"
+ top_pad="3"
width="87" />
<text
type="string"
@@ -1455,7 +1485,7 @@
<spinner
decimal_digits="2"
follows="left|top"
- height="16"
+ height="19"
increment="1"
initial_value="0"
label="X"
@@ -1466,12 +1496,12 @@
min_val="-9999"
name="Rot X"
text_enabled_color="1 1 1 1"
- top_pad="6"
+ top_pad="5"
width="87" />
<spinner
decimal_digits="2"
follows="left|top"
- height="16"
+ height="19"
increment="1"
initial_value="0"
label="Y"
@@ -1482,12 +1512,12 @@
min_val="-9999"
name="Rot Y"
text_enabled_color="1 1 1 1"
- top_pad="2"
+ top_pad="3"
width="87" />
<spinner
decimal_digits="2"
follows="left|top"
- height="16"
+ height="19"
increment="1"
initial_value="0"
label="Z"
@@ -1498,91 +1528,59 @@
min_val="-9999"
name="Rot Z"
text_enabled_color="1 1 1 1"
- top_pad="2"
+ top_pad="3"
width="87" />
+
<text
type="string"
length="1"
follows="left|top"
height="10"
layout="topleft"
- left_delta="0"
- name="label material"
- top_pad="6"
- width="121">
- Material
- </text>
- <combo_box
- height="18"
- layout="topleft"
- left_delta="0"
- name="material"
- top_pad="4"
- width="87">
- <combo_box.item
- label="Stone"
- value="Stone" />
- <combo_box.item
- label="Metal"
- value="Metal" />
- <combo_box.item
- label="Glass"
- value="Glass" />
- <combo_box.item
- label="Wood"
- value="Wood" />
- <combo_box.item
- label="Flesh"
- value="Flesh" />
- <combo_box.item
- label="Plastic"
- value="Plastic" />
- <combo_box.item
- label="Rubber"
- value="Rubber" />
- </combo_box>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="121"
+ left="125"
name="label basetype"
top="26"
- width="141">
+ width="150">
Building Block Type
</text>
<combo_box
- height="18"
+ height="19"
layout="topleft"
left_delta="0"
name="comboBaseType"
- top_pad="6"
- width="141">
+ top_pad="4"
+ width="150">
<combo_box.item
label="Box"
+ name="Box"
value="Box" />
<combo_box.item
label="Cylinder"
+ name="Cylinder"
value="Cylinder" />
<combo_box.item
label="Prism"
+ name="Prism"
value="Prism" />
<combo_box.item
label="Sphere"
+ name="Sphere"
value="Sphere" />
<combo_box.item
label="Torus"
+ name="Torus"
value="Torus" />
<combo_box.item
label="Tube"
+ name="Tube"
value="Tube" />
<combo_box.item
label="Ring"
+ name="Ring"
value="Ring" />
<combo_box.item
label="Sculpted"
+ name="Sculpted"
value="Sculpted" />
</combo_box>
<text
@@ -1593,13 +1591,13 @@
layout="topleft"
left_delta="0"
name="text cut"
- top_pad="2"
- width="141">
+ top_pad="6"
+ width="150">
Path Cut Begin and End
</text>
<spinner
follows="left|top"
- height="16"
+ height="19"
increment="0.025"
initial_value="0"
label="B"
@@ -1608,17 +1606,17 @@
left_delta="0"
max_val="0.98"
name="cut begin"
- top_pad="6"
+ top_pad="4"
width="68" />
<spinner
follows="left|top"
- height="16"
+ height="19"
increment="0.025"
initial_value="1"
label="E"
label_width="10"
layout="topleft"
- left_pad="5"
+ left_pad="10"
min_val="0.02"
name="cut end"
top_delta="0"
@@ -1629,9 +1627,9 @@
follows="left|top"
height="10"
layout="topleft"
- left="121"
+ left="125"
name="text hollow"
- top="98"
+ top_pad="6"
width="68">
Hollow
</text>
@@ -1650,23 +1648,23 @@
<spinner
decimal_digits="1"
follows="left|top"
- height="16"
+ height="19"
increment="5"
initial_value="0"
layout="topleft"
- left="121"
+ left="125"
max_val="95"
name="Scale 1"
- top="112"
+ top_pad="4"
width="68" />
<spinner
decimal_digits="2"
follows="left|top"
- height="16"
+ height="19"
increment="0.05"
initial_value="0"
layout="topleft"
- left_pad="5"
+ left_pad="10"
max_val="0.95"
min_val="-0.95"
name="Skew"
@@ -1678,30 +1676,34 @@
follows="left|top"
height="10"
layout="topleft"
- left="121"
+ left="125"
name="Hollow Shape"
- top="133"
- width="141">
+ top_pad="6"
+ width="150">
Hollow Shape
</text>
<combo_box
- height="18"
+ height="19"
layout="topleft"
left_delta="0"
name="hole"
- top_pad="6"
- width="141">
+ top_pad="4"
+ width="150">
<combo_box.item
label="Default"
+ name="Default"
value="Default" />
<combo_box.item
label="Circle"
+ name="Circle"
value="Circle" />
<combo_box.item
label="Square"
+ name="Square"
value="Square" />
<combo_box.item
label="Triangle"
+ name="Triangle"
value="Triangle" />
</combo_box>
<text
@@ -1712,14 +1714,14 @@
layout="topleft"
left_delta="0"
name="text twist"
- top_pad="2"
- width="141">
+ top_pad="4"
+ width="150">
Twist Begin and End
</text>
<spinner
decimal_digits="0"
follows="left|top"
- height="16"
+ height="19"
increment="9"
initial_value="0"
label="B"
@@ -1729,18 +1731,18 @@
max_val="180"
min_val="-180"
name="Twist Begin"
- top_pad="6"
+ top_pad="4"
width="68" />
<spinner
decimal_digits="0"
follows="left|top"
- height="16"
+ height="19"
increment="9"
initial_value="0"
label="E"
label_width="10"
layout="topleft"
- left_pad="5"
+ left_pad="10"
max_val="180"
min_val="-180"
name="Twist End"
@@ -1752,10 +1754,10 @@
follows="left|top"
height="10"
layout="topleft"
- left="121"
+ left="125"
name="scale_taper"
- top="205"
- width="141">
+ top_pad="6"
+ width="150">
Taper
</text>
<text
@@ -1767,13 +1769,13 @@
left_delta="0"
name="scale_hole"
top_delta="0"
- width="141">
+ width="150">
Hole Size
</text>
<spinner
decimal_digits="2"
follows="left|top"
- height="16"
+ height="19"
increment="0.05"
initial_value="0"
label="X"
@@ -1787,13 +1789,13 @@
<spinner
decimal_digits="2"
follows="left|top"
- height="16"
+ height="19"
increment="0.05"
initial_value="0"
label="Y"
label_width="10"
layout="topleft"
- left_pad="5"
+ left_pad="10"
min_val="-1"
name="Taper Scale Y"
top_delta="0"
@@ -1804,16 +1806,16 @@
follows="left|top"
height="10"
layout="topleft"
- left="121"
+ left="125"
name="text topshear"
- top="239"
+ top_pad="6"
width="141">
Top Shear
</text>
<spinner
decimal_digits="2"
follows="left|top"
- height="16"
+ height="19"
increment="0.05"
initial_value="0"
label="X"
@@ -1828,13 +1830,13 @@
<spinner
decimal_digits="2"
follows="left|top"
- height="16"
+ height="19"
increment="0.05"
initial_value="0"
label="Y"
label_width="10"
layout="topleft"
- left_pad="5"
+ left_pad="10"
max_val="0.5"
min_val="-0.5"
name="Shear Y"
@@ -1846,10 +1848,10 @@
follows="left|top"
height="10"
layout="topleft"
- left="121"
+ left="125"
name="advanced_cut"
- top="273"
- width="141">
+ top_pad="6"
+ width="150">
Profile Cut Begin and End
</text>
<text
@@ -1861,7 +1863,7 @@
left_delta="0"
name="advanced_dimple"
top_delta="0"
- width="141">
+ width="150">
Dimple Begin and End
</text>
<text
@@ -1873,12 +1875,12 @@
left_delta="0"
name="advanced_slice"
top_delta="0"
- width="141">
+ width="150">
Slice Begin and End
</text>
<spinner
follows="left|top"
- height="16"
+ height="19"
increment="0.025"
initial_value="0"
label="B"
@@ -1887,17 +1889,17 @@
left_delta="0"
max_val="0.95"
name="Path Limit Begin"
- top_pad="3"
+ top_pad="4"
width="68" />
<spinner
follows="left|top"
- height="16"
+ height="19"
increment="0.025"
initial_value="1"
label="E"
label_width="10"
layout="topleft"
- left_pad="5"
+ left_pad="10"
min_val="0.05"
name="Path Limit End"
top_delta="0"
@@ -1908,16 +1910,16 @@
follows="left|top"
height="10"
layout="topleft"
- left="121"
+ left="125"
name="text taper2"
- top="306"
- width="141">
+ top_pad="6"
+ width="150">
Taper
</text>
<spinner
decimal_digits="2"
follows="left|top"
- height="16"
+ height="19"
increment="0.05"
initial_value="0"
label="X"
@@ -1926,18 +1928,18 @@
left_delta="0"
min_val="-1"
name="Taper X"
- top_pad="3"
+ top_pad="4"
width="68" />
<spinner
decimal_digits="2"
follows="left|top"
- height="16"
+ height="19"
increment="0.05"
initial_value="0"
label="Y"
label_width="10"
layout="topleft"
- left_pad="5"
+ left_pad="10"
min_val="-1"
name="Taper Y"
top_delta="0"
@@ -1948,9 +1950,9 @@
follows="left|top"
height="10"
layout="topleft"
- left="121"
+ left="125"
name="text radius delta"
- top="337"
+ top_pad="6"
width="78">
Radius
</text>
@@ -1960,7 +1962,7 @@
follows="left|top"
height="10"
layout="topleft"
- left_delta="73"
+ left_delta="78"
name="text revolutions"
top_delta="0"
width="68">
@@ -1968,22 +1970,22 @@
</text>
<spinner
follows="left|top"
- height="16"
+ height="19"
increment="0.05"
initial_value="0"
layout="topleft"
- left="121"
+ left="125"
min_val="-1"
name="Radius Offset"
- top="350"
+ top_pad="4"
width="68" />
<spinner
decimal_digits="2"
follows="left|top"
- height="16"
+ height="19"
initial_value="1"
layout="topleft"
- left_pad="5"
+ left_pad="10"
max_val="4"
min_val="1"
name="Revolutions"
@@ -1996,14 +1998,14 @@
height="141"
label="Sculpt Texture"
layout="topleft"
- left="121"
+ left="125"
name="sculpt texture control"
tool_tip="Click to choose a picture"
top="70"
visible="false"
- width="141" />
+ width="145" />
<check_box
- height="16"
+ height="19"
label="Mirror"
layout="topleft"
left_delta="0"
@@ -2011,9 +2013,9 @@
tool_tip="Flips sculpted prim along the X axis."
top_pad="8"
visible="false"
- width="121" />
+ width="130" />
<check_box
- height="16"
+ height="19"
label="Inside-out"
layout="topleft"
left_delta="0"
@@ -2032,36 +2034,42 @@
name="label sculpt type"
top_pad="10"
visible="false"
- width="121">
+ width="130">
Stitching type
</text>
<combo_box
- height="18"
+ height="19"
layout="topleft"
left_delta="0"
name="sculpt type control"
- top_pad="6"
+ top_pad="4"
visible="false"
- width="141">
+ width="150">
<combo_box.item
- label="none)"
+ label="(none)"
+ name="None"
value="None" />
<combo_box.item
label="Sphere"
+ name="Sphere"
value="Sphere" />
<combo_box.item
label="Torus"
+ name="Torus"
value="Torus" />
<combo_box.item
label="Plane"
+ name="Plane"
value="Plane" />
<combo_box.item
label="Cylinder"
+ name="Cylinder"
value="Cylinder" />
</combo_box>
</panel>
+
<panel
- border="true"
+ border="false"
follows="left|top|right|bottom"
height="367"
label="Features"
@@ -2070,7 +2078,7 @@
mouse_opaque="false"
name="Features"
top_delta="0"
- width="270">
+ width="280">
<text
type="string"
length="1"
@@ -2096,7 +2104,7 @@
Edit object features:
</text>
<check_box
- height="16"
+ height="19"
label="Flexible Path"
layout="topleft"
left_delta="0"
@@ -2106,7 +2114,7 @@
width="121" />
<spinner
follows="left|top"
- height="16"
+ height="19"
increment="1"
initial_value="2"
label="Softness"
@@ -2115,11 +2123,11 @@
left_delta="0"
max_val="3"
name="FlexNumSections"
- top_pad="4"
+ top_pad="10"
width="128" />
<spinner
follows="left|top"
- height="16"
+ height="19"
increment="0.5"
initial_value="0.3"
label="Gravity"
@@ -2133,7 +2141,7 @@
width="128" />
<spinner
follows="left|top"
- height="16"
+ height="19"
increment="0.5"
initial_value="2"
label="Drag"
@@ -2146,7 +2154,7 @@
width="128" />
<spinner
follows="left|top"
- height="16"
+ height="19"
increment="0.5"
initial_value="0"
label="Wind"
@@ -2159,7 +2167,7 @@
width="128" />
<spinner
follows="left|top"
- height="16"
+ height="19"
increment="0.5"
initial_value="1"
label="Tension"
@@ -2172,7 +2180,7 @@
width="128" />
<spinner
follows="left|top"
- height="16"
+ height="19"
increment="0.01"
initial_value="0"
label="Force X"
@@ -2186,7 +2194,7 @@
width="128" />
<spinner
follows="left|top"
- height="16"
+ height="19"
increment="0.01"
initial_value="0"
label="Force Y"
@@ -2200,7 +2208,7 @@
width="128" />
<spinner
follows="left|top"
- height="16"
+ height="19"
increment="0.01"
initial_value="0"
label="Force Z"
@@ -2213,7 +2221,7 @@
top_pad="4"
width="128" />
<check_box
- height="16"
+ height="19"
label="Light"
layout="topleft"
left_delta="0"
@@ -2229,7 +2237,7 @@
layout="topleft"
left_delta="0"
name="label color"
- top_pad="11"
+ top_pad="15"
width="58">
Color
</text>
@@ -2243,22 +2251,22 @@
left_delta="67"
name="colorswatch"
tool_tip="Click to open Color Picker"
- top="237"
+ top_delta="-10"
width="32" />
<spinner
follows="left|top"
- height="16"
+ height="19"
initial_value="0.5"
label="Intensity"
label_width="65"
layout="topleft"
left="10"
name="Light Intensity"
- top="273"
+ top_pad="4"
width="128" />
<spinner
follows="left|top"
- height="16"
+ height="19"
initial_value="5"
label="Radius"
label_width="65"
@@ -2266,11 +2274,11 @@
left_delta="0"
max_val="20"
name="Light Radius"
- top_pad="4"
+ top_pad="0"
width="128" />
<spinner
follows="left|top"
- height="16"
+ height="19"
increment="0.25"
initial_value="1"
label="Falloff"
@@ -2279,11 +2287,11 @@
left_delta="0"
max_val="2"
name="Light Falloff"
- top_pad="4"
+ top_pad="0"
width="128" />
</panel>
<panel
- border="true"
+ border="false"
follows="left|top|right|bottom"
height="367"
label="Texture"
@@ -2292,7 +2300,7 @@
mouse_opaque="false"
name="Texture"
top_delta="0"
- width="270">
+ width="280">
<panel.string
name="string repeats per meter">
Repeats Per Meter
@@ -2320,7 +2328,7 @@
height="80"
label="Color"
layout="topleft"
- left_pad="26"
+ left_pad="25"
name="colorswatch"
tool_tip="Click to open Color Picker"
top_delta="0"
@@ -2331,16 +2339,16 @@
follows="left|top"
height="10"
layout="topleft"
- left="180"
+ left_pad="20"
name="color trans"
- top="1"
- width="80">
+ top="10"
+ width="100">
Transparency %
</text>
<spinner
decimal_digits="0"
follows="left|top"
- height="16"
+ height="19"
increment="2"
initial_value="0"
layout="topleft"
@@ -2357,14 +2365,14 @@
layout="topleft"
left_delta="0"
name="glow label"
- top_pad="2"
+ top_pad="4"
width="80">
Glow
</text>
<spinner
decimal_digits="2"
follows="left|top"
- height="16"
+ height="19"
initial_value="0"
layout="topleft"
left_delta="0"
@@ -2372,7 +2380,7 @@
top_pad="4"
width="80" />
<check_box
- height="16"
+ height="19"
label="Full Bright"
layout="topleft"
left_delta="0"
@@ -2387,12 +2395,12 @@
layout="topleft"
left="10"
name="tex gen"
- top="94"
+ top_pad="10"
width="90">
Mapping
</text>
<combo_box
- height="18"
+ height="19"
layout="topleft"
left_delta="0"
name="combobox texgen"
@@ -2400,9 +2408,11 @@
width="80">
<combo_box.item
label="Default"
+ name="Default"
value="Default" />
<combo_box.item
label="Planar"
+ name="Planar"
value="Planar" />
</combo_box>
<text
@@ -2413,12 +2423,12 @@
layout="topleft"
left="100"
name="label shininess"
- top="94"
+ top_pad="-33"
width="70">
Shininess
</text>
<combo_box
- height="18"
+ height="19"
layout="topleft"
left_delta="0"
name="combobox shininess"
@@ -2426,15 +2436,19 @@
width="70">
<combo_box.item
label="None"
+ name="None"
value="None" />
<combo_box.item
label="Low"
+ name="Low"
value="Low" />
<combo_box.item
label="Medium"
+ name="Medium"
value="Medium" />
<combo_box.item
label="High"
+ name="High"
value="High" />
</combo_box>
<text
@@ -2445,12 +2459,12 @@
layout="topleft"
left="180"
name="label bumpiness"
- top="94"
+ top_pad="-33"
width="80">
Bumpiness
</text>
<combo_box
- height="18"
+ height="19"
layout="topleft"
left_delta="0"
name="combobox bumpiness"
@@ -2458,57 +2472,75 @@
width="80">
<combo_box.item
label="None"
+ name="None"
value="None" />
<combo_box.item
label="Brightness"
+ name="Brightness"
value="Brightness" />
<combo_box.item
label="Darkness"
+ name="Darkness"
value="Darkness" />
<combo_box.item
label="woodgrain"
+ name="woodgrain"
value="woodgrain" />
<combo_box.item
label="bark"
+ name="bark"
value="bark" />
<combo_box.item
label="bricks"
+ name="bricks"
value="bricks" />
<combo_box.item
label="checker"
+ name="checker"
value="checker" />
<combo_box.item
label="concrete"
+ name="concrete"
value="concrete" />
<combo_box.item
label="crustytile"
+ name="crustytile"
value="crustytile" />
<combo_box.item
label="cutstone"
+ name="cutstone"
value="cutstone" />
<combo_box.item
label="discs"
+ name="discs"
value="discs" />
<combo_box.item
label="gravel"
+ name="gravel"
value="gravel" />
<combo_box.item
label="petridish"
+ name="petridish"
value="petridish" />
<combo_box.item
label="siding"
+ name="siding"
value="siding" />
<combo_box.item
label="stonetile"
+ name="stonetile"
value="stonetile" />
<combo_box.item
label="stucco"
+ name="stucco"
value="stucco" />
<combo_box.item
label="suction"
+ name="suction"
value="suction" />
<combo_box.item
label="weave"
+ name="weave"
value="weave" />
</combo_box>
<text
@@ -2519,13 +2551,13 @@
layout="topleft"
left="10"
name="tex scale"
- top="148"
+ top_pad="15"
width="160">
Repeats per Face
</text>
<spinner
follows="left|top"
- height="16"
+ height="19"
initial_value="0"
label="Horizontal (U)"
label_width="90"
@@ -2533,10 +2565,10 @@
left="20"
max_val="100"
name="TexScaleU"
- top="162"
+ top_pad="10"
width="160" />
<check_box
- height="16"
+ height="19"
label="Flip"
layout="topleft"
left_pad="10"
@@ -2545,7 +2577,7 @@
width="70" />
<spinner
follows="left|top"
- height="16"
+ height="19"
initial_value="0"
label="Vertical (V)"
label_width="90"
@@ -2553,10 +2585,10 @@
left="20"
max_val="100"
name="TexScaleV"
- top="180"
+ top_pad="0"
width="160" />
<check_box
- height="16"
+ height="19"
label="Flip"
layout="topleft"
left_pad="10"
@@ -2571,14 +2603,14 @@
layout="topleft"
left="10"
name="tex rotate"
- top="218"
+ top_pad="20"
width="102">
Rotation (degrees)
</text>
<spinner
decimal_digits="2"
follows="left|top"
- height="16"
+ height="19"
increment="1"
initial_value="0"
layout="topleft"
@@ -2596,14 +2628,14 @@
layout="topleft"
left="10"
name="rpt"
- top="240"
+ top_pad="0"
width="160">
Repeats Per Meter
</text>
<spinner
decimal_digits="1"
follows="left|top"
- height="16"
+ height="19"
initial_value="1"
layout="topleft"
left_delta="102"
@@ -2615,7 +2647,7 @@
<button
follows="left|top"
font="SansSerifSmall"
- height="20"
+ height="19"
label="Apply"
label_selected="Apply"
layout="topleft"
@@ -2631,13 +2663,13 @@
layout="topleft"
left="10"
name="tex offset"
- top="278"
+ top_pad="20"
width="160">
Offset
</text>
<spinner
follows="left|top"
- height="16"
+ height="19"
initial_value="0"
label="Horizontal (U)"
label_width="90"
@@ -2645,11 +2677,11 @@
left="20"
min_val="-1"
name="TexOffsetU"
- top="292"
+ top_pad="10"
width="160" />
<spinner
follows="left|top"
- height="16"
+ height="19"
initial_value="0"
label="Vertical (V)"
label_width="90"
@@ -2659,11 +2691,12 @@
name="TexOffsetV"
top_pad="2"
width="160" />
- <text
+<!--TODO: KILL THIS-->
+ <!-- <text
type="string"
length="1"
follows="left|top"
- height="20"
+ height="19"
layout="topleft"
left="10"
name="textbox autofix"
@@ -2675,17 +2708,17 @@
<button
follows="left|top"
font="SansSerifSmall"
- height="20"
+ height="19"
label="Align"
label_selected="Align"
layout="topleft"
left="112"
name="button align"
top="340"
- width="68" />
+ width="68" />-->
</panel>
<panel
- border="true"
+ border="false"
follows="left|top|right|bottom"
height="367"
label="Content"
@@ -2694,10 +2727,10 @@
mouse_opaque="false"
name="Contents"
top_delta="0"
- width="270">
+ width="280">
<button
follows="left|top"
- height="20"
+ height="19"
label="New Script"
label_selected="New Script..."
layout="topleft"
@@ -2707,7 +2740,7 @@
width="100" />
<button
follows="left|top"
- height="20"
+ height="19"
label="Permissions..."
layout="topleft"
left_pad="10"
@@ -2716,29 +2749,30 @@
width="100" />
<panel_inventory
follows="left|top"
- height="325"
+ height="300"
layout="topleft"
left="10"
name="contents_inventory"
top="35"
- width="252" />
+ width="260" />
</panel>
</tab_container>
<panel
- follows="left|top"
+ follows="left|top"
height="384"
layout="topleft"
left_delta="0"
name="land info panel"
top_delta="0"
- width="272">
+ width="280">
<text
type="string"
length="1"
+ font="SansSerifBig"
follows="left|top"
- height="16"
+ height="19"
layout="topleft"
- left="40"
+ left="20"
name="label_parcel_info"
top="24"
width="150">
@@ -2748,29 +2782,29 @@
type="string"
length="1"
follows="left|top"
- height="16"
+ height="19"
layout="topleft"
- left="48"
+ left="30"
name="label_area_price"
top="48"
width="150">
- Price: L$[PRICE] for [AREA] sq. m.
+ Price: L$[PRICE] for [AREA] m²
</text>
<text
type="string"
length="1"
follows="left|top"
- height="16"
+ height="19"
layout="topleft"
left_delta="0"
name="label_area"
top_delta="0"
width="150">
- Area: [AREA] sq. m.
+ Area: [AREA] m²
</text>
<button
follows="left|top"
- height="20"
+ height="19"
label="About Land..."
label_selected="About Land..."
layout="topleft"
@@ -2780,31 +2814,32 @@
width="112" />
<check_box
control_name="ShowParcelOwners"
- height="16"
+ height="19"
label="Show owners"
layout="topleft"
left_delta="0"
name="checkbox show owners"
tool_tip="Colour parcels according to their ownership"
top_pad="8"
- width="100" />
+ width="140" />
<button
follows="left|top"
- height="18"
+ height="19"
label="?"
label_selected="?"
layout="topleft"
- left_delta="94"
+ left_pad="5"
name="button show owners help"
top_delta="-2"
width="18" />
<text
type="string"
length="1"
+ font="SansSerifBig"
follows="left|top"
- height="16"
+ height="19"
layout="topleft"
- left="40"
+ left="20"
name="label_parcel_modify"
top="152"
width="150">
@@ -2812,17 +2847,17 @@
</text>
<button
follows="left|top"
- height="20"
+ height="19"
label="Subdivide..."
label_selected="Subdivide..."
layout="topleft"
- left="48"
+ left="30"
name="button subdivide land"
top="172"
width="112" />
<button
follows="left|top"
- height="20"
+ height="19"
label="Join..."
label_selected="Join..."
layout="topleft"
@@ -2833,10 +2868,11 @@
<text
type="string"
length="1"
+ font="SansSerifBig"
follows="left|top"
- height="16"
+ height="19"
layout="topleft"
- left="40"
+ left="20"
name="label_parcel_trans"
top="256"
width="150">
@@ -2844,17 +2880,17 @@
</text>
<button
follows="left|top"
- height="20"
+ height="19"
label="Buy Land..."
label_selected="Buy Land..."
layout="topleft"
- left="48"
+ left="30"
name="button buy land"
top="276"
width="112" />
<button
follows="left|top"
- height="20"
+ height="19"
label="Abandon Land..."
label_selected="Abandon Land..."
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/floater_top_objects.xml b/indra/newview/skins/default/xui/en/floater_top_objects.xml
index 20e39beb6f..ecd64d08e6 100644
--- a/indra/newview/skins/default/xui/en/floater_top_objects.xml
+++ b/indra/newview/skins/default/xui/en/floater_top_objects.xml
@@ -87,6 +87,8 @@
label="Mono Time"
name="mono_time"
width="55" />
+ <scroll_list.commit_callback
+ function="TopObjects.CommitObjectsList" />
</scroll_list>
<text
type="string"
@@ -117,7 +119,10 @@
left_pad="10"
name="show_beacon_btn"
top_delta="0"
- width="100" />
+ width="100">
+ <button.commit_callback
+ function="TopObjects.ShowBeacon" />
+ </button>
<text
type="string"
length="1"
@@ -146,7 +151,10 @@
left_pad="10"
name="filter_object_btn"
top_delta="0"
- width="100" />
+ width="100">
+ <button.commit_callback
+ function="TopObjects.GetByObjectName" />
+ </button>
<text
type="string"
length="1"
@@ -175,7 +183,10 @@
left_pad="10"
name="filter_owner_btn"
top_delta="0"
- width="100" />
+ width="100">
+ <button.commit_callback
+ function="TopObjects.GetByOwnerName" />
+ </button>
<button
follows="bottom|left"
height="20"
@@ -184,7 +195,10 @@
left="10"
name="return_selected_btn"
top="295"
- width="130" />
+ width="130">
+ <button.commit_callback
+ function="TopObjects.ReturnSelected" />
+ </button>
<button
follows="bottom|left"
height="20"
@@ -193,7 +207,10 @@
left_pad="10"
name="return_all_btn"
top_delta="0"
- width="130" />
+ width="130">
+ <button.commit_callback
+ function="TopObjects.ReturnAll" />
+ </button>
<button
follows="bottom|left"
height="20"
@@ -202,7 +219,10 @@
left="10"
name="disable_selected_btn"
top="320"
- width="130" />
+ width="130">
+ <button.commit_callback
+ function="TopObjects.DisableSelected" />
+ </button>
<button
follows="bottom|left"
height="20"
@@ -211,7 +231,10 @@
left_pad="10"
name="disable_all_btn"
top_delta="0"
- width="130" />
+ width="130">
+ <button.commit_callback
+ function="TopObjects.DisableAll" />
+ </button>
<button
bottom="315"
follows="bottom|right"
@@ -220,5 +243,8 @@
layout="topleft"
name="refresh_btn"
right="-10"
- width="100" />
+ width="100">
+ <button.commit_callback
+ function="TopObjects.Refresh" />
+ </button>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_ui_preview.xml b/indra/newview/skins/default/xui/en/floater_ui_preview.xml
index 10968364f3..bbb17dfb8f 100644
--- a/indra/newview/skins/default/xui/en/floater_ui_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_ui_preview.xml
@@ -41,6 +41,7 @@
width="55">
<combo_box.item
label="en"
+ name="item1"
value="en" />
</combo_box>
<button
@@ -136,6 +137,7 @@
width="55">
<combo_box.item
label="en"
+ name="item1"
value="en" />
</combo_box>
<button
@@ -161,6 +163,15 @@
tool_tip="Closes the currently-displayed floater, if one exists"
top_delta="0"
width="85" />
+ <button
+ follows="left|top"
+ height="25"
+ label="Export Schema"
+ layout="topleft"
+ left_pad="10"
+ name="export_schema"
+ top_delta="0"
+ width="120" />
<scroll_list
bottom="525"
column_padding="0"
@@ -183,7 +194,7 @@
name="file_column"
width="150" />
<scroll_list.columns
- dynamicwidth="true"
+ dynamic_width="true"
label="Top-Level Node"
name="top_level_node_column" />
</scroll_list>
diff --git a/indra/newview/skins/default/xui/en/floater_url_entry.xml b/indra/newview/skins/default/xui/en/floater_url_entry.xml
index 82a9750cda..cf59d44d01 100644
--- a/indra/newview/skins/default/xui/en/floater_url_entry.xml
+++ b/indra/newview/skins/default/xui/en/floater_url_entry.xml
@@ -4,7 +4,7 @@
height="87"
layout="topleft"
name="url_entry"
- width="500">
+ width="280">
<text
type="string"
length="1"
@@ -12,7 +12,7 @@
follows="top|left"
height="15"
layout="topleft"
- left="20"
+ left="10"
name="media_label"
top="20">
Media URL:
@@ -26,44 +26,48 @@
max_chars="255"
name="media_entry"
top_delta="-4"
- width="370" />
+ width="190" />
<button
follows="top|left"
height="20"
+ font="SansSerifSmall"
label="OK"
layout="topleft"
- left="20"
+ left="10"
name="ok_btn"
top="50"
width="64" />
<button
follows="top|left"
height="20"
+ font="SansSerifSmall"
label="Cancel"
layout="topleft"
- left_pad="28"
+ left_pad="5"
name="cancel_btn"
top_delta="0"
width="64" />
<button
follows="top|right"
height="20"
+ font="SansSerifSmall"
label="Clear"
layout="topleft"
- left_pad="220"
+ left_pad="65"
name="clear_btn"
top_delta="0"
width="64" />
<text
type="string"
length="1"
+ font="SansSerifSmall"
bottom_delta="-2"
follows="bottom|left"
height="15"
layout="topleft"
- left="220"
+ left="152"
name="loading_label"
- visible="false">
+ visible="true">
Loading...
</text>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml
index 43f209546a..6a022e8966 100644
--- a/indra/newview/skins/default/xui/en/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/en/floater_world_map.xml
@@ -144,7 +144,10 @@
name="Go Home"
tool_tip="Teleport to your home"
top="34"
- width="88" />
+ width="88" >
+ <button.commit_callback
+ function="WMap.GoHome" />
+ </button>
<icon
color="0 1 0 1"
follows="top|right"
@@ -324,7 +327,10 @@
width="202">
<combo_box.item
label="Online Friends"
+ name="item1"
value="None" />
+ <combo_box.commit_callback
+ function="WMap.AvatarCombo"/>
</combo_box>
<icon
color="0.5 0 0 1"
@@ -351,7 +357,10 @@
width="202">
<combo_box.item
label="Landmarks"
+ name="item1"
value="None" />
+ <combo_box.commit_callback
+ function="WMap.Landmark" />
</combo_box>
<icon
color="0.5 0 0 1"
@@ -384,7 +393,10 @@
name="DoSearch"
tool_tip="Search for region"
top_delta="0"
- width="60" />
+ width="60">
+ <button.commit_callback
+ function="WMap.Location" />
+ </button>
<text
type="string"
length="1"
@@ -415,6 +427,8 @@
label=""
name="sim_name"
width="206" />
+ <scroll_list.commit_callback
+ function="WMap.SearchResult" />
</scroll_list>
<text
type="string"
@@ -441,7 +455,10 @@
name="spin x"
tool_tip="X coordinate of location to show on map"
top_delta="0"
- width="48" />
+ width="48">
+ <spinner.commit_callback
+ function="WMap.CommitLocation" />
+ </spinner>
<spinner
decimal_digits="0"
follows="bottom|right"
@@ -454,7 +471,10 @@
name="spin y"
tool_tip="Y coordinate of location to show on map"
top_delta="0"
- width="48" />
+ width="48" >
+ <spinner.commit_callback
+ function="WMap.CommitLocation" />
+ </spinner>
<spinner
decimal_digits="0"
follows="bottom|right"
@@ -467,7 +487,10 @@
name="spin z"
tool_tip="Z coordinate of location to show on map"
top_delta="0"
- width="48" />
+ width="48">
+ <spinner.commit_callback
+ function="WMap.CommitLocation" />
+ </spinner>
<button
follows="right|bottom"
height="20"
@@ -478,7 +501,10 @@
name="Teleport"
tool_tip="Teleport to selected location"
top="494"
- width="90" />
+ width="90">
+ <button.commit_callback
+ function="WMap.Teleport" />
+ </button>
<button
follows="right|bottom"
height="20"
@@ -489,7 +515,10 @@
name="Show Destination"
tool_tip="Center map on selected location"
top_delta="0"
- width="125" />
+ width="125">
+ <button.commit_callback
+ function="WMap.ShowTarget" />
+ </button>
<button
follows="right|bottom"
height="20"
@@ -500,7 +529,10 @@
name="Clear"
tool_tip="Stop tracking"
top="518"
- width="90" />
+ width="90">
+ <button.commit_callback
+ function="WMap.Clear" />
+ </button>
<button
follows="right|bottom"
height="20"
@@ -511,18 +543,24 @@
name="Show My Location"
tool_tip="Center map on your avatar&apos;s location"
top_delta="0"
- width="125" />
+ width="125" >
+ <button.commit_callback
+ function="WMap.ShowAgent" />
+ </button>
<button
enabled="false"
follows="bottom|right"
height="20"
- label="Copy SLURL to clipboard"
+ label="Copy SLurl to clipboard"
layout="topleft"
left="-230"
name="copy_slurl"
- tool_tip="Copies current location as SLURL to be used on the web."
+ tool_tip="Copies current location as SLurl to be used on the web."
top="542"
- width="222" />
+ width="222">
+ <button.commit_callback
+ function="WMap.CopySLURL" />
+ </button>
<slider
follows="right|bottom"
height="16"
diff --git a/indra/newview/skins/default/xui/en/fonts.xml b/indra/newview/skins/default/xui/en/fonts.xml
index 483291044d..ced8ba83f7 100644
--- a/indra/newview/skins/default/xui/en/fonts.xml
+++ b/indra/newview/skins/default/xui/en/fonts.xml
@@ -19,13 +19,25 @@
</font>
<font name="SansSerif" comment="Name of san-serif font (Truetype file name)">
- <file>"MtBkLfRg.ttf"</file>
+ <file>Helvetica.dfont</file>
+ <os name="Windows">
+ <file>arial.ttf</file>
+ </os>
+ <os name="Mac">
+ <file>Helvetica.dfont</file>
+ </os>
</font>
<font name="SansSerifBold"
comment="Name of bold sans-serif font"
font_style="Bold">
- <file>MtBdLfRg.ttf</file>
+ <file>Helvetica.dfont</file>
+ <os name="Windows">
+ <file>arialbd.ttf</file>
+ </os>
+ <os name="Mac">
+ <file>Helvetica.dfont</file>
+ </os>
</font>
<font name="Monospace"
diff --git a/indra/newview/skins/default/xui/en/menu_imchiclet_group.xml b/indra/newview/skins/default/xui/en/menu_imchiclet_group.xml
new file mode 100644
index 0000000000..542e319792
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/menu_imchiclet_group.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<menu
+ height="101"
+ layout="topleft"
+ left="100"
+ mouse_opaque="false"
+ name="IMChiclet Group Menu"
+ top="724"
+ visible="false"
+ width="128">
+ <menu_item_call
+ label="Chat..."
+ layout="topleft"
+ name="Chat">
+ <menu_item_call.on_click
+ function="IMChicletMenu.Action"
+ parameter="group chat" />
+ </menu_item_call>
+ <menu_item_call
+ label="Info..."
+ layout="topleft"
+ name="Show Profile">
+ <menu_item_call.on_click
+ function="IMChicletMenu.Action"
+ parameter="info" />
+ </menu_item_call>
+</menu>
diff --git a/indra/newview/skins/default/xui/en/menu_imchiclet_p2p.xml b/indra/newview/skins/default/xui/en/menu_imchiclet_p2p.xml
new file mode 100644
index 0000000000..bad6e1e212
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/menu_imchiclet_p2p.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<menu
+ height="101"
+ layout="topleft"
+ left="100"
+ mouse_opaque="false"
+ name="IMChiclet P2P Menu"
+ top="724"
+ visible="false"
+ width="128">
+ <menu_item_call
+ label="Show Profile..."
+ layout="topleft"
+ name="Show Profile">
+ <menu_item_call.on_click
+ function="IMChicletMenu.Action"
+ parameter="profile" />
+ </menu_item_call>
+ <menu_item_call
+ label="Send IM..."
+ layout="topleft"
+ name="Send IM">
+ <menu_item_call.on_click
+ function="IMChicletMenu.Action"
+ parameter="im" />
+ </menu_item_call>
+ <menu_item_call
+ label="Add Friend..."
+ layout="topleft"
+ name="Add Friend">
+ <menu_item_call.on_click
+ function="IMChicletMenu.Action"
+ parameter="add" />
+ </menu_item_call>
+ <menu_item_call
+ label="Remove Friend..."
+ layout="topleft"
+ name="Remove Friend">
+ <menu_item_call.on_click
+ function="IMChicletMenu.Action"
+ parameter="remove" />
+ </menu_item_call>
+</menu>
diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml
index 6f2fd5e5e5..c788f8f095 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory.xml
@@ -77,6 +77,14 @@
parameter="category" />
</menu_item_call>
<menu_item_call
+ label="New Current"
+ layout="topleft"
+ name="New Current">
+ <menu_item_call.on_click
+ function="Inventory.DoCreate"
+ parameter="current" />
+ </menu_item_call>
+ <menu_item_call
label="New Script"
layout="topleft"
name="New Script">
@@ -230,6 +238,91 @@
parameter="eyes" />
</menu_item_call>
</menu>
+ <menu
+ label="Change Type"
+ layout="topleft"
+ name="Change Type">
+ <menu_item_call
+ label="Default"
+ layout="topleft"
+ name="Default">
+ <menu_item_call.on_click
+ function="Inventory.DoToSelected"
+ parameter="change_folder_type_default" />
+ </menu_item_call>
+ <menu_item_call
+ label="Gloves"
+ layout="topleft"
+ name="Gloves">
+ <menu_item_call.on_click
+ function="Inventory.DoToSelected"
+ parameter="change_folder_type_gloves" />
+ </menu_item_call>
+ <menu_item_call
+ label="Jacket"
+ layout="topleft"
+ name="Jacket">
+ <menu_item_call.on_click
+ function="Inventory.DoToSelected"
+ parameter="change_folder_type_jacket" />
+ </menu_item_call>
+ <menu_item_call
+ label="Pants"
+ layout="topleft"
+ name="Pants">
+ <menu_item_call.on_click
+ function="Inventory.DoToSelected"
+ parameter="change_folder_type_pants" />
+ </menu_item_call>
+ <menu_item_call
+ label="Shape"
+ layout="topleft"
+ name="Shape">
+ <menu_item_call.on_click
+ function="Inventory.DoToSelected"
+ parameter="change_folder_type_shape" />
+ </menu_item_call>
+ <menu_item_call
+ label="Shoes"
+ layout="topleft"
+ name="Shoes">
+ <menu_item_call.on_click
+ function="Inventory.DoToSelected"
+ parameter="change_folder_type_shoes" />
+ </menu_item_call>
+ <menu_item_call
+ label="Shirt"
+ layout="topleft"
+ name="Shirt">
+ <menu_item_call.on_click
+ function="Inventory.DoToSelected"
+ parameter="change_folder_type_shirt" />
+ </menu_item_call>
+ <menu_item_call
+ label="Skirt"
+ layout="topleft"
+ name="Skirt">
+ <menu_item_call.on_click
+ function="Inventory.DoToSelected"
+ parameter="change_folder_type_skirt" />
+ </menu_item_call>
+ <menu_item_call
+ label="Underpants"
+ layout="topleft"
+ name="Underpants">
+ <menu_item_call.on_click
+ function="Inventory.DoToSelected"
+ parameter="change_folder_type_underpants" />
+ </menu_item_call>
+ <menu_item_call
+ label="Undershirt"
+ layout="topleft"
+ name="Undershirt">
+ <menu_item_call.on_click
+ function="Inventory.DoToSelected"
+ parameter="change_folder_type_undershirt" />
+ </menu_item_call>
+ </menu>
<menu_item_call
label="Teleport"
layout="topleft"
@@ -271,6 +364,14 @@
parameter="restore" />
</menu_item_call>
<menu_item_call
+ label="Goto Link"
+ layout="topleft"
+ name="Goto Link">
+ <menu_item_call.on_click
+ function="Inventory.DoToSelected"
+ parameter="goto" />
+ </menu_item_call>
+ <menu_item_call
label="Open"
layout="topleft"
name="Open">
diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml
index eb3dcc225e..4e3c0d0c40 100644
--- a/indra/newview/skins/default/xui/en/menu_login.xml
+++ b/indra/newview/skins/default/xui/en/menu_login.xml
@@ -52,12 +52,12 @@
parameter="help f1" />
</menu_item_call>
<menu_item_call
- label="About Second Life..."
+ label="About Second Life"
layout="topleft"
- name="About Second Life...">
+ name="About Second Life">
<menu_item_call.on_click
function="ShowFloater"
- parameter="about" />
+ parameter="sl_about" />
</menu_item_call>
</menu>
<menu
@@ -101,5 +101,13 @@
function="ShowFloater"
parameter="test_widgets" />
</menu_item_call>
+ <menu_item_call
+ label="List View Test"
+ name="List View Test"
+ shortcut="control|shift|L">
+ <menu_item_call.on_click
+ function="ShowFloater"
+ parameter="test_list_view" />
+ </menu_item_call>
</menu>
</menu_bar>
diff --git a/indra/newview/skins/default/xui/en/menu_navbar.xml b/indra/newview/skins/default/xui/en/menu_navbar.xml
index 725321648b..013136a593 100644
--- a/indra/newview/skins/default/xui/en/menu_navbar.xml
+++ b/indra/newview/skins/default/xui/en/menu_navbar.xml
@@ -9,7 +9,7 @@
visible="false"
width="128">
<menu_item_call
- label="Copy SLURL to Clipboard"
+ label="Copy SLurl to Clipboard"
layout="topleft"
name="Copy SLURL">
<menu_item_call.on_click
@@ -23,6 +23,9 @@
<menu_item_call.on_click
function="Navbar.Action"
parameter="landmark" />
+ <menu_item_call.on_enable
+ function="Navbar.EnableMenuItem"
+ parameter="can_landmark" />
</menu_item_call>
<menu_item_separator
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_nearby_chat.xml b/indra/newview/skins/default/xui/en/menu_nearby_chat.xml
index 5eb4b10af9..02a2f83d14 100644
--- a/indra/newview/skins/default/xui/en/menu_nearby_chat.xml
+++ b/indra/newview/skins/default/xui/en/menu_nearby_chat.xml
@@ -1,10 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<menu bottom="100" color="MenuDefaultBgColor" drop_shadow="true" height="101" left="100"
mouse_opaque="false" name="NearBy Chat Menu" opaque="true" width="128" visible="false">
- <menu_item_call bottom_delta="-18" height="18" label="Keep Visible" left="0" mouse_opaque="true"
- name="keep_visible" width="128">
- <menu_item_call.on_click function="NearbyChat.Action" userdata="keep_visible" />
- </menu_item_call>
<menu_item_call bottom_delta="-18" height="18" label="Show Nearby People..." left="0" mouse_opaque="true"
name="nearby_people" width="128">
<menu_item_call.on_click function="NearbyChat.Action" userdata="nearby_people" />
diff --git a/indra/newview/skins/default/xui/en/menu_picks.xml b/indra/newview/skins/default/xui/en/menu_picks.xml
new file mode 100644
index 0000000000..146d7d06fe
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/menu_picks.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<context_menu
+ layout="topleft"
+ name="Picks">
+ <menu_item_call
+ label="Info"
+ layout="topleft"
+ name="pick_info">
+ <menu_item_call.on_click
+ function="Pick.Info" />
+ </menu_item_call>
+ <menu_item_call
+ label="Edit"
+ layout="topleft"
+ name="pick_edit"
+ visible="false">
+ <menu_item_call.on_click
+ function="Pick.Edit" />
+ </menu_item_call>
+ <menu_item_call
+ label="Teleport"
+ layout="topleft"
+ name="pick_teleport">
+ <menu_item_call.on_click
+ function="Pick.Teleport" />
+ </menu_item_call>
+ <menu_item_call
+ label="Show on Map"
+ layout="topleft"
+ name="pick_map">
+ <menu_item_call.on_click
+ function="Pick.Map" />
+ </menu_item_call>
+ <menu_item_separator
+ layout="topleft"
+ name="pick_separator"
+ visible="false" />
+ <menu_item_call
+ label="Delete"
+ layout="topleft"
+ name="pick_delete"
+ visible="false">
+ <menu_item_call.on_click
+ function="Pick.Delete" />
+ </menu_item_call>
+</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 926b51d4c1..fe1baf22d0 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -15,7 +15,7 @@
name="Preferences"
shortcut="control|P">
<menu_item_call.on_click
- function="ShowFloater"
+ function="Floater.Show"
parameter="preferences" />
</menu_item_call>
<menu_item_separator
@@ -31,6 +31,7 @@
name="Account History">
<menu_item_call.on_click
function="PromptShowURL"
+ name="AccountHistory_url"
parameter="WebLaunchAccountHistory,http://secondlife.com/account/transactions.php" />
</menu_item_call>
<menu_item_call
@@ -39,6 +40,7 @@
name="Manage My Account">
<menu_item_call.on_click
function="PromptShowURL"
+ name="ManageMyAccount_url"
parameter="WebLaunchJoinNow,http://secondlife.com/account/" />
</menu_item_call>
<menu_item_separator
@@ -179,65 +181,64 @@
function="World.Chat" />
</menu_item_call>
<menu_item_check
- label="Local Chat"
+ label="Nearby Chat"
layout="topleft"
- name="Chat History"
+ name="Nearby Chat"
shortcut="control|H">
<menu_item_check.on_check
function="Floater.Visible"
- parameter="chat" />
+ parameter="nearby_chat" />
<menu_item_check.on_click
function="Floater.Toggle"
- parameter="chat" />
+ parameter="nearby_chat" />
</menu_item_check>
+ <menu_item_separator
+ layout="topleft" />
<menu_item_check
- label="Nearby Chat"
+ label="Active Speakers"
layout="topleft"
- name="Nearby Chat"
- shortcut="control|N">
+ name="Active Speakers">
<menu_item_check.on_check
function="Floater.Visible"
- parameter="nearby_chat" />
+ parameter="active_speakers" />
<menu_item_check.on_click
function="Floater.Toggle"
- parameter="nearby_chat" />
+ parameter="active_speakers" />
</menu_item_check>
<menu_item_check
- label="Communicate"
+ label="Block List"
layout="topleft"
- name="Instant Message"
- shortcut="control|T">
+ name="Mute List">
<menu_item_check.on_check
function="Floater.Visible"
- parameter="communicate" />
+ parameter="mute" />
<menu_item_check.on_click
function="Floater.Toggle"
- parameter="communicate" />
+ parameter="mute" />
</menu_item_check>
<menu_item_separator
layout="topleft" />
<menu_item_check
- label="Active Speakers"
+ label="(Legacy) Communicate"
layout="topleft"
- name="Active Speakers">
+ name="Instant Message"
+ shortcut="control|T">
<menu_item_check.on_check
- function="FloaterVisible"
- parameter="active speakers" />
+ function="Floater.Visible"
+ parameter="communicate" />
<menu_item_check.on_click
- function="ShowFloater"
- parameter="active speakers" />
+ function="Floater.Toggle"
+ parameter="communicate" />
</menu_item_check>
- <menu_item_check
- label="Mute List"
+ <menu_item_call
+ label="(Temp) Media Remote Ctrl"
layout="topleft"
- name="Mute List">
- <menu_item_check.on_check
- function="FloaterVisible"
- parameter="mute list" />
- <menu_item_check.on_click
- function="ShowFloater"
- parameter="mute list" />
- </menu_item_check>
+ name="Preferences"
+ shortcut="control|alt|M">
+ <menu_item_call.on_click
+ function="Floater.Toggle"
+ parameter="media_remote_ctrl" />
+ </menu_item_call>
</menu>
<menu
label="World"
@@ -249,22 +250,22 @@
layout="topleft"
name="Camera Controls">
<menu_item_check.on_check
- function="FloaterVisible"
- parameter="camera controls" />
+ function="Floater.Visible"
+ parameter="camera" />
<menu_item_check.on_click
- function="ShowFloater"
- parameter="camera controls" />
+ function="Floater.Toggle"
+ parameter="camera" />
</menu_item_check>
<menu_item_check
label="Movement Controls"
layout="topleft"
name="Movement Controls">
<menu_item_check.on_check
- function="FloaterVisible"
- parameter="movement controls" />
+ function="Floater.Visible"
+ parameter="moveview" />
<menu_item_check.on_click
- function="ShowFloater"
- parameter="movement controls" />
+ function="Floater.Toggle"
+ parameter="moveview" />
</menu_item_check>
<menu_item_separator
layout="topleft" />
@@ -273,16 +274,16 @@
layout="topleft"
name="About Land">
<menu_item_call.on_click
- function="ShowFloater"
- parameter="about land" />
+ function="Floater.Show"
+ parameter="about_land" />
</menu_item_call>
<menu_item_call
label="Region/Estate"
layout="topleft"
name="Region/Estate">
<menu_item_call.on_click
- function="ShowFloater"
- parameter="about region" />
+ function="Floater.Show"
+ parameter="region_info" />
</menu_item_call>
<menu_item_separator
layout="topleft" />
@@ -350,9 +351,10 @@
name="Mini-Map"
shortcut="control|shift|M">
<menu_item_check.on_check
- function="FloaterVisible" />
+ function="Floater.Visible"
+ parameter="mini_map" />
<menu_item_check.on_click
- function="ShowFloater"
+ function="Floater.Toggle"
parameter="mini_map" />
</menu_item_check>
<menu_item_separator
@@ -400,47 +402,36 @@
layout="topleft"
name="Tutorial">
<menu_item_call.on_click
- function="ShowFloater"
- parameter="help tutorial" />
+ function="Floater.Show"
+ parameter="hud" />
</menu_item_call>
- <menu
- label="Report"
- layout="topleft"
- name="Report"
- tear_off="true">
- <menu_item_call
- label="Report Abuse"
- layout="topleft"
- name="Report Abuse">
- <menu_item_call.on_click
- function="ShowFloater"
- parameter="complaint reporter" />
- </menu_item_call>
- <menu_item_call
- label="Report Bug"
+ <menu_item_separator
+ layout="topleft" />
+ <menu_item_call
+ label="Report Bug..."
layout="topleft"
- name="Report Bug">
- <menu_item_call.on_click
+ name="ReportBug">
+ <menu_item_call.on_click
function="PromptShowURL"
- parameter="WebLaunchPublicIssue,http://jira.secondlife.com" />
- </menu_item_call>
- <menu_item_call
- label="Bumps, Pushes &amp; Hits."
- layout="topleft"
- name="Bumps, Pushes &amp;amp; Hits">
- <menu_item_call.on_click
- function="ShowFloater"
- parameter="mean events" />
- </menu_item_call>
- <menu_item_call
- label="About Second Life"
+ name="ReportBug_url"
+ parameter="hud,http://help.secondlife.com/en/bugreport/" />
+ </menu_item_call>
+ <menu_item_call
+ label="Report Abuse..."
layout="topleft"
- name="About Second Life">
+ name="Report Abuse">
<menu_item_call.on_click
function="ShowFloater"
- parameter="about" />
+ parameter="complaint reporter" />
</menu_item_call>
- </menu>
+ <menu_item_call
+ label="About Second Life"
+ layout="topleft"
+ name="About Second Life">
+ <menu_item_call.on_click
+ function="Floater.Show"
+ parameter="sl_about" />
+ </menu_item_call>
</menu>
<menu
create_jump_keys="true"
@@ -573,8 +564,8 @@
layout="topleft"
name="perm prefs">
<menu_item_call.on_click
- function="ShowFloater"
- parameter="perm prefs" />
+ function="Floater.Toggle"
+ parameter="perm_prefs" />
</menu_item_call>
<menu_item_call
label="Show Script Warning/Error Window"
@@ -702,8 +693,8 @@
name="Grid Options"
shortcut="control|shift|B">
<menu_item_call.on_click
- function="ShowFloater"
- parameter="grid options" />
+ function="Floater.Show"
+ parameter="build_options" />
<menu_item_call.on_enable
function="Tools.EnableToolNotPie" />
</menu_item_call>
@@ -720,10 +711,10 @@
name="beacons"
shortcut="control|alt|shift|N">
<menu_item_check.on_check
- function="FloaterVisible"
+ function="Floater.Visible"
parameter="beacons" />
<menu_item_check.on_click
- function="ShowFloater"
+ function="Floater.Toggle"
parameter="beacons" />
</menu_item_check>
<menu_item_check
@@ -838,6 +829,7 @@
function="Tools.BuyOrTake" />
<menu_item_call.on_enable
function="Tools.EnableBuyOrTake"
+ name="EnableBuyOrTake"
parameter="Buy,Take" />
</menu_item_call>
<menu_item_call
@@ -1312,8 +1304,8 @@
layout="topleft"
name="Lag Meter">
<menu_item_call.on_click
- function="ShowFloater"
- parameter="lag meter" />
+ function="Floater.Show"
+ parameter="lagmeter" />
</menu_item_call>
<menu_item_check
label="Statistics Bar"
@@ -1894,8 +1886,8 @@
function="Advanced.CheckConsole"
parameter="notifications" />
<menu_item_check.on_click
- function="Advanced.ToggleConsole"
- parameter="notifications" />
+ function="Floater.Show"
+ parameter="notifications_console" />
</menu_item_check>
<menu_item_separator
layout="topleft" />
@@ -1999,9 +1991,17 @@
layout="topleft"
name="Memory Leaking Simulation">
<menu_item_call.on_click
- function="Advanced.MemoryLeakingSimulation"
- parameter="" />
+ function="Floater.Show"
+ parameter="mem_leaking" />
</menu_item_call>
+ <menu_item_call
+ label="Bumps, Pushes &amp; Hits..."
+ layout="topleft"
+ name="Bumps, Pushes &amp;amp; Hits">
+ <menu_item_call.on_click
+ function="Floater.Show"
+ parameter="bumps" />
+ </menu_item_call>
<menu_item_separator
layout="topleft" />
<menu
@@ -2832,11 +2832,19 @@
name="XUI"
tear_off="true">
<menu_item_call
+ label="Reload Color Settings"
+ layout="topleft"
+ name="Reload Color Settings">
+ <menu_item_call.on_click
+ function="Advanced.ReloadColorSettings" />
+ </menu_item_call>
+ <menu_item_call
label="Show Font Test"
layout="topleft"
name="Show Font Test">
<menu_item_call.on_click
- function="Advanced.ShowFontTest" />
+ function="Floater.Show"
+ parameter="font_test" />
</menu_item_call>
<menu_item_call
label="Load from XML..."
@@ -2862,6 +2870,13 @@
<menu_item_check.on_click
function="Advanced.ToggleXUINames" />
</menu_item_check>
+ <menu_item_call
+ label="Send Test IMs"
+ layout="topleft"
+ name="Send Test IMs">
+ <menu_item_call.on_click
+ function="Advanced.SendTestIMs" />
+ </menu_item_call>
</menu>
<menu
create_jump_keys="true"
@@ -3092,7 +3107,8 @@
function="Advanced.ToggleInfoDisplay"
parameter="agent target" />
</menu_item_check>
- <!-- <menu_item_check
+<!-- Appears not to exist anymore
+ <menu_item_check
label="Debug Rotation"
layout="topleft"
name="Debug Rotation">
@@ -3103,6 +3119,7 @@
function="ToggleControl"
parameter="DebugAvatarRotation" />
</menu_item_check> -->
+-->
<menu_item_call
label="Dump Attachments"
layout="topleft"
@@ -3295,7 +3312,8 @@
layout="topleft"
name="God Tools">
<menu_item_call.on_click
- function="Admin.ShowGodTools" />
+ function="Floater.Show"
+ parameter="god_tools" />
<menu_item_call.on_enable
function="EnableGodCustomerService" />
</menu_item_call>
@@ -3481,6 +3499,7 @@
name="Official Linden Blog">
<menu_item_call.on_click
function="PromptShowURL"
+ name="OfficialLindenBlog_url"
parameter="WebLaunchSupportWiki,http://blog.secondlife.com/" />
</menu_item_call>
<menu_item_call
@@ -3489,6 +3508,7 @@
name="Scripting Portal">
<menu_item_call.on_click
function="PromptShowURL"
+ name="ScriptingPortal_url"
parameter="WebLaunchLSLWiki,http://wiki.secondlife.com/wiki/LSL_Portal" />
</menu_item_call>
<menu
@@ -3503,6 +3523,7 @@
name="Public Issue Tracker">
<menu_item_call.on_click
function="PromptShowURL"
+ name="PublicIssueTracker_url"
parameter="WebLaunchPublicIssue,http://jira.secondlife.com" />
</menu_item_call>
<menu_item_call
@@ -3511,6 +3532,7 @@
name="Publc Issue Tracker Help">
<menu_item_call.on_click
function="PromptShowURL"
+ name="PublicIssueTrackerHelp_url"
parameter="WebLaunchPublicIssueHelp,http://wiki.secondlife.com/wiki/Issue_tracker" />
</menu_item_call>
<menu_item_separator
@@ -3521,6 +3543,7 @@
name="Bug Reporing 101">
<menu_item_call.on_click
function="PromptShowURL"
+ name="BugReporting101_url"
parameter="WebLaunchBugReport101,http://wiki.secondlife.com/wiki/Bug_Reporting_101" />
</menu_item_call>
<menu_item_call
@@ -3529,6 +3552,7 @@
name="Security Issues">
<menu_item_call.on_click
function="PromptShowURL"
+ name="SecurityIssues_url"
parameter="WebLaunchSecurityIssues,http://wiki.secondlife.com/wiki/Security_issues" />
</menu_item_call>
<menu_item_call
@@ -3537,6 +3561,7 @@
name="QA Wiki">
<menu_item_call.on_click
function="PromptShowURL"
+ name="QAWiki_url"
parameter="WebLaunchQAWiki,http://wiki.secondlife.com/wiki/QA_Portal" />
</menu_item_call>
</menu>
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 47b21dc64d..17bb961308 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -13,7 +13,7 @@
<global name="implicitclosebutton">
Close
</global>
-
+
<template name="okbutton">
<form>
<button
@@ -102,7 +102,7 @@
name="MissingAlert"
label="Unknown Alert Message"
type="alertmodal">
-Your version of Second Life does not know how to display the alert message it just received.
+Your version of Second Life does not know how to display the alert it just received. Please verify that you have the latest Viewer installed.
Error details: The alert called &apos;[_NAME]&apos; was not found in notifications.xml.
<usetemplate
@@ -154,7 +154,7 @@ No tutorial is currently available.
icon="alertmodal.tga"
name="BadInstallation"
type="alertmodal">
-An error occurred while updating Second Life. Please download the latest version from secondlife.com.
+ An error occurred while updating Second Life. Please download the latest version of the Viewer. http://get.secondlife.com
<usetemplate
name="okbutton"
yestext="Ok"/>
@@ -164,9 +164,9 @@ An error occurred while updating Second Life. Please download the latest version
icon="alertmodal.tga"
name="LoginFailedNoNetwork"
type="alertmodal">
-Network Error: Could not establish a connection.
+Could not connect to the Second Life Grid.
&apos;[DIAGNOSTIC]&apos;
-Please check your network connection.
+Make sure your Internet connection is working properly.
<usetemplate
name="okbutton"
yestext="Ok"/>
@@ -443,6 +443,13 @@ Go to the Second Life web site for more information on partnering?
Your default permissions may not work in older regions.
</notification>
+<notification
+ icon="alertmodal.tga"
+ name="ClickUnimplemented"
+ type="alertmodal">
+This feature is yet to be implemented.
+ </notification>
+
<notification
icon="alertmodal.tga"
name="ClickWebProfileHelpAvatar"
@@ -2335,9 +2342,10 @@ You can use [SECOND_LIFE] normally and other users will see you correctly.
icon="alertmodal.tga"
name="FirstRun"
type="alertmodal">
+
[SECOND_LIFE] installation is complete.
-If this is your first time using [SECOND_LIFE], you will need to create an account before you can log on.
+If this is your first time using [SECOND_LIFE], you will need to create an account before you can log in.
Return to www.secondlife.com to create a new account?
<usetemplate
name="okcancelbuttons"
@@ -2399,7 +2407,7 @@ Please choose the male or female avatar. You can change your mind later.
icon="alertmodal.tga"
name="GrantedModifyRights"
type="alertmodal">
-You have been granted the privilege to modify [FIRST_NAME] [LAST_NAME]&apos;s objects.
+[FIRST_NAME] [LAST_NAME] has given you permission to edit their objects.
</notification>
<notification
@@ -2836,7 +2844,7 @@ Do you REALLY want to kick all users off the grid?
icon="alertmodal.tga"
name="MuteLinden"
type="alertmodal">
-Sorry, you cannot mute a Linden.
+Sorry, you cannot block a Linden.
<usetemplate
name="okbutton"
yestext="OK"/>
@@ -2851,10 +2859,10 @@ You cannot start an auction on a parcel which is already set for sale. Disable
<notification
icon="alertmodal.tga"
- label="Mute object by name failed"
+ label="Block object by name failed"
name="MuteByNameFailed"
type="alertmodal">
-You already have muted this name.
+You already have blocked this name.
<usetemplate
name="okbutton"
yestext="OK"/>
@@ -2907,8 +2915,7 @@ Chat and instant messages will be hidden. Instant messages will get your Busy mo
icon="alert.tga"
name="JoinedTooManyGroupsMember"
type="alert">
-You are a member of too many groups to join another one. Please leave at least one group before joining this one, or decline the offer.
-To leave a group select the &apos;Groups...&apos; option from the &apos;Edit&apos; menu.
+You have reached your maximum number of groups. Please leave another group before joining this one, or decline the offer.
[NAME] has invited you to join a group as a member.
[INVITE]
<usetemplate
@@ -3056,6 +3063,18 @@ Are you sure you want to teleport?
</notification>
<notification
+ icon="alertmodal.tga"
+ name="TeleportToPick"
+ type="alertmodal">
+Teleport to [PICK]?
+ <usetemplate
+ ignoretext="When teleporting from double-clicking a pick"
+ name="okcancelignore"
+ notext="Cancel"
+ yestext="Teleport"/>
+ </notification>
+
+ <notification
icon="alert.tga"
label="Message everyone in your Estate"
name="MessageEstate"
@@ -4154,7 +4173,7 @@ Go to the Second Life web site to see your account history?
icon="alertmodal.tga"
name="ClickOpenF1Help"
type="alertmodal">
-Visit the Second Life Support Web site?
+View Second Life help?
<usetemplate
ignoretext="When visiting the Second Life Support Website."
name="okcancelignore"
@@ -4170,8 +4189,9 @@ Are you sure you want to quit?
<usetemplate
ignoretext="When Quitting Second Life."
name="okcancelignore"
- notext="Continue"
+ notext="Don&apos;t Quit"
yestext="Quit"/>
+ <unique/>
</notification>
<notification
@@ -4366,7 +4386,7 @@ Would you like to leave Busy Mode before completing this transaction?
icon="alertmodal.tga"
name="ConfirmEmptyTrash"
type="alertmodal">
-Are you sure you want to permanently remove the contents of your Trash folder?
+Are you sure you want to permanently delete the contents of your Trash?
<usetemplate
ignoretext="When emptying your inventory trash folder"
name="okcancelignore"
@@ -4411,7 +4431,7 @@ Are you sure you want to clear your list of saved URLs?
icon="alertmodal.tga"
name="ConfirmEmptyLostAndFound"
type="alertmodal">
-Are you sure you want to permanently remove the contents of your Lost And Found folder?
+Are you sure you want to permanently delete the contents of your Lost And Found?
<usetemplate
ignoretext="When emptying your inventory Lost And Found folder"
name="okcancelignore"
@@ -4423,13 +4443,13 @@ Are you sure you want to permanently remove the contents of your Lost And Found
icon="alertmodal.tga"
name="CopySLURL"
type="alertmodal">
-The following SLURL has been copied to your clipboard:
+The following SLurl has been copied to your clipboard:
[SLURL]
Put it in a web page to give others easy access to this location or try it out yourself by pasting it into the address bar of your web browser.
<form name="form">
<ignore name="ignore"
- text="When copying a SLURL to your clipboard"/>
+ text="When copying a SLurl to your clipboard"/>
</form>
</notification>
@@ -4905,7 +4925,7 @@ Your chat session with [NAME] must close.
icon="alertmodal.tga"
name="Cannot_Purchase_an_Attachment"
type="alertmodal">
-Items may not be purchased while they are part of an attachment.
+You can&apos;t buy an object while it is attached.
</notification>
<notification
@@ -4923,7 +4943,7 @@ Granting this request gives a script ongoing permission to take Linden dollars (
icon="alertmodal.tga"
name="AutoWearNewClothing"
type="alertmodal">
-Would you like to automatically wear the clothing item you create?
+Automatically wear the clothing you create?
<usetemplate
ignoretext="Automatically wear new clothing"
name="okcancelignore"
@@ -4935,13 +4955,12 @@ Would you like to automatically wear the clothing item you create?
icon="alertmodal.tga"
name="NotAgeVerified"
type="alertmodal">
-You need to be age-verified in order to access this parcel.
-Would you like to visit the Second Life website to verify your age?
+You must be age-verified to visit this area. Visit the Second Life website and verify your age?
[_URL]
- <url option="0" name="url">
+ <url option="0">
- https://secondlife.com/account/verification.php
+ https://secondlife.com/account/verification.php
</url>
<usetemplate
ignoretext="Warn about lack of age verification"
@@ -4954,8 +4973,7 @@ Would you like to visit the Second Life website to verify your age?
icon="alertmodal.tga"
name="Cannot enter parcel: no payment info on file"
type="alertmodal">
-This parcel requires that you have payment information on file before you can access it.
-Would you like to visit the Second Life website to set this up?
+You must have payment information on file to visit this area. Visit the Second Life website and set this up?
[_URL]
<url option="0" name="url">
@@ -4973,354 +4991,354 @@ Would you like to visit the Second Life website to set this up?
icon="alertmodal.tga"
name="MissingString"
type="alertmodal">
-The string [STRING_NAME] is missing from strings.xml
+How odd. The string [STRING_NAME] is missing from strings.xml
</notification>
<notification
icon="notifytip.tga"
name="SystemMessageTip"
type="notifytip">
-[MESSAGE]
+ [MESSAGE]
</notification>
<notification
icon="notifytip.tga"
name="Cancelled"
type="notifytip">
-Cancelled
+ Cancelled
</notification>
<notification
icon="notifytip.tga"
name="CancelledSit"
type="notifytip">
-Cancelled Sit
+ Cancelled Sit
</notification>
<notification
icon="notifytip.tga"
name="CancelledAttach"
type="notifytip">
-Cancelled Attach
+ Cancelled Attach
</notification>
<notification
icon="notifytip.tga"
name="ReplacedMissingWearable"
type="notifytip">
-Replaced missing clothing/body part with default.
+ Replaced missing clothing/body part with default.
</notification>
<notification
icon="groupnotify"
name="GroupNotice"
type="groupnotify">
-Topic: [SUBJECT], Message: [MESSAGE]
+ Topic: [SUBJECT], Message: [MESSAGE]
</notification>
<notification
icon="notifytip.tga"
name="FriendOnline"
type="notifytip">
-[FIRST] [LAST] is Online
+ [FIRST] [LAST] is Online
</notification>
<notification
icon="notifytip.tga"
name="FriendOffline"
type="notifytip">
-[FIRST] [LAST] is Offline
+ [FIRST] [LAST] is Offline
</notification>
<notification
icon="notifytip.tga"
name="AddSelfFriend"
type="notifytip">
-You cannot add yourself as a friend.
+ Although you&apos;re very nice, you can&apos;t add yourself as a friend.
</notification>
<notification
icon="notifytip.tga"
name="UploadingAuctionSnapshot"
type="notifytip">
-Uploading in-world and web site snapshots...
-(Takes about 5 minutes.)
+ Uploading in-world and web site snapshots...
+ (Takes about 5 minutes.)
</notification>
<notification
icon="notify.tga"
name="UploadPayment"
type="notify">
-You paid L$[AMOUNT] to upload.
+ You paid L$[AMOUNT] to upload.
</notification>
<notification
icon="notifytip.tga"
name="UploadWebSnapshotDone"
type="notifytip">
-Web site snapshot upload done.
+ Web site snapshot upload done.
</notification>
<notification
icon="notifytip.tga"
name="UploadSnapshotDone"
type="notifytip">
-In-world snapshot upload done
+ In-world snapshot upload done
</notification>
<notification
icon="notifytip.tga"
name="TerrainDownloaded"
type="notifytip">
-Terrain.raw downloaded
+ Terrain.raw downloaded
</notification>
<notification
icon="notifytip.tga"
name="GestureMissing"
type="notifytip">
-Gesture [NAME] is missing from database.
+ Hmm. Gesture [NAME] is missing from the database.
</notification>
<notification
icon="notifytip.tga"
name="UnableToLoadGesture"
type="notifytip">
-Unable to load gesture [NAME].
-Please try again.
+ Unable to load gesture [NAME].
+ Please try again.
</notification>
<notification
icon="notifytip.tga"
name="LandmarkMissing"
type="notifytip">
-Landmark is missing from database.
+ Landmark is missing from database.
</notification>
<notification
icon="notifytip.tga"
name="UnableToLoadLandmark"
type="notifytip">
-Unable to load landmark. Please try again.
+ Unable to load landmark. Please try again.
</notification>
<notification
icon="notifytip.tga"
name="CapsKeyOn"
type="notifytip">
-Your Caps Lock key is on.
-As this will affect the password you type in, you will probably want to turn it off.
+ Your Caps Lock key is on.
+ This might affect your password.
</notification>
<notification
icon="notifytip.tga"
name="NotecardMissing"
type="notifytip">
-Notecard is missing from database.
+ Notecard is missing from database.
</notification>
<notification
icon="notifytip.tga"
name="NotecardNoPermissions"
type="notifytip">
-Insufficient permissions to view notecard.
+ You don&apos;t have permission to view this notecard.
</notification>
<notification
icon="notifytip.tga"
name="RezItemNoPermissions"
type="notifytip">
-Insufficient permissions to rez object.
+ Insufficient permissions to rez object.
</notification>
<notification
icon="notifytip.tga"
name="UnableToLoadNotecard"
type="notifytip">
-Unable to load notecard.
-Please try again.
+ Unable to load notecard.
+ Please try again.
</notification>
<notification
icon="notifytip.tga"
name="ScriptMissing"
type="notifytip">
-Script is missing from database.
+ Script is missing from database.
</notification>
<notification
icon="notifytip.tga"
name="ScriptNoPermissions"
type="notifytip">
-Insufficient permissions to view script.
+ Insufficient permissions to view script.
</notification>
<notification
icon="notifytip.tga"
name="UnableToLoadScript"
type="notifytip">
-Unable to load script. Please try again.
+ Unable to load script. Please try again.
</notification>
<notification
icon="notifytip.tga"
name="IncompleteInventory"
type="notifytip">
-The complete contents you are offering are not yet locally available. Please try offering those items again in a minute.
+ The complete contents you are offering are not yet locally available. Please try offering those items again in a minute.
</notification>
<notification
icon="notifytip.tga"
name="CannotModifyProtectedCategories"
type="notifytip">
-You cannot modify protected categories.
+ You cannot modify protected categories.
</notification>
<notification
icon="notifytip.tga"
name="CannotRemoveProtectedCategories"
type="notifytip">
-You cannot remove protected categories.
+ You cannot remove protected categories.
</notification>
<notification
icon="notifytip.tga"
name="OfferedCard"
type="notifytip">
-You have offered a calling card to [FIRST] [LAST]
+ You have offered a calling card to [FIRST] [LAST]
</notification>
<notification
icon="notifytip.tga"
name="UnableToBuyWhileDownloading"
type="notifytip">
-Unable to buy while downloading object data.
-Please try again.
+ Unable to buy while downloading object data.
+ Please try again.
</notification>
<notification
icon="notifytip.tga"
name="UnableToLinkWhileDownloading"
type="notifytip">
-Unable to link while downloading object data.
-Please try again.
+ Unable to link while downloading object data.
+ Please try again.
</notification>
<notification
icon="notifytip.tga"
name="CannotBuyObjectsFromDifferentOwners"
type="notifytip">
-Cannot buy objects from different owners at the same time.
-Please select a single object.
+ You can only buy objects from one owner at a time.
+ Please select a single object.
</notification>
<notification
icon="notifytip.tga"
name="ObjectNotForSale"
type="notifytip">
-Object does not appear to be for sale.
+ This object is not for sale.
</notification>
<notification
icon="notifytip.tga"
name="EnteringGodMode"
type="notifytip">
-Entering god mode, level [LEVEL]
+ Entering god mode, level [LEVEL]
</notification>
<notification
icon="notifytip.tga"
name="LeavingGodMode"
type="notifytip">
-Leaving god mode, level [LEVEL]
+ Now leaving god mode, level [LEVEL]
</notification>
<notification
icon="notifytip.tga"
name="CopyFailed"
type="notifytip">
-Copy failed because you lack copy permission
+ You don&apos;t have permission to copy this.
</notification>
<notification
icon="notifytip.tga"
name="InventoryAccepted"
type="notifytip">
-[NAME] accepted your inventory offer.
+ [NAME] accepted your inventory offer.
</notification>
<notification
icon="notifytip.tga"
name="InventoryDeclined"
type="notifytip">
-[NAME] declined your inventory offer.
+ [NAME] declined your inventory offer.
</notification>
<notification
icon="notifytip.tga"
name="ObjectMessage"
type="notifytip">
-[NAME]: [MESSAGE]
+ [NAME]: [MESSAGE]
</notification>
<notification
icon="notifytip.tga"
name="CallingCardAccepted"
type="notifytip">
-Your calling card was accepted.
+ Your calling card was accepted.
</notification>
<notification
icon="notifytip.tga"
name="CallingCardDeclined"
type="notifytip">
-Your calling card was declined.
+ Your calling card was declined.
</notification>
<notification
icon="notifytip.tga"
name="TeleportToLandmark"
type="notifytip">
-Now that you have reached the mainland, you can teleport to locations like &apos;[NAME]&apos; by clicking on the Inventory button on the bottom right of your screen, and then select the Landmarks folder.
-Double click on the landmark and click on Teleport to travel there.
+ Now that you have reached the mainland, you can teleport to locations like &apos;[NAME]&apos; by clicking on the Inventory button on the bottom right of your screen, and then select the Landmarks folder.
+ Double click on the landmark and click on Teleport to travel there.
</notification>
<notification
icon="notifytip.tga"
name="TeleportToPerson"
type="notifytip">
-Now that you have reached the mainland, you can contact residents like &apos;[NAME]&apos; by clicking on the Inventory button on the bottom right of your screen, and then select the Calling Cards folder.
-Double click on the card, click on Instant Message, and type a message.
+ Now that you have reached the mainland, you can contact residents like &apos;[NAME]&apos; by clicking on the Inventory button on the bottom right of your screen, and then select the Calling Cards folder.
+ Double click on the card, click on Instant Message, and type a message.
</notification>
<notification
icon="notifytip.tga"
name="CantSelectLandFromMultipleRegions"
type="notifytip">
-Can&apos;t select land across server boundaries.
-Try selecting a smaller piece of land.
+ Can&apos;t select land across server boundaries.
+ Try selecting a smaller piece of land.
</notification>
<notification
icon="notifytip.tga"
name="SearchWordBanned"
type="notifytip">
-Some terms in your search query were excluded due to content restrictions as clarified in the Community Standards.
+ Some terms in your search query were excluded due to content restrictions as clarified in the Community Standards.
</notification>
<notification
icon="notifytip.tga"
name="NoContentToSearch"
type="notifytip">
-Please select at least one type of content to search (PG, Mature, or Adult).
+ Please select at least one type of content to search (PG, Mature, or Adult).
</notification>
<notification
icon="notify.tga"
name="GroupVote"
type="notify">
-[NAME] has proposed to vote on:
-[MESSAGE]
+ [NAME] has proposed to vote on:
+ [MESSAGE]
<form name="form">
<button
index="0"
@@ -5337,17 +5355,17 @@ Please select at least one type of content to search (PG, Mature, or Adult).
icon="notify.tga"
name="SystemMessage"
type="notify">
-[MESSAGE]
+ [MESSAGE]
</notification>
<notification
icon="notify.tga"
name="EventNotification"
type="notify">
-Event Notification:
+ Event Notification:
-[NAME]
-[DATE]
+ [NAME]
+ [DATE]
<form name="form">
<button
index="0"
@@ -5368,9 +5386,9 @@ Event Notification:
icon="notify.tga"
name="TransferObjectsHighlighted"
type="notify">
-All objects on this parcel that will transfer to the purchaser of this parcel are now highlighted.
+ All objects on this parcel that will transfer to the purchaser of this parcel are now highlighted.
-* Trees and grasses that will transfer are not highlighted.
+ * Trees and grasses that will transfer are not highlighted.
<form name="form">
<button
index="0"
@@ -5383,61 +5401,61 @@ All objects on this parcel that will transfer to the purchaser of this parcel ar
icon="notify.tga"
name="DeactivatedGesturesTrigger"
type="notify">
-Deactivated gestures with same trigger:
-[NAMES]
+ Deactivated gestures with same trigger:
+ [NAMES]
</notification>
<notification
icon="notify.tga"
name="NoQuickTime"
type="notify">
-Apple&apos;s QuickTime software does not appear to be installed on your system.
-If you want to view streaming media on parcels that support it you should go to the QuickTime site (http://www.apple.com/quicktime) and install the QuickTime Player.
+ Apple&apos;s QuickTime software does not appear to be installed on your system.
+ If you want to view streaming media on parcels that support it you should go to the QuickTime site (http://www.apple.com/quicktime) and install the QuickTime Player.
</notification>
<notification
icon="notify.tga"
name="OwnedObjectsReturned"
type="notify">
-The objects you own on the selected parcel of land have been returned back to your inventory.
+ The objects you own on the selected parcel of land have been returned back to your inventory.
</notification>
<notification
icon="notify.tga"
name="OtherObjectsReturned"
type="notify">
-The objects on the selected parcel of land that is owned by [FIRST] [LAST] have been returned to his or her inventory.
+ The objects on the selected parcel of land that is owned by [FIRST] [LAST] have been returned to his or her inventory.
</notification>
<notification
icon="notify.tga"
name="OtherObjectsReturned2"
type="notify">
-The objects on the selected parcel of land owned by the resident &apos;[NAME]&apos; have been returned to their owner.
+ The objects on the selected parcel of land owned by the resident &apos;[NAME]&apos; have been returned to their owner.
</notification>
<notification
icon="notify.tga"
name="GroupObjectsReturned"
type="notify">
-The objects on the selected parcel of land shared with the group [GROUPNAME] have been returned back to their owner&apos;s inventory.
-Transferable deeded objects have been returned to their previous owners.
-Non-transferable objects that are deeded to the group have been deleted.
+ The objects on the selected parcel of land shared with the group [GROUPNAME] have been returned back to their owner&apos;s inventory.
+ Transferable deeded objects have been returned to their previous owners.
+ Non-transferable objects that are deeded to the group have been deleted.
</notification>
<notification
icon="notify.tga"
name="UnOwnedObjectsReturned"
type="notify">
-The objects on the selected parcel that are NOT owned by you have been returned to their owners.
+ The objects on the selected parcel that are NOT owned by you have been returned to their owners.
</notification>
<notification
icon="notify.tga"
name="NotSafe"
type="notify">
-This land has damage enabled (&apos;not safe&apos;).
-You can be hurt here. If you die, you will be teleported to your home location.
+ This land has damage enabled.
+ You can be hurt here. If you die, you will be teleported to your home location.
<unique/>
</notification>
@@ -5445,8 +5463,8 @@ You can be hurt here. If you die, you will be teleported to your home location.
icon="notify.tga"
name="NoFly"
type="notify">
-This land has flying disabled (&apos;no fly&apos;).
-You cannot fly here.
+ This area has flying disabled.
+ You can&apos;t fly here.
<unique/>
</notification>
@@ -5454,8 +5472,7 @@ You cannot fly here.
icon="notify.tga"
name="PushRestricted"
type="notify">
-This land is &apos;No Pushing&apos;.
-You cannot push others here unless you own the land.
+ This area does not allow pushing. You can&apos;t push others here unless you own the land.
<unique/>
</notification>
@@ -5463,7 +5480,7 @@ You cannot push others here unless you own the land.
icon="notify.tga"
name="NoVoice"
type="notify">
-This land has voice disabled.
+ This area has voice chat disabled. You won&apos;t be able to hear anyone talking.
<unique/>
</notification>
@@ -5471,8 +5488,7 @@ This land has voice disabled.
icon="notify.tga"
name="NoBuild"
type="notify">
-This land has building disabled (&apos;no build&apos;).
-You cannot create objects here.
+ This area has building disabled. You can&apos;t build or rez objects here.
<unique/>
</notification>
@@ -5480,222 +5496,223 @@ You cannot create objects here.
icon="notify.tga"
name="ScriptsStopped"
type="notify">
-An administrator has temporarily stopped scripts in this region.
+ An administrator has temporarily stopped scripts in this region.
</notification>
<notification
icon="notify.tga"
name="ScriptsNotRunning"
type="notify">
-This region is not running any scripts.
+ This region is not running any scripts.
</notification>
<notification
icon="notify.tga"
name="NoOutsideScripts"
type="notify">
-This land has outside scripts disabled (&apos;no outside scripts&apos;).
-No scripts will run except those belonging to the land owner.
+ This land has outside scripts disabled.
+
+ No scripts will work here except those belonging to the land owner.
</notification>
<notification
icon="notify.tga"
name="ClaimPublicLand"
type="notify">
-Can only claim public land in region you&apos;re in.
+ You can only claim public land in the Region you&apos;re in.
</notification>
<notification
icon="notify.tga"
name="RegionTPAccessBlocked"
type="notify">
-You aren&apos;t allowed in that Region due to your maturity Rating. You may need to validate your age and/or install the latest Viewer.
+ You aren&apos;t allowed in that Region due to your maturity Rating. You may need to validate your age and/or install the latest Viewer.
-Please go to the Knowledge Base for details on accessing areas with this maturity Rating.
+ Please go to the Knowledge Base for details on accessing areas with this maturity Rating.
</notification>
<notification
icon="notify.tga"
name="URBannedFromRegion"
type="notify">
-You are banned from the region.
+ You are banned from the region.
</notification>
<notification
icon="notify.tga"
name="NoTeenGridAccess"
type="notify">
-Your account cannot connect to this teen grid region.
+ Your account cannot connect to this teen grid region.
</notification>
<notification
icon="notify.tga"
name="NoHelpIslandTP"
type="notify">
-You cannot teleport back to Help Island.
-Go to &apos;Help Island Public&apos; to repeat the tutorial.
+ You cannot teleport back to Help Island.
+ Go to &apos;Help Island Public&apos; to repeat the tutorial.
</notification>
<notification
icon="notify.tga"
name="ImproperPaymentStatus"
type="notify">
-You do not have proper payment status to enter this region.
+ You do not have proper payment status to enter this region.
</notification>
<notification
icon="notify.tga"
name="MustGetAgeRgion"
type="notify">
-You must be age-verified to enter this region.
+ You must be age-verified to enter this region.
</notification>
<notification
icon="notify.tga"
name="MustGetAgeParcel"
type="notify">
-You must be age-verified to enter this parcel.
+ You must be age-verified to enter this parcel.
</notification>
<notification
icon="notify.tga"
name="NoDestRegion"
type="notify">
-No destination region found.
+ No destination region found.
</notification>
<notification
icon="notify.tga"
name="NotAllowedInDest"
type="notify">
-You are not allowed into the destination.
+ You are not allowed into the destination.
</notification>
<notification
icon="notify.tga"
name="RegionParcelBan"
type="notify">
-Cannot region cross into banned parcel. Try another way.
+ Cannot region cross into banned parcel. Try another way.
</notification>
<notification
icon="notify.tga"
name="TelehubRedirect"
type="notify">
-You have been redirected to a telehub.
+ You have been redirected to a telehub.
</notification>
<notification
icon="notify.tga"
name="CouldntTPCloser"
type="notify">
-Could not teleport closer to destination.
+ Could not teleport closer to destination.
</notification>
<notification
icon="notify.tga"
name="TPCancelled"
type="notify">
- Teleport cancelled.
+ Teleport cancelled.
</notification>
<notification
icon="notify.tga"
name="FullRegionTryAgain"
type="notify">
-The region you are attempting to enter is currently full.
-Please try again in a few moments.
+ The region you are attempting to enter is currently full.
+ Please try again in a few moments.
</notification>
<notification
icon="notify.tga"
name="GeneralFailure"
type="notify">
-General failure.
+ General failure.
</notification>
<notification
icon="notify.tga"
name="RoutedWrongRegion"
type="notify">
-Routed to wrong region. Please try again.
+ Routed to wrong region. Please try again.
</notification>
<notification
icon="notify.tga"
name="NoValidAgentID"
type="notify">
-No valid agent id.
+ No valid agent id.
</notification>
<notification
icon="notify.tga"
name="NoValidSession"
type="notify">
-No valid session id.
+ No valid session id.
</notification>
<notification
icon="notify.tga"
name="NoValidCircuit"
type="notify">
-No valid circuit code.
+ No valid circuit code.
</notification>
<notification
icon="notify.tga"
name="NoValidTimestamp"
type="notify">
-No valid timestamp.
+ No valid timestamp.
</notification>
<notification
icon="notify.tga"
name="NoPendingConnection"
type="notify">
-Unable to create pending connection.
+ Unable to create pending connection.
</notification>
<notification
icon="notify.tga"
name="InternalUsherError"
type="notify">
-Internal error attempting to connect agent usher.
+ Internal error attempting to connect agent usher.
</notification>
<notification
icon="notify.tga"
name="NoGoodTPDestination"
type="notify">
-Unable to find a good teleport destination in this region.
+ Unable to find a good teleport destination in this region.
</notification>
<notification
icon="notify.tga"
name="InternalErrorRegionResolver"
type="notify">
-Internal error attempting to activate region resolver.
+ Internal error attempting to activate region resolver.
</notification>
<notification
icon="notify.tga"
name="NoValidLanding"
type="notify">
-A valid landing point could not be found.
+ A valid landing point could not be found.
</notification>
<notification
icon="notify.tga"
name="NoValidParcel"
type="notify">
-No valid parcel could be found.
+ No valid parcel could be found.
</notification>
<notification
icon="notify.tga"
name="ObjectGiveItem"
type="notify">
-An object named [OBJECTFROMNAME] owned by [FIRST] [LAST] has given you a [OBJECTTYPE] named [OBJECTNAME].
+ An object named [OBJECTFROMNAME] owned by [FIRST] [LAST] has given you a [OBJECTTYPE] named [OBJECTNAME].
<form name="form">
<button
index="0"
@@ -5708,7 +5725,7 @@ An object named [OBJECTFROMNAME] owned by [FIRST] [LAST] has given you a [OBJECT
<button
index="2"
name="Mute"
- text="Mute"/>
+ text="Block"/>
</form>
</notification>
@@ -5716,7 +5733,7 @@ An object named [OBJECTFROMNAME] owned by [FIRST] [LAST] has given you a [OBJECT
icon="notify.tga"
name="ObjectGiveItemUnknownUser"
type="notify">
-An object named [OBJECTFROMNAME] owned by (an unknown user) has given you a [OBJECTTYPE] named [OBJECTNAME].
+ An object named [OBJECTFROMNAME] owned by (an unknown user) has given you a [OBJECTTYPE] named [OBJECTNAME].
<form name="form">
<button
index="0"
@@ -5729,7 +5746,7 @@ An object named [OBJECTFROMNAME] owned by (an unknown user) has given you a [OBJ
<button
index="2"
name="Mute"
- text="Mute"/>
+ text="Block"/>
</form>
</notification>
@@ -5737,7 +5754,7 @@ An object named [OBJECTFROMNAME] owned by (an unknown user) has given you a [OBJ
icon="notify.tga"
name="UserGiveItem"
type="notify">
-[NAME] has given you a [OBJECTTYPE] named &apos;[OBJECTNAME]&apos;.
+ [NAME] has given you a [OBJECTTYPE] named &apos;[OBJECTNAME]&apos;.
<form name="form">
<button
index="0"
@@ -5750,7 +5767,7 @@ An object named [OBJECTFROMNAME] owned by (an unknown user) has given you a [OBJ
<button
index="2"
name="Mute"
- text="Mute"/>
+ text="Block"/>
</form>
</notification>
@@ -5758,15 +5775,15 @@ An object named [OBJECTFROMNAME] owned by (an unknown user) has given you a [OBJ
icon="notify.tga"
name="GodMessage"
type="notify">
-[NAME]
-[MESSAGE]
+ [NAME]
+ [MESSAGE]
</notification>
<notification
icon="notify.tga"
name="JoinGroup"
type="notify">
-[MESSAGE]
+ [MESSAGE]
<form name="form">
<button
index="0"
@@ -5787,9 +5804,9 @@ An object named [OBJECTFROMNAME] owned by (an unknown user) has given you a [OBJ
icon="notify.tga"
name="TeleportOffered"
type="notify">
-[NAME] has offered to teleport you to his or her location:
+ [NAME] has offered to teleport you to their location:
-[MESSAGE]
+ [MESSAGE]
<form name="form">
<button
index="0"
@@ -5806,8 +5823,8 @@ An object named [OBJECTFROMNAME] owned by (an unknown user) has given you a [OBJ
icon="notify.tga"
name="GotoURL"
type="notify">
-[MESSAGE]
-[URL]
+ [MESSAGE]
+ [URL]
<form name="form">
<button
index="0"
@@ -5824,11 +5841,11 @@ An object named [OBJECTFROMNAME] owned by (an unknown user) has given you a [OBJ
icon="notify.tga"
name="OfferFriendship"
type="notify">
-[NAME] is offering friendship.
+ [NAME] is offering friendship.
-[MESSAGE]
+ [MESSAGE]
-(By default, you will be able to see each other&apos;s online status.)
+ (By default, you will be able to see each other&apos;s online status.)
<form name="form">
<button
index="0"
@@ -5845,9 +5862,9 @@ An object named [OBJECTFROMNAME] owned by (an unknown user) has given you a [OBJ
icon="notify.tga"
name="OfferFriendshipNoMessage"
type="notify">
-[NAME] is offering friendship.
+ [NAME] is offering friendship.
-(By default, you will be able to see each other&apos;s online status.)
+ (By default, you will be able to see each other&apos;s online status.)
<form name="form">
<button
index="0"
@@ -5864,22 +5881,22 @@ An object named [OBJECTFROMNAME] owned by (an unknown user) has given you a [OBJ
icon="notify.tga"
name="FriendshipAccepted"
type="notify">
-[NAME] accepted your friendship offer.
+ [NAME] accepted your friendship offer.
</notification>
<notification
icon="notify.tga"
name="FriendshipDeclined"
type="notify">
-[NAME] declined your friendship offer.
+ [NAME] declined your friendship offer.
</notification>
<notification
icon="notify.tga"
name="OfferCallingCard"
type="notify">
-[FIRST] [LAST] is offering their calling card.
-This will add a bookmark in your inventory so you can quickly IM this resident.
+ [FIRST] [LAST] is offering their calling card.
+ This will add a bookmark in your inventory so you can quickly IM this resident.
<form name="form">
<button
index="0"
@@ -5898,8 +5915,8 @@ This will add a bookmark in your inventory so you can quickly IM this resident.
priority="high"
sound="UISndAlert"
type="notify">
-Region is restarting in [MINUTES] minutes.
-If you remain in this region you will be logged out.
+ This region will restart in [MINUTES] minutes.
+ If you stay in this region you will be logged out.
</notification>
<notification
@@ -5908,19 +5925,19 @@ If you remain in this region you will be logged out.
priority="high"
sound="UISndAlert"
type="notify">
-Region is restarting in [SECONDS] seconds.
-If you remain in this region you will be logged out.
+ This region will restart in [SECONDS] seconds.
+ If you stay in this region you will be logged out.
</notification>
<notification
icon="notify.tga"
name="LoadWebPage"
type="notify">
-Load web page [URL]?
+ Load web page [URL]?
-[MESSAGE]
+ [MESSAGE]
-From object: [OBJECTNAME], owner: [NAME]?
+ From object: [OBJECTNAME], owner: [NAME]?
<form name="form">
<button
index="0"
@@ -5937,14 +5954,14 @@ From object: [OBJECTNAME], owner: [NAME]?
icon="notify.tga"
name="FailedToFindWearableUnnamed"
type="notify">
-Failed to find [TYPE] in database.
+ Failed to find [TYPE] in database.
</notification>
<notification
icon="notify.tga"
name="FailedToFindWearable"
type="notify">
-Failed to find [TYPE] named [DESC] in database.
+ Failed to find [TYPE] named [DESC] in database.
</notification>
<notification
@@ -5958,10 +5975,10 @@ Failed to find [TYPE] named [DESC] in database.
icon="notify.tga"
name="ScriptQuestion"
type="notify">
-&apos;[OBJECTNAME]&apos;, an object owned by &apos;[NAME]&apos;, would like to:
+ &apos;[OBJECTNAME]&apos;, an object owned by &apos;[NAME]&apos;, would like to:
-[QUESTIONS]
-Is this OK?
+ [QUESTIONS]
+ Is this OK?
<form name="form">
<button
index="0"
@@ -5974,7 +5991,7 @@ Is this OK?
<button
index="2"
name="Mute"
- text="Mute"/>
+ text="Block"/>
</form>
</notification>
@@ -5983,12 +6000,12 @@ Is this OK?
name="ScriptQuestionCaution"
priority="high"
type="notify">
-&apos;[OBJECTNAME]&apos;, an object owned by &apos;[NAME]&apos;, would like to:
+ An object named &apos;[OBJECTNAME]&apos;, owned by &apos;[NAME]&apos; would like to:
-[QUESTIONS]
-If you do not trust this object and its creator, you should deny the request. For additional information, click the Details button.
+ [QUESTIONS]
+ If you do not trust this object and its creator, you should deny the request.
-Grant this request?
+ Grant this request?
<form name="form">
<button
index="0"
@@ -6010,8 +6027,8 @@ Grant this request?
icon="notify.tga"
name="ScriptDialog"
type="notify">
-[FIRST] [LAST]&apos;s &apos;[TITLE]&apos;
-[MESSAGE]
+ [FIRST] [LAST]&apos;s &apos;[TITLE]&apos;
+ [MESSAGE]
<form name="form">
<button
index="-1"
@@ -6024,8 +6041,8 @@ Grant this request?
icon="notify.tga"
name="ScriptDialogGroup"
type="notify">
-[GROUPNAME]&apos;s &apos;[TITLE]&apos;
-[MESSAGE]
+ [GROUPNAME]&apos;s &apos;[TITLE]&apos;
+ [MESSAGE]
<form name="form">
<button
index="-1"
@@ -6038,142 +6055,137 @@ Grant this request?
icon="notify.tga"
name="FirstBalanceIncrease"
type="notify">
-You just received L$[AMOUNT].
-Objects and other users may give you L$.
-Your balance is shown in the upper-right corner of the screen.
+ You just received L$[AMOUNT].
+ Your L$ balance is shown in the upper-right.
</notification>
<notification
icon="notify.tga"
name="FirstBalanceDecrease"
type="notify">
-You just paid L$[AMOUNT].
-Your balance is shown in the upper-right corner of the screen.
+ You just paid L$[AMOUNT].
+ Your L$ balance is shown in the upper-right.
</notification>
<notification
icon="notify.tga"
name="FirstSit"
type="notify">
-You are sitting.
-Use the arrow keys (or AWSD) to change the view.
-Click the &apos;Stand Up&apos; button to get up.
+ You are sitting.
+ Use your arrow keys (or AWSD) to look around.
+ Click the &apos;Stand Up&apos; button to stand.
</notification>
<notification
icon="notify.tga"
name="FirstMap"
type="notify">
-Click and drag to scroll the map.
-Double-click to teleport.
-Use the controls on the right to find things and display different backgrounds.
+ Click and drag the map to look around.
+ Double-click to teleport.
+ Use the controls on the right to find things and display different backgrounds.
</notification>
<notification
icon="notify.tga"
name="FirstBuild"
type="notify">
-You can build new objects in some areas of [SECOND_LIFE].
-Use the tools in the upper left to build, and try holding down Ctrl or Alt to rapidly switch tools.
-Press Esc to stop building.
+ You have opened the Build Tools. Every object you see around you was created using these tools.
</notification>
+<!--
<notification
icon="notify.tga"
name="FirstLeftClickNoHit"
type="notify">
-Left-clicking interacts with special objects.
-If the mouse pointer changes to a hand, you can interact with the object.
-Right-click always shows a menu of things you can do.
+ Left-clicking interacts with special objects.
+ If the mouse pointer changes to a hand, you can interact with the object.
+ Right-click always shows a menu of things you can do.
</notification>
-
+-->
<notification
icon="notify.tga"
name="FirstTeleport"
type="notify">
-This region doesn&apos;t allow point-to-point teleports, so you&apos;ve been transported to the nearest telehub.
-Your destination is marked with a tall beacon.
-Follow the red arrow to the beacon, or click the arrow to dismiss the beacon.
+ You can only teleport to certain areas in this region. The arrow points to your specific destination. Click to dismiss it.
</notification>
<notification
icon="notify.tga"
name="FirstOverrideKeys"
type="notify">
-Your movement keys are now being handled by an object.
-Try the arrow keys or AWSD to see what they do.
-Some objects (like guns) require you to go into mouselook to use them.
-Press &apos;M&apos; to do this.
+ Your movement keys are now being handled by an object.
+ Try the arrow keys or AWSD to see what they do.
+ Some objects (like guns) require you to go into mouselook to use them.
+ Press &apos;M&apos; to do this.
</notification>
<notification
icon="notify.tga"
name="FirstAppearance"
type="notify">
-You are editing your appearance.
-To rotate and zoom view, use the arrow keys.
-When you are finished, press &apos;Save All&apos; to save your look and exit.
-You can edit your appearance as often as you like.
+ You are editing your Appearance.
+Use the arrow keys to look around.
+When you are done, press &apos;Save All&apos;.
</notification>
<notification
icon="notify.tga"
name="FirstInventory"
type="notify">
-This is your inventory, which contains objects, notecards, clothing, and other things you own.
-* To wear an object or outfit folder, drag it onto yourself.
-* To bring an object into the world, drag it onto the ground.
-* To read a notecard, double-click it.
+ This is your Inventory, which contains items you own.
+
+ * To wear something, drag it onto yourself.
+ * To rez something inworld, drag it onto the ground.
+ * To read a notecard, double-click it.
</notification>
<notification
icon="notify.tga"
name="FirstSandbox"
type="notify">
-This is a sandbox region.
-Objects you build here may be deleted after you leave the area, Sandboxes clean on a regular basis, please refer to the information at the top of the screen next to the region name.
+ This is a sandbox area, and is meant to help Residents learn how to build.
-Sandbox regions are uncommon, and are marked with signs.
+ Things you build here will be deleted after you leave, so don&apos;t forget to right-click and choose &apos;take&apos; to move your creation to your Inventory.
</notification>
<notification
icon="notify.tga"
name="FirstFlexible"
type="notify">
-This object is flexible.
-Flexible objects may not be physical and must be phantom until the flexible checkbox is unchecked.
+ This object is flexible. Flexis must be phantom and not physical.
</notification>
<notification
icon="notify.tga"
name="FirstDebugMenus"
type="notify">
-You have enabled the Advanced menu.
-This menu contains features useful for developers debugging Second Life.
-To toggle this menu on Windows press Ctrl-Alt-D. On Mac press Cmd-Opt-Shift-D.
+ You opened the Advanced menu.
+
+ To toggle this menu,
+ Windows: Ctrl-Alt-D
+ Mac: &#8984;-Opt-D
+
</notification>
<notification
icon="notify.tga"
name="FirstSculptedPrim"
type="notify">
-You are editing a sculpted prim.
-Sculpted prims require a special texture to specify their shape.
-You can find example sculpted textures in the inventory library.
+ You are editing a Sculpted prim. Sculpties require a special texture to define their shape.
</notification>
<notification
icon="notify.tga"
name="FirstMedia"
type="notify">
-You have begun playing media. Media can set to play automatically in the preferences window under Audio / Video. Note that this can be a security risk for media sites you do not trust.
+ You have begun playing media. Media can set to play automatically in the preferences window under Audio / Video. Note that this can be a security risk for media sites you do not trust.
</notification>
<notification
icon="notifytip.tga"
name="MaxListSelectMessage"
type="notifytip">
-You may only select up to [MAX_SELECT] items from this list.
+ You may only select up to [MAX_SELECT] items from this list.
</notification>
<notification
@@ -6181,7 +6193,7 @@ You may only select up to [MAX_SELECT] items from this list.
name="VoiceInviteP2P"
type="notify">
[NAME] is inviting you to a Voice Chat call.
-Click Accept to join the call or Decline to decline the invitation. Click Mute to mute this caller.
+Click Accept to join the call or Decline to decline the invitation. Click Block to block this caller.
<unique>
<context key="NAME"/>
</unique>
@@ -6197,7 +6209,7 @@ Click Accept to join the call or Decline to decline the invitation. Click Mute t
<button
index="2"
name="Mute"
- text="Mute"/>
+ text="Block"/>
</form>
</notification>
@@ -6205,21 +6217,21 @@ Click Accept to join the call or Decline to decline the invitation. Click Mute t
icon="notify.tga"
name="AutoUnmuteByIM"
type="notify">
-[FIRST] [LAST] was sent an instant message and has been automatically unmuted.
+[FIRST] [LAST] was sent an instant message and has been automatically unblocked.
</notification>
<notification
icon="notify.tga"
name="AutoUnmuteByMoney"
type="notify">
-[FIRST] [LAST] was given money and has been automatically unmuted.
+[FIRST] [LAST] was given money and has been automatically unblocked.
</notification>
<notification
icon="notify.tga"
name="AutoUnmuteByInventory"
type="notify">
-[FIRST] [LAST] was offered inventory and has been automatically unmuted.
+[FIRST] [LAST] was offered inventory and has been automatically unblocked.
</notification>
<notification
@@ -6227,7 +6239,7 @@ Click Accept to join the call or Decline to decline the invitation. Click Mute t
name="VoiceInviteGroup"
type="notify">
[NAME] has joined a Voice Chat call with the group [GROUP].
-Click Accept to join the call or Decline to decline the invitation. Click Mute to mute this caller.
+Click Accept to join the call or Decline to decline the invitation. Click Block to block this caller.
<unique>
<context key="NAME"/>
<context key="GROUP"/>
@@ -6244,7 +6256,7 @@ Click Accept to join the call or Decline to decline the invitation. Click Mute t
<button
index="2"
name="Mute"
- text="Mute"/>
+ text="Block"/>
</form>
</notification>
@@ -6252,8 +6264,8 @@ Click Accept to join the call or Decline to decline the invitation. Click Mute t
icon="notify.tga"
name="VoiceInviteAdHoc"
type="notify">
-[NAME] has joined a Voice Chat call with a conference chat...
-Click Accept to join the call or Decline to decline the invitation. Click Mute to mute this user.
+[NAME] has joined a voice chat call with a conference chat.
+Click Accept to join the call or Decline to decline the invitation. Click Block to block this user.
<unique>
<context key="NAME"/>
</unique>
@@ -6269,7 +6281,7 @@ Click Accept to join the call or Decline to decline the invitation. Click Mute t
<button
index="2"
name="Mute"
- text="Mute"/>
+ text="Block"/>
</form>
</notification>
@@ -6278,7 +6290,7 @@ Click Accept to join the call or Decline to decline the invitation. Click Mute t
name="InviteAdHoc"
type="notify">
[NAME] is inviting you to a conference chat.
-Click Accept to join the chat or Decline to decline the invitation. Click Mute to mute this user.
+Click Accept to join the chat or Decline to decline the invitation. Click Block to block this user.
<unique>
<context key="NAME"/>
</unique>
@@ -6294,7 +6306,7 @@ Click Accept to join the chat or Decline to decline the invitation. Click Mute t
<button
index="2"
name="Mute"
- text="Mute"/>
+ text="Block"/>
</form>
</notification>
@@ -6302,7 +6314,7 @@ Click Accept to join the chat or Decline to decline the invitation. Click Mute t
icon="notifytip.tga"
name="VoiceChannelFull"
type="notifytip">
-The voice call you are trying to join, [VOICE_CHANNEL_NAME], has reached maximum capacity. Please try again later.
+ The voice call you are trying to join, [VOICE_CHANNEL_NAME], has reached maximum capacity. Please try again later.
<unique>
<context key="VOICE_CHANNEL_NAME"/>
</unique>
@@ -6312,7 +6324,7 @@ The voice call you are trying to join, [VOICE_CHANNEL_NAME], has reached maximum
icon="notifytip.tga"
name="ProximalVoiceChannelFull"
type="notifytip">
-We&apos;re sorry. This area has reached maximum capacity for voice conversations. Please try to use voice in another area.
+ We&apos;re sorry. This area has reached maximum capacity for voice conversations. Please try to use voice in another area.
<unique/>
</notification>
@@ -6320,7 +6332,7 @@ We&apos;re sorry. This area has reached maximum capacity for voice conversation
icon="notifytip.tga"
name="VoiceChannelDisconnected"
type="notifytip">
-You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnected to spatial voice chat.
+ You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnected to spatial voice chat.
<unique>
<context key="VOICE_CHANNEL_NAME"/>
</unique>
@@ -6330,7 +6342,7 @@ You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnect
icon="notifytip.tga"
name="VoiceChannelDisconnectedP2P"
type="notifytip">
-[VOICE_CHANNEL_NAME] has ended the call. You will now be reconnected to spatial voice chat.
+ [VOICE_CHANNEL_NAME] has ended the call. You will now be reconnected to spatial voice chat.
<unique>
<context key="VOICE_CHANNEL_NAME"/>
</unique>
@@ -6340,7 +6352,7 @@ You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnect
icon="notifytip.tga"
name="P2PCallDeclined"
type="notifytip">
-[VOICE_CHANNEL_NAME] has declined your call. You will now be reconnected to spatial voice chat.
+ [VOICE_CHANNEL_NAME] has declined your call. You will now be reconnected to spatial voice chat.
<unique>
<context key="VOICE_CHANNEL_NAME"/>
</unique>
@@ -6350,7 +6362,7 @@ You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnect
icon="notifytip.tga"
name="P2PCallNoAnswer"
type="notifytip">
-[VOICE_CHANNEL_NAME] is not available to take your call. You will now be reconnected to spatial voice chat.
+ [VOICE_CHANNEL_NAME] is not available to take your call. You will now be reconnected to spatial voice chat.
<unique>
<context key="VOICE_CHANNEL_NAME"/>
</unique>
@@ -6360,7 +6372,7 @@ You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnect
icon="notifytip.tga"
name="VoiceChannelJoinFailed"
type="notifytip">
-Failed to connect to [VOICE_CHANNEL_NAME], please try again later. You will now be reconnected to spatial voice chat.
+ Failed to connect to [VOICE_CHANNEL_NAME], please try again later. You will now be reconnected to spatial voice chat.
<unique>
<context key="VOICE_CHANNEL_NAME"/>
</unique>
@@ -6371,7 +6383,7 @@ Failed to connect to [VOICE_CHANNEL_NAME], please try again later. You will now
icon="notifytip.tga"
name="VoiceLoginRetry"
type="notifytip">
-We are creating a voice channel for you. This may take up to one minute.
+ We are creating a voice channel for you. This may take up to one minute.
<unique/>
</notification>
@@ -6379,28 +6391,28 @@ We are creating a voice channel for you. This may take up to one minute.
icon="notifytip.tga"
name="Cannot enter parcel: not a group member"
type="notifytip">
-Cannot enter parcel, you are not a member of the appropriate group.
+ Only members of a certain group can visit this area.
</notification>
<notification
icon="notifytip.tga"
name="Cannot enter parcel: banned"
type="notifytip">
-Cannot enter parcel, you have been banned.
+ Cannot enter parcel, you have been banned.
</notification>
<notification
icon="notifytip.tga"
name="Cannot enter parcel: not on access list"
type="notifytip">
-Cannot enter parcel, you are not on the access list.
+ Cannot enter parcel, you are not on the access list.
</notification>
<notification
icon="notifytip.tga"
name="VoiceNotAllowed"
type="notifytip">
-You do not have permission to connect to voice chat for [VOICE_CHANNEL_NAME].
+ You do not have permission to connect to voice chat for [VOICE_CHANNEL_NAME].
<unique>
<context key="VOICE_CHANNEL_NAME"/>
</unique>
@@ -6410,7 +6422,7 @@ You do not have permission to connect to voice chat for [VOICE_CHANNEL_NAME].
icon="notifytip.tga"
name="VoiceCallGenericError"
type="notifytip">
-An error has occurred while trying to connect to voice chat for [VOICE_CHANNEL_NAME]. Please try again later.
+ An error has occurred while trying to connect to voice chat for [VOICE_CHANNEL_NAME]. Please try again later.
<unique>
<context key="VOICE_CHANNEL_NAME"/>
</unique>
@@ -6422,7 +6434,7 @@ An error has occurred while trying to connect to voice chat for [VOICE_CHANNEL_N
name="ServerVersionChanged"
priority="high"
type="notifytip">
-The region you have entered is running a different simulator version. Click this message for details.
+ You just entered a region using a different server version, which may affect performance. Click to see the release notes.
</notification>
<notification
@@ -6430,7 +6442,33 @@ The region you have entered is running a different simulator version. Click this
name="UnableToOpenCommandURL"
priority="high"
type="notifytip">
-The URL you clicked cannot be opened from this web browser.
+ The link you clicked cannot be opened from this web browser.
+ </notification>
+
+ <notification name="IMToast" type="notifytoast">
+ [MESSAGE]
+ <form name="form">
+ <button index="0" name="respondbutton" text="Respond"/>
+ </form>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="CreateGroupCost"
+ type="alertmodal">
+ Creating this group will cost L$100.
+ Groups need more than one member, or they are deleted forever.
+ Please invite members within 48 hours.
+ <usetemplate
+ canceltext="Cancel"
+ name="okcancelbuttons"
+ notext="Cancel"
+ yestext="Create group for L$100"/>
+ </notification>
+
+ <notification icon="notifytip.tga"
+ name="AttachmentSaved" type="notifytip">
+ Attachment has been saved.
</notification>
<global name="UnsupportedCPU">
diff --git a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml
index bf3f70f54b..3de3365539 100644
--- a/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_avatar_list_item.xml
@@ -47,9 +47,9 @@
<button
bottom="5" left="260" width="20" height="20" follows="right"
name="info_btn" label=""
- image_unselected="info_btn.tga" image_disabled="info_btn.tga"
- image_selected="info_btn_active.tga" image_hover_selected="info_btn_active.tga"
- image_disabled_selected="info_btn.tga" font="SansSerifBigBold"
+ image_unselected="avatar_info_btn.tga" image_disabled="avatar_info_btn.tga"
+ image_selected="avatar_info_btn_active.tga" image_hover_selected="avatar_info_btn_active.tga"
+ image_disabled_selected="avatar_info_btn.tga" font="SansSerifBigBold"
/>
<button
diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
index 303487f21b..d42943d225 100644
--- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml
+++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
@@ -1,41 +1,234 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel follows="left|bottom|right" name="bottom_tray" bg_opaque_color="0.25 0.25 0.25 1.0"
- bg_alpha_color="0.25 0.25 0.25 1.0" background_visible="true" auto_resize="true"
- left="0" bottom="0" width="1000" height="28" border_visible="false" has_border="false">
- <layout_stack name="toolbar_stack" follows="left|right|bottom|top"
- bottom="0" left="0" width="1000" height="25" orientation="horizontal" border_size="0" auto_resize="false">
-
- <icon image_name="spacer24.tga" left="0" width="5" height="10" bottom="0" follows="left|right" auto_resize="false" color="0 0 0 0"/>
- <panel follows="left|right" auto_resize="true" width="250" height="28" min_height="28">
- <line_editor name="chat_box" follows="left|right"
- width="250" height="20" left="0" bottom="6"
- bevel_style="in" border_style="line" border_thickness="1"/>
- </panel>
- <icon image_name="spacer24.tga" left="0" width="5" height="10" bottom="0" follows="left|right" auto_resize="false" color="0 0 0 0"/>
- <view_border bevel_style="in" bottom="0" height="28" min_height="28" width="1" follows="left|right" left="270" mouse_opaque="false" auto_resize="false"/>
- <icon image_name="spacer24.tga" left="0" width="5" height="10" bottom="0" follows="left|right" auto_resize="false" color="0 0 0 0"/>
- <panel follows="left|right" auto_resize="false" width="100" height="28" min_height="28">
- <chiclet_talk name="talk" left="0" bottom="6" width="100" height="20" follows="left|right" auto_resize="false"/>
- </panel>
- <icon name="DUMMY" image_name="spacer24.tga" left="0" width="150" height="10" bottom="0" follows="left|right" auto_resize="false" color="0 0 0 0"/>
- <panel follows="left|right" auto_resize="true" width="250" height="28" min_height="28">
- <chiclet_panel name="chiclet_list" follows="left|right"
- width="250" height="25" left="0" bottom="2"/>
- </panel>
- <icon image_name="spacer24.tga" left="0" width="5" height="10" bottom="0" follows="left|right" auto_resize="false" color="0 0 0 0"/>
- <panel follows="left|right" auto_resize="false" width="40" height="28" min_height="28">
- <chiclet_notification name="im_well" follows="left|right" auto_resize="false"
- left="0" bottom="4" width="40" height="25"
- image_unselected="im_notifications.tga" image_selected="im_notifications.tga"/>
- </panel>
- <icon image_name="spacer24.tga" left="0" width="10" height="10" bottom="0" follows="left|right" auto_resize="false" color="0 0 0 0"/>
- <view_border bevel_style="in" bottom="0" height="30" width="1" follows="left|right" left="270" mouse_opaque="false" auto_resize="false"/>
- <icon image_name="spacer24.tga" left="0" width="10" height="10" bottom="0" follows="left|right" auto_resize="false" color="0 0 0 0"/>
- <panel follows="left|right" auto_resize="false" width="48" height="28" min_height="28">
- <chiclet_notification name="sys_well" follows="left|right" auto_resize="false"
- left="0" bottom="5" width="48" height="25"
- image_unselected="sys_notifications.tga" image_selected="sys_notifications.tga"/>
- </panel>
- <icon image_name="spacer24.tga" left="0" width="5" height="10" bottom="0" follows="left|right" auto_resize="false" color="0 0 0 0"/>
- </layout_stack>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel
+ background_visible="true"
+ bg_alpha_color="0.25 0.25 0.25 1"
+ bg_opaque_color="0.25 0.25 0.25 1"
+ follows="left|bottom|right"
+ height="28"
+ layout="topleft"
+ left="0"
+ name="bottom_tray"
+ top="28"
+ border_visible="true"
+ width="1000">
+ <layout_stack
+ border_size="0"
+ clip="false"
+ follows="left|right|bottom|top"
+ height="28"
+ layout="topleft"
+ left="0"
+ name="toolbar_stack"
+ orientation="horizontal"
+ top="0"
+ width="1000">
+ <icon
+ auto_resize="false"
+ color="0 0 0 0"
+ follows="left|right"
+ height="10"
+ image_name="spacer24.tga"
+ layout="topleft"
+ left="0"
+ top="0"
+ width="5"
+ min_width="5" />
+ <layout_panel
+ follows="left|right"
+ height="28"
+ layout="topleft"
+ left="5"
+ min_height="28"
+ width="500"
+ top="0"
+ min_width="305"
+ name="chat_bar"
+ user_resize="false"
+ filename="panel_nearby_chat_bar.xml"/>
+ <icon
+ auto_resize="false"
+ color="0 0 0 0"
+ follows="left|right"
+ height="10"
+ image_name="spacer24.tga"
+ layout="topleft"
+ left="0"
+ name="DUMMY"
+ top="0"
+ width="5"
+ min_width="5"/>
+ <layout_panel
+ auto_resize="false"
+ follows="right"
+ height="28"
+ layout="topleft"
+ left="5"
+ min_height="28"
+ width="90"
+ top_delta="-10"
+ min_width="90"
+ user_resize="false">
+ <button
+ bottom="22"
+ follows="right"
+ height="20"
+ label="Stand Up"
+ layout="topleft"
+ name="stand"
+ top="3"
+ width="90" />
+ </layout_panel>
+ <icon
+ auto_resize="false"
+ color="0 0 0 0"
+ follows="left|right"
+ height="10"
+ image_name="spacer24.tga"
+ layout="topleft"
+ left="0"
+ name="DUMMY"
+ top="0"
+ width="5"
+ min_width="5" />
+ <layout_panel
+ follows="left|right"
+ height="28"
+ layout="topleft"
+ min_height="28"
+ top="0"
+ name="chiclet_list_panel"
+ width="150"
+ user_resize="false">
+ <chiclet_panel
+ follows="left|right"
+ height="25"
+ layout="topleft"
+ left="0"
+ name="chiclet_list"
+ top="1"
+ chiclet_padding="3"
+ scrolling_offset="40"
+ width="150" />
+ </layout_panel>
+ <icon
+ auto_resize="false"
+ color="0 0 0 0"
+ follows="left|right"
+ height="10"
+ image_name="spacer24.tga"
+ layout="topleft"
+ left="0"
+ top="0"
+ width="5"
+ min_width="5" />
+ <layout_panel
+ auto_resize="false"
+ follows="right"
+ height="28"
+ layout="topleft"
+ min_height="28"
+ name="im_well_panel"
+ width="40"
+ top="0"
+ min_width="40"
+ user_resize="false">
+ <chiclet_notification
+ follows="right"
+ height="25"
+ layout="topleft"
+ left="0"
+ name="im_well"
+ top="2"
+ width="40">
+ <button
+ image_selected="im_notifications.tga"
+ image_unselected="im_notifications.tga"/>
+ <unread_notifications
+ width="20"
+ height="20"
+ left="18"
+ top="23"/>
+ <chiclet_notification.commit_callback
+ function="Notification.Show"
+ parameter="ClickUnimplemented" />
+ </chiclet_notification>
+ </layout_panel>
+ <icon
+ auto_resize="false"
+ color="0 0 0 0"
+ follows="left|right"
+ height="10"
+ image_name="spacer24.tga"
+ layout="topleft"
+ left="0"
+ top="0"
+ width="10"
+ min_width="10"/>
+ <view_border
+ auto_resize="false"
+ bevel_style="in"
+ follows="left|right"
+ height="28"
+ layout="topleft"
+ left="270"
+ name="well_separator"
+ top="0"
+ width="1" />
+ <icon
+ auto_resize="false"
+ color="0 0 0 0"
+ follows="left|right"
+ height="10"
+ image_name="spacer24.tga"
+ layout="topleft"
+ left="0"
+ top="0"
+ width="10"
+ min_width="10" />
+ <layout_panel
+ auto_resize="false"
+ follows="right"
+ height="28"
+ layout="topleft"
+ min_height="28"
+ top="0"
+ name="sys_well_panel"
+ width="48"
+ min_width="48"
+ user_resize="false">
+ <chiclet_notification
+ follows="right"
+ height="25"
+ layout="topleft"
+ left="0"
+ name="sys_well"
+ top="2"
+ width="48">
+ <button
+ image_selected="bottom_tray_sys_notifications.tga"
+ image_unselected="bottom_tray_sys_notifications.tga"/>
+ <unread_notifications
+ width="20"
+ height="20"
+ left="22"
+ top="23"/>
+<!--
+ <chiclet_notification.commit_callback
+ function="Notification.Show"
+ parameter="ClickUnimplemented" />
+ -->
+ </chiclet_notification>
+ </layout_panel>
+ <icon
+ auto_resize="false"
+ color="0 0 0 0"
+ follows="left|right"
+ height="10"
+ image_name="spacer24.tga"
+ layout="topleft"
+ left="0"
+ top="0"
+ width="5"
+ min_width="5" />
+ </layout_stack>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_chat_item.xml b/indra/newview/skins/default/xui/en/panel_chat_item.xml
new file mode 100644
index 0000000000..713c3a41a2
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_chat_item.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<!-- All our XML is utf-8 encoded. -->
+
+<panel
+ name="instant_message"
+ width="300"
+ height="180"
+ background_opaque="false"
+ background_visible="true"
+ follows="left|top|right|bottom"
+ bg_alpha_color="0.3 0.3 0.3 1.0">
+ <panel width="250" height="30" background_visible="true" background_opaque="false" bg_alpha_color="0.0 0.0 0.0 1.0" name="msg_caption">
+ <avatar_icon
+ top="25" left="10" width="20" height="20" follows="left|top"
+ color="1 1 1 1" enabled="true" name="avatar_icon"
+ />
+ <text
+ width="130" top="25" left="40" height="20" follows="left|right|top"
+ font="SansSerifBigBold" text_color="white" word_wrap="true"
+ mouse_opaque="true" name="sender_name" >
+ Jerry Knight
+ </text>
+ <icon top="22" left="170" width="15" height="15" follows="top|right"
+ image_name="icn_voice-pvtfocus.tga" visible="false" name="msg_inspector"/>
+ <icon top="22" left="190" width="10" height="10" follows="top|right"
+ image_name="speaking_indicator.tga" name="msg_icon"/>
+ <text width="35" top="22" left="205" height="20" follows="right|top"
+ text_color="white" word_wrap="true" mouse_opaque="true" name="msg_time" >
+ 10:32
+ </text>
+ </panel>
+ <text_chat
+ top="-35" left="10" right="-10" height="120" follows="left|right|bottom"
+ font="SansSerifSmall" text_color="white" word_wrap="true"
+ mouse_opaque="true" name="msg_text" >
+ </text_chat>
+</panel>
+
diff --git a/indra/newview/skins/default/xui/en/panel_classified.xml b/indra/newview/skins/default/xui/en/panel_classified.xml
index f2cec86b38..3acd8fae4b 100644
--- a/indra/newview/skins/default/xui/en/panel_classified.xml
+++ b/indra/newview/skins/default/xui/en/panel_classified.xml
@@ -108,13 +108,16 @@
width="130">
<combo_box.item
label="- Select Mature -"
+ name="select_mature"
value="Select" />
<combo_box.item
label="Mature Content"
+ name="mature"
value="Mature" />
<combo_box.item
label="PG Content"
- value="Not Mature" />
+ name="pg"
+ value="PG" />
</combo_box>
<combo_box
bottom="45"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_pick.xml b/indra/newview/skins/default/xui/en/panel_edit_pick.xml
index 967cf2f539..a74f560753 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_pick.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_pick.xml
@@ -2,14 +2,13 @@
<panel
background_visible="true"
bevel_style="in"
- bg_alpha_color="0.2 0.2 0.2 1"
height="640"
label="Edit Pick"
layout="topleft"
left="0"
name="panel_edit_pick"
top="0"
- width="355">
+ width="305">
<text
type="string"
length="1"
@@ -21,26 +20,46 @@
name="title"
text_color="white"
top="0"
- width="150">
+ width="250">
Edit Pick
</text>
<panel
background_visible="true"
- bg_alpha_color="0.5 0.5 0.5 1"
+ bg_alpha_color="DkGray2"
+ width="280"
follows="left|right|top|bottom"
height="570"
layout="topleft"
left="10"
right="-10"
top="30">
- <texture_picker
+ <panel
follows="left|top|right"
height="150"
layout="topleft"
left="10"
- name="pick_snapshot"
right="-10"
- top="10" />
+ top="10">
+ <panel
+ follows="left|top|right"
+ height="150"
+ layout="topleft" >
+ <texture_picker
+ follows="left|top|right"
+ height="150"
+ layout="topleft"
+ name="pick_snapshot" />
+ </panel>
+ <icon
+ height="16"
+ image_name="image_edit_icon.tga"
+ layout="topleft"
+ name="edit_icon"
+ right="-25"
+ top="30"
+ visible="false"
+ width="16" />
+ </panel>
<text
type="string"
length="1"
@@ -48,7 +67,8 @@
height="16"
layout="topleft"
left="10"
- name="Name:">
+ name="Name:"
+ text_color="white">
Name:
</text>
<line_editor
@@ -57,8 +77,10 @@
height="20"
layout="topleft"
left="10"
+ max_length="63"
name="pick_name"
right="-10"
+ text_color="black"
width="290" />
<text
type="string"
@@ -68,6 +90,7 @@
layout="topleft"
left="10"
name="description_label"
+ text_color="white"
v_pad="15"
valign="center">
Description:
@@ -75,10 +98,12 @@
<text_editor
follows="left|top|right"
height="100"
+ hide_scrollbar="true"
layout="topleft"
left="10"
max_length="1023"
name="pick_desc"
+ text_color="black"
right="-10"
word_wrap="true" />
<text
@@ -88,7 +113,8 @@
height="20"
layout="topleft"
left="10"
- name="description_label"
+ name="location_label"
+ text_color="white"
v_pad="15"
valign="bottom">
Location:
@@ -102,7 +128,9 @@
left="10"
name="pick_location"
right="-10"
+ text_color="white"
v_pad="10"
+ width="250"
valign="center"
word_wrap="true">
loading...
@@ -124,11 +152,11 @@
left="5"
name="bottom_panel"
top="605"
- width="345">
+ right="-10">
<button
follows="bottom|left"
height="20"
- label="Save Changes"
+ label="Save [WHAT]"
layout="topleft"
name="save_changes_btn"
right="-120"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_profile.xml b/indra/newview/skins/default/xui/en/panel_edit_profile.xml
index e787d03eca..26354ce611 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_profile.xml
@@ -3,7 +3,6 @@
class="edit_profile_panel"
background_visible="true"
bevel_style="in"
- bg_alpha_color="0.3 0.3 0.3 1"
follows="left|top|right|bottom"
height="690"
label="Profile Edit"
@@ -12,7 +11,7 @@
mouse_opaque="true"
name="edit_profile_panel"
top="10"
- width="355">
+ width="305">
<text
top="0"
left="9"
@@ -22,19 +21,19 @@
layout="topleft"
name="title_text"
text_color="white"
- width="350">
+ width="250">
Edit Profile
</text>
<panel
background_visible="true"
- bg_alpha_color="0.6 0.6 0.6 1"
+ bg_alpha_color="DkGray2"
follows="left|top|right|bottom"
height="620"
layout="topleft"
left="9"
name="data_panel"
top_pad="10"
- width="337">
+ width="280">
<text
top_pad="5"
left="9"
@@ -51,10 +50,10 @@
follows="left|top"
height="120"
layout="topleft"
- left="9"
+ left="10"
name="lifes_images_panel"
top_pad="10"
- width="250">
+ width="265">
<panel
height="120"
layout="topleft"
@@ -70,7 +69,7 @@
height="20"
layout="topleft"
left="0"
- name="first_life_photo_title_text"
+ name="second_life_photo_title_text"
text_color="white"
top="0"
width="125">
@@ -102,11 +101,11 @@
height="20"
layout="topleft"
left="0"
- name="second_life_photo_title_text"
+ name="real_world_photo_title_text"
text_color="white"
top="0"
width="125">
- First Life photo:
+ Real World photo:
</text>
<texture_picker
allow_no_texture="true"
@@ -115,10 +114,28 @@
height="105"
layout="topleft"
left="0"
- name="1st_life_pic"
+ name="real_world_pic"
top_pad="5"
width="105" />
</panel>
+ <icon
+ height="16"
+ image_name="image_edit_icon.tga"
+ layout="topleft"
+ left="75"
+ name="2nd_life_edit_icon"
+ tool_tip="Click to select an image"
+ top="35"
+ width="16" />
+ <icon
+ height="16"
+ image_name="image_edit_icon.tga"
+ layout="topleft"
+ left="200"
+ name="real_world_edit_icon"
+ tool_tip="Click to select an image"
+ top="35"
+ width="16" />
</panel>
<text
type="string"
@@ -131,7 +148,7 @@
name="title_sl_descr_text"
text_color="white"
top_pad="10"
- width="290">
+ width="250">
Second Life description:
</text>
<text_editor
@@ -144,7 +161,7 @@
left="9"
name="sl_description_edit"
text_color="0.1 0.1 0.1 1"
- width="290"
+ width="265"
word_wrap="true">
</text_editor>
<text
@@ -155,11 +172,11 @@
height="15"
layout="topleft"
left="9"
- name="title_fl_descr_text"
+ name="title_rw_descr_text"
text_color="white"
top_pad="10"
- width="290">
- First Life description:
+ width="250">
+ Real World description:
</text>
<text_editor
type="string"
@@ -171,7 +188,7 @@
left="9"
name="fl_description_edit"
text_color="0.1 0.1 0.1 1"
- width="290"
+ width="265"
word_wrap="true">
</text_editor>
<text
@@ -189,8 +206,6 @@
Homepage:
</text>
<line_editor
- type="string"
- length="1"
follows="left|top|right"
font="SansSerif"
font.style="UNDERLINE"
@@ -199,23 +214,25 @@
left="9"
name="homepage_edit"
text_color="0.2 0.2 1 1"
- width="290">
+ width="265">
TODO
</line_editor>
<check_box
follows="left|top"
+ font="SansSerifBold"
label="Show me in Search results"
layout="topleft"
left="9"
name="show_in_search_checkbox"
height="16"
+ text_enabled_color="white"
top_pad="10"
width="250"/>
</panel>
<panel
follows="bottom|right"
height="30"
- left="96"
+ left="10"
name="profile_me_buttons_panel"
top_pad="8"
width="250">
diff --git a/indra/newview/skins/default/xui/en/panel_friends.xml b/indra/newview/skins/default/xui/en/panel_friends.xml
index a151eed20f..3a35465df2 100644
--- a/indra/newview/skins/default/xui/en/panel_friends.xml
+++ b/indra/newview/skins/default/xui/en/panel_friends.xml
@@ -29,7 +29,7 @@
tool_tip="Online status"
width="20" />
<scroll_list.columns
- dynamicwidth="true"
+ dynamic_width="true"
label="Name"
name="friend_name"
tool_tip="Name" />
diff --git a/indra/newview/skins/default/xui/en/panel_group_general.xml b/indra/newview/skins/default/xui/en/panel_group_general.xml
index 10d10f60ff..71b5f78d59 100644
--- a/indra/newview/skins/default/xui/en/panel_group_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_general.xml
@@ -2,13 +2,13 @@
<panel
border="true"
follows="all"
- height="466"
+ height="514"
label="General"
layout="topleft"
left="1"
name="general_tab"
- top="466"
- width="418">
+ top="514"
+ width="280">
<panel.string
name="help_text">
The General tab contains general information about
@@ -26,128 +26,127 @@ Hover your mouse over the options for more help.
Retrieving member data
</panel.string>
<panel.string
- name="confirm_group_create_str">
- Creating this group will cost L$100.
-Are you really, really, REALLY sure you want to spend L$100 to create this group?
-Be aware that if nobody else joins this group within 48 hours, it will be disbanded and the group&apos;s name will be unavailable for future use.
- </panel.string>
- <panel.string
name="group_join_btn">
Join (L$[AMOUNT])
</panel.string>
- <button
+ <!--<button
follows="left|top"
height="16"
label="?"
label_selected="?"
layout="topleft"
- left="391"
+ left="255"
name="help_button"
top="8"
- width="20" />
+ width="20" /> -->
<line_editor
follows="left|top"
- font="SansSerif"
+ font="SansSerifSmall"
halign="left"
height="16"
label="Type your new group name here"
layout="topleft"
- left_delta="-384"
+ left="10"
max_length="35"
name="group_name_editor"
- top_delta="0"
- width="300" />
+ top="8"
+ width="235" />
<text
type="string"
length="1"
follows="left|top"
- font="SansSerifBig"
+ font="SansSerifSmall"
height="16"
layout="topleft"
left_delta="0"
name="group_name"
- top_delta="-4"
- width="300">
+ top_delta="0"
+ width="240">
Type your new group name here
</text>
<text
type="string"
length="1"
+ follows="left|top"
height="16"
layout="topleft"
left_delta="0"
name="prepend_founded_by"
top_pad="4"
- width="100">
- Founded by
+ width="270">
+ Founded by:
</text>
<name_box
follows="left|top"
height="16"
initial_value="(retrieving)"
layout="topleft"
- left_delta="63"
+ left="30"
name="founder_name"
- top_delta="0"
- width="200" />
- <text
+ top_pad="0"
+ width="133" />
+ <text_editor
type="string"
length="1"
- height="16"
+ follows="left|top"
+ halign="left"
+ height="125"
+ hide_scrollbar="true"
layout="topleft"
- name="group_charter_label"
- right="410"
- top="40"
- width="265">
+ max_length="511"
+ name="charter"
+ right="275"
+ top_pad="0"
+ width="170"
+ word_wrap="true">
Group Charter
- </text>
+ </text_editor>
<texture_picker
follows="left|top"
- height="144"
- label="Group Insignia"
+ height="96"
+ label=""
layout="topleft"
- left_delta="-138"
+ left_delta="-95"
name="insignia"
tool_tip="Click to choose a picture"
top_delta="1"
- width="128" />
- <text_editor
+ width="85" />
+ <text
+ follows="left|top"
type="string"
length="1"
- follows="left|top"
- halign="left"
- height="160"
- hide_scrollbar="true"
+ height="16"
layout="topleft"
- max_length="511"
- name="charter"
- right="410"
- top="55"
- width="265"
- word_wrap="true">
+ name="group_charter_label"
+ right="275"
+ top="190"
+ width="170">
Group Charter
- </text_editor>
+ </text>
<button
follows="left|top"
height="22"
+ font="SansSerifSmall"
label="Join (L$0)"
label_selected="Join (L$0)"
layout="topleft"
- left="7"
+ left="10"
name="join_button"
- top="193"
- width="128" />
+ top="160"
+ width="85" />
<button
follows="left|top"
height="22"
- label="Detailed View"
+ font="SansSerifSmall"
+ label="Details"
label_selected="Detailed View"
layout="topleft"
left_delta="0"
name="info_button"
top_delta="0"
- width="128" />
+ width="85" />
<text
+ follows="left|top"
type="string"
length="1"
font="SansSerif"
@@ -155,19 +154,20 @@ Be aware that if nobody else joins this group within 48 hours, it will be disban
layout="topleft"
left_delta="0"
name="text_owners_and_visible_members"
- top_pad="4"
- width="160">
+ top_pad="30"
+ width="270">
Owners &amp; Visible Members
</text>
<text
+ follows="left|top"
type="string"
length="1"
height="16"
layout="topleft"
left_delta="0"
name="text_owners_are_shown_in_bold"
- top_delta="16"
- width="160">
+ top_pad="0"
+ width="270">
(Owners are shown in bold)
</text>
<name_list
@@ -179,8 +179,8 @@ Be aware that if nobody else joins this group within 48 hours, it will be disban
layout="topleft"
left_delta="0"
name="visible_members"
- top_pad="8"
- width="404">
+ top_pad="0"
+ width="263">
<name_list.columns
label="Member Name"
name="name"
@@ -195,9 +195,11 @@ Be aware that if nobody else joins this group within 48 hours, it will be disban
relative_width="0.25" />
</name_list>
<text
+ follows="left|top"
+ height="16"
type="string"
length="1"
- bottom_delta="18"
+ top_pad="10"
font="SansSerif"
layout="topleft"
name="text_group_preferences">
@@ -208,12 +210,12 @@ Be aware that if nobody else joins this group within 48 hours, it will be disban
bevel_style="in"
border="true"
follows="left|top"
- height="96"
+ height="125"
layout="topleft"
left_delta="0"
name="preferences_container"
- top_pad="8"
- width="404">
+ top_pad="0"
+ width="263">
<check_box
height="16"
initial_value="true"
@@ -223,7 +225,7 @@ Be aware that if nobody else joins this group within 48 hours, it will be disban
name="show_in_group_list"
tool_tip="Let people see this group in search results."
top="4"
- width="95" />
+ width="90" />
<check_box
follows="right|top"
height="16"
@@ -232,17 +234,17 @@ Be aware that if nobody else joins this group within 48 hours, it will be disban
left_delta="0"
name="open_enrollement"
tool_tip="Sets whether this group allows new members to join without being invited."
- top_pad="2"
- width="95" />
+ top_pad="5"
+ width="90" />
<check_box
height="16"
label="Enrollment fee: L$"
layout="topleft"
- left_delta="16"
+ left_delta="0"
name="check_enrollment_fee"
tool_tip="Sets whether to require an enrollment fee to join the group."
- top="40"
- width="95" />
+ top_pad="5"
+ width="90" />
<spinner
decimal_digits="0"
follows="left|top"
@@ -251,66 +253,71 @@ Be aware that if nobody else joins this group within 48 hours, it will be disban
increment="1"
label_width="10"
layout="topleft"
- left_pad="21"
+ left="25"
max_val="99999"
+ top_pad="5"
name="spin_enrollment_fee"
tool_tip="New members must pay this fee to join the group when Enrollment Fee is checked."
top_delta="-2"
width="65" />
- <combo_box
- height="20"
+ <check_box
+ height="16"
+ font="SansSerifSmall"
+ label="Receive notices"
layout="topleft"
- left="6"
- name="group_mature_check"
- tool_tip="Sets whether your group information is considered mature."
- top="64"
- width="130">
- <combo_box.item
- label="Select Mature -"
- value="Select" />
- <combo_box.item
- label="Mature Content"
- value="Mature" />
- <combo_box.item
- label="PG Content"
- value="Not Mature" />
- </combo_box>
- <text
+ left="5"
+ name="receive_notices"
+ tool_tip="Sets whether you want to receive Notices from this group. Uncheck this box if this group is spamming you."
+ top_pad="5"
+ width="240" />
+ <check_box
+ height="16"
+ label="List in my profile"
+ layout="topleft"
+ left="5"
+ name="list_groups_in_profile"
+ tool_tip="Sets whether you want to list this group in your Profile"
+ top_pad="5"
+ width="240" />
+ <text
type="string"
length="1"
height="16"
layout="topleft"
- left="225"
+ left="145"
name="active_title_label"
top="4"
width="95">
My Active Title
</text>
<combo_box
- height="16"
+ height="20"
layout="topleft"
left_delta="0"
name="active_title"
tool_tip="Sets the title that appears in your avatar&apos;s name tag when this group is active."
- top_pad="6"
- width="95" />
- <check_box
- height="16"
- label="Receive group notices"
- layout="topleft"
- left_delta="0"
- name="receive_notices"
- tool_tip="Sets whether you want to receive Notices from this group. Uncheck this box if this group is spamming you."
- top_pad="9"
- width="95" />
- <check_box
- height="16"
- label="List group in my profile"
+ top_pad="0"
+ width="110" />
+ <combo_box
+ height="20"
layout="topleft"
left_delta="0"
- name="list_groups_in_profile"
- tool_tip="Sets whether you want to list this group in your Profile"
- top_pad="2"
- width="95" />
+ name="group_mature_check"
+ tool_tip="Sets whether your group information is considered mature."
+ top_pad="10"
+ width="120">
+ <combo_box.item
+ label="Select Mature -"
+ name="select_mature"
+ value="Select" />
+ <combo_box.item
+ label="Mature Content"
+ name="mature"
+ value="Mature" />
+ <combo_box.item
+ label="PG Content"
+ name="pg"
+ value="Not Mature" />
+ </combo_box>
</panel>
-</panel>
+</panel> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/panel_group_land_money.xml b/indra/newview/skins/default/xui/en/panel_group_land_money.xml
index 35691661f1..b96421ca2f 100644
--- a/indra/newview/skins/default/xui/en/panel_group_land_money.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_land_money.xml
@@ -2,13 +2,13 @@
<panel
border="true"
follows="all"
- height="470"
+ height="514"
label="Land &amp; L$"
layout="topleft"
left="1"
name="land_money_tab"
top="470"
- width="418">
+ width="280">
<panel.string
name="help_text">
Parcels owned by the group are listed along with contribution details. A warning appears until the Total Land in Use is less than or equal to the Total Contribution. The Planning, Details, and Sales tabs provide information about the group&apos;s finances.
@@ -29,14 +29,17 @@
name="land_contrib_error">
Unable to set your land contribution.
</panel.string>
+ <!--
<button
+ follows="left|top"
height="16"
label="?"
layout="topleft"
- left="391"
+ left="250"
name="help_button"
top="8"
width="20" />
+ -->
<text
type="string"
length="1"
@@ -44,10 +47,10 @@
font="SansSerifBig"
height="16"
layout="topleft"
- left_delta="-384"
+ left="10"
name="group_land_heading"
- top_delta="-4"
- width="150">
+ top_pad="10"
+ width="260">
Group Owned Land
</text>
<scroll_list
@@ -55,28 +58,28 @@
follows="top"
font="SansSerifSmall"
heading_height="14"
- height="120"
+ height="100"
layout="topleft"
left_delta="0"
name="group_parcel_list"
- top_pad="6"
- width="404">
+ top_pad="4"
+ width="265">
<scroll_list.columns
- label="Parcel Name"
+ label="Parcel"
name="name"
- width="100" />
+ width="67" />
<scroll_list.columns
label="Region"
name="location"
- width="120" />
+ width="72" />
<scroll_list.columns
label="Type"
name="type"
- width="100" />
+ width="60" />
<scroll_list.columns
label="Area"
name="area"
- width="61" />
+ width="20" />
<scroll_list.columns
label=""
name="hidden"
@@ -88,10 +91,10 @@
label="Show on Map"
label_selected="Show on Map"
layout="topleft"
- left="312"
+ left="150"
name="map_button"
- top="150"
- width="100"
+ top_pad="10"
+ width="125"
enabled="false" />
<text
type="string"
@@ -100,10 +103,10 @@
halign="right"
height="16"
layout="topleft"
- left_delta="-305"
+ left="5"
name="total_contributed_land_label"
- top_delta="4"
- width="120">
+ top_pad="10"
+ width="130">
Total Contribution:
</text>
<text
@@ -115,8 +118,8 @@
left_pad="5"
name="total_contributed_land_value"
top_delta="0"
- width="100">
- [AREA] sq. meters
+ width="120">
+ [AREA] m²
</text>
<text
type="string"
@@ -125,10 +128,10 @@
halign="right"
height="16"
layout="topleft"
- left="7"
+ left="5"
name="total_land_in_use_label"
- top="172"
- width="120">
+ top_pad="0"
+ width="130">
Total Land In Use:
</text>
<text
@@ -140,8 +143,8 @@
left_pad="5"
name="total_land_in_use_value"
top_delta="0"
- width="150">
- [AREA] sq. meters
+ width="120">
+ [AREA] m²
</text>
<text
type="string"
@@ -150,10 +153,10 @@
halign="right"
height="16"
layout="topleft"
- left="7"
+ left="5"
name="land_available_label"
- top="190"
- width="120">
+ top_pad="0"
+ width="130">
Land Available:
</text>
<text
@@ -166,7 +169,7 @@
name="land_available_value"
top_delta="0"
width="120">
- [AREA] sq. meters
+ [AREA] m²
</text>
<text
type="string"
@@ -175,10 +178,10 @@
halign="right"
height="16"
layout="topleft"
- left="7"
+ left="5"
name="your_contribution_label"
- top="208"
- width="120">
+ top_pad="0"
+ width="130">
Your Contribution:
</text>
<line_editor
@@ -191,7 +194,7 @@
max_length="10"
name="your_contribution_line_editor"
top_delta="-2"
- width="70" />
+ width="95" />
<text
type="string"
length="1"
@@ -199,10 +202,22 @@
height="16"
layout="topleft"
left_pad="5"
+ name="your_contribution_units"
+ top_delta="2">
+ ( m² )
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ halign="right"
+ height="16"
+ layout="topleft"
+ left_pad="5"
name="your_contribution_max_value"
- top_delta="2"
- width="200">
- sq. meters ([AMOUNT] max)
+ top_delta="0"
+ width="95">
+ ([AMOUNT] max)
</text>
<icon
height="16"
@@ -210,21 +225,24 @@
layout="topleft"
left="9"
name="group_over_limit_icon"
- top="235"
+ top_pad="0"
visible="false"
width="16" />
<text
+ follows="left|top"
type="string"
length="1"
- height="16"
+ word_wrap="true"
+ font="SansSerifSmall"
+ height="40"
layout="topleft"
left_pad="5"
name="group_over_limit_text"
text_color="GroupOverTierColor"
- top_delta="1"
- width="400">
+ top_delta="0"
+ width="250">
Group members must contribute more land credits to support land in use.
- </text>
+ </text>
<text
type="string"
length="1"
@@ -232,31 +250,31 @@
font="SansSerifBig"
height="16"
layout="topleft"
- left="12"
+ left="10"
name="group_money_heading"
- top="261"
+ top_pad="0"
width="150">
Group L$
</text>
<tab_container
follows="all"
- height="180"
+ height="100"
layout="topleft"
- left="6"
+ left="10"
name="group_money_tab_container"
tab_position="top"
- top="286"
- width="406">
+ top_pad="10"
+ width="265">
<panel
border="true"
follows="left|top|right|bottom"
- height="255"
+ height="180"
label="Planning"
layout="topleft"
left="1"
name="group_money_planning_tab"
top="5"
- width="398">
+ width="270">
<text_editor
type="string"
length="1"
@@ -269,105 +287,101 @@
max_length="4096"
name="group_money_planning_text"
top="5"
- width="382">
+ width="260">
Computing...
</text_editor>
</panel>
- <panel
+ <panel
border="true"
- follows="all"
- height="250"
+ follows="left|top|right|bottom"
+ height="180"
label="Details"
layout="topleft"
left_delta="0"
name="group_money_details_tab"
- top_delta="163"
- width="398">
- <text_editor
+ top_delta="0"
+ width="270">
+ <text_editor
type="string"
length="1"
bg_readonly_color="0.784314 0.819608 0.8 1"
- follows="left|top"
+ follows="all"
font="Monospace"
- height="125"
+ height="140"
layout="topleft"
left="8"
max_length="4096"
name="group_money_details_text"
top="7"
- width="382">
+ width="260">
Computing...
- </text_editor>
- <button
- follows="left|top"
+ </text_editor>
+ <button
height="20"
label="&lt; Earlier"
label_selected="&lt; Earlier"
layout="topleft"
- left="24"
+ left="5"
name="earlier_details_button"
tool_tip="Go back in time"
- top="136"
- width="80" />
+ top_pad="10"
+ width="125" />
<button
- follows="left|top"
height="20"
label="Later &gt;"
label_selected="Later &gt;"
layout="topleft"
- left_pad="190"
+ left_pad="5"
name="later_details_button"
tool_tip="Go forward in time"
top_delta="0"
- width="80" />
+ width="125" />
</panel>
- <panel
+ <panel
border="true"
- follows="all"
- height="164"
+ follows="left|top|right|bottom"
+ height="180"
label="Sales"
layout="topleft"
left_delta="0"
name="group_money_sales_tab"
top_delta="-1"
- width="398">
+ width="270">
<text_editor
type="string"
length="1"
bg_readonly_color="0.784314 0.819608 0.8 1"
- follows="left|top"
+ follows="all"
font="Monospace"
- height="125"
+ height="140"
layout="topleft"
left="8"
max_length="4096"
name="group_money_sales_text"
top="7"
- width="382">
+ width="260">
Computing...
</text_editor>
<button
- follows="left|top"
height="20"
label="&lt; Earlier"
label_selected="&lt; Earlier"
layout="topleft"
- left="24"
+ left="5"
name="earlier_sales_button"
tool_tip="Go back in time"
- top="136"
- width="80" />
+ top_pad="10"
+ width="125" />
<button
- follows="left|top"
height="20"
label="Later &gt;"
label_selected="Later &gt;"
layout="topleft"
- left_pad="190"
+ left_pad="5"
name="later_sales_button"
tool_tip="Go forward in time"
top_delta="0"
- width="80" />
+ width="125" />
</panel>
</tab_container>
-</panel>
+</panel> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/panel_group_notices.xml b/indra/newview/skins/default/xui/en/panel_group_notices.xml
index 345cc734e6..2e5f2dcb0b 100644
--- a/indra/newview/skins/default/xui/en/panel_group_notices.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_notices.xml
@@ -2,13 +2,13 @@
<panel
border="true"
follows="all"
- height="466"
+ height="530"
label="Notices"
layout="topleft"
left="1"
name="notices_tab"
- top="466"
- width="418">
+ top="530"
+ width="280">
<panel.string
name="help_text">
Notices are a quick way to communicate across a
@@ -22,41 +22,44 @@ the General tab.
name="no_notices_text">
There are no past notices.
</panel.string>
- <button
+ <!-- <button
+ follows="left|top"
height="16"
label="?"
label_selected="?"
layout="topleft"
- left="391"
+ left="250"
name="help_button"
top="8"
- width="20" />
- <text
+ width="20" /> -->
+ <text
+ follows="left|top"
type="string"
length="1"
font="SansSerifBig"
height="16"
layout="topleft"
- left_delta="-384"
+ left="10"
name="lbl"
- top_delta="-4"
- width="436">
+ top_pad="10"
+ width="269">
Group Notices Archive
</text>
<text
+ follows="left|top"
type="string"
length="1"
- height="16"
+ word_wrap="true"
+ height="73"
layout="topleft"
left_delta="0"
name="lbl2"
top_pad="4"
- width="436">
- Notices are kept for 14 days. Click the notice below you wish to view.
-Click the &apos;Refresh&apos; button to check if new notices have been received.
-Notice lists are limited to 200 notices per group on a daily basis.
+ width="270">
+ Notices are kept for 14 days. Click the notice below if you wish to view. Click the &apos;Refresh&apos; button to check if new notices have been received. Notice lists are limited to 200 notices per group on a daily basis.
</text>
<scroll_list
+ follows="left|top"
column_padding="0"
draw_heading="true"
heading_height="14"
@@ -64,8 +67,8 @@ Notice lists are limited to 200 notices per group on a daily basis.
layout="topleft"
left_delta="0"
name="notice_list"
- top_pad="28"
- width="404">
+ top_pad="0"
+ width="265">
<scroll_list.columns
label=""
name="icon"
@@ -73,20 +76,21 @@ Notice lists are limited to 200 notices per group on a daily basis.
<scroll_list.columns
label="Subject"
name="subject"
- width="171" />
+ width="100" />
<scroll_list.columns
label="From"
name="from"
- width="125" />
+ width="83" />
<scroll_list.columns
label="Date"
name="date"
- width="85" />
+ width="50" />
<scroll_list.columns
name="sort"
width="-1" />
</scroll_list>
<text
+ follows="left|top"
type="string"
length="1"
layout="topleft"
@@ -95,69 +99,74 @@ Notice lists are limited to 200 notices per group on a daily basis.
None found.
</text>
<button
+ follows="left|top"
height="20"
- label="Create New Notice"
+ font="SansSerifSmall"
+ label="New Notice"
label_selected="Create New Notice"
layout="topleft"
left_delta="0"
name="create_new_notice"
- top_delta="-2"
- width="150" />
+ top_delta="4"
+ width="125" />
<button
+ follows="left|top"
height="20"
+ font="SansSerifSmall"
label="Refresh"
label_selected="Refresh List"
layout="topleft"
- left_pad="164"
+ left_pad="12"
name="refresh_notices"
top_delta="0"
- width="90" />
+ width="125" />
<panel
- follows="all"
+ follows="left|top"
height="268"
label="Create New Notice"
layout="topleft"
- left="1"
+ left="0"
name="panel_create_new_notice"
- top="198"
- width="418">
+ top="250"
+ width="265">
<text
+ follows="left|top"
type="string"
length="1"
font="SansSerifBig"
height="16"
layout="topleft"
- left="7"
+ left="10"
mouse_opaque="false"
name="lbl"
- top="2"
- width="436">
+ top_pad="0"
+ width="265">
Create a Notice
</text>
<text
+ follows="left|top"
type="string"
+ word_wrap="true"
length="1"
- height="16"
+ height="90"
layout="topleft"
left_delta="0"
name="lbl2"
top_pad="4"
- width="436">
- You must enter a subject to send a notice. You can add a single
-item to a notice by dragging it from your inventory to this
-panel. Attached items must be copiable and transferrable,
-and you can&apos;t send a folder.
+ width="196">
+ You must enter a subject to send a notice. You can add a single item to a notice by dragging it from your inventory to this panel. Attached items must be copiable and transferrable, and you can&apos;t send a folder.
</text>
<text
+ follows="left|top"
type="string"
length="1"
- halign="right"
+ halign="left"
height="16"
layout="topleft"
left_delta="0"
name="lbl3"
- top_pad="47"
- width="55">
+ top_pad="10"
+ width="60">
Subject:
</text>
<line_editor
@@ -168,52 +177,54 @@ and you can&apos;t send a folder.
left_pad="3"
max_length="63"
name="create_subject"
- top_delta="0"
- width="264" />
+ top_delta="-1"
+ width="200" />
<text
+ follows="left|top"
type="string"
length="1"
- halign="right"
+ halign="left"
height="16"
layout="topleft"
- left="7"
+ left="10"
name="lbl4"
- top="103"
- width="55">
+ top_pad="10"
+ width="60">
Message:
</text>
<text_editor
- height="120"
+ height="75"
hide_scrollbar="true"
layout="topleft"
left_pad="3"
max_length="511"
name="create_message"
- top_delta="2"
- width="346"
+ top_delta="0"
+ width="200"
word_wrap="true" />
<text
+ follows="left|top"
type="string"
length="1"
- halign="right"
+ halign="left"
height="16"
layout="topleft"
- left="7"
+ left="10"
name="lbl5"
- top="228"
- width="55">
+ top_pad="10"
+ width="60">
Attach:
</text>
<line_editor
enabled="false"
height="16"
layout="topleft"
- left_pad="4"
+ left_pad="3"
max_length="63"
mouse_opaque="false"
name="create_inventory_name"
- top_delta="2"
- width="211" />
+ top_delta="0"
+ width="200" />
<icon
height="16"
layout="topleft"
@@ -222,41 +233,45 @@ and you can&apos;t send a folder.
top_delta="0"
width="16" />
<button
+ follows="left|top"
height="20"
+ font="SansSerifSmall"
label="Remove Attachment"
label_selected="Remove Attachment"
layout="topleft"
- left_pad="197"
+ left="10"
name="remove_attachment"
- top_delta="-4"
+ top_pad="10"
width="135" />
<button
+ follows="left|top"
height="20"
- label="Send Notice"
+ font="SansSerifSmall"
+ label="Send"
label_selected="Send Notice"
layout="topleft"
- left_delta="0"
+ left_delta="138"
name="send_notice"
- top_delta="20"
- width="135" />
+ top_delta="0"
+ width="125" />
<panel
bevel_style="in"
border="true"
- height="76"
+ height="71"
layout="topleft"
- left="335"
+ left="200"
name="drop_target2"
top="20"
- width="76" />
+ width="71" />
<icon
- height="64"
+ height="59"
image_name="icon_groupnoticeinventory.tga"
layout="topleft"
- left_delta="5"
+ left_delta="6"
mouse_opaque="true"
name="drop_icon"
- top="25"
- width="64" />
+ top="26"
+ width="59" />
<group_drop_target
height="466"
layout="topleft"
@@ -264,52 +279,53 @@ and you can&apos;t send a folder.
name="drop_target"
tool_tip="Drag an inventory item onto the message box to send it with the notice. You must have permission to copy and transfer the object to send it with the notice."
top="-198"
- width="422" />
- </panel>
+ width="280" />
+ </panel>
<panel
- follows="all"
+ follows="left|top"
height="268"
label="View Past Notice"
layout="topleft"
- left_delta="0"
+ left="0"
name="panel_view_past_notice"
- top_delta="0"
- width="418">
+ top="250"
+ width="265">
<text
type="string"
length="1"
font="SansSerifBig"
height="16"
layout="topleft"
- left="7"
+ left="10"
mouse_opaque="false"
name="lbl"
- top="2"
- width="436">
+ top_pad="0"
+ width="265">
Archived Notice
</text>
<text
type="string"
length="1"
height="16"
+ word_wrap="true"
layout="topleft"
left_delta="0"
name="lbl2"
top_pad="4"
- width="436">
+ width="265">
To send a new notice, click the &apos;Create New Notice&apos; button above.
</text>
<text
type="string"
length="1"
- halign="right"
+ halign="left"
height="16"
layout="topleft"
left_delta="0"
name="lbl3"
top_pad="24"
visible="false"
- width="55">
+ width="60">
Subject:
</text>
<line_editor
@@ -321,52 +337,43 @@ and you can&apos;t send a folder.
left_pad="3"
max_length="63"
name="view_subject"
- top_delta="0"
+ top_delta="-1"
visible="false"
- width="346" />
+ width="200" />
<text
type="string"
length="1"
- halign="right"
+ halign="left"
height="16"
layout="topleft"
- left="7"
+ left="10"
name="lbl4"
- top="80"
+ top_pad="10"
visible="false"
- width="55">
+ width="60">
Message:
</text>
<text_editor
enabled="false"
- height="206"
+ height="150"
hide_scrollbar="true"
layout="topleft"
- left_delta="0"
+ left="10"
max_length="511"
name="view_message"
- top_delta="-42"
- width="404"
+ top_delta="-35"
+ width="260"
word_wrap="true" />
- <button
- height="20"
- label="Open Attachment"
- label_selected="Open Attachment"
- layout="topleft"
- left_delta="0"
- name="open_attachment"
- top_pad="4"
- width="110" />
<line_editor
enabled="false"
height="16"
layout="topleft"
- left_pad="3"
+ left_delta="0"
max_length="63"
mouse_opaque="false"
name="view_inventory_name"
- top_delta="1"
- width="264" />
+ top_pad="10"
+ width="260" />
<icon
height="16"
layout="topleft"
@@ -374,5 +381,16 @@ and you can&apos;t send a folder.
name="view_inv_icon"
top_delta="0"
width="16" />
- </panel>
-</panel>
+ <button
+ follows="left|top"
+ height="20"
+ font="SansSerifSmall"
+ label="Open Attachment"
+ label_selected="Open Attachment"
+ layout="topleft"
+ left_delta="0"
+ name="open_attachment"
+ top_pad="10"
+ width="135" />
+ </panel>
+</panel> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/panel_group_notify.xml b/indra/newview/skins/default/xui/en/panel_group_notify.xml
new file mode 100644
index 0000000000..a39a681f83
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_group_notify.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel background_visible="true" bevel_style="in" bg_alpha_color="0 0 0 0"
+ height="200" label="instant_message" layout="topleft" left="0"
+ name="panel_group_notify" top="0" width="350">
+ <panel background_visible="true" bevel_style="in" bg_alpha_color="black"
+ height="50" label="header" layout="topleft" left="0" name="header"
+ top="0" width="350">
+ <icon follows="left|top|right|bottom" height="40" width="40" layout="topleft"
+ top="5" left="5" mouse_opaque="true" name="group_icon"/>
+ <text type="string" length="1" follows="left|top|right|bottom"
+ font="SansSerifBigBold" height="20" layout="topleft" left="60" name="title"
+ text_color="GroupNotifyTextColor" top="20" width="300">
+ Sender Name / Group Name
+ </text>
+ </panel>
+ <text_editor type="string" length="1" bg_readonly_color="0 0 0 0"
+ follows="left|top|right|bottom" height="70" hide_scrollbar="true"
+ hide_border="true" layout="topleft" top="55" left="25" name="message"
+ text_color="GroupNotifyTextColor" text_readonly_color="GroupNotifyTextColor" width="300" word_wrap="true">
+ Message
+ Body
+ </text_editor>
+ <icon follows="left|top|right|bottom" height="16" width="16"
+ layout="topleft" top="135" left="25" mouse_opaque="true" name="attachment_icon" />
+ <text font="SansSerif" font.style="UNDERLINE" font_shadow="hard"
+ type="string" length="1" follows="left|top|right|bottom" layout="topleft"
+ left="45" top="135" height="15" width="280" name="attachment"
+ text_color="GroupNotifyTextColor">
+ Attachment
+ </text>
+ <button label="OK" layout="topleft" top="170" left="140" height="20"
+ width="70" name="btn_ok" />
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_group_roles.xml b/indra/newview/skins/default/xui/en/panel_group_roles.xml
index c758da4b63..dd6cd8c95e 100644
--- a/indra/newview/skins/default/xui/en/panel_group_roles.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_roles.xml
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
border="true"
- height="466"
+ height="530"
label="Members &amp; Roles"
layout="topleft"
left="1"
name="roles_tab"
- top="466"
- width="418">
+ top="530"
+ width="280">
<panel.string
name="default_needs_apply_text">
There are unapplied changes on the current sub-tab.
@@ -18,21 +18,25 @@
</panel.string>
<panel.string
name="help_text" />
+ <!--
<button
+ follows="left|top"
height="16"
label="?"
layout="topleft"
- left="391"
+ left="250"
name="help_button"
top="8"
width="20" />
+ -->
<panel
+ follows="left|top"
height="24"
layout="topleft"
- left="7"
+ left="10"
name="members_header"
- top="0"
- width="380">
+ top_pad="10"
+ width="270">
<text
type="string"
length="1"
@@ -42,30 +46,31 @@
left="0"
name="static"
top="4"
- width="150">
+ width="270">
Members &amp; Roles
</text>
<text
type="string"
length="1"
- height="32"
+ word_wrap="true"
+ height="40"
layout="topleft"
left_delta="0"
name="static2"
top_pad="4"
- width="400">
- Group Members are assigned Roles with Abilities. These settings can
-easily be customized, allowing for greater organization and flexibility.
+ width="270">
+ Group Members are assigned Roles with Abilities. These settings can easily be customized, allowing for greater organization and flexibility.
</text>
</panel>
<panel
+ follows="left|top"
height="24"
layout="topleft"
left_delta="0"
name="roles_header"
top_delta="0"
visible="false"
- width="380">
+ width="270">
<text
type="string"
length="1"
@@ -75,64 +80,69 @@ easily be customized, allowing for greater organization and flexibility.
left="0"
name="static"
top="4"
- width="100">
+ width="270">
Roles
</text>
<text
type="string"
length="1"
- height="16"
+ word_wrap="true"
+ height="40"
layout="topleft"
left_delta="0"
name="role_properties_modifiable"
top_pad="4"
visible="false"
- width="394">
+ width="270">
Select a Role below. You can modify its Name, Description and Member Title.
</text>
<text
type="string"
length="1"
- height="16"
+ word_wrap="true"
+ height="40"
layout="topleft"
left_delta="0"
name="role_properties_not_modifiable"
top_delta="0"
- width="394">
+ width="270">
Select a Role below to see its properties, Members and allowed Abilities.
</text>
<text
type="string"
length="1"
+ word_wrap="true"
height="16"
layout="topleft"
left_delta="0"
name="role_actions_modifiable"
- top_delta="14"
+ top_delta="24"
visible="false"
- width="394">
+ width="270">
You can also assign Abilities to the Role.
</text>
<text
type="string"
length="1"
+ word_wrap="true"
height="16"
layout="topleft"
left_delta="0"
name="role_actions_not_modifiable"
top_delta="0"
- width="394">
+ width="270">
You may view, but not modify, assigned Abilities.
</text>
</panel>
<panel
+ follows="left|top"
height="24"
layout="topleft"
left_delta="0"
name="actions_header"
top_delta="20"
visible="false"
- width="380">
+ width="270">
<text
type="string"
length="1"
@@ -142,40 +152,40 @@ easily be customized, allowing for greater organization and flexibility.
left="0"
name="static"
top="-16"
- width="200">
+ width="270">
Abilities
</text>
<text
type="string"
length="1"
- height="32"
+ word_wrap="true"
+ height="40"
layout="topleft"
left_delta="0"
name="static2"
top_pad="4"
- width="394">
- You can view an Ability&apos;s Description and which Roles and Members can
-execute the Ability.
+ width="270">
+ You can view an Ability&apos;s Description and which Roles and Members can execute the Ability.
</text>
</panel>
<tab_container
height="180"
layout="topleft"
- left_delta="-1"
+ left_delta="0"
name="roles_tab_container"
tab_position="top"
- top_pad="10"
- width="406">
+ top="70"
+ width="265">
<panel
border="true"
- height="164"
+ height="165"
label="Members"
layout="topleft"
left="1"
name="members_sub_tab"
tool_tip="Members"
top="16"
- width="406">
+ width="265">
<panel.string
name="help_text">
You can add or remove Roles assigned to Members.
@@ -191,8 +201,8 @@ clicking on their names.
left="4"
max_length="63"
name="search_text"
- top="5"
- width="100" />
+ top="10"
+ width="90" />
<button
font="SansSerifSmall"
height="20"
@@ -201,14 +211,14 @@ clicking on their names.
left_pad="5"
name="search_button"
top_delta="-2"
- width="60" />
+ width="80" />
<button
enabled="false"
font="SansSerifSmall"
height="20"
label="Show All"
layout="topleft"
- left_pad="5"
+ left_pad="0"
name="show_all_button"
top_delta="0"
width="80" />
@@ -216,42 +226,44 @@ clicking on their names.
column_padding="0"
draw_heading="true"
heading_height="14"
- height="120"
+ height="100"
layout="topleft"
left="4"
multi_select="true"
name="member_list"
- top="24"
- width="396">
+ top_pad="4"
+ width="255">
<name_list.columns
- label="Member Name"
+ label="Member"
name="name"
- width="136" />
+ width="90" />
<name_list.columns
- label="Donated Tier"
+ label="Donations"
name="donated"
- width="136" />
+ width="95" />
<name_list.columns
- label="Last Login"
+ label="Online"
name="online"
- width="116" />
+ width="80" />
</name_list>
<button
- height="19"
- label="Invite New Member ..."
+ height="20"
+ font="SansSerifSmall"
+ label="Invite"
layout="topleft"
left_delta="0"
name="member_invite"
- top_pad="1"
- width="146" />
+ top_pad="6"
+ width="125" />
<button
- height="19"
- label="Eject From Group"
+ height="20"
+ font="SansSerifSmall"
+ label="Eject"
layout="topleft"
- left_pad="103"
+ left_pad="5"
name="member_eject"
top_delta="0"
- width="146" />
+ width="125" />
<icon
height="16"
image_name="inv_folder_plain_closed.tga"
@@ -268,7 +280,7 @@ clicking on their names.
left_delta="0"
name="roles_sub_tab"
top_delta="0"
- width="398">
+ width="265">
<panel.string
name="help_text">
Roles have a title and an allowed list of Abilities
@@ -301,8 +313,8 @@ including the Everyone and Owner Roles.
left="4"
max_length="63"
name="search_text"
- top="5"
- width="100" />
+ top="10"
+ width="90" />
<button
font="SansSerifSmall"
height="20"
@@ -311,14 +323,14 @@ including the Everyone and Owner Roles.
left_pad="5"
name="search_button"
top_delta="-2"
- width="60" />
+ width="80" />
<button
enabled="false"
font="SansSerifSmall"
height="20"
label="Show All"
layout="topleft"
- left_pad="5"
+ left_pad="0"
name="show_all_button"
top_delta="0"
width="80" />
@@ -327,41 +339,43 @@ including the Everyone and Owner Roles.
draw_heading="true"
follows="left|top"
heading_height="14"
- height="120"
+ height="100"
layout="topleft"
left="4"
name="role_list"
- top="23"
- width="396">
+ top_pad="4"
+ width="255">
<scroll_list.columns
- label="Role Name"
+ label="Role"
name="name"
- width="126" />
+ width="80" />
<scroll_list.columns
label="Title"
name="title"
- width="186" />
+ width="90" />
<scroll_list.columns
label="Members"
name="members"
- width="76" />
+ width="95" />
</scroll_list>
<button
- height="19"
- label="Create New Role ..."
+ height="20"
+ font="SansSerifSmall"
+ label="Create New Role"
layout="topleft"
left_delta="0"
name="role_create"
- top_pad="2"
- width="146" />
+ top_pad="6"
+ width="125" />
<button
- height="19"
+ height="20"
+ font="SansSerifSmall"
label="Delete Role"
layout="topleft"
- left_pad="95"
+ left_pad="5"
name="role_delete"
top_delta="0"
- width="146" />
+ width="125" />
</panel>
<panel
border="true"
@@ -371,7 +385,7 @@ including the Everyone and Owner Roles.
left_delta="0"
name="actions_sub_tab"
top_delta="0"
- width="398">
+ width="265">
<panel.string
name="help_text">
Abilities allow Members in Roles to do specific
@@ -383,11 +397,11 @@ things in this group. There&apos;s a broad variety of Abilities.
follows="left|top"
height="16"
layout="topleft"
- left="6"
+ left="4"
max_length="63"
name="search_text"
- top="5"
- width="100" />
+ top="10"
+ width="90" />
<button
font="SansSerifSmall"
height="20"
@@ -396,14 +410,14 @@ things in this group. There&apos;s a broad variety of Abilities.
left_pad="5"
name="search_button"
top_delta="-2"
- width="60" />
+ width="80" />
<button
enabled="false"
font="SansSerifSmall"
height="20"
label="Show All"
layout="topleft"
- left_pad="5"
+ left_pad="0"
name="show_all_button"
top_delta="0"
width="80" />
@@ -411,15 +425,15 @@ things in this group. There&apos;s a broad variety of Abilities.
column_padding="0"
draw_stripes="false"
follows="left|top"
- height="134"
+ height="100"
layout="topleft"
left="6"
multi_select="true"
name="action_list"
search_column="1"
tool_tip="Select an Ability to view more details."
- top="23"
- width="392">
+ top_pad="6"
+ width="255">
<scroll_list.columns
label=""
name="icon"
@@ -427,7 +441,7 @@ things in this group. There&apos;s a broad variety of Abilities.
<scroll_list.columns
label=""
name="action"
- width="356" />
+ width="247" />
</scroll_list>
<icon
height="16"
@@ -439,12 +453,12 @@ things in this group. There&apos;s a broad variety of Abilities.
</panel>
</tab_container>
<panel
- height="215"
+ height="50"
layout="topleft"
- left_delta="1"
+ left="10"
name="members_footer"
- top_pad="20"
- width="406">
+ top_pad="10"
+ width="265">
<text
type="string"
length="1"
@@ -453,7 +467,7 @@ things in this group. There&apos;s a broad variety of Abilities.
layout="topleft"
left="0"
name="static"
- top="-16"
+ top_pad="0"
width="100">
Assigned Roles
</text>
@@ -463,21 +477,21 @@ things in this group. There&apos;s a broad variety of Abilities.
font="SansSerif"
height="16"
layout="topleft"
- left_pad="50"
+ left_pad="35"
name="static2"
top_delta="0"
- width="150">
+ width="100">
Allowed Abilities
</text>
<scroll_list
draw_stripes="false"
enabled="false"
- height="198"
+ height="75"
layout="topleft"
left="0"
name="member_assigned_roles"
- top="1"
- width="145">
+ top_pad="5"
+ width="130">
<scroll_list.columns
label=""
name="checkbox"
@@ -485,18 +499,18 @@ things in this group. There&apos;s a broad variety of Abilities.
<scroll_list.columns
label=""
name="role"
- width="109" />
+ width="107" />
</scroll_list>
<scroll_list
draw_stripes="false"
enabled="false"
- height="198"
+ height="75"
layout="topleft"
left_pad="5"
name="member_allowed_actions"
tool_tip="For Details of each Allowed Ability see the Abilities tab."
top_delta="0"
- width="254">
+ width="130">
<scroll_list.columns
label=""
name="icon"
@@ -504,7 +518,7 @@ things in this group. There&apos;s a broad variety of Abilities.
<scroll_list.columns
label=""
name="action"
- width="224" />
+ width="126" />
</scroll_list>
</panel>
<panel
@@ -514,7 +528,7 @@ things in this group. There&apos;s a broad variety of Abilities.
name="roles_footer"
top_delta="0"
visible="false"
- width="406">
+ width="270">
<text
type="string"
length="1"
@@ -523,7 +537,7 @@ things in this group. There&apos;s a broad variety of Abilities.
layout="topleft"
left="0"
name="static"
- top="-16"
+ top="0"
width="100">
Name
</text>
@@ -533,7 +547,7 @@ things in this group. There&apos;s a broad variety of Abilities.
font="SansSerif"
height="16"
layout="topleft"
- left_pad="50"
+ left_pad="35"
name="static2"
top_delta="0"
width="100">
@@ -550,8 +564,8 @@ things in this group. There&apos;s a broad variety of Abilities.
left="0"
max_length="20"
name="role_name"
- top="0"
- width="145">
+ top_pad="0"
+ width="130">
Employees
</line_editor>
<text
@@ -562,7 +576,7 @@ things in this group. There&apos;s a broad variety of Abilities.
layout="topleft"
left_delta="0"
name="static3"
- top_delta="16"
+ top_pad="10"
width="100">
Title
</text>
@@ -577,8 +591,8 @@ things in this group. There&apos;s a broad variety of Abilities.
left_delta="0"
max_length="20"
name="role_title"
- top_delta="16"
- width="145">
+ top_pad="0"
+ width="130">
(waiting)
</line_editor>
<text_editor
@@ -588,11 +602,11 @@ things in this group. There&apos;s a broad variety of Abilities.
height="48"
hide_scrollbar="true"
layout="topleft"
- left="150"
+ left="135"
max_length="254"
name="role_description"
- top="0"
- width="254"
+ top="16"
+ width="130"
word_wrap="true">
(waiting)
</text_editor>
@@ -604,7 +618,7 @@ things in this group. There&apos;s a broad variety of Abilities.
layout="topleft"
left="0"
name="static4"
- top="58"
+ top="85"
width="120">
Assigned Members
</text>
@@ -614,22 +628,22 @@ things in this group. There&apos;s a broad variety of Abilities.
font="SansSerif"
height="16"
layout="topleft"
- left_pad="30"
+ left_pad="15"
name="static5"
tool_tip="A list of Abilities the currently selected role can perform."
top_delta="0"
- width="240">
+ width="100">
Allowed Abilities
</text>
<name_list
draw_stripes="false"
enabled="false"
- height="105"
+ height="75"
layout="topleft"
left="0"
name="role_assigned_members"
- top="74"
- width="145" />
+ top_pad="0"
+ width="130" />
<check_box
height="16"
label="Members are visible"
@@ -637,18 +651,18 @@ things in this group. There&apos;s a broad variety of Abilities.
left_delta="0"
name="role_visible_in_list"
tool_tip="Sets whether members of this role are visible in the General tab to people outside of the group."
- top_pad="4"
- width="361" />
+ top_pad="10"
+ width="130" />
<scroll_list
draw_stripes="false"
- height="125"
+ height="75"
layout="topleft"
- left="150"
+ left="135"
name="role_allowed_actions"
search_column="2"
tool_tip="For Details of each Allowed Ability see the Abilities tab."
- top="74"
- width="254">
+ top="101"
+ width="130">
<scroll_list.columns
label=""
name="icon"
@@ -663,14 +677,14 @@ things in this group. There&apos;s a broad variety of Abilities.
width="220" />
</scroll_list>
</panel>
- <panel
+ <panel
height="215"
layout="topleft"
left_delta="0"
name="actions_footer"
top_delta="0"
visible="false"
- width="406">
+ width="265">
<text
type="string"
length="1"
@@ -679,8 +693,8 @@ things in this group. There&apos;s a broad variety of Abilities.
layout="topleft"
left="0"
name="static"
- top="-16"
- width="100">
+ top="0"
+ width="200">
Description
</text>
<text_editor
@@ -694,8 +708,8 @@ things in this group. There&apos;s a broad variety of Abilities.
left_delta="0"
max_length="512"
name="action_description"
- top_delta="16"
- width="404"
+ top_pad="0"
+ width="265"
word_wrap="true">
This Ability is &apos;Eject Members from this Group&apos;. Only an Owner can eject another Owner.
</text_editor>
@@ -708,7 +722,7 @@ things in this group. There&apos;s a broad variety of Abilities.
left_delta="0"
name="static2"
top_pad="10"
- width="145">
+ width="125">
Roles with Ability
</text>
<text
@@ -717,27 +731,27 @@ things in this group. There&apos;s a broad variety of Abilities.
font="SansSerif"
height="16"
layout="topleft"
- left_pad="5"
+ left_pad="10"
name="static3"
top_delta="0"
- width="200">
+ width="125">
Members with Ability
</text>
<scroll_list
enabled="false"
- height="125"
+ height="75"
layout="topleft"
left="0"
name="action_roles"
- top="74"
- width="145" />
+ top="90"
+ width="130" />
<name_list
enabled="false"
- height="125"
+ height="75"
layout="topleft"
left_pad="5"
name="action_members"
top_delta="0"
- width="254" />
+ width="130" />
</panel>
-</panel>
+</panel> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml
new file mode 100644
index 0000000000..5067b4c1d8
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel name="panel_im_control_panel"
+ width="96"
+ height="215"
+ border="false">
+
+ <avatar_icon name="avatar_icon"
+ width="96"
+ height="96" />
+
+ <button name="view_profile_btn"
+ label="View Profile"
+ left_delta="3"
+ width="90"
+ height="20" />
+
+ <button name="add_friend_btn"
+ label="Add Friend"
+ width="90"
+ height="20" />
+
+ <button name="call_btn"
+ label="Call"
+ width="90"
+ height="20" />
+
+ <button name="share_btn"
+ label="Share"
+ width="90"
+ height="20" />
+
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml
deleted file mode 100644
index e252788c69..0000000000
--- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml
+++ /dev/null
@@ -1,258 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel
- background_visible="true"
- bg_alpha_color="0.3 0.3 0.3 1"
- height="560"
- label="Landmark"
- layout="topleft"
- left="0"
- name="landmark_info"
- top="800"
- width="355">
- <panel.string
- name="not_available">
- (N\A)
- </panel.string>
- <panel.string
- name="unknown">
- (unknown)
- </panel.string>
- <panel.string
- name="public">
- (public)
- </panel.string>
- <panel.string
- name="server_update_text">
- Place information not available without server update.
- </panel.string>
- <panel.string
- name="server_error_text">
- Information about this location is unavailable at this time, please try again later.
- </panel.string>
- <panel.string
- name="server_forbidden_text">
- Information about this location is unavailable due to access restrictions. Please check your permissions with the parcel owner.
- </panel.string>
- <panel.string
- name="acquired_date">
- [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local]
- </panel.string>
- <button
- follows="top|left"
- height="20"
- image_overlay="navbar_back.tga"
- image_selected="navbar_bg_button.tga"
- image_unselected="navbar_bg_button.tga"
- layout="topleft"
- left="10"
- name="back_btn"
- picture_style="true"
- top="20"
- width="20" />
- <text
- type="string"
- length="1"
- follows="left|top|right"
- font="SansSerifHugeBold"
- height="20"
- layout="topleft"
- left="50"
- name="panel_title"
- text_color="white"
- top="20"
- width="150">
- Landmark
- </text>
- <texture_picker
- follows="top|left"
- height="128"
- layout="topleft"
- left="10"
- name="logo"
- top="60"
- width="128" />
- <text
- follows="left|top|right"
- font="SansSerifHugeBold"
- height="20"
- layout="topleft"
- left="10"
- name="region_name"
- text_color="white"
- top="180"
- width="340" />
- <text
- follows="left|top|right"
- font="SansSerifBold"
- height="20"
- layout="topleft"
- left="10"
- name="parcel_name"
- text_color="white"
- top="205"
- width="340" />
- <panel
- follows="left|top|right|bottom"
- height="335"
- layout="topleft"
- left="0"
- name="info_panel"
- top="225"
- width="355">
- <text_editor
- bg_focus_color="0.3 0.3 0.3 1"
- bg_readonly_color="0.3 0.3 0.3 1"
- follows="left|top|right"
- font="SansSerif"
- height="90"
- hide_border="true"
- hide_scrollbar="true"
- layout="topleft"
- left="10"
- max_length="1000"
- name="description"
- read_only="true"
- text_color="white"
- top="0"
- width="340" />
- <icon
- follows="top|left"
- height="30"
- image_name=""
- layout="topleft"
- left="10"
- mouse_opaque="true"
- name="maturity"
- top="95"
- width="30" />
- <text
- type="string"
- length="1"
- follows="left|top"
- font="SansSerif"
- height="15"
- layout="topleft"
- left="10"
- name="owner_lable"
- text_color="white"
- top="130"
- width="50"
- word_wrap="true">
- Owner:
- </text>
- <text
- follows="left|top|right"
- font="SansSerif"
- height="15"
- layout="topleft"
- left="80"
- name="owner"
- text_color="white"
- top="130"
- width="260"
- word_wrap="true" />
- <text
- type="string"
- length="1"
- follows="left|top"
- font="SansSerif"
- height="15"
- layout="topleft"
- left="10"
- name="creator_lable"
- text_color="white"
- top="150"
- width="50"
- word_wrap="true">
- Creator:
- </text>
- <text
- follows="left|top|right"
- font="SansSerif"
- height="15"
- layout="topleft"
- left="80"
- name="creator"
- text_color="white"
- top="150"
- width="260"
- word_wrap="true" />
- <text
- type="string"
- length="1"
- follows="left|top"
- font="SansSerif"
- height="15"
- layout="topleft"
- left="10"
- name="created_lable"
- text_color="white"
- top="170"
- width="50"
- word_wrap="true">
- Created:
- </text>
- <text
- follows="left|top|right"
- font="SansSerif"
- height="15"
- layout="topleft"
- left="80"
- name="created"
- text_color="white"
- top="170"
- width="260"
- word_wrap="true" />
- <text
- type="string"
- length="1"
- follows="left|top"
- font="SansSerif"
- height="15"
- layout="topleft"
- left="10"
- name="title_lable"
- text_color="white"
- top="190"
- width="50"
- word_wrap="true">
- Title:
- </text>
- <line_editor
- follows="left|top|right"
- font="SansSerif"
- height="22"
- layout="topleft"
- left="10"
- max_length="255"
- name="title_editor"
- top="210"
- width="330" />
- <text
- type="string"
- length="1"
- follows="left|top"
- font="SansSerif"
- height="15"
- layout="topleft"
- left="10"
- name="notes_lable"
- text_color="white"
- top="240"
- width="90"
- word_wrap="true">
- My Notes:
- </text>
- <text_editor
- follows="left|top|bottom|right"
- font="SansSerif"
- height="70"
- hide_scrollbar="true"
- layout="topleft"
- left="10"
- max_length="1000"
- name="notes_editor"
- top="260"
- width="330" />
- </panel>
-</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_landmarks.xml b/indra/newview/skins/default/xui/en/panel_landmarks.xml
index f27b584c51..9ee80a37d7 100644
--- a/indra/newview/skins/default/xui/en/panel_landmarks.xml
+++ b/indra/newview/skins/default/xui/en/panel_landmarks.xml
@@ -1,10 +1,34 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<panel name="Landmarks" bottom="0" height="326" left="0" width="380"
- border="true" follows="left|top|right|bottom">
- <inventory_panel allow_multi_select="true" border="true" bottom="0"
- follows="left|top|right|bottom" height="326" left="0" mouse_opaque="true"
- name="landmarks_list" width="380"/>
- <button bottom="0" halign="center" height="16" label=">" enabled="false"
- mouse_opaque="false" name="selector" width="20" left="0"
- follows="right|bottom" tool_tip="View landmark properties"/>
+<panel
+ name="Landmarks"
+ bottom="0"
+ height="326"
+ left="0"
+ width="380"
+ border="true"
+ background_visible="true"
+ bg_alpha_color="DkGray2"
+ follows="left|top|right|bottom">
+ <inventory_panel
+ allow_multi_select="true"
+ border="true"
+ bottom="0"
+ follows="left|top|right|bottom"
+ height="326"
+ left="0"
+ mouse_opaque="true"
+ name="landmarks_list"
+ width="380"/>
+ <button
+ bottom="0"
+ halign="center"
+ height="16"
+ label=">"
+ enabled="false"
+ mouse_opaque="false"
+ name="selector"
+ width="20"
+ left="0"
+ follows="right|bottom"
+ tool_tip="View landmark properties"/>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml
index 20da8aa41e..5ee73c1242 100644
--- a/indra/newview/skins/default/xui/en/panel_login.xml
+++ b/indra/newview/skins/default/xui/en/panel_login.xml
@@ -136,12 +136,15 @@
width="155">
<combo_box.item
label="My Last Location"
+ name="MyLastLocation"
value="last" />
<combo_box.item
label="My Home"
+ name="MyHome"
value="home" />
<combo_box.item
label="&lt;Type region name&gt;"
+ name="Typeregionname"
value="" />
</combo_box>
<check_box
diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
index fa1abaa595..c9a0b6bc38 100644
--- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
@@ -8,15 +8,16 @@
layout="topleft"
name="navigation_bar"
width="600">
- <button
+ <button
follows="left|top"
font="SansSerifSmall"
height="20"
- image_disabled="navbar_bg_button.tga"
- image_disabled_selected="navbar_bg_button.tga"
- image_overlay="navbar_back.tga"
- image_selected="navbar_bg_button.tga"
- image_unselected="navbar_bg_button.tga"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_overlay="Arrow_Left_Off"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ hover_glow_amount="0.15"
layout="topleft"
left="5"
name="back_btn"
@@ -24,15 +25,17 @@
tool_tip="Go back to previous location"
top="8"
width="20" />
+
<button
follows="left|top"
font="SansSerifSmall"
height="20"
- image_disabled="navbar_bg_button.tga"
- image_disabled_selected="navbar_bg_button.tga"
- image_overlay="navbar_forward.tga"
- image_selected="navbar_bg_button.tga"
- image_unselected="navbar_bg_button.tga"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_overlay="Arrow_Right_Off"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ hover_glow_amount="0.15"
layout="topleft"
left_pad="2"
name="forward_btn"
@@ -44,11 +47,12 @@
follows="left|top"
font="SansSerifSmall"
height="20"
- image_disabled="navbar_bg_button.tga"
- image_disabled_selected="navbar_bg_button.tga"
- image_overlay="navbar_home.tga"
- image_selected="navbar_bg_button.tga"
- image_unselected="navbar_bg_button.tga"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_overlay="Home_Off"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ hover_glow_amount="0.15"
layout="topleft"
left_pad="5"
name="home_btn"
@@ -68,69 +72,70 @@
name="location_combo"
top_delta="0"
width="320">
+ <!-- *TODO: Delete. Let the location_input use the correct art sizes.
+ <location_input.add_landmark_button
+ height="18"
+ name="location_combo_add"
+ width="20" />
+ <location_input.info_button
+ height="18"
+ name="location_combo_info"
+ width="20" />
+ -->
</location_input>
- <button
- follows="right|top"
- height="20"
- image_disabled="navbar_bg_center.tga"
- image_disabled_selected="navbar_bg_center.tga"
- image_hover_selected="navbar_bg_center.tga"
- image_hover_unselected="navbar_bg_center.tga"
- image_selected="navbar_bg_center.tga"
- image_unselected="navbar_bg_center.tga"
- layout="topleft"
- left_pad="5"
- mouse_opaque="false"
- name="search_bg"
- picture_style="true"
- top_delta="0"
- width="168" />
- <line_editor
+
+<!-- <button -->
+<!-- follows="right|top" -->
+<!-- height="20" -->
+<!-- image_disabled="TextField_Search_Off" -->
+<!-- image_disabled_selected="TextField_Search_Off" -->
+<!-- image_hover_selected="TextField_Search_Off" -->
+<!-- image_hover_unselected="TextField_Search_Off" -->
+<!-- image_selected="TextField_Search_Off" -->
+<!-- image_unselected="TextField_Search_Off" -->
+<!-- layout="topleft" -->
+<!-- left_pad="5" -->
+<!-- mouse_opaque="false" -->
+<!-- name="search_bg" -->
+<!-- picture_style="true" -->
+<!-- top_delta="0" -->
+<!-- width="168" /> -->
+
+ <search_editor
bevel_style="none"
border_style="line"
+ border.border_thickness="0"
commit_on_focus_lost="false"
follows="right|top"
halign="right"
- height="18"
- label="Search"
+ height="20"
+ label="Search All"
layout="topleft"
- left_delta="0"
+ left_pad="5"
mouse_opaque="false"
name="search_input"
- tool_tip="Search"
- top_delta="1"
- width="152" />
- <button
- follows="right|top"
- height="16"
- image_disabled="status_search_btn.png"
- image_disabled_selected="status_search_btn_pressed.png"
- image_selected="status_search_btn_pressed.png"
- image_unselected="status_search_btn.png"
- layout="topleft"
- left_delta="152"
- name="search_btn"
- picture_style="true"
- scale_image="false"
- tool_tip="Search"
- top_delta="1"
- width="16" />
+ tool_tip="Search All"
+ top_delta="0"
+ width="135" />
+
<button
follows="right|top"
font="SansSerifSmall"
height="20"
- image_disabled="navbar_bg_button.tga"
- image_disabled_selected="navbar_bg_button.tga"
- image_overlay="navbar_help.tga"
- image_selected="navbar_bg_button.tga"
- image_unselected="navbar_bg_button.tga"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled"
+ image_overlay="Help_Off"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
+ hover_glow_amount="0.15"
layout="topleft"
- left_pad="5"
+ left_pad="15"
name="help_btn"
picture_style="true"
tool_tip="Help"
- top_delta="-2"
+ top_delta="0"
width="20" />
+
<favorites_bar
follows="left|right|top"
height="25"
diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml
new file mode 100644
index 0000000000..8b19f9a515
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel
+ default_tab_group="1"
+ follows="left|bottom|right"
+ height="25"
+ layout="topleft"
+ left="0"
+ name="chat_bar"
+ top="24"
+ width="500">
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ follows="left|right"
+ height="20"
+ label="Click here to chat."
+ layout="topleft"
+ left_delta="7"
+ left="0"
+ name="chat_box"
+ tool_tip="Press Enter to say, Ctrl-Enter to shout."
+ top="3"
+ width="250" />
+ <button
+ follows="right"
+ width="45"
+ top="3"
+ layout="topleft"
+ left_pad="5"
+ label="Log"
+ height="20">
+ <button.commit_callback function="Floater.Toggle" parameter="nearby_chat"/>
+ </button>
+ <chiclet_talk
+ follows="right"
+ height="20"
+ layout="topleft"
+ left_pad="5"
+ name="talk"
+ top="3"
+ width="100" />
+ <gesture_combo_box
+ follows="right"
+ height="20"
+ label="Gestures"
+ layout="topleft"
+ name="Gesture"
+ left_pad="5"
+ top="3"
+ width="90" />
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_notes.xml b/indra/newview/skins/default/xui/en/panel_notes.xml
index 767432a522..a0ac9df8a5 100644
--- a/indra/newview/skins/default/xui/en/panel_notes.xml
+++ b/indra/newview/skins/default/xui/en/panel_notes.xml
@@ -1,168 +1,173 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
follows="top|left|right|bottom"
- background_visible="true"
bevel_style="in"
- bg_alpha_color="0.5 0.5 0.5 1"
- height="705"
+ height="625"
label="Notes and Privacy"
layout="topleft"
left="10"
name="panel_notes"
top="10"
- width="355">
- <scroll_container
- left="1" width="354" height="690" follows="left|top|right|bottom"
- layout="topleft"
- reserve_scroll_corner="false">
- <panel
- layout="topleft"
- width="320"
- height="690"
- left="0"
- top="0">
- <text
- type="string"
- length="1"
- follows="left|top"
- font="SansSerifHugeBold"
- height="35"
+ width="305">
+ <scroll_container
+ left="8"
+ width="260"
+ height="570"
+ follows="left|top|right|bottom"
layout="topleft"
- left="10"
- name="pick_title"
- text_color="white"
- top="10"
- width="250"
- word_wrap="true">
- Private Notes
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- font="SansSerif"
- font.style="ITALIC"
- height="15"
- layout="topleft"
- left="10"
- name="status_message"
- text_color="0.1 0.1 0.1 1"
- top="50"
- width="300">
- Your notes about this user:
- </text>
- <text_editor
- bg_focus_color="white"
- bg_writeable_color="0.6 0.6 0.6 1"
- follows="left|right"
- font="SansSerif"
- height="300"
- hide_scrollbar="true"
- layout="topleft"
- left="10"
- max_length="1000"
- name="notes_edit"
- text_color="black"
- top="70"
- width="280"
- word_wrap="true" />
- <text
- type="string"
- length="1"
- follows="left|top"
- font="SansSerifHugeBold"
- height="35"
- layout="topleft"
- left="10"
- name="pick_title"
- text_color="white"
- top="410"
- width="250"
- word_wrap="true">
- Private Settings
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- font="SansSerif"
- font.style="ITALIC"
- height="15"
- layout="topleft"
- left="10"
- name="status_message"
- text_color="0.1 0.1 0.1 1"
- top="435"
- width="300">
- This user can:
- </text>
- <check_box
- enabled="false"
- follows="left|top"
- font="SansSerifBig"
- height="20"
- label="See my online status"
- layout="topleft"
- left="10"
- name="status_check"
- text_disabled_color="0.1 0.1 0.1 1"
- text_enabled_color="white"
- top="455"
- width="300" />
- <check_box
- enabled="false"
- follows="left|top"
- font="SansSerifBig"
- height="20"
- label="See me on the map"
- layout="topleft"
- left="10"
- name="map_check"
- text_disabled_color="0.1 0.1 0.1 1"
- text_enabled_color="white"
- top="480"
- width="300" />
- <check_box
- enabled="false"
- follows="left|top"
- font="SansSerifBig"
- height="20"
- label="Edit, delite or take my objects"
- layout="topleft"
- left="10"
- name="objects_check"
- text_disabled_color="0.1 0.1 0.1 1"
- text_enabled_color="white"
- top="505"
- width="300" />
+ name="profile_scroll"
+ opaque="true"
+ color="DkGray2"
+ reserve_scroll_corner="false">
+ <panel
+ layout="topleft"
+ width="260"
+ height="530"
+ left="0"
+ follows="left|right"
+ top="0">
+ <!-- <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerifHugeBold"
+ height="20"
+ layout="topleft"
+ left="10"
+ name="pick_title"
+ text_color="white"
+ top="10"
+ width="250"
+ word_wrap="true">
+ Private Notes
+ </text>-->
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerifBold"
+ height="15"
+ layout="topleft"
+ left="10"
+ name="status_message"
+ text_color="White"
+ top="20"
+ width="260">
+ Your private notes:
+ </text>
+ <text_editor
+ bg_focus_color="LtGray"
+ bg_writeable_color="LtGray"
+ follows="left|right"
+ font="SansSerif"
+ height="200"
+ hide_scrollbar="true"
+ layout="topleft"
+ left="10"
+ max_length="1000"
+ name="notes_edit"
+ text_color="black"
+ top_pad="10"
+ width="240"
+ word_wrap="true" />
+ <!-- <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerifHugeBold"
+ height="20"
+ layout="topleft"
+ left="10"
+ name="pick_title2"
+ text_color="white"
+ top_pad="10"
+ width="250"
+ word_wrap="true">
+ Private Settings
+ </text> -->
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ font="SansSerifBold"
+ height="15"
+ layout="topleft"
+ left="10"
+ name="status_message2"
+ text_color="white"
+ top_pad="30"
+ width="260">
+ Allow this user to:
+ </text>
+ <check_box
+ enabled="false"
+ follows="left|top"
+ font="SansSerif"
+ height="20"
+ label="See my online status"
+ layout="topleft"
+ left="10"
+ name="status_check"
+ text_disabled_color="0.1 0.1 0.1 1"
+ text_enabled_color="white"
+ top_pad="10"
+ width="260" />
+ <check_box
+ enabled="false"
+ follows="left|top"
+ font="SansSerif"
+ height="20"
+ label="See me on the map"
+ layout="topleft"
+ left="10"
+ name="map_check"
+ text_disabled_color="0.1 0.1 0.1 1"
+ text_enabled_color="white"
+ top_pad="10"
+ width="260" />
+ <check_box
+ enabled="false"
+ follows="left|top"
+ font="SansSerif"
+ height="20"
+ label="Edit, delete or take my objects"
+ layout="topleft"
+ left="10"
+ name="objects_check"
+ text_disabled_color="0.1 0.1 0.1 1"
+ text_enabled_color="white"
+ top_pad="10"
+ width="260" />
+ </panel>
+ </scroll_container>
<panel
layout="topleft"
follows="bottom"
height="30"
- left="0"
+ left="8"
name="notes_buttons_panel"
- bottom="690"
- width="350">
- <button
+ bottom="625"
+ width="280">
+ <button
follows="bottom|left"
font="SansSerifSmallBold"
height="25"
label="Add Friend"
layout="topleft"
- left="5"
+ left="0"
mouse_opaque="false"
name="add_friend"
top="0"
- width="75" />
+ width="90" />
<button
follows="bottom|left"
font="SansSerifSmallBold"
height="25"
label="IM"
layout="topleft"
- left_pad="5"
+ left_pad="0"
name="im"
- top_delta="0"
+ top="0"
width="40" />
<button
follows="bottom|left"
@@ -170,9 +175,9 @@
height="25"
label="Call"
layout="topleft"
- left_pad="5"
+ left_pad="0"
name="call"
- top_delta="0"
+ top="0"
width="50"
enabled="false"/>
<button
@@ -181,22 +186,20 @@
height="25"
label="Teleport"
layout="topleft"
- left_pad="5"
+ left_pad="0"
name="teleport"
- top_delta="0"
- width="65" />
+ top="0"
+ width="75" />
<button
follows="bottom|left"
font="SansSerifSmallBold"
height="25"
label="Share"
layout="topleft"
- left_pad="15"
+ left_pad="0"
name="share"
- top_delta="0"
- width="50"
+ top="0"
+ width="60"
enabled="false"/>
</panel>
</panel>
- </scroll_container>
-</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml
index f53e06494f..f7b2481f1c 100644
--- a/indra/newview/skins/default/xui/en/panel_people.xml
+++ b/indra/newview/skins/default/xui/en/panel_people.xml
@@ -1,225 +1,300 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
layout="topleft"
- top="0" left="0" width="355" height="465"
+ top="0"
+ left="0"
+ width="305"
+ height="465"
follows="left|top|right|bottom"
- background_visible="true" bg_alpha_color="0.3 0.3 0.3 1"
- label="People" name="people_panel"
->
- <search_editor
+ background_visible="true"
+ bg_alpha_color="0.3 0.3 0.3 1"
+ label="People"
+ name="people_panel">
+ <filter_editor
layout="topleft"
- top="3" left="10" width="335" height="16"
+ top="3"
+ left="15"
+ width="270"
+ height="20"
follows="left|top|right"
- max_length="300"
- label="Filter" name="filter_input"
- font="SansSerif" text_color="black"
- />
+ max_length="270"
+ label="Filter People"
+ name="filter_input"
+ font="SansSerif"
+ background_image="TextField_Search_Off"
+ text_pad_left="23"
+ text_color="black"/>
+ <button
+ name="people_search"
+ layout="topleft"
+ top="5"
+ left="23"
+ width="13"
+ height="13"
+ scale_image="false"
+ follows="left|top|right"
+ font="SansSerifBigBold"
+ image_selected="Search"
+ image_unselected="Search"
+ picture_style="true"/>
<tab_container
layout="topleft"
- top="30" left="10" width="335" height="400"
+ top="30"
+ left="10"
+ width="280"
+ height="400"
follows="left|top|right|bottom"
name="tabs"
- tab_position="top"
- bg_alpha_color="0.7 0.7 0.1 1"
- >
- <panel
+ tab_position="top">
+ <panel
layout="topleft"
- height="390" width="332"
+ height="390"
+ width="280"
follows="left|top|right|bottom"
- background_visible="true" bevel_style="bright" bg_alpha_color="0.7 0.7 0.7 1"
- label="Nearby" name="nearby_panel"
- >
+ background_visible="true"
+ bevel_style="bright"
+ label="Nearby"
+ name="nearby_panel">
<avatar_list
layout="topleft"
- top="2" left="0" width="332" height="357"
+ top="2"
+ left="0"
+ width="280"
+ height="357"
follows="left|top|right|bottom"
name="avatar_list"
- />
+ volume_column_width="20"/>
<panel
layout="topleft"
- bottom="390" left="0" width="333" height="30"
+ bottom="390"
+ left="0"
+ width="280"
+ height="30"
follows="left|right|bottom"
- background_visible="true" bevel_style="bright" bg_alpha_color="black"
- label="bottom_panel" name="bottom_panel"
- >
+ background_visible="true"
+ bevel_style="bright"
+ label="bottom_panel"
+ name="bottom_panel">
<button
name="gear_btn"
enabled="false"
layout="topleft"
- top="9" left="305" width="16" height="16"
+ top="7"
+ left="20"
+ width="18"
+ height="18"
follows="bottom|right"
font="SansSerifBigBold"
- image_hover_selected="gear.tga"
- image_selected="gear.tga"
- image_unselected="gear.tga"
- picture_style="true"
- />
- </panel>
+ hover_glow_amount="0.15"
+ image_selected="OptionsMenu_Press"
+ image_unselected="OptionsMenu_Off"
+ picture_style="true"/>
+ </panel>
</panel>
<panel
layout="topleft"
- height="390" width="332"
+ height="390"
+ width="280"
follows="left|top|right|bottom"
- background_visible="true" bevel_style="bright" bg_alpha_color="0.7 0.7 0.7 1"
- label="Friends" name="friends_panel"
- >
+ background_visible="true"
+ bevel_style="bright"
+ label="Friends"
+ name="friends_panel">
<avatar_list
layout="topleft"
- top="2" left="0" width="332" height="357"
+ top="2"
+ left="0"
+ width="280"
+ height="357"
follows="left|top|right|bottom"
- name="avatar_list"
- />
+ name="avatar_list"/>
<panel
layout="topleft"
- bottom="390" left="0" width="333" height="30"
+ bottom="390"
+ left="0"
+ width="280"
+ height="30"
follows="left|right|bottom"
- background_visible="true" bevel_style="in" bg_alpha_color="black"
- label="bottom_panel" name="bottom_panel"
- >
- <button
+ background_visible="true"
+ bevel_style="in"
+ label="bottom_panel"
+ name="bottom_panel">
+ <button
+ name="gear_btn"
+ enabled="false"
+ layout="topleft"
+ top="7"
+ left="20"
+ width="18"
+ height="18"
+ follows="bottom|right"
+ font="SansSerifBigBold"
+ hover_glow_amount="0.15"
+ image_selected="OptionsMenu_Press"
+ image_unselected="OptionsMenu_Off"
+ picture_style="true"/>
+ <button
name="add_btn"
layout="topleft"
- top="9" left="10" width="16" height="16"
+ top_delta="0"
+ left_pad="5"
+ width="18"
+ height="18"
follows="bottom|left"
font="SansSerifBigBold"
- image_hover_selected="add_btn.tga"
- image_selected="add_btn.tga"
- image_unselected="add_btn.tga" picture_style="true"
- />
+ hover_glow_amount="0.15"
+ image_selected="AddItem_Press"
+ image_unselected="AddItem_Off"
+ picture_style="true"/>
<button
name="del_btn"
layout="topleft"
- top_delta="0" left_pad="24" width="16" height="16"
+ top_delta="0"
+ left_pad="180"
+ width="18"
+ height="18"
follows="bottom|left"
font="SansSerifBigBold"
- image_hover_selected="del_btn.tga"
- image_selected="del_btn.tga"
- image_unselected="del_btn.tga"
- picture_style="true"
- />
- <button
- name="gear_btn"
- enabled="false"
- layout="topleft"
- top_delta="0" left_pad="239" width="16" height="16"
- follows="bottom|right"
- font="SansSerifBigBold"
- image_hover_selected="gear.tga"
- image_selected="gear.tga"
- image_unselected="gear.tga"
- picture_style="true"
- />
- </panel>
+ hover_glow_amount="0.15"
+ image_selected="TrashItem_Press"
+ image_unselected="TrashItem_Off"
+ picture_style="true"/>
+ </panel>
</panel>
<panel
layout="topleft"
- height="390" width="332"
+ height="390"
+ width="280"
follows="left|top|right|bottom"
- background_visible="true" bevel_style="bright" bg_alpha_color="0.7 0.7 0.7 1"
- label="Groups" name="groups_panel"
- >
+ background_visible="true"
+ bevel_style="bright"
+ label="Groups"
+ name="groups_panel">
<group_list
layout="topleft"
- top="2" left="0" width="332" height="357"
+ top="2"
+ left="0"
+ width="280"
+ height="357"
follows="left|top|right|bottom"
- name="group_list"
- />
+ name="group_list"/>
<panel
layout="topleft"
- bottom="390" left="0" width="333" height="30"
+ bottom="390"
+ left="0"
+ width="280"
+ height="30"
follows="left|right|bottom"
- background_visible="true" bevel_style="in" bg_alpha_color="black"
- label="bottom_panel" name="bottom_panel"
- >
+ background_visible="true"
+ bevel_style="in"
+ label="bottom_panel"
+ name="bottom_panel">
<button
- name="plus_btn"
+ name="gear_btn"
+ enabled="false"
layout="topleft"
- top="9" left="10" width="16" height="16"
- follows="bottom|left"
+ top="7"
+ left="20"
+ width="18"
+ height="18"
+ follows="bottom|right"
font="SansSerifBigBold"
- image_hover_selected="add_btn.tga"
- image_selected="add_btn.tga"
- image_unselected="add_btn.tga"
- picture_style="true"
- />
+ hover_glow_amount="0.15"
+ image_selected="OptionsMenu_Press"
+ image_unselected="OptionsMenu_Off"
+ picture_style="true"/>
<button
- name="minus_btn"
+ name="plus_btn"
layout="topleft"
- top_delta="0" left_pad="24" width="16" height="16"
+ top_delta="0"
+ left_pad="5"
+ width="18"
+ height="18"
follows="bottom|left"
font="SansSerifBigBold"
- image_hover_selected="del_btn.tga"
- image_selected="del_btn.tga"
- image_unselected="del_btn.tga"
- picture_style="true"
- />
+ hover_glow_amount="0.15"
+ image_selected="AddItem_Press"
+ image_unselected="AddItem_Off"
+ picture_style="true"/>
<button
name="activate_btn"
layout="topleft"
- top_delta="0" left_pad="24" width="16" height="16"
+ top_delta="5"
+ left_pad="24"
+ width="10"
+ height="10"
follows="bottom|left"
font="SansSerifBigBold"
- image_hover_selected="activate_btn.tga"
- image_selected="activate_btn.tga"
- image_unselected="activate_btn.tga"
- picture_style="true"
- />
+ image_hover_selected="group_activate_btn.tga"
+ image_selected="group_activate_btn.tga"
+ image_unselected="group_activate_btn.tga"
+ picture_style="true"/>
<button
- name="gear_btn"
- enabled="false"
+ name="minus_btn"
layout="topleft"
- top_delta="0" left="305" width="16" height="16"
- follows="bottom|right"
+ top_delta="-5"
+ left_pad="146"
+ width="18"
+ height="18"
+ follows="bottom|left"
font="SansSerifBigBold"
- image_hover_selected="gear.tga"
- image_selected="gear.tga"
- image_unselected="gear.tga"
- picture_style="true"
- />
- </panel>
+ hover_glow_amount="0.15"
+ image_selected="TrashItem_Press"
+ image_unselected="TrashItem_Off"
+ picture_style="true"/>
+ </panel>
</panel>
<panel
layout="topleft"
- height="390" width="332"
+ height="390"
+ width="280"
follows="left|top|right|bottom"
- background_visible="true" bevel_style="bright" bg_alpha_color="0.7 0.7 0.7 1"
- label="Recent" name="recent_panel"
- >
+ background_visible="true"
+ bevel_style="bright"
+ label="Recent"
+ name="recent_panel">
<avatar_list
layout="topleft"
- top="2" left="0" width="332" height="357"
+ top="2"
+ left="0"
+ width="280"
+ height="357"
follows="left|top|right|bottom"
- name="avatar_list"
- />
+ name="avatar_list"/>
<panel
layout="topleft"
- bottom="390" left="0" width="333" height="30"
+ bottom="390"
+ left="0"
+ width="280"
+ height="30"
follows="left|right|bottom"
- background_visible="true" bevel_style="in" bg_alpha_color="black"
- label="bottom_panel" name="bottom_panel"
- >
+ background_visible="true"
+ bevel_style="in"
+ label="bottom_panel"
+ name="bottom_panel">
<button
name="gear_btn"
enabled="false"
layout="topleft"
- top="9" left="305" width="16" height="16"
+ top="7"
+ left="20"
+ width="18"
+ height="18"
follows="bottom|right"
font="SansSerifBigBold"
- image_hover_selected="gear.tga"
- image_selected="gear.tga"
- image_unselected="gear.tga"
- picture_style="true"
- />
+ hover_glow_amount="0.15"
+ image_selected="OptionsMenu_Press"
+ image_unselected="OptionsMenu_Off"
+ picture_style="true"/>
</panel>
</panel>
</tab_container>
-
- <layout_stack
+ <layout_stack
name="button_bar"
follows="left|right|bottom"
bottom="6"
left="6"
- width="335"
+ width="280"
height="27"
orientation="horizontal"
animate="false"
@@ -234,16 +309,15 @@
left="0"
min_width="85"
width="85"
- visible="true"
- >
+ visible="true">
<button
label="View Profile"
name="view_profile_btn"
layout="topleft"
- width="85" height="25"
+ width="85"
+ height="25"
follows="top|left|right"
- font="SansSerifSmallBold"
- />
+ font="SansSerifSmallBold"/>
</layout_panel>
<layout_panel
name="add_friend_btn_panel"
@@ -255,16 +329,14 @@
left="0"
min_width="85"
width="85"
- visible="true"
- >
+ visible="true">
<button
label="Add Friend"
name="add_friend_btn"
layout="topleft"
width="85" height="25"
follows="top|left|right"
- font="SansSerifSmallBold"
- />
+ font="SansSerifSmallBold"/>
</layout_panel>
<layout_panel
name="group_info_btn_panel"
@@ -276,16 +348,15 @@
left="0"
min_width="80"
width="80"
- visible="true"
- >
+ visible="true">
<button
label="Group Info"
name="group_info_btn"
layout="topleft"
- width="80" height="25"
+ width="80"
+ height="25"
follows="top|left|right"
- font="SansSerifSmallBold"
- />
+ font="SansSerifSmallBold"/>
</layout_panel>
<layout_panel name="chat_btn_panel"
border="false"
@@ -296,16 +367,14 @@
left="0"
min_width="45"
width="45"
- visible="true"
- >
+ visible="true">
<button
label="Chat"
name="chat_btn"
layout="topleft"
width="45" height="25"
follows="top|left|right"
- font="SansSerifSmallBold"
- />
+ font="SansSerifSmallBold"/>
</layout_panel>
<layout_panel
name="im_btn_panel"
@@ -317,16 +386,15 @@
left="0"
min_width="35"
width="35"
- visible="true"
- >
+ visible="true">
<button
label="IM"
name="im_btn"
layout="topleft"
- width="35" height="25"
+ width="35"
+ height="25"
follows="top|left|right"
- font="SansSerifSmallBold"
- />
+ font="SansSerifSmallBold"/>
</layout_panel>
<layout_panel
name="call_btn_panel"
@@ -338,17 +406,16 @@
left="0"
min_width="40"
width="40"
- visible="false"
- >
+ visible="false">
<button
label="Call"
name="call_btn"
enabled="false"
layout="topleft"
- width="40" height="25"
+ width="40"
+ height="25"
follows="top|left|right"
- font="SansSerifSmallBold"
- />
+ font="SansSerifSmallBold"/>
</layout_panel>
<layout_panel
name="teleport_btn_panel"
@@ -359,8 +426,7 @@
height="25"
left="0"
min_width="65"
- width="65"
- >
+ width="65">
<button
label="Teleport"
name="teleport_btn"
@@ -368,8 +434,7 @@
height="25"
layout="topleft"
follows="left|top|right"
- font="SansSerifSmallBold"
- />
+ font="SansSerifSmallBold"/>
</layout_panel>
<layout_panel
name="share_btn_panel"
@@ -382,8 +447,7 @@
left="0"
min_width="50"
width="50"
- visible="false"
- >
+ visible="false">
<button
label="Share"
name="share_btn"
@@ -392,8 +456,7 @@
width="50"
height="25"
follows="top|left|right"
- font="SansSerifSmallBold"
- />
+ font="SansSerifSmallBold"/>
</layout_panel>
<layout_panel
name="more_btn_panel"
@@ -405,8 +468,7 @@
left="0"
min_width="40"
width="40"
- visible="true"
- >
+ visible="true">
<button
label="&gt;&gt;"
name="more_btn"
@@ -415,10 +477,9 @@
width="40"
height="25"
follows="top|right"
- font="SansSerifSmallBold"
- />
+ font="SansSerifSmallBold"/>
</layout_panel>
- </layout_stack>
+ </layout_stack>
<string name="no_people">
No people
</string>
@@ -428,14 +489,17 @@
<string name="no_friends">
No friends
</string>
+ <string name="no_groups">
+ No groups
+ </string>
<panel
layout="topleft"
name="panel_profile_view"
class="panel_profile_view"
filename="panel_profile_view.xml"
top="0"
- left="5"
- width="345"
+ left="0"
+ width="355"
height="465"
follows="left|right|top|bottom"
visible="false"
diff --git a/indra/newview/skins/default/xui/en/panel_pick_info.xml b/indra/newview/skins/default/xui/en/panel_pick_info.xml
index fa04ba7f15..393521f1d2 100644
--- a/indra/newview/skins/default/xui/en/panel_pick_info.xml
+++ b/indra/newview/skins/default/xui/en/panel_pick_info.xml
@@ -1,14 +1,12 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
- background_visible="true"
bevel_style="in"
- bg_alpha_color="0.2 0.2 0.2 1"
- height="640"
+ height="660"
layout="topleft"
left="0"
name="panel_pick_info"
top="0"
- width="355">
+ width="305">
<button
follows="top|left"
height="20"
@@ -36,11 +34,12 @@
Pick Info
</text>
<panel
- background_visible="true"
- bg_alpha_color="0.5 0.5 0.5 1"
follows="left|right|top|bottom"
- height="570"
+ height="580"
+ width="280"
layout="topleft"
+ background_visible="true"
+ bg_alpha_color="DkGray2"
left="10"
right="-10"
top="30">
@@ -57,17 +56,18 @@
type="string"
length="1"
follows="left|top"
- height="16"
+ height="15"
layout="topleft"
left="10"
- name="Name:">
+ name="Name:"
+ text_color="white">
Name:
</text>
<text
type="string"
length="1"
follows="left|top|right"
- height="20"
+ height="15"
layout="topleft"
left="10"
name="pick_name"
@@ -78,13 +78,14 @@
</text>
<text
type="string"
- length="1"
follows="left|top"
- height="20"
+ height="15"
layout="topleft"
left="10"
name="description_label"
- v_pad="15"
+ text_color="white"
+ top_pad="20"
+ v_pad="0"
valign="center">
Description:
</text>
@@ -92,13 +93,12 @@
type="string"
length="1"
follows="left|top|right"
- height="40"
+ height="60"
layout="topleft"
left="10"
name="pick_desc"
right="-10"
text_color="white"
- v_pad="15"
valign="center"
word_wrap="true">
[description]
@@ -110,21 +110,20 @@
height="20"
layout="topleft"
left="10"
- name="description_label"
- v_pad="15"
+ name="location_label"
+ text_color="white"
+ top_pad="20"
valign="bottom">
Location:
</text>
<text
type="string"
- length="1"
follows="left|top"
height="30"
layout="topleft"
left="10"
name="pick_location"
text_color="white"
- v_pad="15"
valign="center">
[loading...]
</text>
@@ -133,52 +132,50 @@
follows="left|right|bottom"
height="30"
layout="topleft"
- left="10"
+ left="8"
name="buttons"
right="-10"
- top_pad="2">
+ bottom="660">
<button
follows="bottom|left"
font="SansSerifSmallBold"
height="25"
label="Edit"
layout="topleft"
- left="10"
+ left="0"
name="edit_btn"
- top="3"
+ top="0"
width="50" />
<button
- enabled="false"
- follows="bottom|left"
+ follows="bottom|left"
font="SansSerifSmallBold"
height="25"
label="Teleport"
layout="topleft"
- left="65"
+ left_pad="0"
name="teleport_btn"
- top="3"
- width="70" />
+ top="0"
+ width="80" />
<button
- enabled="false"
- follows="bottom|left"
+ follows="bottom|left"
font="SansSerifSmallBold"
height="25"
label="Show on Map"
layout="topleft"
- left="140"
+ left_pad="0"
name="show_on_map_btn"
- top="3"
- width="90" />
+ top="0"
+ width="100" />
<button
- enabled="false"
- follows="bottom|right"
+ enabled="false"
+ follows="bottom|left"
font="SansSerifSmallBold"
height="25"
label="Verb"
layout="topleft"
- left="270"
+ left_pad="0"
name="verb_btn"
- top="3"
+ top="0"
width="50" />
</panel>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_pick_list_item.xml b/indra/newview/skins/default/xui/en/panel_pick_list_item.xml
new file mode 100644
index 0000000000..1a06e2bb06
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_pick_list_item.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel
+ bg_alpha_color="0.4 0.4 0.4 1"
+ bg_opaque_color="0.4 0.4 0.4 1"
+ border="true"
+ follows="top|left|right"
+ height="80"
+ layout="topleft"
+ left="0"
+ name="picture_item"
+ top="80"
+ width="245">
+ <texture_picker
+ allow_no_texture="true"
+ default_image_name="None"
+ enabled="false"
+ follows="left|top"
+ height="80"
+ layout="topleft"
+ left="5"
+ mouse_opaque="false"
+ name="picture"
+ tab_stop="false"
+ top="7"
+ width="70" />
+ <text
+ follows="top|left|right"
+ font="SansSerif"
+ height="20"
+ layout="topleft"
+ left="80"
+ name="picture_name"
+ text_color="black"
+ top="5"
+ use_ellipses="true"
+ width="150"/>
+ <text
+ follows="top|left|right"
+ font="SansSerifSmall"
+ height="40"
+ layout="topleft"
+ name="picture_descr"
+ text_color="white"
+ top="25"
+ use_ellipses="true"
+ width="150"
+ word_wrap="true" />
+ <button
+ follows="top|right"
+ height="20"
+ image_disabled="navbar_bg_button.tga"
+ image_disabled_selected="navbar_bg_button.tga"
+ image_overlay="navbar_forward.tga"
+ image_selected="navbar_bg_button.tga"
+ image_unselected="navbar_bg_button.tga"
+ layout="topleft"
+ name="info_chevron"
+ picture_style="true"
+ right="-5"
+ tab_stop="false"
+ top="28"
+ width="20" />
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_picks.xml b/indra/newview/skins/default/xui/en/panel_picks.xml
index 95055f43dc..5b66026f48 100644
--- a/indra/newview/skins/default/xui/en/panel_picks.xml
+++ b/indra/newview/skins/default/xui/en/panel_picks.xml
@@ -1,163 +1,166 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
- background_visible="true"
bevel_style="in"
- bg_alpha_color="0.5 0.5 0.5 1"
- height="690"
+ follows="left|top|right|bottom"
+ height="625"
label="Picks"
layout="topleft"
left="0"
name="panel_picks"
top="0"
- width="355">
- <text
+ width="305">
+ <!--<text
type="string"
length="1"
follows="top|left|right"
font="SansSerifHugeBold"
- height="55"
+ height="50"
layout="topleft"
left="10"
name="pick_title"
text_color="white"
top="10"
- width="330"
+ width="270"
word_wrap="true">
[NAME]&apos;s favorite places in Second Life...
- </text>
+ </text>-->
<!-- below is a special title shown for the Agent on the "Picks" tab-->
<text
type="string"
length="1"
follows="top"
- font="SansSerifHugeBold"
- height="55"
+ font="SansSerifBold"
+ height="35"
layout="topleft"
left="10"
name="pick_title_agent"
text_color="white"
top="10"
visible="false"
- width="330"
+ width="270"
word_wrap="true">
Tell everyone about your favorite Second Life places...
</text>
<scroll_container
follows="left|top|right|bottom"
- height="550"
+ height="495"
layout="topleft"
- left="5"
- reserve_scroll_corner="true"
- width="345">
+ left="8"
+ name="profile_scroll"
+ opaque="true"
+ color="DkGray2"
+ reserve_scroll_corner="false"
+ top_pad="0"
+ width="260">
<panel
- background_visible="true"
bevel_style="in"
- bg_alpha_color="0.6 0.6 0.6 1"
- follows="left|top|right|bottom"
- height="600"
+ height="40"
layout="topleft"
left="0"
name="back_panel"
top="0"
- width="325" />
+ width="260" />
</scroll_container>
<panel
background_visible="true"
bevel_style="in"
- bg_alpha_color="black"
enabled="false"
follows="left|right|bottom"
height="25"
label="bottom_panel"
layout="topleft"
- left="5"
+ left="8"
name="edit_panel"
visible="false"
- width="345">
+ top_pad="0"
+ width="260">
<button
enabled="false"
follows="bottom|left"
font="SansSerifBigBold"
- height="16"
- image_hover_selected="gear.tga"
- image_selected="gear.tga"
- image_unselected="gear.tga"
+ height="18"
+ hover_glow_amount="0.15"
+ image_selected="OptionsMenu_Press"
+ image_unselected="OptionsMenu_Off"
layout="topleft"
- left="5"
+ left="10"
name="gear_menu_btn"
picture_style="true"
top="5"
- width="16" />
+ width="18" />
<button
follows="bottom|left"
font="SansSerifBigBold"
- height="16"
- image_disabled="add_btn.tga"
- image_disabled_selected="add_btn.tga"
- image_hover_selected="add_btn.tga"
- image_selected="add_btn.tga"
- image_unselected="add_btn.tga"
+ height="18"
+ image_disabled="AddItem_Off"
+ image_disabled_selected="AddItem_Press"
+ hover_glow_amount="0.15"
+ image_selected="AddItem_Press"
+ image_unselected="AddItem_Off"
layout="topleft"
left="35"
name="new_btn"
picture_style="true"
- tool_tip="Create New Pick at Current Location"
+ tool_tip="Create New Pick at Current Location"
top="5"
- width="16" />
+ width="18" />
<button
follows="bottom|right"
font="SansSerifBigBold"
- height="16"
- image_disabled="del_btn.tga"
- image_disabled_selected="del_btn.tga"
- image_hover_selected="del_btn.tga"
- image_selected="del_btn.tga"
- image_unselected="del_btn.tga"
+ height="18"
+ image_disabled="TrashItem_Off"
+ image_disabled_selected="TrashItem_Press"
+ hover_glow_amount="0.15"
+ image_selected="TrashItem_Press"
+ image_unselected="TrashItem_Off"
layout="topleft"
name="trash_btn"
picture_style="true"
right="-10"
top="5"
- width="16" />
+ width="18" />
</panel>
<panel
- follows="left|right"
- height="25"
+ follows="bottom|left"
+ height="30"
layout="topleft"
- left="0"
+ left="8"
name="buttons_cucks"
- top_pad="10"
- width="345">
+ bottom="625"
+ width="280">
<button
follows="bottom|left"
font="SansSerifSmallBold"
height="25"
label="Info"
layout="topleft"
- left="10"
+ left="0"
name="info_btn"
+ enabled="false"
top="0"
- width="50" />
+ width="60" />
<button
follows="bottom|left"
font="SansSerifSmallBold"
height="25"
label="Teleport"
layout="topleft"
- left="65"
+ left_pad="0"
name="teleport_btn"
+ enabled="false"
top="0"
- width="70" />
+ width="75" />
<button
follows="bottom|left"
font="SansSerifSmallBold"
height="25"
label="Show on Map"
layout="topleft"
- left="140"
+ left_pad="0"
name="show_on_map_btn"
+ enabled="false"
top="0"
- width="90" />
+ width="105" />
<button
enabled="false"
follows="bottom|right"
@@ -165,9 +168,9 @@
height="25"
label="Verb"
layout="topleft"
- left="270"
+ left_pad="0"
name="verb_btn"
top="0"
- width="50" />
+ width="60" />
</panel>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_places.xml b/indra/newview/skins/default/xui/en/panel_places.xml
index 66bb38b45e..c91cb2394c 100644
--- a/indra/newview/skins/default/xui/en/panel_places.xml
+++ b/indra/newview/skins/default/xui/en/panel_places.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
background_visible="true"
- bg_alpha_color="0.3 0.3 0.3 1"
follows="left|top|right|bottom"
height="400"
label="Places"
@@ -11,53 +10,78 @@
min_width="240"
name="places panel"
top="400"
- width="355">
- <search_editor
+ width="305">
+ <panel.string
+ name="landmarks_tab_title">
+ Landmarks
+ </panel.string>
+ <panel.string
+ name="teleport_history_tab_title">
+ Teleport History
+ </panel.string>
+ <filter_editor
follows="left|top|right"
- height="16"
+ height="20"
label="Filter"
layout="topleft"
- left="10"
+ left="15"
name="Filter"
- top="4"
- width="335" />
+ top="3"
+ width="270"
+ font="SansSerif"
+ background_image="TextField_Search_Off"
+ text_pad_left="23"
+ text_color="black"/>
+ <button
+ name="landmark_search"
+ layout="topleft"
+ top="5"
+ left="23"
+ width="13"
+ height="13"
+ scale_image="false"
+ follows="left|top|right"
+ font="SansSerifBigBold"
+ image_selected="Search"
+ image_unselected="Search"
+ picture_style="true"/>
<tab_container
follows="left|top|right|bottom"
height="326"
layout="topleft"
- left_delta="0"
+ left="10"
name="Places Tabs"
tab_position="top"
top_pad="19"
- width="335" />
+ width="280" />
<panel
- class="panel_landmark_info"
- filename="panel_landmark_info.xml"
+ class="panel_place_info"
+ filename="panel_place_info.xml"
follows="left|top|right|bottom"
height="675"
layout="topleft"
left="0"
- name="panel_landmark_info"
+ name="panel_place_info"
top="-310"
visible="false"
- width="355" />
+ width="280" />
<button
follows="bottom|left"
font="SansSerifSmallBold"
height="25"
- label="TELEPORT"
+ label="Teleport"
layout="topleft"
left_delta="10"
name="teleport_btn"
top_pad="5"
- width="90" />
+ width="80" />
<button
follows="bottom|left"
font="SansSerifSmallBold"
height="25"
- label="SHOW ON MAP"
+ label="Show on Map"
layout="topleft"
- left_pad="5"
+ left_pad="0"
name="map_btn"
top_delta="0"
width="110" />
@@ -66,20 +90,20 @@
follows="bottom|left"
font="SansSerifSmallBold"
height="25"
- label="SHARE"
+ label="Share"
layout="topleft"
- left_pad="5"
+ left_pad="0"
name="share_btn"
top_delta="0"
width="60" />
<button
- enabled="false"
+ enabled="true"
follows="bottom|right"
font="SansSerifSmallBold"
height="25"
label="▼"
layout="topleft"
- left_pad="35"
+ left_pad="0"
name="overflow_btn"
top_delta="0"
width="30" />
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
new file mode 100644
index 0000000000..624345367f
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
@@ -0,0 +1,270 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<panel
+ border="true"
+ background_visible="true"
+ follows="left|top|right|bottom"
+ height="408"
+ layout="topleft"
+ left="102"
+ name="advanced"
+ top="1"
+ width="517">
+ <text
+ type="string"
+ text_color="LabelSelectedDisabledColor"
+ length="1"
+ follows="left|top"
+ layout="topleft"
+ left="8"
+ name="text status"
+ top_pad="3"
+ width="280">
+Beware the Trout!
+ </text>
+
+ <!-- ADVANCED -->
+
+ <check_box
+ control_name="SmallAvatarNames"
+ height="16"
+ initial_value="true"
+ label="Small Avatar Names"
+ layout="topleft"
+ left_delta="30"
+ name="small_avatar_names_checkbox"
+ top="20"
+ width="200" />
+ <check_box
+ control_name="ArrowKeysMoveAvatar"
+ height="16"
+ label="Arrow keys always move avatar when chatting"
+ layout="topleft"
+ left_delta="0"
+ name="arrow_keys_move_avatar_check"
+ top_pad="10"
+ width="237" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left_delta="0"
+ mouse_opaque="false"
+ name="text_box7"
+ top_pad="10"
+ width="128">
+ Bubble Chat:
+ </text>
+ <slider
+ control_name="ChatBubbleOpacity"
+ follows="left|top"
+ height="12"
+ increment="0.05"
+ initial_value="1"
+ label="Opacity"
+ layout="topleft"
+ left_delta="0"
+ name="bubble_chat_opacity"
+ top_pad="10"
+ width="200" />
+
+ <check_box
+ control_name="UIAutoScale"
+ height="16"
+ label="Resolution independent scale"
+ layout="topleft"
+ left="30"
+ name="ui_auto_scale"
+ top_pad="10"
+ width="256" />
+ <!--text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="12"
+ layout="topleft"
+ left="30"
+ name="DisplayResLabel"
+ top_pad="10"
+ width="128">
+ Display Resolution:
+ </text>
+ <combo_box
+ height="18"
+ layout="topleft"
+ left_pad="5"
+ name="fullscreen combo"
+ top_delta="-1"
+ width="150" /-->
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="12"
+ layout="topleft"
+ left="30"
+ name="AspectRatioLabel1"
+ tool_tip="width / height"
+ top_pad="5"
+ width="160">
+ Aspect Ratio:
+ </text>
+ <combo_box
+ allow_text_entry="true"
+ height="16"
+ layout="topleft"
+ left_pad="0"
+ max_chars="100"
+ name="aspect_ratio"
+ tool_tip="width / height"
+ top_delta="0"
+ width="150">
+ <combo_box.item
+ enabled="true"
+ label="4:3 (Standard CRT)"
+ name="item1"
+ value="1.333333" />
+ <combo_box.item
+ enabled="true"
+ label="5:4 (1280x1024 LCD)"
+ name="item2"
+ value="1.25" />
+ <combo_box.item
+ enabled="true"
+ label="8:5 (Widescreen)"
+ name="item3"
+ value="1.6" />
+ <combo_box.item
+ enabled="true"
+ label="16:9 (Widescreen)"
+ name="item4"
+ value="1.7777777" />
+ </combo_box>
+ <check_box
+ control_name="FullScreenAutoDetectAspectRatio"
+ height="16"
+ label="Auto-detect ratio"
+ layout="topleft"
+ left_pad="5"
+ name="aspect_auto_detect"
+ top_delta="1"
+ width="256">
+ <check_box.commit_callback
+ function="Pref.AutoDetectAspect" />
+ </check_box>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left="30"
+ name=" Camera Options:"
+ top_pad="10"
+ width="266">
+ Camera Options:
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left="30"
+ name="camera_fov_label"
+ top_pad="10"
+ width="128">
+ Camera View Angle:
+ </text>
+ <slider
+ can_edit_text="true"
+ control_name="CameraAngle"
+ decimal_digits="2"
+ follows="left|top"
+ height="16"
+ increment="0.025"
+ initial_value="1.57"
+ layout="topleft"
+ left="128"
+ max_val="2.97"
+ min_val="0.17"
+ name="camera_fov"
+ show_text="false"
+ top_delta="0"
+ width="128" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left="30"
+ name="Camera Follow Distance:"
+ top_pad="10"
+ width="128">
+ Camera Follow Distance:
+ </text>
+ <slider
+ can_edit_text="true"
+ control_name="CameraOffsetScale"
+ decimal_digits="2"
+ follows="left|top"
+ height="16"
+ increment="0.025"
+ initial_value="1"
+ layout="topleft"
+ left_delta="128"
+ max_val="3"
+ min_val="0.5"
+ name="camera_offset_scale"
+ show_text="false"
+ top_delta="0"
+ width="128" />
+
+ <check_box
+ control_name="EditCameraMovement"
+ height="16"
+ label="Automatic Edit Camera Movement"
+ layout="topleft"
+ left="10"
+ name="edit_camera_movement"
+ tool_tip="Use automatic camera positioning when entering and exiting edit mode"
+ top_pad="5"
+ width="201" />
+ <check_box
+ control_name="AppearanceCameraMovement"
+ height="16"
+ label="Automatic Appearance Camera Movement"
+ layout="topleft"
+ left_pad="5"
+ name="appearance_camera_movement"
+ tool_tip="Use automatic camera positioning while in edit mode"
+ top_delta="0"
+ width="242" />
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="12"
+ layout="topleft"
+ left="10"
+ name="text2"
+ top_pad="5"
+ width="128">
+ Avatar Display Options:
+ </text>
+ <check_box
+ control_name="FirstPersonAvatarVisible"
+ height="16"
+ label="Show Avatar in Mouselook"
+ layout="topleft"
+ left_pad="10"
+ name="first_person_avatar_visible"
+ top_delta="0"
+ width="256" />
+
+
+</panel> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
index bda437ab29..89d96b015f 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
@@ -9,25 +9,13 @@
name="chat"
top="1"
width="517">
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="12"
- mouse_opaque="false"
- top="10"
- width="128">
- Chat Font Size:
- </text>
<radio_group
height="30"
layout="topleft"
- left_pad="8"
+ left="30"
control_name="ChatFontSize"
name="chat_font_size"
- top_delta="0"
+ top="10"
width="331">
<radio_item
height="16"
@@ -35,8 +23,8 @@
layout="topleft"
left="0"
name="radio"
- top="8"
- width="98" />
+ top="10"
+ width="125" />
<radio_item
height="16"
label="Medium"
@@ -44,7 +32,7 @@
left_pad="12"
name="radio2"
top_delta="0"
- width="98" />
+ width="125" />
<radio_item
height="16"
label="Large"
@@ -52,45 +40,56 @@
left_pad="12"
name="radio3"
top_delta="0"
- width="98" />
+ width="125" />
</radio_group>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="12"
- mouse_opaque="false"
- name="text_box2"
- top="54"
- width="128">
- Chat Color:
- </text>
<color_swatch
border_color="0.45098 0.517647 0.607843 1"
can_apply_immediately="true"
control_name="UserChatColor"
follows="left|top"
height="47"
- label="You"
layout="topleft"
- left_pad="8"
+ left="30"
name="user"
- top_delta="-1"
+ top_pad="10"
width="44" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left_pad="5"
+ mouse_opaque="false"
+ name="text_box1"
+ top_delta="5"
+ width="95">
+ Me
+ </text>
<color_swatch
border_color="0.45098 0.517647 0.607843 1"
can_apply_immediately="true"
control_name="AgentChatColor"
follows="left|top"
height="47"
- label="Others"
layout="topleft"
- left_pad="10"
+ left="180"
name="agent"
- top_delta="0"
+ top_pad="-17"
width="44" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left_pad="5"
+ mouse_opaque="false"
+ name="text_box2"
+ top_delta="5"
+ width="95">
+ Others
+ </text>
<color_swatch
border_color="0.45098 0.517647 0.607843 1"
can_apply_immediately="true"
@@ -98,13 +97,25 @@
control_name="IMChatColor"
follows="left|top"
height="47"
- label="IM"
label_width="60"
layout="topleft"
- left_pad="10"
+ left="350"
name="im"
- top_delta="0"
+ top_pad="-17"
width="44" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left_pad="5"
+ mouse_opaque="false"
+ name="text_box3"
+ top_delta="5"
+ width="95">
+ IM
+ </text>
<color_swatch
border_color="0.45098 0.517647 0.607843 1"
can_apply_immediately="true"
@@ -112,13 +123,25 @@
control_name="SystemChatColor"
follows="left|top"
height="47"
- label="System"
label_width="44"
layout="topleft"
- left_pad="10"
+ left="30"
name="system"
- top_delta="0"
+ top_pad="40"
width="44" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left_pad="5"
+ mouse_opaque="false"
+ name="text_box4"
+ top_delta="5"
+ width="95">
+ System
+ </text>
<color_swatch
border_color="0.45098 0.517647 0.607843 1"
can_apply_immediately="true"
@@ -126,63 +149,35 @@
control_name="ScriptErrorColor"
follows="left|top"
height="47"
- label="Errors"
layout="topleft"
- left_pad="10"
+ left="180"
name="script_error"
- top_delta="0"
+ top_pad="-17"
width="44" />
- <color_swatch
- border_color="0.45098 0.517647 0.607843 1"
- can_apply_immediately="true"
- color="0.7 0.9 0.7 1"
- control_name="ObjectChatColor"
+ <text
+ type="string"
+ length="1"
follows="left|top"
- height="47"
- label="Objects"
+ height="10"
layout="topleft"
- left="148"
- name="objects"
- top="103"
- width="44" />
+ left_pad="5"
+ mouse_opaque="false"
+ name="text_box5"
+ top_delta="5"
+ width="95">
+ Errors
+ </text>
<color_swatch
border_color="0.45098 0.517647 0.607843 1"
can_apply_immediately="true"
color="0.7 0.9 0.7 1"
- control_name="llOwnerSayChatColor"
- follows="left|top"
- height="47"
- label="Owner"
- layout="topleft"
- left_pad="10"
- name="owner"
- top_delta="0"
- width="44" />
- <color_swatch
- border_color="0.45098 0.517647 0.607843 1"
- can_apply_immediately="true"
- color="0 0 0 1"
- control_name="BackgroundChatColor"
- follows="left|top"
- height="47"
- label="Bubble"
- layout="topleft"
- left_pad="10"
- name="background"
- top_delta="0"
- width="44" />
- <color_swatch
- border_color="0.45098 0.517647 0.607843 1"
- can_apply_immediately="true"
- color="0.6 0.6 1 1"
- control_name="HTMLLinkColor"
+ control_name="ObjectChatColor"
follows="left|top"
height="47"
- label="URLs"
layout="topleft"
- left_pad="10"
- name="links"
- top_delta="0"
+ left="350"
+ name="objects"
+ top_pad="-17"
width="44" />
<text
type="string"
@@ -190,56 +185,50 @@
follows="left|top"
height="10"
layout="topleft"
- left="12"
+ left_pad="5"
mouse_opaque="false"
- name="text_box3"
- top="168"
- width="135">
- Chat Console:
+ name="text_box6"
+ top_delta="5"
+ width="95">
+ Objects
</text>
- <spinner
- control_name="ChatPersistTime"
- decimal_digits="0"
+ <color_swatch
+ border_color="0.45098 0.517647 0.607843 1"
+ can_apply_immediately="true"
+ color="0.7 0.9 0.7 1"
+ control_name="llOwnerSayChatColor"
follows="left|top"
- height="16"
- increment="1"
- initial_value="10"
- label="Fade chat after"
- label_width="80"
+ height="47"
layout="topleft"
- left_pad="1"
- max_val="60"
- min_val="2"
- name="fade_chat_time"
- top_delta="2"
- width="130" />
+ left="30"
+ name="owner"
+ top_pad="40"
+ width="44" />
<text
type="string"
length="1"
follows="left|top"
height="10"
layout="topleft"
- left_pad="4"
+ left_pad="5"
mouse_opaque="false"
- name="text_box4"
- top_delta="0"
- width="80">
- (seconds)
+ name="text_box7"
+ top_delta="5"
+ width="95">
+ Owner
</text>
- <spinner
- control_name="ConsoleMaxLines"
- decimal_digits="0"
+ <color_swatch
+ border_color="0.45098 0.517647 0.607843 1"
+ can_apply_immediately="true"
+ color="0 0 0 1"
+ control_name="BackgroundChatColor"
follows="left|top"
- height="16"
- increment="1"
- initial_value="10"
+ height="47"
layout="topleft"
- left_delta="58"
- max_val="50"
- min_val="1"
- name="max_chat_count"
- top_delta="0"
- width="60" />
+ left="180"
+ name="background"
+ top_pad="-17"
+ width="44" />
<text
type="string"
length="1"
@@ -248,123 +237,62 @@
layout="topleft"
left_pad="5"
mouse_opaque="false"
- name="text_box5"
- top_delta="0"
- width="60">
- (# lines)
+ name="text_box8"
+ top_delta="5"
+ width="95">
+ Bubble
</text>
- <slider
- control_name="ConsoleBackgroundOpacity"
+ <color_swatch
+ border_color="0.45098 0.517647 0.607843 1"
+ can_apply_immediately="true"
+ color="0.6 0.6 1 1"
+ control_name="HTMLLinkColor"
follows="left|top"
- height="12"
- increment="0.05"
- initial_value="1"
- label="Opacity"
- layout="topleft"
- left="148"
- name="console_opacity"
- top="193"
- width="200" />
- <check_box
- control_name="ChatFullWidth"
- height="16"
- label="Use full screen width (Requires restart)"
+ height="47"
layout="topleft"
- left_delta="0"
- name="chat_full_width_check"
- top_pad="9"
- width="239" />
+ left="350"
+ name="links"
+ top_pad="-17"
+ width="44" />
<text
type="string"
length="1"
follows="left|top"
height="10"
layout="topleft"
- left="12"
+ left_pad="5"
mouse_opaque="false"
- name="text_box6"
- top="245"
- width="135">
- Chat Options:
+ name="text_box9"
+ top_delta="5"
+ width="95">
+ URLs
</text>
<check_box
- control_name="CloseChatOnReturn"
- height="16"
- label="Close chat bar after hitting return"
- layout="topleft"
- left_pad="1"
- name="close_chat_on_return_check"
- top_delta="2"
- width="237" />
- <check_box
- control_name="ArrowKeysMoveAvatar"
- height="16"
- label="Arrow keys always move avatar when chatting"
- layout="topleft"
- left_delta="0"
- name="arrow_keys_move_avatar_check"
- top_pad="4"
- width="237" />
- <check_box
- control_name="ChatShowTimestamps"
- height="16"
- label="Show timestamps in Local Chat"
- layout="topleft"
- left_delta="0"
- name="show_timestamps_check"
- top_pad="4"
- width="237" />
- <check_box
- control_name="ScriptErrorsAsChat"
- height="16"
- label="Show script errors and warnings as regular chat"
- layout="topleft"
- left_delta="0"
- name="script_errors_as_chat"
- top_pad="4"
- width="275" />
- <check_box
control_name="PlayTypingAnim"
height="16"
initial_value="true"
label="Play typing animation when chatting"
layout="topleft"
- left_delta="0"
+ left="30"
name="play_typing_animation"
- top_pad="4"
- width="237" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="12"
- mouse_opaque="false"
- name="text_box7"
- top="359"
- width="128">
- Bubble Chat:
- </text>
+ top_pad="40"
+ width="400" />
<check_box
control_name="UseChatBubbles"
height="16"
label="Show chat bubbles"
layout="topleft"
- left_pad="8"
+ left_delta="0"
name="bubble_text_chat"
- top_delta="1"
- width="237" />
- <slider
- control_name="ChatBubbleOpacity"
- follows="left|top"
- height="12"
- increment="0.05"
- initial_value="1"
- label="Opacity"
+ top_pad="5"
+ width="400" />
+ <check_box
+ enabled="false"
+ height="16"
+ label="Email me IMs when I'm offline"
layout="topleft"
left_delta="0"
- name="bubble_chat_opacity"
- top_pad="4"
- width="200" />
+ name="send_im_to_email"
+ top_pad="5"
+ width="400" />
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml
index b30bda3e59..70d15c237b 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml
@@ -9,419 +9,293 @@
name="general_panel"
top="1"
width="517">
- <combo_box
- control_name="LoginLocation"
- follows="left|bottom"
- height="18"
- layout="topleft"
- left_delta="151"
- name="start_location_combo"
- top="7"
- width="155">
- <combo_box.item
- label="My Last Location"
- value="last" />
- <combo_box.item
- label="My Home"
- value="home" />
- </combo_box>
- <check_box
- control_name="ShowStartLocation"
- height="16"
- initial_value="true"
- label="Show Start Location on Login Screen"
- layout="topleft"
- left_delta="0"
- name="show_location_checkbox"
- top_pad="3"
- width="256" />
- <combo_box
- control_name="RenderName"
- height="18"
- layout="topleft"
- left_delta="4"
- name="fade_out_combobox"
- top_pad="7"
- width="146">
- <combo_box.item
- label="Never"
- value="0" />
- <combo_box.item
- label="Show Temporarily"
- value="1" />
- <combo_box.item
- label="Always"
- value="2" />
- </combo_box>
- <check_box
- control_name="SmallAvatarNames"
- height="16"
- initial_value="true"
- label="Small Avatar Names"
- layout="topleft"
- left_delta="-4"
- name="small_avatar_names_checkbox"
- top_pad="9"
- width="200" />
- <check_box
- control_name="RenderNameHideSelf"
- height="16"
- label="Hide My Name On My Screen"
- layout="topleft"
- left_delta="0"
- name="show_my_name_checkbox"
- top_pad="2"
- width="200" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="10"
- name="group_titles_textbox"
- top="120"
- width="394">
- Group Titles:
- </text>
- <check_box
- control_name="RenderHideGroupTitleAll"
- height="16"
- label="Hide All Group Titles"
- layout="topleft"
- left_delta="141"
- name="show_all_title_checkbox"
- top_delta="0"
- width="256" />
- <check_box
- control_name="RenderHideGroupTitle"
- height="16"
- label="Hide My Group Title"
- layout="topleft"
- left_delta="0"
- name="show_my_title_checkbox"
- top_pad="2"
- width="256" />
- <color_swatch
- border_color="0.45098 0.517647 0.607843 1"
- control_name="EffectColor"
- follows="left|top"
- height="48"
- layout="topleft"
- left_delta="2"
- name="effect_color_swatch"
- tool_tip="Click to open Color Picker"
- top_pad="8"
- width="32" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="12"
- layout="topleft"
- left="10"
- name="UI Size:"
- top="203"
- width="128">
- UI Size:
- </text>
- <spinner
- control_name="UIScaleFactor"
- height="16"
- increment="0.025"
- initial_value="1"
- layout="topleft"
- left_pad="16"
- max_val="1.4"
- min_val="0.75"
- name="ui_scale_slider"
- top_delta="-2"
- width="58" />
- <check_box
- control_name="UIAutoScale"
- height="16"
- label="Use resolution independent scale"
- layout="topleft"
- left_delta="-3"
- name="ui_auto_scale"
- top_pad="3"
- width="256" />
- <spinner
- control_name="AFKTimeout"
- decimal_digits="0"
- follows="left|top"
- height="16"
- increment="1"
- initial_value="300"
- label="Away Timeout:"
- label_width="141"
- layout="topleft"
- left="10"
- max_val="600"
- min_val="30"
- name="afk_timeout_spinner"
- top="244"
- width="202" />
- <check_box
- control_name="NotifyMoneyChange"
- height="16"
- label="Notify when Linden dollars (L$) spent or received"
- layout="topleft"
- left="151"
- name="notify_money_change_checkbox"
- top="270"
- width="256" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="10"
- name="maturity_desired_label"
- top="312"
- width="394">
- Rating:
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left_delta="141"
- name="maturity_desired_prompt"
- top_delta="0"
- width="394">
- I want to access content rated:
- </text>
- <combo_box
- control_name="PreferredMaturity"
- height="18"
- layout="topleft"
- left_delta="164"
- name="maturity_desired_combobox"
- top_delta="-2"
- width="150">
- <combo_box.item
- label="PG, Mature and Adult"
- value="42" />
- <combo_box.item
- label="PG and Mature"
- value="21" />
- <combo_box.item
- label="PG only"
- value="13" />
- </combo_box>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left_delta="0"
- name="maturity_desired_textbox"
- top_delta="2"
- width="150">
- PG only
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="10"
- name="start_location_textbox"
- top="10"
- width="394">
- Start Location:
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left_delta="0"
- name="show_names_textbox"
- top_pad="34"
- width="394">
- Show Names:
- </text>
- <text
+ <text
type="string"
length="1"
follows="left|top"
height="10"
layout="topleft"
- left_delta="0"
- name="effects_color_textbox"
- top_pad="110"
- width="394">
- Color For My Effects:
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="220"
- name="seconds_textbox"
- top="244"
- width="128">
- seconds
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="18"
- layout="topleft"
- left="10"
- name="crash_report_textbox"
- top="344"
- width="394">
- Crash reports:
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="18"
- layout="topleft"
- left_delta="0"
+ left="30"
name="language_textbox"
- top_pad="4"
- width="394">
- Language:
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="18"
- layout="topleft"
- left_delta="293"
- name="language_textbox2"
- top_delta="1"
+ top="10"
width="400">
- (Requires restart for full effect)
+ Language:
</text>
<combo_box
- control_name="CrashSubmitBehavior"
- height="18"
- layout="topleft"
- left="153"
- name="crash_behavior_combobox"
- top="344"
- width="146">
- <combo_box.item
- enabled="true"
- label="Ask before sending"
- value="Ask before sending" />
- <combo_box.item
- enabled="true"
- label="Always send"
- value="Always send" />
- <combo_box.item
- enabled="true"
- label="Never send"
- value="Never send" />
- </combo_box>
- <combo_box
- allow_text_entry="true"
control_name="Language"
follows="left|bottom"
- height="16"
+ height="18"
layout="topleft"
- left_delta="0"
+ left_delta="50"
max_chars="135"
name="language_combobox"
- top_pad="4"
- width="146">
+ top_pad="10"
+ width="155">
<combo_box.item
enabled="true"
label="System Default"
+ name="System Default Language"
value="default" />
<combo_box.item
enabled="true"
label="English"
+ name="English"
value="en" />
<combo_box.item
enabled="true"
label="Dansk (Danish) - Beta"
+ name="Danish"
value="da" />
<combo_box.item
enabled="true"
label="Deutsch (German) - Beta"
+ name="Deutsch(German)"
value="de" />
<combo_box.item
enabled="true"
label="Español (Spanish) - Beta"
+ name="Spanish"
value="es" />
<combo_box.item
enabled="true"
label="Français (French) - Beta"
+ name="French"
value="fr" />
<combo_box.item
enabled="true"
label="Italiano (Italian) - Beta"
+ name="Italian"
value="it" />
<combo_box.item
enabled="true"
label="Magyar (Hungarian) - Beta"
+ name="Hungarian"
value="hu" />
<combo_box.item
enabled="true"
label="Nederlands (Dutch) - Beta"
+ name="Dutch"
value="nl" />
<combo_box.item
enabled="true"
label="Polski (Polish) - Beta"
+ name="Polish"
value="pl" />
<combo_box.item
enabled="true"
label="Portugués (Portuguese) - Beta"
+ name="Portugese"
value="pt" />
<combo_box.item
enabled="true"
label="Русский (Russian) - Beta"
+ name="Russian"
value="ru" />
<combo_box.item
enabled="true"
label="Türkçe (Turkish) - Beta"
+ name="Turkish"
value="tr" />
<combo_box.item
enabled="true"
label="Українська (Ukrainian) - Beta"
+ name="Ukrainian"
value="uk" />
<combo_box.item
enabled="true"
label="中文 (简体) (Chinese) - Beta"
+ name="Chinese"
value="zh" />
<combo_box.item
enabled="true"
label="日本語 (Japanese) - Beta"
+ name="(Japanese)"
value="ja" />
<combo_box.item
enabled="true"
label="한국어 (Korean) - Beta"
+ name="(Korean)"
value="ko" />
<combo_box.item
enabled="true"
label="Test Language"
+ name="TestLanguage"
value="test" />
</combo_box>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left_delta="175"
+ name="language_textbox2"
+ top_delta="1"
+ width="400">
+ (Requires restart)
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left="30"
+ name="maturity_desired_prompt"
+ top_pad="10"
+ width="400">
+ I want to access content rated:
+ </text>
+ <combo_box
+ control_name="PreferredMaturity"
+ follows="left|bottom"
+ height="18"
+ layout="topleft"
+ left_delta="50"
+ name="maturity_desired_combobox"
+ top_pad="10"
+ width="155">
+ <combo_box.item
+ label="PG, Mature and Adult"
+ name="Desired_Adult"
+ value="42" />
+ <combo_box.item
+ label="PG and Mature"
+ name="Desired_Mature"
+ value="21" />
+ <combo_box.item
+ label="PG"
+ name="Desired_PG"
+ value="13" />
+ </combo_box>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left="30"
+ name="start_location_textbox"
+ top_delta="20"
+ width="394">
+ Start Location:
+ </text>
+ <combo_box
+ control_name="LoginLocation"
+ follows="left|bottom"
+ height="18"
+ layout="topleft"
+ left_delta="50"
+ name="start_location_combo"
+ top_pad="10"
+ width="155">
+ <combo_box.item
+ label="My Last Location"
+ name="MyLastLocation"
+ value="last" />
+ <combo_box.item
+ label="My Home"
+ name="MyHome"
+ value="home" />
+ </combo_box>
+ <check_box
+ control_name="ShowStartLocation"
+ height="16"
+ initial_value="true"
+ label="Show on Login"
+ layout="topleft"
+ left_delta="175"
+ name="show_location_checkbox"
+ top_delta="1"
+ width="256" />
+
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left="30"
+ name="name_tags_textbox"
+ top_pad="10"
+ width="400">
+ Name tags:
+ </text>
+ <!-- THIS IS A NEW RADIO GROUP ADDED BY LIS -->
+ <radio_group
+ control_name="AvatarNameTagMode"
+ height="30"
+ layout="topleft"
+ left_delta="50"
+ name="Name_Tag_Preference"
+ top_pad="10">
+ <radio_item
+ height="16"
+ label="Off"
+ layout="topleft"
+ left="0"
+ name="radio"
+ top_pad="0"
+ width="98" />
+ <radio_item
+ height="16"
+ label="On"
+ layout="topleft"
+ left_pad="12"
+ name="radio2"
+ top_delta="0"
+ width="98" />
+ <radio_item
+ height="16"
+ label="Show briefly"
+ layout="topleft"
+ left_pad="12"
+ name="radio3"
+ top_delta="0"
+ width="98" />
+ </radio_group>
<check_box
- control_name="LanguageIsPublic"
+ enabled_control="AvatarNameTagMode"
+ control_name="RenderNameShowSelf"
height="16"
- label="Share language with objects"
+ label="Show my name"
layout="topleft"
- left_delta="-2"
- name="language_is_public"
- tool_tip="This lets in-world objects know your preferred language."
- top_pad="2"
+ left_delta="0"
+ name="show_my_name_checkbox"
+ top_pad="5"
+ width="300" />
+ <check_box
+ enabled_control="AvatarNameTagMode"
+ control_name="RenderShowGroupTitleAll"
+ height="16"
+ label="Show group titles"
+ layout="topleft"
+ left_delta="0"
+ name="show_all_title_checkbox"
+ top_pad="5"
width="256" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left="30"
+ name="effects_color_textbox"
+ top_pad="10"
+ width="400">
+ My Effects:
+ </text>
+ <color_swatch
+ border_color="0.45098 0.517647 0.607843 1"
+ control_name="EffectColor"
+ follows="left|top"
+ height="48"
+ layout="topleft"
+ left_delta="50"
+ name="effect_color_swatch"
+ tool_tip="Click to open Color Picker"
+ top_pad="10"
+ width="32" />
+
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
index 8db8c8f31d..563056890a 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
@@ -17,133 +17,34 @@
name="aspect_ratio_text">
[NUM]:[DEN]
</panel.string>
- <button
- follows="left|top"
- height="18"
- label="?"
- layout="topleft"
- left="470"
- name="GraphicsPreferencesHelpButton"
- top="4"
- width="22">
- <button.commit_callback
- function="Pref.OpenHelp" />
- </button>
- <check_box
- control_name="NotFullScreen"
- height="16"
- label="Run Second Life in a window"
- layout="topleft"
- left_delta="-460"
- name="windowed mode"
- top_delta="3"
- width="100">
- <check_box.commit_callback
- function="Pref.OpenHelp" />
- </check_box>
- <text_editor
- make_visible_control="NotFullScreen"
- type="string"
- length="1"
- bg_readonly_color="0 0 0 0"
- enabled="false"
- follows="left|top"
- height="20"
- hide_border="true"
- hide_scrollbar="true"
- layout="topleft"
- left_delta="0"
- max_length="65535"
- name="FullScreenInfo"
- tab_stop="false"
- top_delta="16"
- width="350"
- word_wrap="true">
- If unchecked, viewer will display full-screen when logged in.
- </text_editor>
<text
- make_visible_control="NotFullScreen"
type="string"
length="1"
follows="left|top"
height="12"
layout="topleft"
- left_delta="0"
+ left="30"
name="WindowSizeLabel"
- top_pad="7"
- width="128">
- Window Size:
- </text>
- <combo_box
- make_visible_control="NotFullScreen"
- height="18"
- layout="topleft"
- left_pad="47"
- name="windowsize combo"
- top_delta="-1"
- width="150">
- <combo_box.item
- enabled="true"
- label="640x480"
- value="640 x 480" />
- <combo_box.item
- enabled="true"
- label="800x600 "
- value="800 x 600" />
- <combo_box.item
- enabled="true"
- label="720x480 (NTSC)"
- value="720 x 480" />
- <combo_box.item
- enabled="true"
- label="768x576 (PAL)"
- value="768 x 576" />
- <combo_box.item
- enabled="true"
- label="1024x768"
- value="1024 x 768" />
- </combo_box>
- <text
- make_invisible_control="NotFullScreen"
- type="string"
- length="1"
- follows="left|top"
- height="12"
- layout="topleft"
- left_delta="-175"
- name="DisplayResLabel"
- top_delta="1"
+ top="10"
width="128">
- Display Resolution:
+ Window size:
</text>
- <combo_box
- make_invisible_control="NotFullScreen"
- height="18"
- layout="topleft"
- left_pad="47"
- name="fullscreen combo"
- top_delta="-1"
- width="150" />
- <text
- make_invisible_control="NotFullScreen"
- type="string"
- length="1"
- follows="left|top"
- height="12"
+ <check_box
+ control_name="WindowFullScreen"
+ height="16"
+ label="Use fullscreen"
layout="topleft"
- left="10"
- name="AspectRatioLabel1"
- tool_tip="width / height"
- top="27"
- width="160">
- Aspect Ratio:
- </text>
+ left_delta="30"
+ name="windowed mode"
+ top_pad="4"
+ width="100">
+ </check_box>
<combo_box
- make_invisible_control="NotFullScreen"
+ visiblity_control="WindowFullScreen"
allow_text_entry="true"
height="16"
layout="topleft"
- left_pad="15"
+ left_delta="175"
max_chars="100"
name="aspect_ratio"
tool_tip="width / height"
@@ -152,131 +53,91 @@
<combo_box.item
enabled="true"
label="4:3 (Standard CRT)"
+ name="item1"
value="1.333333" />
<combo_box.item
enabled="true"
label="5:4 (1280x1024 LCD)"
+ name="item2"
value="1.25" />
<combo_box.item
enabled="true"
label="8:5 (Widescreen)"
+ name="item3"
value="1.6" />
<combo_box.item
enabled="true"
label="16:9 (Widescreen)"
+ name="item4"
value="1.7777777" />
<combo_box.commit_callback
function="setControlFalse"
parameter="FullScreenAutoDetectAspectRatio" />
</combo_box>
- <check_box
- make_invisible_control="NotFullScreen"
- control_name="FullScreenAutoDetectAspectRatio"
- height="16"
- label="Auto-detect ratio"
- layout="topleft"
- left_pad="23"
- name="aspect_auto_detect"
- top_delta="1"
- width="256">
- <check_box.commit_callback
- function="Pref.AutoDetectAspect" />
- </check_box>
- <text
+ <text
type="string"
length="1"
follows="left|top"
height="12"
layout="topleft"
- left="10"
- name="HigherText"
- top="73"
- width="80">
- Quality and
+ left="30"
+ name="UI Size:"
+ top_pad="4"
+ width="100">
+ UI Size:
</text>
- <text
- type="string"
- length="1"
+ <slider
+ can_edit_text="true"
+ control_name="UIScaleFactor"
+ decimal_digits="2"
follows="left|top"
- height="12"
+ height="15"
+ increment="0.025"
+ initial_value="1"
layout="topleft"
- left_delta="0"
- name="QualityText"
+ left_delta="32"
+ max_val="1.4"
+ min_val="0.75"
+ name="ui_scale_slider"
top_pad="2"
- width="95">
- Performance:
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="12"
- layout="topleft"
- left="115"
- name="FasterText"
- top="74"
- width="80">
- Faster
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="12"
- layout="topleft"
- left="158"
- name="ShadersPrefText"
- top="93"
- width="40">
- Low
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="12"
- layout="topleft"
- left_pad="7"
- name="ShadersPrefText2"
- top_delta="0"
- width="40">
- Mid
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="12"
+ width="180" />
+ <spinner
+ control_name="UIScaleFactor"
+ height="16"
+ increment="0.025"
+ initial_value="1"
layout="topleft"
- left_pad="7"
- name="ShadersPrefText3"
+ left_pad="10"
+ max_val="1.4"
+ min_val="0.75"
+ name="ui_scale_slider"
top_delta="0"
- width="40">
- High
- </text>
- <text
+ width="58" />
+
+ <text
type="string"
length="1"
follows="left|top"
height="12"
layout="topleft"
- left_pad="7"
- name="ShadersPrefText4"
- top_delta="0"
- width="40">
- Ultra
+ left="30"
+ name="QualitySpeed"
+ top_pad="4"
+ width="400">
+ Quality and speed:
</text>
<text
type="string"
length="1"
follows="left|top"
+ halign="right"
height="12"
layout="topleft"
- left="334"
- name="HigherText2"
- top="68"
+ left="35"
+ name="FasterText"
+ top_pad="4"
width="80">
- Higher
+ Faster
</text>
<text
type="string"
@@ -284,27 +145,27 @@
follows="left|top"
height="12"
layout="topleft"
- left_delta="0"
- name="QualityText2"
- top_pad="2"
- width="95">
- Quality
+ left_delta="360"
+ name="BetterText"
+ top_delta="0"
+ width="80">
+ Better
</text>
<icon
color="0.12 0.12 0.12 1"
height="14"
image_name="rounded_square.tga"
layout="topleft"
- left="173"
+ left="128"
name="LowGraphicsDivet"
- top="75"
+ top_delta="-2"
width="2" />
<icon
color="0.12 0.12 0.12 1"
height="14"
image_name="rounded_square.tga"
layout="topleft"
- left_pad="42"
+ left_pad="83"
name="MidGraphicsDivet"
top_delta="0"
width="2" />
@@ -313,7 +174,7 @@
height="14"
image_name="rounded_square.tga"
layout="topleft"
- left_pad="42"
+ left_pad="85"
name="HighGraphicsDivet"
top_delta="0"
width="2" />
@@ -322,7 +183,7 @@
height="14"
image_name="rounded_square.tga"
layout="topleft"
- left_pad="42"
+ left_pad="83"
name="UltraGraphicsDivet"
top_delta="0"
width="2" />
@@ -334,38 +195,77 @@
increment="1"
initial_value="0"
layout="topleft"
- left_delta="-140"
+ left="120"
max_val="3"
name="QualityPerformanceSelection"
show_text="false"
- top_delta="-1"
- width="150">
+ top_delta="-2"
+ width="275">
<slider.commit_callback
function="Pref.QualityPerformance"/>
</slider>
- <check_box
- control_name="RenderCustomSettings"
- height="16"
- initial_value="true"
- label="Custom"
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ halign="center"
+ height="12"
layout="topleft"
- left_pad="70"
- name="CustomSettings"
- top_delta="1"
- width="256">
- <check_box.commit_callback
- function="Pref.ChangeCustom" />
- </check_box>
- <panel
- make_visible_control="RenderCustomSettings"
- border="true"
+ left="88"
+ name="ShadersPrefText"
+ top_delta="20"
+ width="80">
+ Low
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ halign="center"
+ height="12"
+ layout="topleft"
+ left_delta="87"
+ name="ShadersPrefText2"
+ top_delta="0"
+ width="80">
+ Mid
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ halign="center"
+ height="12"
+ layout="topleft"
+ left_delta="87"
+ name="ShadersPrefText3"
+ top_delta="0"
+ width="80">
+ High
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ halign="center"
+ height="12"
+ layout="topleft"
+ left_delta="85"
+ name="ShadersPrefText4"
+ top_delta="0"
+ width="80">
+ Ultra
+ </text>
+ <panel
+ visiblity_control="ShowAdvancedGraphicsSettings"
+ border="false"
follows="top|left"
height="260"
label="CustomGraphics"
layout="topleft"
left="5"
name="CustomGraphics Panel"
- top="115"
+ top="124"
width="485">
<text
type="string"
@@ -895,26 +795,55 @@
width="315" />
</radio_group>
</panel>
+ <button
+ follows="left|bottom"
+ height="20"
+ label="Apply"
+ label_selected="Apply"
+ layout="topleft"
+ left="10"
+ name="Apply"
+ top="383"
+ width="115">
+ <button.commit_callback
+ function="Pref.Apply" />
+ </button>
<button
+ follows="left|bottom"
height="20"
- label="Recommended Settings"
+ label="Reset"
layout="topleft"
- left="130"
+ left_pad="3"
name="Defaults"
- top="380"
- width="170">
+ top="383"
+ width="115">
<button.commit_callback
function="Pref.HardwareDefaults" />
</button>
<button
+ control_name="ShowAdvancedGraphicsSettings"
+ follows="right|bottom"
height="20"
- label="Hardware Options"
- label_selected="Hardware Options"
+ is_toggle="true"
+ label="Advanced"
layout="topleft"
- left_pad="10"
+ left_pad="35"
+ name="Advanced"
+ top_delta="0"
+ width="115">
+ <button.commit_callback
+ function="Pref.ChangeCustom" />
+ </button>
+ <button
+ follows="right|bottom"
+ height="20"
+ label="Hardware"
+ label_selected="Hardware"
+ layout="topleft"
+ left_pad="3"
name="GraphicsHardwareButton"
top_delta="0"
- width="170">
+ width="115">
<button.commit_callback
function="Pref.HardwareSettings" />
</button>
diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml
index a4363d5858..4f559394a6 100644
--- a/indra/newview/skins/default/xui/en/panel_profile.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile.xml
@@ -1,17 +1,15 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
- background_visible="true"
bevel_style="in"
- bg_alpha_color="0.5 0.5 0.5 1"
follows="left|top|right|bottom"
- height="705"
+ height="625"
label="Profile"
layout="topleft"
left="10"
mouse_opaque="false"
name="panel_profile"
top="10"
- width="355">
+ width="305">
<panel.string
name="CaptionTextAcctInfo">
[ACCTTYPE] [PAYMENTINFO] [AGEVERIFICATION]
@@ -52,269 +50,171 @@
name="NotAgeVerified">
Not Age-verified
</panel.string>
+ <panel.string
+ name="payment_update_link_url">
+ http://www.secondlife.com/account/billing.php?lang=en
+ </panel.string>
+ <panel.string
+ name="my_account_link_url">
+ http://secondlife.com/account
+ </panel.string>
+ <panel.string
+ name="partner_edit_link_url">
+ http://www.secondlife.com/account/partners.php?lang=en
+ </panel.string>
+ <panel.string
+ name="no_partner_text">
+ None
+ </panel.string>
<scroll_container
+ color="DkGray2"
follows="left|top|right|bottom"
- height="690"
+ height="570"
layout="topleft"
- left="1"
- name="profile_scroll"
- width="354">
- <panel
- height="710"
+ left="8"
+ name="profile_scroll"
+ opaque="true"
+ reserve_scroll_corner="false"
+ width="260">
+ <panel
+ height="680"
layout="topleft"
left="0"
top="0"
- width="320">
- <panel
- follows="left|top"
- height="120"
- layout="topleft"
- left="9"
- name="lifes_images_panel"
- top_pad="15"
+ width="280">
+ <text
+ type="string"
+ follows="top|left|right"
+ font="SansSerifHugeBold"
+ height="20"
+ layout="topleft"
+ left="9"
+ name="user_name"
+ text_color="white"
+ top="0"
+ mouse_opaque="true"
width="250">
- <panel
+ (Loading...)
+ </text>
+ <panel
follows="left|top"
- height="120"
+ height="100"
layout="topleft"
- left="0"
+ left="10"
name="second_life_image_panel"
- top="0"
- width="125">
- <text
- type="string"
- follows="left|top|right|bottom"
- font="SansSerifBold"
- height="20"
- layout="topleft"
- left="0"
- name="first_life_photo_title_text"
- text_color="white"
- top="0"
- width="125">
- Second Life photo:
- </text>
+ top="20"
+ width="250">
<texture_picker
allow_no_texture="true"
default_image_name="None"
enabled="false"
follows="top|left"
- height="105"
+ height="100"
layout="topleft"
left="0"
name="2nd_life_pic"
- top_pad="5"
- width="105" />
- </panel>
- <panel
- follows="left|top"
- height="120"
- layout="topleft"
- left_pad="1"
- name="first_life_image_panel"
- top="0"
- width="125">
- <text
- type="string"
- follows="left|top|right|bottom"
- font="SansSerifBold"
- height="20"
- layout="topleft"
- left="0"
- name="second_life_photo_title_text"
- text_color="white"
top="0"
- width="125">
- First Life photo:
- </text>
- <texture_picker
- allow_no_texture="true"
- default_image_name="None"
- enabled="false"
- follows="top|left"
- height="105"
- layout="topleft"
- left="0"
- name="1st_life_pic"
- top_pad="5"
- width="105" />
- </panel>
- </panel>
- <panel
- follows="left|top|right"
- height="30"
- layout="topleft"
- left="0"
- name="status_panel"
- top="135"
- width="300">
- <text
- follows="left|top"
- font="SansSerifBold"
- font.style="ITALIC"
- height="15"
- layout="topleft"
- left="9"
- name="online_status"
- text_color="green"
- width="100" />
- <text
- type="string"
- length="1"
- follows="left|top"
- font="SansSerifBold"
- font.style="ITALIC"
- height="15"
- layout="topleft"
- left="9"
- name="status_message"
- text_color="0.1 0.1 0.1 1"
- width="300">
- <!--TBD-->
- </text>
- </panel>
- <panel
- follows="left|top|right"
- height="80"
- layout="topleft"
- left="0"
- name="status_me_panel"
- top="135"
- width="300">
- <text
- type="string"
- follows="left|top"
- font="SansSerifBold"
- height="15"
- layout="topleft"
- left="9"
- name="online_me_status_text"
- text_color="white"
- width="100">
- Status:
- </text>
- <combo_box
- font="SansSerifBold"
- height="18"
- layout="topleft"
- left="10"
- name="status_combo"
- width="150">
- <combo_box.item
- label="Online"
- value="online" />
- <combo_box.item
- label="Away"
- value="away" />
- <combo_box.item
- label="Busy"
- value="busy" />
- </combo_box>
- <text
- type="string"
- follows="left|top"
- font="SansSerifBold"
- height="15"
- layout="topleft"
- left="9"
- name="status_me_message_text"
- text_color="white"
- width="300">
- What&apos;re you up to?
- </text>
- <line_editor
- type="string"
- border_style="line"
- border_thickness="1"
- follows="left|top|right"
- font="SansSerifBold"
- font.style="ITALIC"
- height="20"
- layout="topleft"
- left="9"
- name="status_me_message_edit"
- select_on_focus="true"
- text_color="0.5 0.5 0.5 1"
- width="300">
- Type a message about what you&apos;re doing in SL!
- </line_editor>
- </panel>
- <text
+ width="100" />
+ <text
type="string"
-
follows="left|top"
font="SansSerifBold"
height="15"
layout="topleft"
- left="9"
+ left_pad="10"
name="title_sl_descr_text"
text_color="white"
- top_pad="10"
- width="290">
- Second Life description:
+ top_delta="0"
+ width="125">
+ Second Life:
</text>
<text
type="string"
+ top_pad="4"
follows="left|top|right"
- font="SansSerif"
- height="45"
+ font="SansSerifSmall"
+ height="75"
layout="topleft"
- left="9"
+ left_delta="0"
name="sl_description_edit"
- text_color="0.1 0.1 0.1 1"
- width="290"
+ text_color="LtGray"
+ width="125"
word_wrap="true">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum.
</text>
- <text
+ </panel>
+ <panel
+ follows="left|top"
+ height="100"
+ layout="topleft"
+ left="10"
+ name="first_life_image_panel"
+ top_pad="20"
+ width="125">
+ <texture_picker
+ allow_no_texture="true"
+ default_image_name="None"
+ enabled="false"
+ follows="top|left"
+ height="100"
+ layout="topleft"
+ left="0"
+ name="real_world_pic"
+ top_pad="0"
+ width="100" />
+ <text
type="string"
follows="left|top"
font="SansSerifBold"
height="15"
layout="topleft"
- left="9"
- name="title_fl_descr_text"
+ left_pad="10"
+ name="title_rw_descr_text"
text_color="white"
- top_pad="10"
- width="290">
- First Life description:
+ top_delta="0"
+ width="125">
+ Real World:
</text>
<text
type="string"
follows="left|top|right"
- font="SansSerif"
+ font="SansSerifSmall"
height="45"
layout="topleft"
- left="9"
+ left_delta="0"
+ top_pad="10"
name="fl_description_edit"
- text_color="0.1 0.1 0.1 1"
- width="290"
+ text_color="LtGray"
+ width="125"
word_wrap="true">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum.
</text>
+ </panel>
<text
type="string"
follows="left|top"
font="SansSerifBold"
height="15"
layout="topleft"
- left="9"
+ halign="right"
+ left="10"
name="title_groups_text"
text_color="white"
- top_pad="10"
- width="290">
- Second Life groups:
+ top_pad="20"
+ width="100">
+ Groups:
</text>
<text
type="string"
follows="left|top|right"
- font="SansSerif"
+ font="SansSerifSmall"
height="45"
layout="topleft"
- left="9"
+ left_pad="10"
+ top_delta="0"
name="sl_groups"
- text_color="0.1 0.1 0.1 1"
- width="290"
+ text_color="LtGray"
+ width="125"
word_wrap="true">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean viverra orci et justo sagittis aliquet. Nullam malesuada mauris sit amet ipsum.
</text>
@@ -323,25 +223,28 @@
follows="left|top"
font="SansSerifBold"
height="15"
+ halign="right"
layout="topleft"
- left="9"
+ left="10"
name="title_homepage_text"
text_color="white"
- top_pad="10"
+ top_pad="20"
width="100">
Homepage:
</text>
<text
type="string"
follows="left|top|right"
- font="SansSerif"
+ font="SansSerifSmall"
font.style="UNDERLINE"
+ font_shadow="hard"
height="15"
+ top_delta="0"
layout="topleft"
- left="9"
+ left_pad="10"
name="homepage_edit"
text_color="0.2 0.2 1 1"
- width="290">
+ width="125">
TODO
</text>
<text
@@ -349,24 +252,26 @@
follows="left|top"
font="SansSerifBold"
height="15"
+ halign="right"
layout="topleft"
- left="9"
+ left="10"
name="title_member_text"
text_color="white"
- top_pad="10"
+ top_pad="20"
width="100">
Member since:
</text>
<text
type="string"
follows="left|top|right"
- font="SansSerif"
+ font="SansSerifSmall"
height="15"
layout="topleft"
- left="9"
+ left_pad="10"
+ top_delta="0"
name="register_date"
- text_color="0.1 0.1 0.1 1"
- width="290"
+ text_color="LtGray"
+ width="125"
word_wrap="true">
05/31/1976
</text>
@@ -375,72 +280,40 @@
follows="left|top"
font="SansSerifBold"
height="15"
+ halign="right"
layout="topleft"
- left="9"
+ left="10"
+ top_pad="20"
name="title_acc_status_text"
text_color="white"
- top_pad="10"
width="100">
Account status:
</text>
<text
type="string"
follows="left|top|right"
- font="SansSerif"
+ font="SansSerifSmall"
height="30"
layout="topleft"
- left="9"
+ left_pad="10"
+ top_delta="0"
name="acc_status_text"
- text_color="0.1 0.1 0.1 1"
- width="290"
+ text_color="LtGray"
+ width="125"
word_wrap="true">
Resident. No payment info on file.
</text>
- <panel
- follows="left|top|right"
- height="15"
- layout="topleft"
- left="9"
- name="account_actions_panel"
- width="335">
- <text
- type="string"
- follows="left|top"
- font="SansSerif"
- font.style="UNDERLINE"
- height="15"
- layout="topleft"
- left="0"
- name="my_account_link"
- text_color="0.2 0.2 1 1"
- top="0"
- width="65">
- Update
- </text>
- <text
- type="string"
- follows="left|top"
- font="SansSerif"
- font.style="UNDERLINE"
- height="15"
- layout="topleft"
- left="70"
- name="my_account_link"
- text_color="0.2 0.2 1 1"
- top="0"
- width="80">
- My Account
- </text>
- </panel>
- <text
+ <text
type="string"
follows="left|top"
font="SansSerifBold"
height="15"
+ halign="right"
layout="topleft"
name="title_partner_text"
text_color="white"
- top_pad="10"
+ top_pad="20"
+ left="10"
width="100">
Partner:
</text>
@@ -448,127 +321,285 @@
follows="left|top|right"
height="15"
layout="topleft"
- left="9"
+ left_pad="10"
+ top_delta="0"
name="partner_data_panel"
- width="335">
+ width="125">
<text
type="string"
follows="left|top|right"
- font="SansSerif"
+ font="SansSerifSmall"
height="15"
layout="topleft"
left="0"
name="partner_text"
- text_color="0.1 0.1 0.1 1"
+ text_color="LtGray"
top="0"
- width="290"
+ width="125"
word_wrap="true">
[FIRST] [LAST]
</text>
<text
type="string"
follows="top|right"
- font="SansSerif"
+ font="SansSerifSmall"
font.style="UNDERLINE"
- halign="right"
+ font_shadow="hard"
height="15"
layout="topleft"
- left="270"
+ left_delta="0"
name="partner_edit_link"
text_color="0.2 0.2 1 1"
- top="0"
+ top_delta="15"
width="40">
Edit
</text>
</panel>
- <panel
- follows="left|top"
- height="30"
+
+ <panel
+ follows="left|top|right"
+ height="15"
layout="topleft"
- name="profile_buttons_panel"
- width="350">
- <button
- follows="bottom|left"
- font="SansSerifSmallBold"
- height="25"
- label="Add Friend"
+ left="50"
+ top_pad="40"
+ name="account_actions_panel"
+ width="200">
+ <text
+ type="string"
+ follows="left|top"
+ font="SansSerif"
+ font.style="UNDERLINE"
+ font_shadow="hard"
+ height="15"
layout="topleft"
- left="5"
- mouse_opaque="false"
- name="add_friend"
+ left="0"
+ name="payment_update_link"
+ text_color="0.2 0.2 1 1"
top="0"
- width="75" />
- <button
- follows="bottom|left"
- font="SansSerifSmallBold"
- height="25"
- label="IM"
- layout="topleft"
- left_pad="5"
- name="im"
- top_delta="0"
- width="40" />
- <button
- enabled="false"
- follows="bottom|left"
- font="SansSerifSmallBold"
- height="25"
- label="Call"
+ width="100">
+ Update
+ </text>
+ <text
+ type="string"
+ follows="left|top"
+ font="SansSerif"
+ font.style="UNDERLINE"
+ font_shadow="hard"
+ height="15"
layout="topleft"
- left_pad="5"
- name="call"
- top_delta="0"
- width="50" />
- <button
- follows="bottom|left"
- font="SansSerifSmallBold"
- height="25"
- label="Teleport"
+ left="70"
+ name="my_account_link"
+ text_color="0.2 0.2 1 1"
+ top="0"
+ width="80">
+ My Account
+ </text>
+ </panel>
+
+
+
+ <!--
+ <panel
+ follows="left|top|right"
+ height="30"
+ layout="topleft"
+ left="0"
+ name="status_panel"
+ top="155"
+ width="260">
+ <text
+ follows="left|top"
+ font="SansSerifBold"
+ font.style="ITALIC"
+ height="15"
layout="topleft"
- left_pad="5"
- name="teleport"
- top_delta="0"
- width="65" />
- <button
- enabled="false"
- follows="bottom|left"
- font="SansSerifSmallBold"
- height="25"
- label="Share"
+ left="9"
+ name="online_status"
+ text_color="green"
+ width="100" />
+ <text
+ type="string"
+ follows="left|top"
+ font="SansSerifBold"
+ font.style="ITALIC"
+ height="15"
layout="topleft"
- left_pad="15"
- name="share"
- top_delta="0"
- width="50" />
- </panel>
+ left="9"
+ name="status_message"
+ text_color="0.1 0.1 0.1 1"
+ width="280">
+ TBD
+ </text>
+ </panel> -->
<panel
- follows="left|top"
- height="30"
+ follows="left|top|right"
+ height="80"
layout="topleft"
- name="profile_me_buttons_panel"
- visible="false"
- width="350">
- <button
- follows="bottom|left"
- font="SansSerifSmallBold"
- height="25"
- label="Edit Profile"
+ left="0"
+ name="status_me_panel"
+ top_pad="20"
+ width="125">
+ <text
+ type="string"
+ follows="left|top"
+ font="SansSerifBold"
+ height="15"
+ halign="right"
layout="topleft"
- left="0"
- name="edit_profile_btn"
- top="0"
- width="105" />
- <button
- follows="bottom|left"
- font="SansSerifSmallBold"
- height="25"
- label="Edit Appearance"
+ left="10"
+ name="online_me_status_text"
+ text_color="white"
+ width="100">
+ Status:
+ </text>
+ <combo_box
+ font="SansSerifBold"
+ height="18"
layout="topleft"
- left_pad="15"
- name="edit_appearance_btn"
+ left_pad="10"
top_delta="0"
- width="130" />
+ name="status_combo"
+ width="100">
+ <combo_box.item
+ label="Online"
+ name="online"
+ value="online" />
+ <combo_box.item
+ label="Away"
+ name="away"
+ value="away" />
+ <combo_box.item
+ label="Busy"
+ name="busy"
+ value="busy" />
+ </combo_box>
+ <text
+ type="string"
+ follows="left|top"
+ font="SansSerifBold"
+ height="15"
+ layout="topleft"
+ left="10"
+ top_pad="20"
+ name="status_me_message_text"
+ text_color="white"
+ width="250">
+ What&apos;re you up to?
+ </text>
+ <line_editor
+ border_style="line"
+ border_thickness="1"
+ follows="left|top|right"
+ font="SansSerifBold"
+ font.style="ITALIC"
+ height="20"
+ layout="topleft"
+ left="10"
+ top_pad="10"
+ name="status_me_message_edit"
+ select_on_focus="true"
+ text_color="0.5 0.5 0.5 1"
+ width="250">
+ Type a message about what you&apos;re doing in SL!
+ </line_editor>
+ </panel>
+
+
+
+
</panel>
- </panel>
+
</scroll_container>
+ <panel
+ bottom="625"
+ follows="bottom|left"
+ height="30"
+ layout="topleft"
+ left="8"
+ name="profile_buttons_panel"
+ width="280">
+ <button
+ follows="bottom|left"
+ font="SansSerifSmallBold"
+ height="25"
+ label="Add Friend"
+ layout="topleft"
+ left="0"
+ mouse_opaque="false"
+ name="add_friend"
+ top="0"
+ width="90" />
+ <button
+ follows="bottom|left"
+ font="SansSerifSmallBold"
+ height="25"
+ label="IM"
+ layout="topleft"
+ left_pad="0"
+ name="im"
+ top="0"
+ width="40" />
+ <button
+ enabled="false"
+ follows="bottom|left"
+ font="SansSerifSmallBold"
+ height="25"
+ label="Call"
+ layout="topleft"
+ left_pad="0"
+ name="call"
+ top="0"
+ width="50" />
+ <button
+ follows="bottom|left"
+ font="SansSerifSmallBold"
+ height="25"
+ label="Teleport"
+ layout="topleft"
+ left_pad="0"
+ name="teleport"
+ top="0"
+ width="75" />
+ <button
+ enabled="false"
+ follows="bottom|left"
+ font="SansSerifSmallBold"
+ height="25"
+ label="Share"
+ layout="topleft"
+ left_pad="0"
+ name="share"
+ top="0"
+ width="60" />
+ </panel>
+ <panel
+ bottom="625"
+ follows="bottom|left"
+ height="30"
+ layout="topleft"
+ left="8"
+ name="profile_me_buttons_panel"
+ visible="false"
+ width="345">
+ <button
+ follows="bottom|left"
+ font="SansSerifSmallBold"
+ height="25"
+ label="Edit Profile"
+ layout="topleft"
+ left="0"
+ name="edit_profile_btn"
+ top="0"
+ width="105" />
+ <button
+ follows="bottom|left"
+ font="SansSerifSmallBold"
+ height="25"
+ label="Edit Appearance"
+ layout="topleft"
+ left_pad="5"
+ name="edit_appearance_btn"
+ top="0"
+ width="130" />
+ </panel>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_profile_view.xml b/indra/newview/skins/default/xui/en/panel_profile_view.xml
index fa919776a7..cd46ccb0bc 100644
--- a/indra/newview/skins/default/xui/en/panel_profile_view.xml
+++ b/indra/newview/skins/default/xui/en/panel_profile_view.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
background_visible="true"
- bg_alpha_color="0.3 0.3 0.3 1"
follows="left|top|right|bottom"
height="660"
label="Me"
@@ -9,39 +8,39 @@
left="0"
name="panel_target_profile"
top="0"
- width="355">
- <button
- layout="topleft"
- name="back"
- left="0"
- top="5"
- width="20"
- height="20"
- label=""
- follows="top|left"
- image_selected="navbar_bg_button.tga"
- image_unselected="navbar_bg_button.tga"
- image_overlay="navbar_back.tga"/>
- <text
- layout="topleft"
- top="0"
- left="30"
- width="150"
- height="20"
- font="SansSerifHugeBold"
- text_color="white"
- follows="top|left"
- mouse_opaque="true"
- name="user_name">(Loading...)</text>
+ width="305">
+ <button
+ layout="topleft"
+ name="back"
+ left="5"
+ top="5"
+ width="20"
+ height="20"
+ label=""
+ follows="top|left"
+ image_selected="navbar_bg_button.tga"
+ image_unselected="navbar_bg_button.tga"
+ image_overlay="navbar_back.tga"/>
+ <text
+ layout="topleft"
+ top="0"
+ left_pad="15"
+ width="125"
+ height="20"
+ font="SansSerifHugeBold"
+ text_color="white"
+ follows="top|left|right"
+ mouse_opaque="true"
+ name="user_name">(Loading...)</text>
<tab_container
follows="left|top|right|bottom"
- height="600"
+ height="625"
layout="topleft"
left="0"
- name="profile_tabs"
+ name="tabs"
tab_position="top"
top="35"
- width="355">
+ width="280">
<panel
class="panel_profile"
filename="panel_profile.xml"
@@ -54,7 +53,7 @@
label="Picks"
layout="topleft"
name="panel_picks"/>
- <panel
+ <panel
class="panel_notes"
filename="panel_notes.xml"
label="Notes"
diff --git a/indra/newview/skins/default/xui/en/panel_progress.xml b/indra/newview/skins/default/xui/en/panel_progress.xml
index 6139bae874..4f23c4d26d 100644
--- a/indra/newview/skins/default/xui/en/panel_progress.xml
+++ b/indra/newview/skins/default/xui/en/panel_progress.xml
@@ -61,28 +61,28 @@
width="640" />
<text
follows="left|right|top"
- font="SansSerif"
+ font="SansSerifHuge"
font_shadow="hard"
- halign="center"
+ halign="left"
height="20"
layout="topleft"
- left_delta="0"
+ left_delta="47"
name="title_text"
text_color="LoginProgressBoxTextColor"
top_delta="50"
- width="640" />
+ width="593" />
<text
follows="left|right|top"
font="SansSerif"
font_shadow="hard"
- halign="center"
+ halign="left"
height="20"
layout="topleft"
left_delta="0"
name="progress_text"
text_color="LoginProgressBoxTextColor"
top_pad="5"
- width="640" />
+ width="593" />
<progress_bar
bottom="115"
color_bar="1 1 1 0.96"
@@ -94,17 +94,17 @@
right="-45" />
<text
follows="left|right|top|bottom"
- font="SansSerif"
+ font="SansSerifLarge"
font_shadow="hard"
- halign="center"
+ halign="left"
height="100"
layout="topleft"
- left="20"
- line_spacing="8"
+ left="30"
+ line_spacing="2"
name="message_text"
text_color="LoginProgressBoxTextColor"
top="145"
- width="600" />
+ width="610" />
</layout_panel>
<layout_panel
height="200"
@@ -125,9 +125,9 @@
follows="right|bottom"
height="22"
layout="topleft"
- left="-86"
+ left="-106"
name="cancel_btn"
picture_style="true"
- top="730"
- width="70" />
+ top="700"
+ width="90" />
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_region_covenant.xml b/indra/newview/skins/default/xui/en/panel_region_covenant.xml
index 7bd548d464..8265ab3227 100644
--- a/indra/newview/skins/default/xui/en/panel_region_covenant.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_covenant.xml
@@ -2,13 +2,13 @@
<panel
border="true"
follows="top|left"
- height="320"
+ height="350"
label="Covenant"
layout="topleft"
left="0"
name="Covenant"
top="320"
- width="480">
+ width="280">
<panel.string
name="can_resell">
Purchased land in this region may be resold.
@@ -49,7 +49,7 @@
mouse_opaque="false"
name="estate_name_lbl"
top_pad="5"
- width="100">
+ width="75">
Name:
</text>
<text
@@ -58,7 +58,7 @@
follows="left|top"
height="20"
layout="topleft"
- left_pad="10"
+ left_pad="0"
mouse_opaque="false"
name="estate_name_text"
top_delta="0"
@@ -75,7 +75,7 @@
mouse_opaque="false"
name="estate_owner_lbl"
top_pad="5"
- width="100">
+ width="75">
Owner:
</text>
<text
@@ -84,7 +84,7 @@
follows="left|top"
height="20"
layout="topleft"
- left_pad="10"
+ left_pad="0"
mouse_opaque="false"
name="estate_owner_text"
top_delta="0"
@@ -102,7 +102,7 @@
mouse_opaque="false"
name="estate_cov_lbl"
top_pad="5"
- width="100">
+ width="75">
Covenant:
</text>
<text
@@ -111,11 +111,11 @@
follows="left|top"
height="20"
layout="topleft"
- left_pad="10"
+ left_pad="0"
mouse_opaque="false"
name="covenant_timestamp_text"
top_delta="0"
- width="308">
+ width="167">
Last Modified Wed Dec 31 16:00:00 1969
</text>
<button
@@ -136,11 +136,11 @@
follows="left|top"
height="100"
layout="topleft"
- left="110"
+ left="80"
max_length="65535"
name="covenant_editor"
top_delta="30"
- width="340"
+ width="193"
word_wrap="true">
There is no Covenant provided for this Estate.
</text_editor>
@@ -150,7 +150,7 @@
height="18"
label="Reset"
layout="topleft"
- left_delta="250"
+ left_delta="75"
name="reset_covenant"
top_pad="5"
width="90" />
@@ -161,11 +161,12 @@
follows="left|top"
height="20"
layout="topleft"
- left="120"
+ left="85"
name="covenant_help_text"
top_pad="10"
- width="460">
- Changes to the covenant will show on all parcels in the estate.
+ width="190">
+ Changes to the covenant will show
+on all parcels in the estate.
</text>
<text
type="string"
@@ -175,9 +176,10 @@
layout="topleft"
left_delta="0"
name="covenant_instructions"
- top_pad="5"
- width="465">
- Drag and drop a notecard to change the Covenant for this Estate.
+ top_pad="15"
+ width="190">
+ Drag and drop a notecard to change
+the Covenant for this Estate.
</text>
<text
@@ -190,7 +192,7 @@
left="5"
mouse_opaque="false"
name="region_section_lbl"
- top_pad="5"
+ top_pad="10"
width="100">
Region
</text>
@@ -204,7 +206,7 @@
mouse_opaque="false"
name="region_name_lbl"
top_pad="5"
- width="100">
+ width="75">
Name:
</text>
<text
@@ -213,7 +215,7 @@
follows="left|top"
height="20"
layout="topleft"
- left_pad="10"
+ left_pad="0"
mouse_opaque="false"
name="region_name_text"
top_delta="0"
@@ -230,7 +232,7 @@
mouse_opaque="false"
name="region_landtype_lbl"
top_pad="5"
- width="100">
+ width="75">
Type:
</text>
<text
@@ -239,7 +241,7 @@
follows="left|top"
height="20"
layout="topleft"
- left_pad="10"
+ left_pad="0"
mouse_opaque="false"
name="region_landtype_text"
top_delta="0"
@@ -256,7 +258,7 @@
mouse_opaque="false"
name="region_maturity_lbl"
top_pad="5"
- width="100">
+ width="75">
Rating:
</text>
<text
@@ -265,7 +267,7 @@
follows="left|top"
height="20"
layout="topleft"
- left_pad="10"
+ left_pad="0"
mouse_opaque="false"
name="region_maturity_text"
top_delta="0"
@@ -282,7 +284,7 @@
mouse_opaque="false"
name="resellable_lbl"
top_pad="5"
- width="100">
+ width="75">
Resale:
</text>
<text
@@ -291,12 +293,13 @@
follows="left|top"
height="20"
layout="topleft"
- left_pad="10"
+ left_pad="0"
mouse_opaque="false"
name="resellable_clause"
top_delta="0"
- width="330">
- Land in this region may not be resold.
+ width="190">
+ Land in this region may not be
+resold.
</text>
<text
type="string"
@@ -307,8 +310,8 @@
left="10"
mouse_opaque="false"
name="changeable_lbl"
- top_pad="5"
- width="100">
+ top_pad="10"
+ width="75">
Subdivide:
</text>
<text
@@ -317,12 +320,13 @@
follows="left|top"
height="30"
layout="topleft"
- left_pad="10"
+ left_pad="0"
mouse_opaque="false"
name="changeable_clause"
top_delta="0"
- width="330">
- Land in this region may not be joined/subdivided.
+ width="190">
+ Land in this region may not be
+joined/subdivided.
</text>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_region_debug.xml b/indra/newview/skins/default/xui/en/panel_region_debug.xml
index 22dc0aa0d0..6a43bf3c4b 100644
--- a/indra/newview/skins/default/xui/en/panel_region_debug.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_debug.xml
@@ -8,7 +8,7 @@
left="0"
name="Debug"
top="320"
- width="480">
+ width="280">
<text
type="string"
length="1"
@@ -32,7 +32,7 @@
left_delta="50"
name="region_text"
top_delta="0"
- width="400">
+ width="220">
unknown
</text>
<check_box
@@ -96,12 +96,13 @@
enabled="false"
follows="left|top"
height="20"
+ font="SansSerifSmall"
label="Apply"
layout="topleft"
left="60"
name="apply_btn"
top="100"
- width="100" />
+ width="80" />
<text
type="string"
length="1"
@@ -120,7 +121,7 @@
follows="left|top"
height="20"
layout="topleft"
- left="30"
+ left="20"
name="resident_text_lbl"
top="175"
width="60">
@@ -139,25 +140,26 @@
mouse_opaque="false"
name="target_avatar_name"
top_delta="-2"
- width="180">
+ width="115">
(none)
</line_editor>
<button
follows="left|top"
height="20"
- label="Choose..."
+ font="SansSerifSmall"
+ label="Choose"
layout="topleft"
- left_pad="10"
+ left_pad="5"
name="choose_avatar_btn"
top_delta="0"
- width="80" />
- <text
+ width="70" />
+ <text
type="string"
length="1"
follows="left|top"
height="20"
layout="topleft"
- left="30"
+ left="20"
name="options_text_lbl"
top="198"
width="60">
@@ -165,7 +167,7 @@
</text>
<check_box
height="20"
- label="Return only those objects with scripts"
+ label="With scripts"
layout="topleft"
left_delta="60"
name="return_scripts"
@@ -174,7 +176,7 @@
width="80" />
<check_box
height="20"
- label="Return only those objects on someone else&apos;s land"
+ label="On someone else&apos;s land"
layout="topleft"
left_delta="0"
name="return_other_land"
@@ -183,7 +185,7 @@
width="80" />
<check_box
height="20"
- label="Return objects in every region of this estate"
+ label="In every region of this estate"
layout="topleft"
left_delta="0"
name="return_estate_wide"
@@ -193,22 +195,24 @@
<button
follows="left|top"
height="20"
+ font="SansSerifSmall"
label="Return"
layout="topleft"
- left="30"
+ left="20"
name="return_btn"
top="263"
width="80" />
<button
follows="left|top"
height="20"
+ font="SansSerifSmall"
label="Get Top Colliders..."
layout="topleft"
left="10"
name="top_colliders_btn"
tool_tip="List of objects experiencing the most potential collisions"
top="313"
- width="150" />
+ width="130" />
<button
follows="left|top"
font="SansSerifSmall"
@@ -222,13 +226,14 @@
<button
follows="left|top"
height="20"
+ font="SansSerifSmall"
label="Get Top Scripts..."
layout="topleft"
left="10"
name="top_scripts_btn"
tool_tip="List of objects spending the most time running scripts"
top_pad="5"
- width="150" />
+ width="130" />
<button
follows="left|top"
font="SansSerifSmall"
@@ -242,13 +247,14 @@
<button
follows="left|top"
height="20"
+ font="SansSerifSmall"
label="Restart Region"
layout="topleft"
left="10"
name="restart_btn"
tool_tip="Give 2 minute countdown and restart region"
top_pad="5"
- width="130" />
+ width="110" />
<button
follows="left|top"
font="SansSerifSmall"
@@ -262,11 +268,12 @@
<button
follows="left|top"
height="20"
+ font="SansSerifSmall"
label="Delay Restart"
layout="topleft"
left="10"
name="cancel_restart_btn"
tool_tip="Delay region restart by one hour"
top_pad="5"
- width="130" />
+ width="110" />
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_region_estate.xml b/indra/newview/skins/default/xui/en/panel_region_estate.xml
index 95e1456c6e..1dafd50cdb 100644
--- a/indra/newview/skins/default/xui/en/panel_region_estate.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_estate.xml
@@ -2,13 +2,13 @@
<panel
border="true"
follows="top|left"
- height="320"
+ height="950"
label="Estate"
layout="topleft"
left="0"
name="Estate"
top="320"
- width="480">
+ width="280">
<panel.string
name="email_unsupported">
Feature unsupported
@@ -287,16 +287,15 @@ regions in the estate.
name="kick_user_from_estate_btn"
top_pad="5"
width="250" />
-
<text
type="string"
length="1"
- bottom="34"
+ top="490"
follows="left|top"
height="20"
layout="topleft"
name="estate_manager_label"
- right="470"
+ left="8"
width="200">
Estate Managers:
</text>
@@ -306,7 +305,7 @@ regions in the estate.
height="18"
label="?"
layout="topleft"
- left_delta="182"
+ left_delta="232"
name="estate_manager_help"
top_delta="-1"
width="18" />
@@ -315,9 +314,9 @@ regions in the estate.
follows="top|left"
height="60"
layout="topleft"
- right="470"
+ left="8"
top_pad="5"
- width="200" />
+ width="250" />
<name_list
follows="left|top"
height="60"
@@ -326,23 +325,23 @@ regions in the estate.
multi_select="true"
name="estate_manager_name_list"
top_delta="0"
- width="200" />
+ width="250" />
<button
follows="left|top"
height="20"
- label="Remove..."
+ label="Add..."
layout="topleft"
- name="remove_estate_manager_btn"
- right="470"
+ left="8"
+ name="add_estate_manager_btn"
top_pad="5"
width="90" />
<button
follows="left|top"
height="20"
- label="Add..."
+ label="Remove..."
layout="topleft"
- left_delta="-110"
- name="add_estate_manager_btn"
+ name="remove_estate_manager_btn"
+ left_pad="70"
top_delta="0"
width="90" />
<text
@@ -351,7 +350,7 @@ regions in the estate.
follows="left|top"
height="20"
layout="topleft"
- left_delta="0"
+ left="8"
name="allow_resident_label"
top_pad="5"
width="200">
@@ -363,7 +362,7 @@ regions in the estate.
height="18"
label="?"
layout="topleft"
- left_delta="182"
+ left_delta="232"
name="allow_resident_help"
top_delta="-1"
width="18" />
@@ -372,9 +371,9 @@ regions in the estate.
follows="top|left"
height="60"
layout="topleft"
- right="470"
+ left="8"
top_pad="5"
- width="200" />
+ width="250" />
<name_list
follows="left|top"
height="60"
@@ -383,23 +382,23 @@ regions in the estate.
multi_select="true"
name="allowed_avatar_name_list"
top_delta="0"
- width="200" />
+ width="250" />
<button
follows="left|top"
height="20"
- label="Remove..."
+ label="Add..."
layout="topleft"
- name="remove_allowed_avatar_btn"
- right="470"
+ left="8"
+ name="add_allowed_avatar_btn"
top_pad="5"
width="90" />
<button
follows="left|top"
height="20"
- label="Add..."
+ label="Remove..."
layout="topleft"
- left_delta="-110"
- name="add_allowed_avatar_btn"
+ name="remove_allowed_avatar_btn"
+ left_pad="70"
top_delta="0"
width="90" />
<text
@@ -408,7 +407,7 @@ regions in the estate.
follows="left|top"
height="20"
layout="topleft"
- left_delta="0"
+ left="8"
name="allow_group_label"
top_pad="5"
width="200">
@@ -420,7 +419,7 @@ regions in the estate.
height="18"
label="?"
layout="topleft"
- left_delta="182"
+ left_delta="232"
name="allow_group_help"
top_delta="-1"
width="18" />
@@ -429,9 +428,9 @@ regions in the estate.
follows="top|left"
height="60"
layout="topleft"
- right="470"
+ left="8"
top_pad="5"
- width="200" />
+ width="250" />
<name_list
follows="left|top"
height="60"
@@ -440,23 +439,23 @@ regions in the estate.
multi_select="true"
name="allowed_group_name_list"
top_delta="0"
- width="200" />
+ width="250" />
<button
follows="left|top"
height="20"
- label="Remove..."
+ label="Add..."
layout="topleft"
- name="remove_allowed_group_btn"
- right="470"
+ left="8"
+ name="add_allowed_group_btn"
top_pad="5"
width="90" />
<button
follows="left|top"
height="20"
- label="Add..."
+ label="Remove..."
layout="topleft"
- left_delta="-110"
- name="add_allowed_group_btn"
+ name="remove_allowed_group_btn"
+ left_pad="70"
top_delta="0"
width="90" />
<text
@@ -465,7 +464,7 @@ regions in the estate.
follows="left|top"
height="20"
layout="topleft"
- left_delta="0"
+ left="8"
name="ban_resident_label"
top_pad="5"
width="200">
@@ -477,7 +476,7 @@ regions in the estate.
height="18"
label="?"
layout="topleft"
- left_delta="182"
+ left_delta="232"
name="ban_resident_help"
top_delta="-1"
width="18" />
@@ -486,9 +485,9 @@ regions in the estate.
follows="top|left"
height="60"
layout="topleft"
- right="470"
+ left="8"
top_pad="5"
- width="200" />
+ width="250" />
<name_list
follows="left|top"
height="60"
@@ -497,23 +496,23 @@ regions in the estate.
multi_select="true"
name="banned_avatar_name_list"
top_delta="0"
- width="200" />
+ width="250" />
<button
follows="left|top"
height="20"
- label="Remove..."
+ label="Add..."
layout="topleft"
- name="remove_banned_avatar_btn"
- right="470"
+ left="8"
+ name="add_banned_avatar_btn"
top_pad="5"
width="90" />
<button
follows="left|top"
height="20"
- label="Add..."
+ label="Remove..."
layout="topleft"
- left_delta="-110"
- name="add_banned_avatar_btn"
+ name="remove_banned_avatar_btn"
+ left_pad="70"
top_delta="0"
width="90" />
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_region_general.xml b/indra/newview/skins/default/xui/en/panel_region_general.xml
index 661cb97c66..b7a32213cf 100644
--- a/indra/newview/skins/default/xui/en/panel_region_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_general.xml
@@ -2,13 +2,13 @@
<panel
border="true"
follows="top|left"
- height="320"
+ height="360"
label="Region"
layout="topleft"
left="0"
name="General"
- top="320"
- width="480">
+ top="360"
+ width="280">
<text
type="string"
length="1"
@@ -32,7 +32,7 @@
left_delta="50"
name="region_text"
top_delta="0"
- width="400">
+ width="200">
unknown
</text>
<text
@@ -283,14 +283,17 @@
width="85">
<combo_box.item
label="Adult"
+ name="Adult"
value="42" />
<combo_box.item
label="Mature"
+ name="Mature"
value="21" />
<combo_box.item
label="PG"
+ name="PG"
value="13" />
- </combo_box>
+ </combo_box>
<button
follows="left|top"
font="SansSerifSmall"
@@ -310,8 +313,11 @@
left="108"
name="apply_btn"
top="320"
- width="100" />
- <button
+ width="100">
+ <button.commit_callback
+ function="RegionInfo.Cancel" />
+ </button>
+ <button
follows="left|top"
height="20"
label="Teleport Home One User..."
@@ -343,8 +349,8 @@
height="20"
label="Manage Telehub..."
layout="topleft"
- left="250"
+ left_delta="0"
name="manage_telehub_btn"
- top="70"
- width="150" />
+ top_pad="20"
+ width="150" />
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_region_terrain.xml b/indra/newview/skins/default/xui/en/panel_region_terrain.xml
index ae3b650774..bdf74c5621 100644
--- a/indra/newview/skins/default/xui/en/panel_region_terrain.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_terrain.xml
@@ -2,13 +2,13 @@
<panel
border="true"
follows="top|left"
- height="320"
+ height="340"
label="Terrain"
layout="topleft"
left="0"
name="Terrain"
top="320"
- width="480">
+ width="280">
<text
type="string"
length="1"
@@ -32,7 +32,7 @@
left_delta="50"
name="region_text"
top_delta="0"
- width="400">
+ width="200">
unknown
</text>
<spinner
@@ -105,9 +105,9 @@
height="20"
label="Use Estate Sun"
layout="topleft"
- left="250"
+ left="15"
name="use_estate_sun_check"
- top="35"
+ top="105"
width="100" />
<button
follows="left|top"
@@ -115,7 +115,7 @@
height="18"
label="?"
layout="topleft"
- left_pad="70"
+ left_pad="85"
name="use_estate_sun_help"
top_delta="2"
width="18" />
@@ -123,9 +123,9 @@
height="20"
label="Fixed Sun"
layout="topleft"
- left="250"
+ left="15"
name="fixed_sun_check"
- top="55"
+ top_pad="0"
width="100" />
<button
follows="left|top"
@@ -133,7 +133,7 @@
height="18"
label="?"
layout="topleft"
- left_pad="70"
+ left_pad="85"
name="fixed_sun_help"
top_delta="2"
width="18" />
@@ -141,9 +141,9 @@
height="20"
image_name="icon_day_cycle.tga"
layout="topleft"
- left="285"
+ left="50"
name="daycycle"
- top="80"
+ top_delta="25"
width="165" />
<slider
follows="left|top"
@@ -151,12 +151,12 @@
increment="0.001"
label="Phase"
layout="topleft"
- left="250"
+ left="15"
max_val="30"
min_val="6"
name="sun_hour_slider"
show_text="false"
- top="105"
+ top_delta="30"
width="200" />
<button
enabled="false"
@@ -164,18 +164,18 @@
height="20"
label="Apply"
layout="topleft"
- left="350"
+ left="130"
name="apply_btn"
- top="135"
+ top_delta="30"
width="90" />
<view_border
bevel_style="none"
follows="top|left"
- height="130"
+ height="210"
layout="topleft"
left="8"
top="30"
- width="460" />
+ width="240" />
<button
follows="left|top"
height="20"
@@ -184,7 +184,7 @@
left_delta="2"
name="download_raw_btn"
tool_tip="Available only to estate owners, not managers"
- top_pad="60"
+ top_pad="15"
width="170" />
<button
follows="left|top"
@@ -204,7 +204,7 @@
left="10"
name="upload_raw_btn"
tool_tip="Available only to estate owners, not managers"
- top="243"
+ top_pad="0"
width="170" />
<button
follows="left|top"
@@ -224,7 +224,7 @@
left="10"
name="bake_terrain_btn"
tool_tip="Set current terrain as mid-point for raise/lower limits"
- top="283"
+ top_pad="15"
width="100" />
<button
follows="left|top"
diff --git a/indra/newview/skins/default/xui/en/panel_region_texture.xml b/indra/newview/skins/default/xui/en/panel_region_texture.xml
index f24630f4e3..bf63bb0cb6 100644
--- a/indra/newview/skins/default/xui/en/panel_region_texture.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_texture.xml
@@ -2,13 +2,13 @@
<panel
border="true"
follows="top|left"
- height="320"
+ height="575"
label="Ground Textures"
layout="topleft"
left="0"
name="Textures"
top="320"
- width="480">
+ width="280">
<text
type="string"
length="1"
@@ -32,7 +32,7 @@
left_delta="50"
name="region_text"
top_delta="0"
- width="400">
+ width="200">
unknown
</text>
<text
@@ -45,7 +45,8 @@
name="detail_texture_text"
top="36"
width="300">
- Terrain Textures (requires 512x512, 24 bit .tga files)
+ Terrain Textures
+(requires 512x512, 24 bit .tga files)
</text>
<texture_picker
follows="left|top"
@@ -53,7 +54,7 @@
layout="topleft"
left_delta="0"
name="texture_detail_0"
- top_delta="20"
+ top_delta="30"
width="100" />
<texture_picker
follows="left|top"
@@ -67,9 +68,9 @@
follows="left|top"
height="100"
layout="topleft"
- left_pad="10"
+ left="10"
name="texture_detail_2"
- top_delta="0"
+ top_delta="105"
width="100" />
<texture_picker
follows="left|top"
@@ -87,7 +88,7 @@
layout="topleft"
left="10"
name="height_text_lbl"
- top="146"
+ top="157"
width="65">
1 (Low)
</text>
@@ -109,9 +110,9 @@
follows="left|top"
height="20"
layout="topleft"
- left_pad="10"
+ left="10"
name="height_text_lbl3"
- top_delta="0"
+ top_delta="105"
width="100">
3
</text>
@@ -135,7 +136,7 @@
layout="topleft"
left="10"
name="height_text_lbl5"
- top="186"
+ top_delta="25"
width="300">
Texture Elevation Ranges
</text>
@@ -147,7 +148,7 @@
layout="topleft"
left="51"
name="height_text_lbl6"
- top="201"
+ top_delta="20"
width="100">
Southwest
</text>
@@ -163,31 +164,7 @@
width="100">
Northwest
</text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="20"
- layout="topleft"
- left_pad="10"
- name="height_text_lbl8"
- top_delta="0"
- width="100">
- Southeast
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="20"
- layout="topleft"
- left_pad="10"
- name="height_text_lbl9"
- top_delta="0"
- width="100">
- Northeast
- </text>
- <spinner
+ <spinner
follows="left|top"
height="20"
increment="0.5"
@@ -198,7 +175,7 @@
max_val="500"
min_val="-500"
name="height_start_spin_0"
- top="221"
+ top_delta="20"
width="100" />
<spinner
follows="left|top"
@@ -217,52 +194,76 @@
follows="left|top"
height="20"
increment="0.5"
- label="Low"
+ label="High"
label_width="37"
layout="topleft"
- left_pad="10"
+ left="10"
max_val="500"
min_val="-500"
- name="height_start_spin_2"
- top_delta="0"
+ name="height_range_spin_0"
+ top_delta="20"
width="100" />
<spinner
follows="left|top"
height="20"
increment="0.5"
- label="Low"
+ label="High"
label_width="37"
layout="topleft"
left_pad="10"
max_val="500"
min_val="-500"
- name="height_start_spin_3"
+ name="height_range_spin_1"
top_delta="0"
width="100" />
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left="51"
+ name="height_text_lbl8"
+ top_delta="30"
+ width="100">
+ Southeast
+ </text>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="20"
+ layout="topleft"
+ left_pad="10"
+ name="height_text_lbl9"
+ top_delta="0"
+ width="100">
+ Northeast
+ </text>
<spinner
follows="left|top"
height="20"
increment="0.5"
- label="High"
+ label="Low"
label_width="37"
layout="topleft"
left="10"
max_val="500"
min_val="-500"
- name="height_range_spin_0"
- top="241"
+ name="height_start_spin_2"
+ top_delta="20"
width="100" />
<spinner
follows="left|top"
height="20"
increment="0.5"
- label="High"
+ label="Low"
label_width="37"
layout="topleft"
left_pad="10"
max_val="500"
min_val="-500"
- name="height_range_spin_1"
+ name="height_start_spin_3"
top_delta="0"
width="100" />
<spinner
@@ -272,11 +273,11 @@
label="High"
label_width="37"
layout="topleft"
- left_pad="10"
+ left="10"
max_val="500"
min_val="-500"
name="height_range_spin_2"
- top_delta="0"
+ top_delta="20"
width="100" />
<spinner
follows="left|top"
@@ -297,11 +298,12 @@
follows="left|top"
height="20"
layout="topleft"
- left="25"
+ left="10"
name="height_text_lbl10"
- top="281"
- width="480">
- These values represent the blend range for the textures above.
+ top_delta="30"
+ width="270">
+ These values represent the blend range
+for the textures above.
</text>
<text
type="string"
@@ -311,30 +313,22 @@
layout="topleft"
left_delta="0"
name="height_text_lbl11"
- top_delta="16"
- width="450">
- Measured in meters, the LOW value is the MAXIMUM height of Texture #1,
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="20"
- layout="topleft"
- left_delta="0"
- name="height_text_lbl12"
- top_delta="16"
- width="480">
- and the HIGH value is the MINIMUM height of Texture #4.
+ top_delta="32"
+ width="270">
+ Measured in meters, the LOW value
+is the MAXIMUM height of Texture #1,
+and the HIGH value is the MINIMUM
+height of Texture #4.
</text>
+
<button
enabled="false"
follows="left|bottom"
height="20"
label="Apply"
layout="topleft"
- left="350"
+ left="120"
name="apply_btn"
- top="290"
- width="100" />
+ top_delta="60"
+ width="100" />
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_script_ed.xml b/indra/newview/skins/default/xui/en/panel_script_ed.xml
index f059f4f3c1..9fd075f79b 100644
--- a/indra/newview/skins/default/xui/en/panel_script_ed.xml
+++ b/indra/newview/skins/default/xui/en/panel_script_ed.xml
@@ -15,7 +15,7 @@
</panel.string>
<panel.string
name="can_not_view">
- You are not allowed to view this script.
+ You can not view or edit this script, since it has been set as &quot;no copy&quot;. You need full permissions to view or edit a script inside an object.
</panel.string>
<panel.string
name="public_objects_can_not_run">
diff --git a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml
index 2805ace906..21ecd01839 100644
--- a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml
+++ b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml
@@ -49,10 +49,10 @@
<button
enabled="false"
height="132"
- image_disabled="square_btn_32x128.tga"
- image_disabled_selected="square_btn_selected_32x128.tga"
- image_selected="square_btn_selected_32x128.tga"
- image_unselected="square_btn_32x128.tga"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled_Selected"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
layout="topleft"
left="2"
name="less"
@@ -63,10 +63,10 @@
<button
enabled="false"
height="132"
- image_disabled="square_btn_32x128.tga"
- image_disabled_selected="square_btn_selected_32x128.tga"
- image_selected="square_btn_selected_32x128.tga"
- image_unselected="square_btn_32x128.tga"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled_Selected"
+ image_selected="PushButton_Selected"
+ image_unselected="PushButton_Off"
layout="topleft"
left_pad="2"
name="more"
diff --git a/indra/newview/skins/default/xui/en/panel_side_tray.xml b/indra/newview/skins/default/xui/en/panel_side_tray.xml
index 220191ddaa..096b60adb1 100644
--- a/indra/newview/skins/default/xui/en/panel_side_tray.xml
+++ b/indra/newview/skins/default/xui/en/panel_side_tray.xml
@@ -4,57 +4,60 @@
background_visible="false"
bg_opaque_color="0.0 0.0 0.0 0.0"
mouse_opaque="true"
- collapsed="true"
+ width="305"
+ collapsed="true"
>
<sidetray_tab
- name="sidebarpanel2"
+ name="sidebar_home"
+ tab_title="Home"
+ description="Home."
+ image="icn_voice-groupfocus.tga"
mouse_opaque="false"
background_opaque="false"
background_visible="true"
bg_opaque_color="0.5 0.5 0.5 1.0"
- image="icn_voice-groupfocus.tga"
+ >
+ <panel
+ name="panel_home"
+ filename="panel_sidetray_home_tab.xml"
+ width="355"
+ height="465"
+ label="home"
+ border="true"
+ />
+ </sidetray_tab>
+
+ <sidetray_tab
+ name="sidebar_people"
tab_title="People"
description="Find your friends, contacts and people nearby."
+ image="icn_voice-groupfocus.tga"
+ mouse_opaque="false"
+ background_opaque="false"
+ background_visible="true"
+ bg_opaque_color="0.5 0.5 0.5 1.0"
>
- <collapsible_ctrl
- name="people_accordion"
- title="People"
- collapsable="true"
- min_width="200"
- min_height="200"
- expanded="true"
- header_visible="false"
- >
<panel
class="panel_people"
name="panel_people"
filename="panel_people.xml"
- width="355"
+ width="280"
height="465"
label="People"
border="true"
/>
- </collapsible_ctrl>
</sidetray_tab>
-
+ <!-- *TODO Vadim: isn't the sidetray_tab "label" attribute redundant since we have "tab_title" ? -->
<sidetray_tab
- name="sidebarpanel1"
+ name="sidebar_places"
+ tab_title="Places"
+ label="Places"
+ description="Find places to go and places you've been."
+ image="inv_item_landmark.tga"
mouse_opaque="false"
background_visible="true"
- label="Places"
bg_opaque_color="0.5 0.5 0.5 1.0"
- image="inv_item_landmark.tga"
- tab_title="Places"
- description="Find places to go and places you've been."
>
- <collapsible_ctrl
- name="places_accordian"
- title="Places"
- collapsable="true"
- min_width="355"
- min_height="570"
- header_visible="false"
- >
<panel
class="panel_places"
name="panel_places"
@@ -62,34 +65,594 @@
label="Places"
border="true"
/>
- </collapsible_ctrl>
</sidetray_tab>
<sidetray_tab
name="sidebar_me"
+ tab_title="Me"
+ description="Change your profile, your look and quick links to your outfits."
+ image="icn_voice-pvtfocus.tga"
mouse_opaque="false"
background_visible="true"
bg_opaque_color="0.5 0.5 0.5 1.0"
- image="icn_voice-pvtfocus.tga"
- tab_title="Me"
- description="Change your profile, your look and quick links to your outfits."
>
- <collapsible_ctrl
- name="me_accordion"
- title="Me"
- collapsable="false"
- min_width="200"
- min_height="200"
- header_visible="false"
- >
<panel
class="panel_me_profile"
name="panel_me_profile"
- filename="panel_me_profile.xml"
+ filename="panel_me_profile.xml"
label="Me"
border="true"
/>
- </collapsible_ctrl>
+ </sidetray_tab>
+
+ <!--
+ <sidetray_tab
+ name="sidebar_group"
+ mouse_opaque="false"
+ background_visible="true"
+ bg_opaque_color="0.5 0.5 0.5 1.0"
+ image="icn_voice-groupfocus.tga"
+ tab_title="Groups"
+ description="Manage Groups."
+ >
+ <accordion_tab
+ name="group_accordion"
+ title="Group General"
+ expanded="true"
+ collapsible="true"
+ min_width="200"
+ min_height="200"
+ header_visible="true"
+ >
+ <panel
+ class="panel_group_general"
+ name="panel_group_general"
+ filename="panel_group_general.xml"
+ label="Group"
+ border="true"
+ />
+ </accordion_tab>
+ <accordion_tab
+ name="groupland_accordion"
+ title="Group Land and Money"
+ expanded="false"
+ collapsible="true"
+ min_width="200"
+ min_height="200"
+ header_visible="true"
+ >
+ <panel
+ class="panel_group_land"
+ name="panel_group_land"
+ filename="panel_group_land_money.xml"
+ label="Group"
+ border="true"
+ />
+ </accordion_tab>
+ <accordion_tab
+ name="groupnotices_accordion"
+ title="Group Notices"
+ expanded="false"
+ collapsible="true"
+ min_width="200"
+ min_height="200"
+ header_visible="true"
+ >
+ <panel
+ class="panel_group_roles"
+ name="panel_group_roles"
+ filename="panel_group_roles.xml"
+ label="Group"
+ border="true"
+ />
+ </accordion_tab>
+ <accordion_tab
+ name="grouproles_accordion"
+ title="Group Roles"
+ expanded="false"
+ collapsible="true"
+ min_width="200"
+ min_height="200"
+ header_visible="true"
+ >
+ <panel
+ class="panel_group_roles"
+ name="panel_group_roles"
+ filename="panel_group_roles.xml"
+ label="Group"
+ border="true"
+ />
+ </accordion_tab>
</sidetray_tab>
+
+
+ <sidetray_tab
+ name="sidebar_previews"
+ mouse_opaque="false"
+ background_opaque="false"
+ background_visible="true"
+ bg_opaque_color="0.5 0.5 0.5 1.0"
+ image="icn_voice-groupfocus.tga"
+ tab_title="Previews"
+ description="Previews."
+ >
+ <accordion_tab
+ name="floater_preview_animation"
+ title="Preview Animation"
+ collapsible="true"
+ expanded="false"
+ min_width="200"
+ min_height="200"
+ header_visible="true"
+ >
+ <panel
+ class="floater_preview_animation"
+ name="floater_preview_animation"
+ filename="floater_preview_animation.xml"
+ width="280"
+ height="85"
+ label="Preview_Animation"
+ border="true"
+ />
+ </accordion_tab>
+ <accordion_tab
+ name="floater_preview_gesture"
+ title="Preview Gesture"
+ collapsible="true"
+ expanded="false"
+ min_width="200"
+ min_height="200"
+ header_visible="true"
+ >
+ <panel
+ class="floater_preview_gesture"
+ name="floater_preview_gesture"
+ filename="floater_preview_gesture.xml"
+ width="280"
+ height="400"
+ label="Preview_Gesture"
+ border="true"
+ />
+ </accordion_tab>
+ <accordion_tab
+ name="floater_preview_existing_landmark"
+ title="Preview Existing Landmark"
+ collapsible="true"
+ expanded="false"
+ min_width="200"
+ min_height="200"
+ header_visible="true"
+ >
+ <panel
+ class="floater_preview_existing_landmark"
+ name="floater_preview_existing_landmark"
+ filename="floater_preview_existing_landmark.xml"
+ width="280"
+ height="495"
+ label="Preview_Existing_Landmark"
+ border="true"
+ />
+ </accordion_tab>
+ <accordion_tab
+ name="floater_preview_sound"
+ title="Preview Sound"
+ collapsible="true"
+ expanded="false"
+ min_width="200"
+ min_height="200"
+ header_visible="true"
+ >
+ <panel
+ class="floater_preview_sound"
+ name="floater_preview_sound"
+ filename="floater_preview_sound.xml"
+ width="280"
+ height="85"
+ label="Preview_Sound"
+ border="true"
+ />
+ </accordion_tab>
+ <accordion_tab
+ name="floater_preview_url"
+ title="Preview URL"
+ collapsible="true"
+ expanded="false"
+ min_width="200"
+ min_height="200"
+ header_visible="true"
+ >
+ <panel
+ class="floater_preview_url"
+ name="floater_preview_url"
+ filename="floater_preview_url.xml"
+ width="280"
+ height="465"
+ label="Preview_URL"
+ border="true"
+ />
+ </accordion_tab>
+ <accordion_tab
+ name="floater_URL_entry"
+ title="URL Entry"
+ collapsible="true"
+ expanded="false"
+ min_width="200"
+ min_height="200"
+ header_visible="true"
+ >
+ <panel
+ class="floater_URL_entry"
+ name="floater_URL_entry"
+ filename="floater_URL_entry.xml"
+ width="280"
+ height="87"
+ label="URL_entry"
+ border="true"
+ />
+ </accordion_tab>
+ </sidetray_tab>
+
+ <sidetray_tab
+ name="sidebar_region"
+ mouse_opaque="false"
+ background_opaque="false"
+ background_visible="true"
+ bg_opaque_color="0.5 0.5 0.5 1.0"
+ image="icn_voice-groupfocus.tga"
+ tab_title="Region"
+ description="Region."
+ >
+ <accordion_tab
+ name="panel_region_covenant"
+ title="Region Covenant"
+ collapsible="true"
+ min_width="200"
+ min_height="200"
+ expanded="false"
+ header_visible="true"
+ >
+ <panel
+ class="panel_region_covenant"
+ name="panel_region_covenant"
+ filename="panel_region_covenant.xml"
+ width="280"
+ height="350"
+ label="Panel_Region_Covenant"
+ border="true"
+ />
+ </accordion_tab>
+ <accordion_tab
+ name="panel_region_debug"
+ title="Region Debug"
+ collapsible="true"
+ min_width="200"
+ min_height="200"
+ expanded="false"
+ header_visible="true"
+ >
+ <panel
+ class="panel_region_debug"
+ name="panel_region_debug"
+ filename="panel_region_debug.xml"
+ width="280"
+ height="500"
+ label="Panel_Region_Debug"
+ border="true"
+ />
+ </accordion_tab>
+ <accordion_tab
+ name="panel_region_estate"
+ title="Region Estate"
+ collapsible="true"
+ min_width="200"
+ min_height="200"
+ expanded="false"
+ header_visible="true"
+ >
+ <panel
+ class="panel_region_estate"
+ name="panel_region_estate"
+ filename="panel_region_estate.xml"
+ width="280"
+ height="950"
+ label="Panel_Region_Estate"
+ border="true"
+ />
+ </accordion_tab>
+ <accordion_tab
+ name="panel_region_general"
+ title="Region General"
+ collapsible="true"
+ min_width="200"
+ min_height="200"
+ expanded="false"
+ header_visible="true"
+ >
+ <panel
+ class="panel_region_general"
+ name="panel_region_general"
+ filename="panel_region_general.xml"
+ width="280"
+ height="500"
+ label="Panel_Region_General"
+ border="true"
+ />
+ </accordion_tab>
+ <accordion_tab
+ name="panel_region_terrain"
+ title="Region Terrain"
+ collapsible="true"
+ min_width="200"
+ min_height="200"
+ expanded="false"
+ header_visible="true"
+ >
+ <panel
+ class="panel_region_terrain"
+ name="panel_region_terrain"
+ filename="panel_region_terrain.xml"
+ width="280"
+ height="340"
+ label="Panel_Region_Terrain"
+ border="true"
+ />
+ </accordion_tab>
+ <accordion_tab
+ name="panel_region_texture"
+ title="Region Texture"
+ collapsible="true"
+ min_width="200"
+ min_height="200"
+ expanded="false"
+ header_visible="true"
+ >
+ <panel
+ class="panel_region_texture"
+ name="panel_region_texture"
+ filename="panel_region_texture.xml"
+ width="280"
+ height="575"
+ label="Panel_Region_Texture"
+ border="true"
+ />
+ </accordion_tab>
+ <accordion_tab
+ name="floater_region_info"
+ title="Region Info"
+ collapsible="true"
+ min_width="200"
+ min_height="200"
+ expanded="false"
+ header_visible="true"
+ >
+ <panel
+ class="floater_region_info"
+ name="floater_region_info"
+ filename="floater_region_info.xml"
+ width="280"
+ height="512"
+ label="Floater_Region_Info"
+ border="true"
+ />
+ </accordion_tab>
+ </sidetray_tab>
+
+ <sidetray_tab
+ name="Build"
+ mouse_opaque="false"
+ background_opaque="false"
+ background_visible="true"
+ bg_opaque_color="0.5 0.5 0.5 1.0"
+ image="icn_voice-groupfocus.tga"
+ tab_title="Build"
+ description="Build"
+ >
+ <accordion_tab
+ name="floater_tools"
+ title="Tools"
+ collapsible="true"
+ min_width="200"
+ min_height="200"
+ expanded="false"
+ header_visible="true"
+ >
+ <panel
+ class="floater_tools"
+ name="floater_tools"
+ filename="floater_tools.xml"
+ width="280"
+ height="550"
+ label="Tools"
+ border="true"
+ />
+ </accordion_tab>
+ <accordion_tab
+ name="floater_bulk_perms"
+ title="Bulk Perms"
+ collapsible="true"
+ min_width="200"
+ min_height="200"
+ expanded="false"
+ header_visible="true"
+ >
+ <panel
+ class="floater_bulk_perms"
+ name="floater_bulk_perms"
+ filename="floater_bulk_perms.xml"
+ width="280"
+ height="360"
+ label="Tools"
+ border="true"
+ />
+ </accordion_tab>
+ <accordion_tab
+ name="floater_build_options"
+ title="Build Options"
+ collapsible="true"
+ min_width="200"
+ min_height="200"
+ expanded="false"
+ header_visible="true"
+ >
+ <panel
+ class="floater_build_options"
+ name="floater_build_options"
+ filename="floater_build_options.xml"
+ width="280"
+ height="151"
+ label="Tools"
+ border="true"
+ />
+ </accordion_tab>
+
+ </sidetray_tab>
+
+ <sidetray_tab
+ name="othertools"
+ mouse_opaque="false"
+ background_opaque="false"
+ background_visible="true"
+ bg_opaque_color="0.5 0.5 0.5 1.0"
+ image="icn_voice-groupfocus.tga"
+ tab_title="Other Tools"
+ description="Other Tools"
+ >
+ <accordion_tab
+ name="floater_gesture"
+ title="Gestures"
+ collapsible="true"
+ min_width="200"
+ min_height="200"
+ expanded="false"
+ header_visible="true"
+ >
+ <panel
+ class="floater_gesture"
+ name="floater_gesture"
+ filename="floater_gesture.xml"
+ width="280"
+ height="465"
+ label="Gesture"
+ border="true"
+ />
+ </accordion_tab>
+
+ <accordion_tab
+ name="floater_buy_contents"
+ title="Buy Contents"
+ collapsible="true"
+ min_width="200"
+ min_height="200"
+ expanded="false"
+ header_visible="true"
+ >
+ <panel
+ class="floater_buy_contents"
+ name="floater_buy_contents"
+ filename="floater_buy_contents.xml"
+ width="280"
+ height="250"
+ label="buy_contents"
+ border="true"
+ />
+ </accordion_tab>
+ <accordion_tab
+ name="floater_buy_object"
+ title="Buy Object"
+ collapsible="true"
+ min_width="200"
+ min_height="200"
+ expanded="false"
+ header_visible="true"
+ >
+ <panel
+ class="floater_buy_object"
+ name="floater_buy_object"
+ filename="floater_buy_object.xml"
+ width="280"
+ height="250"
+ label="buy_object"
+ border="true"
+ />
+ </collapsible_ctrl>
+ <accordion_tab
+ name="floater_inventory_view_finder"
+ title="Inventory View Finder"
+ collapsible="true"
+ min_width="200"
+ min_height="200"
+ expanded="false"
+ header_visible="true"
+ >
+ <panel
+ class="floater_inventory_view_finder"
+ name="floater_inventory_view_finder"
+ filename="floater_inventory_view_finder.xml"
+ width="280"
+ height="408"
+ label="view_finder"
+ border="true"
+ />
+ </accordion_tab>
+ <accordion_tab
+ name="floater_mute"
+ title="Mute"
+ collapsible="true"
+ min_width="200"
+ min_height="200"
+ expanded="false"
+ header_visible="true"
+ >
+ <panel
+ class="floater_mute"
+ name="floater_mute"
+ filename="floater_mute.xml"
+ width="280"
+ height="300"
+ label="mute"
+ border="true"
+ />
+ </accordion_tab>
+ <accordion_tab
+ name="floater_sell_land"
+ title="Sell Land"
+ collapsible="true"
+ min_width="200"
+ min_height="200"
+ expanded="false"
+ header_visible="true"
+ >
+ <panel
+ class="floater_sell_land"
+ name="floater_sell_land"
+ filename="floater_sell_land.xml"
+ width="280"
+ height="600"
+ label="sell_land"
+ border="true"
+ />
+ </accordion_tab>
+ <accordion_tab
+ name="floater_telehub"
+ title="Telehub"
+ collapsible="true"
+ min_width="200"
+ min_height="200"
+ expanded="false"
+ header_visible="true"
+ >
+ <panel
+ class="floater_telehub"
+ name="floater_telehub"
+ filename="floater_telehub.xml"
+ width="280"
+ height="250"
+ label="telehub"
+ border="true"
+ />
+ </accordion_tab>
+
+ </sidetray_tab>
+ -->
</side_tray>
diff --git a/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml b/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml
new file mode 100644
index 0000000000..a85662603d
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<!-- All our XML is utf-8 encoded. -->
+
+<panel
+ name="home_tab"
+ title="home_tab"
+ visible="true"
+ width="300"
+ height="420"
+ background_opaque="false"
+ background_visible="true"
+ bevel_style="in"
+ follows="left|top|right|bottom">
+ <panel
+ left="10" width="280" height="130"
+ background_visible="true"
+ background_opaque="false"
+ bg_alpha_color="0.3 0.3 0.3 1.0"
+ name="sidebar_people"
+ follows="left|top|right"
+ class="panel_sidetray_home_info">
+ <text
+ top="-10" width="200" left="5" height="30" follows="left|right|top"
+ font="SansSerifHugeBold" text_color="white" word_wrap="true"
+ mouse_opaque="false" name="tab_name" >
+ People
+ </text>
+ <icon
+ top="-10" right="-10" width="20" height="20" follows="top|right"
+ color="1 1 1 1" enabled="true" image_name="icn_voice-groupfocus.tga"
+ mouse_opaque="false" name="tab_icon"/>
+ <text
+ top="-40" left="10" right="-10" height="120" follows="left|right|bottom"
+ font="SansSerifBig" text_color="white" word_wrap="true"
+ mouse_opaque="false" name="tab_description" >
+ Find your friends, contacts and people nearby.
+ </text>
+ </panel>
+ <panel
+ left="10" width="280" height="130"
+ background_visible="true"
+ background_opaque="false"
+ bg_alpha_color="0.3 0.3 0.3 1.0"
+ name="sidebar_places"
+ follows="left|top|right"
+ class="panel_sidetray_home_info">
+ <text
+ top="-10" width="200" left="5" height="30" follows="left|right|top"
+ font="SansSerifHugeBold" text_color="white" word_wrap="true"
+ mouse_opaque="false" name="tab_name" >
+ Places
+ </text>
+ <icon
+ top="-10" right="-10" width="20" height="20" follows="top|right"
+ color="1 1 1 1" enabled="true" image_name="inv_item_landmark.tga"
+ mouse_opaque="false" name="tab_icon"/>
+ <text
+ top="-40" left="10" right="-10" height="120" follows="left|right|bottom|top"
+ font="SansSerifBig" text_color="white" word_wrap="true"
+ mouse_opaque="false" name="tab_description" >
+ Find your friends, contacts and people nearby.
+ </text>
+ </panel>
+ <panel
+ left="10" width="280" height="130"
+ background_visible="true"
+ background_opaque="false"
+ bg_alpha_color="0.3 0.3 0.3 1.0"
+ name="sidebar_me"
+ follows="left|top|right"
+ class="panel_sidetray_home_info">
+ <text
+ top="-10" width="200" left="5" height="30" follows="left|right|top"
+ font="SansSerifHugeBold" text_color="white" word_wrap="true"
+ mouse_opaque="false" name="tab_name" >
+ Me
+ </text>
+ <icon
+ top="-10" right="-10" width="20" height="20" follows="top|right"
+ color="1 1 1 1" enabled="true" image_name="icn_voice-pvtfocus.tga"
+ mouse_opaque="false" name="tab_icon"/>
+ <text
+ top="-40" left="10" right="-10" height="120" follows="left|right|bottom"
+ font="SansSerifBig" text_color="white" word_wrap="true"
+ mouse_opaque="false" name="tab_description" >
+ Change your profile, your look and quick links to your outfits.
+ </text>
+ </panel>
+</panel>
+ \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml
index 3709514147..9bf401d817 100644
--- a/indra/newview/skins/default/xui/en/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml
@@ -41,7 +41,7 @@
font="SansSerifSmall"
height="16"
layout="topleft"
- left="-130"
+ left="-150"
name="buycurrency"
picture_style="true"
tool_tip="Account Balance / Buy currency"
@@ -61,7 +61,7 @@
tool_tip="Current Time (Pacific)"
top_delta="-1"
v_pad="2"
- width="60">
+ width="80">
12:00 AM
</text>
<button
@@ -70,7 +70,7 @@
image_selected="status_script_debug.tga"
image_unselected="status_script_debug.tga"
layout="topleft"
- left_delta="-557"
+ left_delta="-537"
name="scriptout"
picture_style="true"
scale_image="false"
diff --git a/indra/newview/skins/default/xui/en/panel_teleport_history.xml b/indra/newview/skins/default/xui/en/panel_teleport_history.xml
index b7ce812dc8..05ebcbb50b 100644
--- a/indra/newview/skins/default/xui/en/panel_teleport_history.xml
+++ b/indra/newview/skins/default/xui/en/panel_teleport_history.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel name="Teleport History" bottom="0" height="326" left="0" width="380"
border="true" follows="left|top|right|bottom">
- <scroll_list bottom="0" can_resize="true" column_padding="0" draw_heading="true"
+ <scroll_list bottom="0" column_padding="0" draw_heading="true"
draw_stripes="false" follows="left|top|bottom|right" left="0"
multi_select="false" name="history_items" search_column="1"
sort_column="1" height="326" width="380" >
<column name="landmark_icon" width="20" />
- <column dynamicwidth="true" label="Region" name="region" />
+ <column dynamic_width="true" label="Region" name="region" />
<column name="index" width="0" />
</scroll_list>
</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_toast.xml b/indra/newview/skins/default/xui/en/panel_toast.xml
new file mode 100644
index 0000000000..ba4915e074
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_toast.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<!-- All our XML is utf-8 encoded. -->
+
+<panel
+ name="toast"
+ title="toast"
+ visible="false"
+ layout="topleft"
+ width="350"
+ height="72"
+ left="100"
+ top="500"
+ follows="right|bottom"
+ background_opaque="true"
+ background_visible="true"
+ bevel_style="in"
+ bg_alpha_color="0.3 0.3 0.3 1.0">
+
+ <text
+ visible="false"
+ follows="left|top|right|bottom"
+ font="SansSerifBold"
+ height="40"
+ layout="topleft"
+ left="60"
+ name="toast_text"
+ word_wrap="true"
+ text_color="white"
+ top="20"
+ width="290">
+ Toast text;
+ </text>
+ <icon
+ top="20"
+ left="10"
+ width="32"
+ height="32"
+ follows="top|left"
+ layout="topleft"
+ visible="false"
+ color="1 1 1 1"
+ enabled="true"
+ image_name="notify_tip_icon.tga"
+ mouse_opaque="true"
+ name="icon"
+ />
+ <button
+ layout="topleft"
+ top="-5"
+ left="335"
+ width="20"
+ height="20"
+ follows="top|right"
+ visible="false"
+ enabled="true"
+ mouse_opaque="true"
+ name="hide_btn"
+ label=""
+ image_unselected="toast_hide_btn.tga"
+ image_disabled="toast_hide_btn.tga"
+ image_selected="toast_hide_btn.tga"
+ image_hover_selected="toast_hide_btn.tga"
+ image_disabled_selected="toast_hide_btn.tga"
+ />
+</panel>
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 58bb16581a..e5665b0194 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -76,12 +76,14 @@
<string name="TooltipAltRight">Alt-Right arrow for next tab</string>
<!-- ButtonToolTips, llfloater.cpp -->
- <string name="BUTTON_CLOSE_DARWIN">Close (Cmd-W)</string>
+ <string name="BUTTON_CLOSE_DARWIN">Close (&#8984;-W)</string>
<string name="BUTTON_CLOSE_WIN">Close (Ctrl-W)</string>
<string name="BUTTON_RESTORE">Restore</string>
<string name="BUTTON_MINIMIZE">Minimize</string>
<string name="BUTTON_TEAR_OFF">Tear Off</string>
<string name="BUTTON_EDIT">Edit</string>
+ <string name="BUTTON_DOCK">Dock</string>
+ <string name="BUTTON_UNDOCK">Undock</string>
<!-- searching - generic -->
<string name="Searching">Searching...</string>
@@ -152,7 +154,7 @@
<string name="AvatarEditingAppearance">(Editing Appearance)</string>
<string name="AvatarAway">Away</string>
<string name="AvatarBusy">Busy</string>
- <string name="AvatarMuted">Muted</string>
+ <string name="AvatarMuted">Blocked</string>
<!-- animations -->
<string name="anim_express_afraid">Afraid</string>
@@ -341,36 +343,41 @@
You do not have a copy of
this texture in your inventory
</string>
- <string name="no_transfer"> (no transfer)</string>
- <string name="no_modify"> (no modify)</string>
- <string name="no_copy"> (no copy)</string>
- <string name="worn"> (worn)</string>
+ <!-- use value="" because they have preceding spaces -->
+ <string name="no_transfer" value=" (no transfer)" />
+ <string name="no_modify" value=" (no modify)" />
+ <string name="no_copy" value=" (no copy)" />
+ <string name="worn" value=" (worn)" />
+ <string name="link" value=" (link)" />
+ <string name="broken_link" value=" (broken_link)" />
<string name="LoadingContents">Loading contents...</string>
<string name="NoContents">No contents</string>
<!-- Gestures labels -->
- <string name="Chat"> Chat : </string>
- <string name="Sound"> Sound : </string>
- <string name="Wait"> --- Wait : </string>
- <string name="AnimFlagStop"> Stop Animation : </string>
- <string name="AnimFlagStart"> Start Animation : </string>
- <string name="Wave"> Wave </string>
- <string name="HelloAvatar"> Hello, avatar! </string>
+ <!-- use value="" because they have preceding spaces -->
+ <string name="Chat" value=" Chat : " />
+ <string name="Sound" value=" Sound : " />
+ <string name="Wait" value=" --- Wait : " />
+ <string name="AnimFlagStop" value=" Stop Animation : " />
+ <string name="AnimFlagStart" value=" Start Animation : " />
+ <string name="Wave" value=" Wave " />
+ <string name="HelloAvatar" value=" Hello, avatar! " />
<!-- inventory filter -->
- <string name="Animations"> Animations,</string>
- <string name="Calling Cards"> Calling Cards,</string>
- <string name="Clothing"> Clothing,</string>
- <string name="Gestures"> Gestures,</string>
- <string name="Landmarks"> Landmarks,</string>
- <string name="Notecards"> Notecards,</string>
- <string name="Objects"> Objects,</string>
- <string name="Scripts"> Scripts,</string>
- <string name="Sounds"> Sounds,</string>
- <string name="Textures"> Textures,</string>
- <string name="Snapshots"> Snapshots,</string>
- <string name="No Filters"> No </string>
- <string name="Since Logoff"> - Since Logoff</string>
+ <!-- use value="" because they have preceding spaces -->
+ <string name="Animations" value=" Animations," />
+ <string name="Calling Cards" value=" Calling Cards," />
+ <string name="Clothing" value=" Clothing," />
+ <string name="Gestures" value=" Gestures," />
+ <string name="Landmarks" value=" Landmarks," />
+ <string name="Notecards" value=" Notecards," />
+ <string name="Objects" value=" Objects," />
+ <string name="Scripts" value=" Scripts," />
+ <string name="Sounds" value=" Sounds," />
+ <string name="Textures" value=" Textures," />
+ <string name="Snapshots" value=" Snapshots," />
+ <string name="No Filters" value="No " />
+ <string name="Since Logoff" value=" - Since Logoff" />
<!-- inventory folder -->
<string name="InvFolder My Inventory">My Inventory</string>
@@ -397,10 +404,6 @@ this texture in your inventory
<string name="InvFolder favorite">Favorites</string>
<!-- inventory FVBridge -->
- <string name="NO_COPY"> (no copy)</string>
- <string name="NO_MOD"> (no modify)</string>
- <string name="NO_XFER"> (no transfer)</string>
-
<string name="Buy">Buy</string>
<string name="BuyforL$">Buy for L$</string>
@@ -486,13 +489,11 @@ this texture in your inventory
<!-- groups -->
<string name="GroupsNone">none</string>
- <string name="Group"> (group)</string>
+ <string name="Group" value=" (group)" />
<string name="Unknown">(Unknown)</string>
- <string name="SummaryForTheWeek">Summary for this week, beginning on </string>
- <string name="NextStipendDay">The next stipend day is </string>
- <string name="GroupIndividualShare"> Group Individual Share
-
- </string>
+ <string name="SummaryForTheWeek" value="Summary for this week, beginning on " />
+ <string name="NextStipendDay" value="The next stipend day is " />
+ <string name="GroupIndividualShare" value=" Group Individual Share" />
<string name="Balance">Balance</string>
<string name="Credits">Credits</string>
<string name="Debits">Debits</string>
@@ -544,8 +545,8 @@ you managed for [OWNER]
<string name="RegionNoCovenant">There is no Covenant provided for this Estate.</string>
<string name="RegionNoCovenantOtherOwner">There is no Covenant provided for this Estate. The land on this estate is being sold by the Estate owner, not Linden Lab. Please contact the Estate Owner for sales details.</string>
<string name="covenant_last_modified">Last Modified:</string>
- <string name="none_text"> (none) </string>
- <string name="never_text"> (never) </string>
+ <string name="none_text" value=" (none) " />
+ <string name="never_text" value=" (never) " />
<!--Region Details-->
<string name="GroupOwned">Group Owned</string>
@@ -651,6 +652,7 @@ Expected .wav, .tga, .bmp, .jpg, .jpeg, or .bvh
<string name="Stage">Stage</string>
<string name="Other">Other</string>
<string name="Any">Any</string>
+ <string name="You">You</string>
<!-- puncutations -->
<string name=":">:</string>
@@ -775,7 +777,6 @@ If you continue to receive this message, contact customer support.
<string name="LTimeHour">hour,datetime,local</string>
<string name="LTimeMin">min,datetime,local</string>
<string name="LTimeYear">year,datetime,local</string>
- <string name="LTimeSec">second,datetime,local</string>
<string name="UTCTimeWeek">weekday,datetime,utc</string>
<string name="UTCTimeDay">day,datetime,utc</string>
@@ -785,4 +786,6 @@ If you continue to receive this message, contact customer support.
<string name="UTCTimeMin">min,datetime,utc</string>
<string name="UTCTimeSec">second,datetime,utc</string>
<string name="UTCTimeTimezone">timezone,datetime,utc</string>
+
+
</strings>
diff --git a/indra/newview/skins/default/xui/en/widgets/button.xml b/indra/newview/skins/default/xui/en/widgets/button.xml
index a1e074fae2..3e7e07749a 100644
--- a/indra/newview/skins/default/xui/en/widgets/button.xml
+++ b/indra/newview/skins/default/xui/en/widgets/button.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<button image_unselected="button_enabled_32x128.tga"
- image_selected="button_enabled_selected_32x128.tga"
- image_disabled_selected="button_disabled_32x128.tga"
- image_disabled="button_disabled_32x128.tga"
+<button image_unselected="PushButton_Off"
+ image_selected="PushButton_Selected"
+ image_disabled_selected="PushButton_Selected_Disabled"
+ image_disabled="PushButton_Disabled"
label_color="ButtonLabelColor"
label_color_selected="ButtonLabelSelectedColor"
label_color_disabled="ButtonLabelDisabledColor"
diff --git a/indra/newview/skins/default/xui/en/widgets/check_box.xml b/indra/newview/skins/default/xui/en/widgets/check_box.xml
index ff01dcebd8..97060fb161 100644
--- a/indra/newview/skins/default/xui/en/widgets/check_box.xml
+++ b/indra/newview/skins/default/xui/en/widgets/check_box.xml
@@ -3,16 +3,15 @@
text_disabled_color="LabelDisabledColor"
font="SansSerifSmall"
follows="left|top">
- <check_box.label_text name="checkbox label"/>
+ <check_box.label_text name="checkbox label" />
<check_box.check_button name="CheckboxCtrl Button"
- commit_on_return="false"
+ commit_on_return="false"
label=""
is_toggle="true"
- hover_glow_amount="0.35"
font="SansSerif"
scale_image="false"
- image_unselected="checkbox_enabled_false.tga"
- image_selected="checkbox_enabled_true.tga"
- image_disabled="checkbox_disabled_false.tga"
- image_disabled_selected="checkbox_disabled_true.tga"/>
+ image_unselected="Checkbox_Off"
+ image_selected="Checkbox_On"
+ image_disabled="Checkbox_Off_Disabled"
+ image_disabled_selected="Checkbox_On_Disabled" />
</check_box>
diff --git a/indra/newview/skins/default/xui/en/widgets/color_swatch.xml b/indra/newview/skins/default/xui/en/widgets/color_swatch.xml
index 304eda2d97..178c890c61 100644
--- a/indra/newview/skins/default/xui/en/widgets/color_swatch.xml
+++ b/indra/newview/skins/default/xui/en/widgets/color_swatch.xml
@@ -5,6 +5,4 @@
<color_swatch.caption_text name="caption"
font="SansSerifSmall"
follows="left|right|bottom"/>
- <color_swatch.border name="border"
- bevel_type="in"/>
</color_swatch>
diff --git a/indra/newview/skins/default/xui/en/widgets/combo_box.xml b/indra/newview/skins/default/xui/en/widgets/combo_box.xml
index 8a8f3f7f2c..a042a61a26 100644
--- a/indra/newview/skins/default/xui/en/widgets/combo_box.xml
+++ b/indra/newview/skins/default/xui/en/widgets/combo_box.xml
@@ -1,22 +1,29 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<combo_box font="SansSerifSmall"
- arrow_image="combobox_arrow.tga"
- list_position="below"
- max_chars="20"
- follows="left|top">
+ list_position="below"
+ max_chars="20"
+ follows="right|top">
<combo_box.combo_button name="Combobox Button"
+ label=""
hover_glow_amount="0.15"
font="SansSerifSmall"
- halign="left"
scale_image="true"
- image_unselected="square_btn_32x128.tga"
- image_selected="square_btn_selected_32x128.tga"
- image_disabled="square_btn_32x128.tga"
- image_disabled_selected="square_btn_selected_32x128.tga"
- image_overlay="combobox_arrow.tga"
- image_overlay_alignment="right"/>
- <combo_box.combo_list bg_writeable_color="white"/>
+ image_unselected="ComboButton_Off"
+ image_selected="ComboButton_Selected"
+ image_disabled="ComboButton_Disabled"
+ image_disabled_selected="ComboButton_Disabled_Selected" />
+ <combo_box.drop_down_button name="Drop Down Button"
+ label=""
+ hover_glow_amount="0.15"
+ font="SansSerifSmall"
+ scale_image="true"
+ pad_right="24"
+ image_unselected="DropDown_Off"
+ image_selected="DropDown_Selected"
+ image_disabled="DropDown_Disabled"
+ image_disabled_selected="DropDown_Disabled_Selected" />
+ <combo_box.combo_list bg_writeable_color="MenuDefaultBgColor" />
<combo_box.combo_editor name="Combo Text Entry"
select_on_focus="true"
- font="SansSerifSmall"/>
+ font="SansSerifSmall" />
</combo_box>
diff --git a/indra/newview/skins/default/xui/en/widgets/drop_down.xml b/indra/newview/skins/default/xui/en/widgets/drop_down.xml
index c35d15ec92..602250ace6 100644
--- a/indra/newview/skins/default/xui/en/widgets/drop_down.xml
+++ b/indra/newview/skins/default/xui/en/widgets/drop_down.xml
@@ -2,19 +2,19 @@
<drop_down text_enabled_color="LabelTextColor"
text_disabled_color="LabelDisabledColor"
font="SansSerifSmall"
- allow_text_entry="false"
+ allow_text_entry="false"
follows="left|top">
<drop_down.combo_button name="Combobox Button"
hover_glow_amount="0.15"
font="SansSerifSmall"
halign="left"
scale_image="true"
- image_unselected="square_btn_32x128.tga"
- image_selected="square_btn_selected_32x128.tga"
- image_disabled="square_btn_32x128.tga"
- image_disabled_selected="square_btn_selected_32x128.tga"
- image_overlay="combobox_arrow.tga"
- image_overlay_alignment="right"/>
- <drop_down.combo_list bg_writeable_color="white"/>
- <drop_down.combo_editor name="Combo Text Entry" visible="false" select_on_focus="true"/>
+ image_unselected="PushButton_Off"
+ image_selected="PushButton_Selected"
+ image_disabled="PushButton_Disabled"
+ image_disabled_selected="PushButton_Disabled_Selected"
+ image_overlay="Combobox_Over"
+ image_overlay_alignment="right" />
+ <drop_down.combo_list bg_writeable_color="white" />
+ <drop_down.combo_editor name="Combo Text Entry" visible="false" select_on_focus="true" />
</drop_down>
diff --git a/indra/newview/skins/default/xui/en/widgets/filter_editor.xml b/indra/newview/skins/default/xui/en/widgets/filter_editor.xml
new file mode 100644
index 0000000000..f77aa396ec
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/widgets/filter_editor.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<filter_editor select_on_focus="true"
+ background="TextField_Search_Off" >
+ <clear_filter_button label=""
+ image_unselected="Icon_Close_Foreground"
+ image_selected="Icon_Close_Press" />
+</filter_editor>
diff --git a/indra/newview/skins/default/xui/en/widgets/flyout_button.xml b/indra/newview/skins/default/xui/en/widgets/flyout_button.xml
index e0033058c8..a5043c5c14 100644
--- a/indra/newview/skins/default/xui/en/widgets/flyout_button.xml
+++ b/indra/newview/skins/default/xui/en/widgets/flyout_button.xml
@@ -1,13 +1,12 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<flyout_button list_position="below">
<action_button scale_image="true"
- image_selected="flyout_btn_left_selected.tga"
- image_unselected="flyout_btn_left.tga"
- image_disabled="flyout_btn_left_disabled.tga"/>
- <combo_button image_selected="flyout_btn_right_selected.tga"
- image_unselected="flyout_btn_right.tga"
- image_disabled="flyout_btn_right_disabled.tga"
+ image_selected="SegmentedBtn_Left_Selected"
+ image_unselected="SegmentedBtn_Left_Off"
+ image_disabled="SegmentedBtn_Left_Disabled"/>
+ <combo_button image_selected="ComboButton_Selected"
+ image_unselected="ComboButton_Off"
+ image_disabled="ComboButton_Disabled"
pad_right="6"
tab_stop="false"/>
-</flyout_button>
-
+</flyout_button> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/widgets/gesture_combo_box.xml b/indra/newview/skins/default/xui/en/widgets/gesture_combo_box.xml
new file mode 100644
index 0000000000..45b1e1eb9f
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/widgets/gesture_combo_box.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<combo_box font="SansSerifSmall"
+ list_position="below"
+ max_chars="20"
+ follows="right|top">
+ <combo_box.combo_button name="Combobox Button"
+ label=""
+ hover_glow_amount="0.15"
+ font="SansSerifSmall"
+ scale_image="true"
+ image_unselected="ComboButton_Off"
+ image_selected="ComboButton_Selected"
+ image_disabled="ComboButton_Disabled"
+ image_disabled_selected="ComboButton_Disabled_Selected" />
+ <combo_box.drop_down_button name="Drop Down Button"
+ label=""
+ hover_glow_amount="0.15"
+ font="SansSerifSmall"
+ scale_image="true"
+ pad_right="24"
+ image_unselected="DropDown_Off"
+ image_selected="DropDown_Selected"
+ image_disabled="DropDown_Disabled"
+ image_disabled_selected="DropDown_Disabled_Selected" />
+ <combo_box.combo_list bg_writeable_color="white" />
+ <combo_box.combo_editor name="Combo Text Entry"
+ select_on_focus="true"
+ font="SansSerifSmall" />
+</combo_box>
diff --git a/indra/newview/skins/default/xui/en/widgets/line_editor.xml b/indra/newview/skins/default/xui/en/widgets/line_editor.xml
index 11081ae308..08205cacbc 100644
--- a/indra/newview/skins/default/xui/en/widgets/line_editor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/line_editor.xml
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<line_editor background_image="sm_rounded_corners_simple.tga"
+<line_editor
+ background_image="TextField_Off"
+ background_image_disabled="TextField_Disabled"
+ background_image_focused="TextField_Active"
select_on_focus="false"
handle_edit_keys_directly="false"
commit_on_focus_lost="true"
ignore_tab="true"
cursor_color="TextCursorColor"
text_color="TextFgColor"
- text_readonly_color="TextFgReadOnlyColor"
+ text_readonly_color="Green"
text_tentative_color="TextFgTentativeColor"
- bg_readonly_color="TextBgReadOnlyColor"
- bg_writeable_color="TextBgWriteableColor"
- bg_focus_color="TextBgFocusColor"
+ highlight_color="EmphasisColor"
+ preedit_bg_color="White"
mouse_opaque="true"
name="line_editor"
font="SansSerifSmall">
- <line_editor.border bevel_style="in"/>
</line_editor>
diff --git a/indra/newview/skins/default/xui/en/widgets/list_view.xml b/indra/newview/skins/default/xui/en/widgets/list_view.xml
new file mode 100644
index 0000000000..c66aeb57a0
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/widgets/list_view.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<list_view
+ fg_selected_color="ListViewSelectedFgColor"
+ bg_selected_color="ListViewSelectedBgColor"
+ bg_color="ListViewBgColor"
+ />
diff --git a/indra/newview/skins/default/xui/en/widgets/location_input.xml b/indra/newview/skins/default/xui/en/widgets/location_input.xml
index 32f5a18d1c..eb9bb99b20 100644
--- a/indra/newview/skins/default/xui/en/widgets/location_input.xml
+++ b/indra/newview/skins/default/xui/en/widgets/location_input.xml
@@ -3,64 +3,48 @@
*TODO: Replace hardcoded buttons width/height with getting this info from the button images.
Currently that doesn't work because LLUIImage::getWidth/getHeight() return 1 for the images.
-->
+
+
+
<location_input font="SansSerifSmall"
- add_landmark_image_enabled="icon_event_adult.tga"
- add_landmark_image_disabled="icon_event.tga"
- add_landmark_hpad="4"
- allow_text_entry="true"
- arrow_image="combobox_arrow.tga"
- list_position="below"
- show_text_as_tentative="false"
- max_chars="20"
- follows="left|top">
- <location_input.background name="Background"
- visible="true"
- label=""
- follows="left|top|right"
- image_unselected="navbar_bg_center.tga"
- image_selected="navbar_bg_center.tga"
- image_disabled="navbar_bg_center.tga"
- image_disabled_selected="navbar_bg_center.tga"
- image_hover_selected="navbar_bg_center.tga"
- image_hover_unselected="navbar_bg_center.tga" />
- <location_input.info_button name="Place Information"
+ add_landmark_image_enabled="Favorite_Star_Active"
+ add_landmark_image_disabled="Favorite_Star_Off"
+ hover_glow_amount="0.15"
+ add_landmark_hpad="2"
+ allow_text_entry="true"
+ list_position="below"
+ show_text_as_tentative="false"
+ max_chars="20"
+ follows="left|top"
+ >
+ <info_button name="Place Information"
label=""
tool_tip="About current location"
- width="20"
- height="20"
+ width="16"
+ height="16"
follows="left|top"
- image_overlay="map_infohub.tga"
- image_unselected="navbar_bg_left.tga"
- image_selected="navbar_bg_left.tga"
- image_hover_selected="navbar_bg_left.tga"
- image_hover_unselected="navbar_bg_left.tga"
- image_disabled_selected="navbar_bg_left.tga"
- image_disabled="navbar_bg_left.tga" />
- <location_input.add_landmark_button name="Add Landmark"
+ hover_glow_amount="0.15"
+ image_unselected="Info_Off"
+ image_selected="Info_Off"
+ image_disabled_selected="Info_Off"
+ image_disabled="Info_Off" />
+ <add_landmark_button name="Add Landmark"
label=""
width="16"
height="16"
tool_tip="Add to My Landmarks"
follows="right|top"
scale_image="false" />
- <location_input.combo_button name="Location History"
+ <combo_button name="Location History"
label=""
- tool_tip="My Location History"
- width="20"
- height="20"
- image_overlay="navbar_history.tga"
- image_overlay_alignment="center"
- image_unselected="navbar_bg_right.tga"
- image_selected="navbar_bg_right.tga"
- image_disabled="navbar_bg_right.tga"
- image_disabled_selected="navbar_bg_right.tga"
- image_hover_selected="navbar_bg_right.tga"
- image_hover_unselected="navbar_bg_right.tga" />
- <location_input.combo_list bg_writeable_color="white"/>
- <location_input.combo_editor name="Combo Text Entry"
- select_on_focus="true"
- font="SansSerifSmall"
- bevel_style="none"
- border_style="line"
- border_thickness="0" />
+ pad_right="0"
+ tool_tip="My Location History"/>
+ <combo_list bg_writeable_color="MenuDefaultBgColor"/>
+ <combo_editor name="Combo Text Entry"
+ text_pad_left="20"
+ select_on_focus="true"
+ font="SansSerifSmall"
+ bevel_style="none"
+ border_style="line"
+ border.border_thickness="0"/>
</location_input>
diff --git a/indra/newview/skins/default/xui/en/widgets/output_monitor.xml b/indra/newview/skins/default/xui/en/widgets/output_monitor.xml
new file mode 100644
index 0000000000..2f6d808125
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/widgets/output_monitor.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<output_monitor
+ image_mute="mute_icon.tga"
+ image_off="icn_voice_ptt-off.tga"
+ image_on="icn_voice_ptt-on.tga"
+ image_level_1="icn_voice_ptt-on-lvl1.tga"
+ image_level_2="icn_voice_ptt-on-lvl2.tga"
+ image_level_3="icn_voice_ptt-on-lvl3.tga"
+ />
diff --git a/indra/newview/skins/default/xui/en/widgets/progress_bar.xml b/indra/newview/skins/default/xui/en/widgets/progress_bar.xml
index 3344de06b0..39cd464872 100644
--- a/indra/newview/skins/default/xui/en/widgets/progress_bar.xml
+++ b/indra/newview/skins/default/xui/en/widgets/progress_bar.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<progress_bar image_bar="rounded_square.tga"
- image_fill="progressbar_fill.tga"
+<progress_bar image_bar="ProgressTrack"
+ image_fill="ProgressBar"
image_shadow="rounded_square_soft.tga"
color_bar.red="0.5764"
color_bar.green="0.6627"
diff --git a/indra/newview/skins/default/xui/en/widgets/radio_group.xml b/indra/newview/skins/default/xui/en/widgets/radio_group.xml
index 2d851042a5..ad7ef5bffc 100644
--- a/indra/newview/skins/default/xui/en/widgets/radio_group.xml
+++ b/indra/newview/skins/default/xui/en/widgets/radio_group.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<radio_group draw_border="true"
+<radio_group draw_border="false"
name="radio_group"
- mouse_opaque="true"
+ mouse_opaque="false"
follows="left|top"
font="SansSerifSmall"/>
diff --git a/indra/newview/skins/default/xui/en/widgets/radio_item.xml b/indra/newview/skins/default/xui/en/widgets/radio_item.xml
index 0a27ca509b..281a55d5e2 100644
--- a/indra/newview/skins/default/xui/en/widgets/radio_item.xml
+++ b/indra/newview/skins/default/xui/en/widgets/radio_item.xml
@@ -2,8 +2,9 @@
<radio_item follows="left|top">
<radio_item.label_text name="Radio Item label"/>
<radio_item.check_button name="Radio control button"
- image_unselected="radio_active_false.tga"
- image_selected="radio_active_true.tga"
- image_disabled="radio_inactive_false.tga"
- image_disabled_selected="radio_inactive_true.tga"/>
+ image_unselected="RadioButton_Off"
+ image_selected="RadioButton_On"
+ image_disabled="RadioButton_Disabled"
+ image_disabled_selected="RadioButton_On_Disabled"/>
</radio_item>
+
diff --git a/indra/newview/skins/default/xui/en/widgets/scroll_bar.xml b/indra/newview/skins/default/xui/en/widgets/scroll_bar.xml
index a6c9a56dfd..3b195c6b33 100644
--- a/indra/newview/skins/default/xui/en/widgets/scroll_bar.xml
+++ b/indra/newview/skins/default/xui/en/widgets/scroll_bar.xml
@@ -1,19 +1,23 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<scroll_bar thumb_image="rounded_square.tga"
- track_image="rounded_square.tga"
- track_color="ScrollbarTrackColor"
+<scroll_bar thumb_image="ScrollThumb_Vert"
+ track_image="ScrollTrack_Vert"
+ track_color="ScrollbarTrackColor"
thumb_color="ScrollbarThumbColor"
- thickness="16">
- <up_button image_unselected="scrollbutton_up_out_blue.tga"
- image_selected="scrollbutton_up_in_blue.tga"
- scale_image="true"/>
- <down_button image_unselected="scrollbutton_down_out_blue.tga"
- image_selected="scrollbutton_down_in_blue.tga"
- scale_image="true"/>
- <left_button image_unselected="scrollbutton_left_out_blue.tga"
- image_selected="scrollbutton_left_in_blue.tga"
- scale_image="true"/>
- <right_button image_unselected="scrollbutton_right_out_blue.tga"
- image_selected="scrollbutton_right_in_blue.tga"
- scale_image="true"/>
+ thickness="15">
+ <up_button image_unselected="ScrollArrow_Up"
+ image_selected="ScrollArrow_Up"
+ scale_image="true" thickness="15"
+ hover_glow_amount="0.15"/>
+ <down_button image_unselected="ScrollArrow_Down"
+ image_selected="ScrollArrow_Down"
+ scale_image="true" thickness="15"
+ hover_glow_amount="0.15"/>
+ <left_button image_unselected="ScrollArrow_Left"
+ image_selected="ScrollArrow_Left"
+ scale_image="true" thickness="15"
+ hover_glow_amount="0.15"/>
+ <right_button image_unselected="ScrollArrow_Right"
+ image_selected="ScrollArrow_Right"
+ scale_image="true" thickness="15"
+ hover_glow_amount="0.15"/>
</scroll_bar>
diff --git a/indra/newview/skins/default/xui/en/widgets/scroll_list.xml b/indra/newview/skins/default/xui/en/widgets/scroll_list.xml
index 9e2c52acca..e3a53eee4d 100644
--- a/indra/newview/skins/default/xui/en/widgets/scroll_list.xml
+++ b/indra/newview/skins/default/xui/en/widgets/scroll_list.xml
@@ -4,7 +4,7 @@
bg_selected_color="ScrollSelectedBGColor"
fg_disable_color="ScrollDisabledColor"
bg_writeable_color="ScrollBgWriteableColor"
- bg_read_only_color="ScrollBgReadOnlyColor"
+ bg_readonly_color="ScrollBgReadOnlyColor"
bg_stripe_color="ScrollBGStripeColor"
hovered_color="ScrollHoveredColor"
highlighted_color="ScrollHighlightedColor"
diff --git a/indra/newview/skins/default/xui/en/widgets/search_editor.xml b/indra/newview/skins/default/xui/en/widgets/search_editor.xml
index 10080e5e39..6f557e239d 100644
--- a/indra/newview/skins/default/xui/en/widgets/search_editor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/search_editor.xml
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<search_editor select_on_focus="true">
- <clear_search_button image_unselected="icn_clear_lineeditor.tga"
- image_selected="close_inactive_blue.tga"
- image_color="TextFgTentativeColor"/>
+<search_editor
+ select_on_focus="true"
+ background_image="TextField_Search_Off"
+ background_image_disabled="TextField_Search_Disabled"
+ background_image_focused="TextField_Search_Active" >
+ <search_button label=""
+ image_unselected="Search"
+ image_selected="Search" />
</search_editor>
diff --git a/indra/newview/skins/default/xui/en/widgets/side_tray.xml b/indra/newview/skins/default/xui/en/widgets/side_tray.xml
index e3b70ba6e2..8b4a5afbe9 100644
--- a/indra/newview/skins/default/xui/en/widgets/side_tray.xml
+++ b/indra/newview/skins/default/xui/en/widgets/side_tray.xml
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<side_tray tab_btn_image="sidebar_tab_left.tga"
- tab_btn_image_selected="sidebar_tab_left_selected.tga"
- tab_btn_width = "32"
- tab_btn_height = "32"
- tab_btn_margin = "0"
- >
-</side_tray>
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<side_tray tab_btn_image="TaskPanel_Tab_Off"
+ tab_btn_image_selected="TaskPanel_Tab_Selected"
+ tab_btn_width="32"
+ tab_btn_height="40"
+ tab_btn_margin="1"
+ >
+</side_tray>
diff --git a/indra/newview/skins/default/xui/en/widgets/simple_text_editor.xml b/indra/newview/skins/default/xui/en/widgets/simple_text_editor.xml
index 20af3bb58f..960c4e81e5 100644
--- a/indra/newview/skins/default/xui/en/widgets/simple_text_editor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/simple_text_editor.xml
@@ -1,11 +1,23 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<simple_text_editor cursor_color="TextCursorColor"
- default_color="TextDefaultColor"
- text_color="TextFgColor"
- text_readonly_color="TextFgReadOnlyColor"
- bg_readonly_color="TextBgReadOnlyColor"
- bg_writeable_color="TextBgWriteableColor"
- bg_focus_color="TextBgFocusColor"
- hide_border="false"
- hide_scrollbar="false"
- font="SansSerif"/>
+<simple_text_editor
+ mouse_opaque="true"
+ font="SansSerifSmall"
+ max_length="255"
+ embedded_items="false"
+ hide_scrollbar="false"
+ hide_border="true"
+ word_wrap="false"
+ ignore_tab="true"
+ track_bottom="false"
+ takes_non_scroll_clicks="true"
+ cursor_color="TextCursorColor"
+ default_color="TextDefaultColor"
+ text_color="TextFgColor"
+ text_readonly_color="TextFgReadOnlyColor"
+ bg_readonly_color="TextBgReadOnlyColor"
+ bg_writeable_color="TextBgWriteableColor"
+ bg_focus_color="TextBgFocusColor">
+ <simple_text_editor.border
+ bevel_style="in"
+ follows="all" />
+</simple_text_editor>
diff --git a/indra/newview/skins/default/xui/en/widgets/slider_bar.xml b/indra/newview/skins/default/xui/en/widgets/slider_bar.xml
index ba9ad21cc0..b33acf81cc 100644
--- a/indra/newview/skins/default/xui/en/widgets/slider_bar.xml
+++ b/indra/newview/skins/default/xui/en/widgets/slider_bar.xml
@@ -2,6 +2,6 @@
<slider_bar track_color="SliderTrackColor"
thumb_outline_color="SliderThumbOutlineColor"
thumb_center_color="SliderThumbCenterColor"
- thumb_image="icn_slide-thumb_dark.tga"
- track_image="icn_slide-groove_dark.tga"
- track_highlight_image="icn_slide-highlight.tga"/>
+ thumb_image="SliderThumb_Off"
+ track_image="SliderTrack_Horiz"
+ track_highlight_image="SliderTrack_Horiz" />
diff --git a/indra/newview/skins/default/xui/en/widgets/spinner.xml b/indra/newview/skins/default/xui/en/widgets/spinner.xml
index 29bf1e8052..7d1a5118cb 100644
--- a/indra/newview/skins/default/xui/en/widgets/spinner.xml
+++ b/indra/newview/skins/default/xui/en/widgets/spinner.xml
@@ -1,5 +1,16 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<spinner text_enabled_color="LabelTextColor"
text_disabled_color="LabelDisabledColor"
- decimal_digits="3"
- label_width="40"/> \ No newline at end of file
+ decimal_digits="3"
+ label_width="40" >
+ <spinner.up_button name="SpinCtrl Up"
+ image_unselected="Stepper_Up_Off"
+ image_selected="Stepper_Up_Press"
+ tab_stop="false"
+ follows="left|bottom" />
+ <spinner.down_button name="SpinCtrl Down"
+ image_unselected="Stepper_Down_Off"
+ image_selected="Stepper_Down_Press"
+ tab_stop="false"
+ follows="left|bottom" />
+</spinner> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/widgets/tab_container.xml b/indra/newview/skins/default/xui/en/widgets/tab_container.xml
index 8245e5ff23..7aad55fb37 100644
--- a/indra/newview/skins/default/xui/en/widgets/tab_container.xml
+++ b/indra/newview/skins/default/xui/en/widgets/tab_container.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<tab_container tab_min_width="60"
tab_max_width="150"
- tab_top_image_unselected="tab_top_blue.tga"
- tab_top_image_selected="tab_top_selected_blue.tga"
+ tab_top_image_unselected="TabTop_Middle_Off"
+ tab_top_image_selected="TabTop_Middle_Selected"
tab_bottom_image_unselected="tab_bottom_blue.tga"
tab_bottom_image_selected="tab_bottom_selected_blue.tga"
- tab_left_image_unselected="tab_left.tga"
- tab_left_image_selected="tab_left_selected.tga"/> \ No newline at end of file
+ tab_left_image_unselected="TabTop_Left_Off"
+ tab_left_image_selected="TabTop_Left_Selected"/> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/widgets/text_editor.xml b/indra/newview/skins/default/xui/en/widgets/text_editor.xml
index dc4c430546..deaade04f8 100644
--- a/indra/newview/skins/default/xui/en/widgets/text_editor.xml
+++ b/indra/newview/skins/default/xui/en/widgets/text_editor.xml
@@ -1,19 +1,4 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<line_editor background_image="sm_rounded_corners_simple.tga"
- select_on_focus="false"
- handle_edit_keys_directly="false"
- commit_on_focus_lost="true"
- ignore_tab="true"
- cursor_color="TextCursorColor"
- text_color="TextFgColor"
- text_readonly_color="TextFgReadOnlyColor"
- text_tentative_color="TextFgTentativeColor"
- bg_readonly_color="TextBgReadOnlyColor"
- bg_writeable_color="TextBgWriteableColor"
- bg_focus_color="TextBgFocusColor"
- mouse_opaque="true"
- name="line_editor"
- font="SansSerifSmall">
- <line_editor.border bevel_style="in"
- follows="all"/>
-</line_editor>
+<!-- Core parameters are in simple_text_editor.xml -->
+<text_editor
+ allow_html="false" />
diff --git a/indra/newview/skins/default/xui/fr/menu_viewer.xml b/indra/newview/skins/default/xui/fr/menu_viewer.xml
index 959cc5764c..98f08452ff 100644
--- a/indra/newview/skins/default/xui/fr/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/fr/menu_viewer.xml
@@ -120,10 +120,10 @@
<menu_item_call label="Reprendre le contrôle" name="Release Keys"/>
<menu_item_separator label="-----------" name="separator4"/>
<menu_item_call label="Historique de mon compte..." name="Account History...">
- <on_click name="AccountHistory_url" userdata="WebLaunchAccountHistory,http://secondlife.com/account/transactions.php?lang=fr"/>
+ <menu_item_call.on_click name="AccountHistory_url" userdata="WebLaunchAccountHistory,http://secondlife.com/account/transactions.php?lang=fr"/>
</menu_item_call>
<menu_item_call label="Gérer mon compte..." name="Manage My Account...">
- <on_click name="ManageMyAccount_url" userdata="WebLaunchJoinNow,http://secondlife.com/account/index.php?lang=fr"/>
+ <menu_item_call.on_click name="ManageMyAccount_url" userdata="WebLaunchJoinNow,http://secondlife.com/account/index.php?lang=fr"/>
</menu_item_call>
<menu_item_call label="Acheter des L$..." name="Buy and Sell L$..."/>
<menu_item_separator label="-----------" name="separator5"/>
@@ -169,7 +169,9 @@
<menu_item_separator label="-----------" name="separator4"/>
<menu_item_call label="Mise au point sur la sélection" name="Focus on Selection"/>
<menu_item_call label="Zoom sur la sélection" name="Zoom to Selection"/>
- <menu_item_call label="Acheter l&apos;objet" name="Menu Object Take"/>
+ <menu_item_call label="Acheter l&apos;objet" name="Menu Object Take">
+ <menu_item_call.on_enable parameter="Acheter,Prendre" name="EnableBuyOrTake"/>
+ </menu_item_call>
<menu_item_call label="Prendre une copie" name="Take Copy"/>
<menu_item_call label="Remplacer l&apos;objet dans le contenu de l&apos;objet" name="Save Object Back to Object Contents"/>
<menu_item_separator label="-----------" name="separator6"/>
@@ -189,7 +191,7 @@
<menu_item_call label="Blog officiel..." name="Official Linden Blog..."/>
<menu_item_separator label="-----------" name="separator2"/>
<menu_item_call label="Aide sur le LSL..." name="Scripting Portal...">
- <on_click name="ScriptingPortal_url" userdata="WebLaunchLSLWiki,http://wiki.secondlife.com/wiki/LSL_Portal/fr" />
+ <menu_item_call.on_click name="ScriptingPortal_url" userdata="WebLaunchLSLWiki,http://wiki.secondlife.com/wiki/LSL_Portal/fr" />
</menu_item_call>
<menu_item_separator label="-----------" name="separator3"/>
<menu_item_call label="Signaler une infraction..." name="Report Abuse..."/>
@@ -199,14 +201,14 @@
<menu label="Signaler des bugs" name="Bug Reporting">
<menu_item_call label="Ouvrir un JIRA..." name="Public Issue Tracker..."/>
<menu_item_call label="Comment utiliser JIRA ?" name="Publc Issue Tracker Help...">
- <on_click name="PublicIssueTrackerHelp_url" userdata="WebLaunchPublicIssueHelp,http://wiki.secondlife.com/wiki/Issue_tracker/fr" />
+ <menu_item_call.on_click name="PublicIssueTrackerHelp_url" userdata="WebLaunchPublicIssueHelp,http://wiki.secondlife.com/wiki/Issue_tracker/fr" />
</menu_item_call>
<menu_item_separator label="-----------" name="separator7"/>
<menu_item_call label="Comment signaler des bugs ?" name="Bug Reporing 101...">
- <on_click name="BugReporting101_url" userdata="WebLaunchBugReport101,http://wiki.secondlife.com/wiki/Bug_Reporting_101/fr"/>
+ <menu_item_call.on_click name="BugReporting101_url" userdata="WebLaunchBugReport101,http://wiki.secondlife.com/wiki/Bug_Reporting_101/fr"/>
</menu_item_call>
<menu_item_call label="Comment signaler un problème de sécurité ?" name="Security Issues...">
- <on_click name="SecurityIssues_url" userdata="WebLaunchSecurityIssues,http://wiki.secondlife.com/wiki/Security_issues/fr"/>
+ <menu_item_call.on_click name="SecurityIssues_url" userdata="WebLaunchSecurityIssues,http://wiki.secondlife.com/wiki/Security_issues/fr"/>
</menu_item_call>
<menu_item_call label="Wiki Assurance Qualité…" name="QA Wiki..."/>
<menu_item_separator label="-----------" name="separator9"/>
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index 19cf9cd961..5af8acebaf 100644
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -69,7 +69,6 @@ std::string LLViewerLogin::getGridLabel() const { return VIEWERLOGIN_GRIDLABEL;
//-----------------------------------------------------------------------------
#include "../llviewercontrol.h"
LLControlGroup gSavedSettings("Global");
-LLControlGroup gSavedSkinSettings("Skinning");
std::string gCurrentVersion = "invalid_version";
LLControlGroup::LLControlGroup(const std::string& name) :
@@ -83,6 +82,9 @@ std::string LLControlGroup::getString(const std::string& name) { return "test_st
BOOL LLControlGroup::declareBOOL(const std::string& name, BOOL initial_val, const std::string& comment, BOOL persist) { return TRUE; }
BOOL LLControlGroup::declareString(const std::string& name, const std::string &initial_val, const std::string& comment, BOOL persist) { return TRUE; }
+#include "lluicolortable.h"
+void LLUIColorTable::saveUserSettings(void)const {}
+
//-----------------------------------------------------------------------------
#include "../llurlsimstring.h"
LLURLSimString LLURLSimString::sInstance;
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index c2a9789ff1..d198518ee3 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -77,6 +77,10 @@ class ViewerManifest(LLManifest):
self.path("paths.xml")
# include the entire textures directory recursively
if self.prefix(src="*/textures"):
+ self.path("*/*.tga")
+ self.path("*/*.j2c")
+ self.path("*/*.jpg")
+ self.path("*/*.png")
self.path("*.tga")
self.path("*.j2c")
self.path("*.jpg")