From 1ea60591a9b5f46a66527497b7b14b843a663de8 Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Fri, 13 Nov 2009 20:33:59 -0500 Subject: Refactoring of llviewerprecompiledheaders.h to hopefully increase stability and reduce unnecessary dependencies and incredibuild wedging. Hopefully in the long run this will reduce build time. Also cleaned up a lot of header file usage to conform better to the coding standard. reviewed by james and steve. --- indra/llcharacter/llkeyframemotion.h | 1 - indra/llcommon/llapp.h | 3 - indra/llcommon/llapr.h | 8 +++ indra/llcommon/llcommon.h | 1 - indra/llcommon/llerror.cpp | 3 - indra/llcommon/llthread.h | 1 + indra/llmessage/lliohttpserver.h | 1 - indra/llplugin/llpluginprocessparent.h | 1 + indra/llvfs/llpidlock.cpp | 9 +++ indra/llvfs/llpidlock.h | 12 +--- indra/newview/llappviewer.cpp | 3 + indra/newview/llappviewer.h | 1 + indra/newview/llfloateranimpreview.h | 1 + indra/newview/llfloaterauction.cpp | 2 +- indra/newview/llfloaterbump.cpp | 6 +- indra/newview/llfloaterpostcard.cpp | 3 +- indra/newview/llfloaterpostcard.h | 4 +- indra/newview/llfloaterregioninfo.cpp | 3 +- indra/newview/llfloaterregioninfo.h | 4 ++ indra/newview/llfloaterreporter.cpp | 5 +- indra/newview/llfloaterurldisplay.cpp | 5 +- indra/newview/llfloaterurlentry.cpp | 2 + indra/newview/llfloaterworldmap.cpp | 2 +- indra/newview/llgroupactions.cpp | 2 + indra/newview/llimfloater.h | 3 +- indra/newview/lllandmarkactions.cpp | 1 + indra/newview/llnavigationbar.cpp | 10 +-- indra/newview/llnearbychatbar.cpp | 2 + indra/newview/llpanellandmarks.cpp | 1 + indra/newview/llpanelpicks.cpp | 1 + indra/newview/llpanelplace.cpp | 1 + indra/newview/llpanelplaceinfo.cpp | 2 + indra/newview/llpanelplaceprofile.cpp | 1 + indra/newview/llpreviewgesture.h | 1 + indra/newview/llremoteparcelrequest.h | 1 + indra/newview/lltexlayer.cpp | 8 ++- indra/newview/lltexlayerparams.cpp | 5 +- indra/newview/lltexlayerparams.h | 4 ++ indra/newview/lltexturecache.h | 1 + indra/newview/lltexturefetch.cpp | 2 + indra/newview/lltexturestatsuploader.cpp | 2 + indra/newview/lltoastimpanel.cpp | 1 + indra/newview/lltoastnotifypanel.cpp | 1 + indra/newview/llurldispatcher.cpp | 1 + indra/newview/llviewerassetstorage.cpp | 9 +-- indra/newview/llviewergenericmessage.h | 1 + indra/newview/llviewerjoint.h | 1 - indra/newview/llviewerjointmesh.h | 1 - indra/newview/llviewermenu.h | 1 + indra/newview/llviewermenufile.cpp | 9 +++ indra/newview/llviewermenufile.h | 1 + indra/newview/llviewermessage.cpp | 2 + indra/newview/llviewermessage.h | 3 + indra/newview/llviewernetwork.cpp | 5 +- indra/newview/llviewerprecompiledheaders.h | 104 +---------------------------- indra/newview/llviewerstats.cpp | 1 + indra/newview/llviewertexture.cpp | 13 ++++ indra/newview/llviewertexture.h | 11 +-- indra/newview/llviewertexturelist.h | 1 + indra/newview/llviewerwindow.cpp | 3 +- indra/newview/llviewerwindow.h | 1 + indra/newview/llvoavatar.cpp | 1 + indra/newview/llvovolume.h | 1 - indra/newview/llwaterparammanager.cpp | 3 - indra/newview/llwldaycycle.cpp | 6 +- indra/newview/llwlparammanager.cpp | 5 -- indra/newview/llworldmapmessage.cpp | 1 + indra/newview/llxmlrpclistener.cpp | 5 +- 68 files changed, 151 insertions(+), 170 deletions(-) (limited to 'indra') diff --git a/indra/llcharacter/llkeyframemotion.h b/indra/llcharacter/llkeyframemotion.h index 7e8c84488c..50d9d05046 100644 --- a/indra/llcharacter/llkeyframemotion.h +++ b/indra/llcharacter/llkeyframemotion.h @@ -47,7 +47,6 @@ #include "llquaternion.h" #include "v3dmath.h" #include "v3math.h" -#include "llapr.h" #include "llbvhconsts.h" class LLKeyframeDataCache; diff --git a/indra/llcommon/llapp.h b/indra/llcommon/llapp.h index 1a052ce62d..72b81f382c 100644 --- a/indra/llcommon/llapp.h +++ b/indra/llcommon/llapp.h @@ -34,7 +34,6 @@ #define LL_LLAPP_H #include -#include "llapr.h" #include "llrun.h" #include "llsd.h" #include "lloptioninterface.h" @@ -202,8 +201,6 @@ public: #if !LL_WINDOWS static U32 getSigChildCount(); static void incSigChildCount(); -#else -#define getpid GetCurrentProcessId #endif static int getPid(); diff --git a/indra/llcommon/llapr.h b/indra/llcommon/llapr.h index b08bb617c5..b05a222b33 100644 --- a/indra/llcommon/llapr.h +++ b/indra/llcommon/llapr.h @@ -38,6 +38,14 @@ #if LL_LINUX || LL_SOLARIS #include // Need PATH_MAX in APR headers... #endif +#if LL_WINDOWS + // Limit Windows API to small and manageable set. + // If you get undefined symbols, find the appropriate + // Windows header file and include that in your .cpp file. + #define WIN32_LEAN_AND_MEAN + #include + #include +#endif #include diff --git a/indra/llcommon/llcommon.h b/indra/llcommon/llcommon.h index b36471f9f8..05eef25b21 100644 --- a/indra/llcommon/llcommon.h +++ b/indra/llcommon/llcommon.h @@ -33,7 +33,6 @@ #define LL_COMMON_H // *TODO: remove these? -#include "llapr.h" #include "lltimer.h" #include "llfile.h" diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 77c0c2294a..bd334a6654 100644 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -45,9 +45,6 @@ # include # include #endif // !LL_WINDOWS -#if LL_WINDOWS -# include -#endif // LL_WINDOWS #include #include "llapp.h" diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h index d8aa90de2e..adef1a9192 100644 --- a/indra/llcommon/llthread.h +++ b/indra/llcommon/llthread.h @@ -34,6 +34,7 @@ #define LL_LLTHREAD_H #include "llapp.h" +#include "llapr.h" #include "apr_thread_cond.h" class LLThread; diff --git a/indra/llmessage/lliohttpserver.h b/indra/llmessage/lliohttpserver.h index d1c9bdde85..e8e390f296 100644 --- a/indra/llmessage/lliohttpserver.h +++ b/indra/llmessage/lliohttpserver.h @@ -34,7 +34,6 @@ #ifndef LL_LLIOHTTPSERVER_H #define LL_LLIOHTTPSERVER_H -#include "llapr.h" #include "llchainio.h" #include "llhttpnode.h" diff --git a/indra/llplugin/llpluginprocessparent.h b/indra/llplugin/llpluginprocessparent.h index 25669f5d78..17608063b5 100644 --- a/indra/llplugin/llpluginprocessparent.h +++ b/indra/llplugin/llpluginprocessparent.h @@ -34,6 +34,7 @@ #ifndef LL_LLPLUGINPROCESSPARENT_H #define LL_LLPLUGINPROCESSPARENT_H +#include "llapr.h" #include "llprocesslauncher.h" #include "llpluginmessage.h" #include "llpluginmessagepipe.h" diff --git a/indra/llvfs/llpidlock.cpp b/indra/llvfs/llpidlock.cpp index 315baa001d..95e3692e10 100755 --- a/indra/llvfs/llpidlock.cpp +++ b/indra/llvfs/llpidlock.cpp @@ -41,6 +41,15 @@ #include "llframetimer.h" #if LL_WINDOWS //For windows platform. + +#include + +namespace { + inline DWORD getpid() { + return GetCurrentProcessId(); + } +} + bool isProcessAlive(U32 pid) { return (bool) GetProcessVersion((DWORD)pid); diff --git a/indra/llvfs/llpidlock.h b/indra/llvfs/llpidlock.h index 42aee4dc4f..496e99cf5a 100755 --- a/indra/llvfs/llpidlock.h +++ b/indra/llvfs/llpidlock.h @@ -37,17 +37,9 @@ class LLSD; class LLFrameTimer; -#if LL_WINDOWS //For windows platform. - -#include - -#define getpid GetCurrentProcessId - -#else //Everyone Else - +#if !LL_WINDOWS //For non-windows platforms. #include - -#endif //Everyone else. +#endif namespace LLPidLock { diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index eb08707b61..79372b593a 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -83,11 +83,14 @@ #include "llsecondlifeurls.h" // Linden library includes +#include "llimagej2c.h" #include "llmemory.h" #include "llprimitive.h" #include "llurlaction.h" +#include "llvfile.h" #include "llvfsthread.h" #include "llvolumemgr.h" +#include "llxfermanager.h" #include "llnotificationmanager.h" #include "llnotifications.h" diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index c1bfbca868..40e74061b5 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -325,6 +325,7 @@ extern BOOL gUseWireframe; // VFS globals - gVFS is for general use // gStaticVFS is read-only and is shipped w/ the viewer // it has pre-cache data like the UI .TGAs +class LLVFS; extern LLVFS *gStaticVFS; extern LLMemoryInfo gSysMemory; diff --git a/indra/newview/llfloateranimpreview.h b/indra/newview/llfloateranimpreview.h index f1c4a6b0d0..2bf81476a2 100644 --- a/indra/newview/llfloateranimpreview.h +++ b/indra/newview/llfloateranimpreview.h @@ -33,6 +33,7 @@ #ifndef LL_LLFLOATERANIMPREVIEW_H #define LL_LLFLOATERANIMPREVIEW_H +#include "llassettype.h" #include "llfloaternamedesc.h" #include "lldynamictexture.h" #include "llcharacter.h" diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp index b63bcccf6b..bbccbb8709 100644 --- a/indra/newview/llfloaterauction.cpp +++ b/indra/newview/llfloaterauction.cpp @@ -35,7 +35,6 @@ #include "llfloaterauction.h" #include "llfloaterregioninfo.h" -#include "lldir.h" #include "llgl.h" #include "llimagej2c.h" #include "llimagetga.h" @@ -43,6 +42,7 @@ #include "llvfile.h" #include "llvfs.h" #include "llwindow.h" +#include "message.h" #include "llagent.h" #include "llcombobox.h" diff --git a/indra/newview/llfloaterbump.cpp b/indra/newview/llfloaterbump.cpp index 68f06b1e5b..e925796526 100644 --- a/indra/newview/llfloaterbump.cpp +++ b/indra/newview/llfloaterbump.cpp @@ -33,11 +33,11 @@ #include "llviewerprecompiledheaders.h" -#include "llfloaterbump.h" +#include "llsd.h" +#include "mean_collision_data.h" +#include "llfloaterbump.h" #include "llscrolllistctrl.h" - -#include "llsd.h" #include "lluictrlfactory.h" #include "llviewermessage.h" diff --git a/indra/newview/llfloaterpostcard.cpp b/indra/newview/llfloaterpostcard.cpp index 572eeb57fe..8da44e2035 100644 --- a/indra/newview/llfloaterpostcard.cpp +++ b/indra/newview/llfloaterpostcard.cpp @@ -56,9 +56,8 @@ #include "llstatusbar.h" #include "llviewerregion.h" #include "lleconomy.h" +#include "message.h" -#include "llgl.h" -#include "llglheaders.h" #include "llimagejpeg.h" #include "llimagej2c.h" #include "llvfile.h" diff --git a/indra/newview/llfloaterpostcard.h b/indra/newview/llfloaterpostcard.h index 49cce53106..0a44b50779 100644 --- a/indra/newview/llfloaterpostcard.h +++ b/indra/newview/llfloaterpostcard.h @@ -70,7 +70,7 @@ public: void sendPostcard(); -protected: +private: LLPointer mJPEGImage; LLPointer mViewerImage; @@ -78,7 +78,7 @@ protected: LLAssetID mAssetID; LLVector2 mImageScale; LLVector3d mPosTakenGlobal; - boolean mHasFirstMsgFocus; + bool mHasFirstMsgFocus; }; diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 05a46ad894..00c46666f6 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -42,6 +42,8 @@ #include "llglheaders.h" #include "llregionflags.h" #include "llstl.h" +#include "llvfile.h" +#include "llxfermanager.h" #include "indra_constants.h" #include "message.h" @@ -53,7 +55,6 @@ #include "llcheckboxctrl.h" #include "llcombobox.h" #include "llfilepicker.h" -#include "llfloaterdaycycle.h" #include "llfloatergodtools.h" // for send_sim_wide_deletes() #include "llfloatertopobjects.h" // added to fix SL-32336 #include "llfloatergroups.h" diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h index a3b91223b7..42ed5b6f42 100644 --- a/indra/newview/llfloaterregioninfo.h +++ b/indra/newview/llfloaterregioninfo.h @@ -35,9 +35,12 @@ #define LL_LLFLOATERREGIONINFO_H #include +#include "llassettype.h" #include "llfloater.h" +#include "llhost.h" #include "llpanel.h" +class LLDispatcher; class LLLineEditor; class LLMessageSystem; class LLPanelRegionInfo; @@ -51,6 +54,7 @@ class LLNameListCtrl; class LLSliderCtrl; class LLSpinCtrl; class LLTextBox; +class LLVFS; class LLPanelRegionGeneralInfo; class LLPanelRegionDebugInfo; diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 1f3bd50d5b..d9fcf6f7b7 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -40,12 +40,15 @@ // linden library includes #include "llassetstorage.h" #include "llfontgl.h" -#include "llgl.h" // for renderer +#include "llimagej2c.h" #include "llinventory.h" #include "llnotificationsutil.h" #include "llstring.h" #include "llsys.h" #include "llversionviewer.h" +#include "llvfile.h" +#include "llvfs.h" +#include "mean_collision_data.h" #include "message.h" #include "v3math.h" diff --git a/indra/newview/llfloaterurldisplay.cpp b/indra/newview/llfloaterurldisplay.cpp index 3b9321a876..4b67cbb308 100644 --- a/indra/newview/llfloaterurldisplay.cpp +++ b/indra/newview/llfloaterurldisplay.cpp @@ -33,13 +33,14 @@ #include "llviewerprecompiledheaders.h" +#include "llregionhandle.h" +#include "v3dmath.h" + #include "llfloaterurldisplay.h" #include "llpanelplace.h" #include "lluictrlfactory.h" -#include "v3dmath.h" - //////////////////////////////////////////////////////////////////////////// // LLFloaterURLDisplay diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp index 5e769feea6..91d0f0e370 100644 --- a/indra/newview/llfloaterurlentry.cpp +++ b/indra/newview/llfloaterurlentry.cpp @@ -32,6 +32,8 @@ #include "llviewerprecompiledheaders.h" +#include "llhttpclient.h" + #include "llfloaterurlentry.h" #include "llpanellandmedia.h" diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 7ca491a698..98f9171237 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -74,8 +74,8 @@ #include "llmapimagetype.h" #include "llweb.h" #include "llslider.h" +#include "message.h" -#include "llglheaders.h" #include "llwindow.h" // copyTextToClipboard() //--------------------------------------------------------------------------- diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index fdb2b886a6..4c7e71f040 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -35,6 +35,8 @@ #include "llgroupactions.h" +#include "message.h" + #include "llagent.h" #include "llcommandhandler.h" #include "llfloaterreg.h" diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h index f90bc35c34..ab3e15c6b2 100644 --- a/indra/newview/llimfloater.h +++ b/indra/newview/llimfloater.h @@ -33,9 +33,10 @@ #ifndef LL_IMFLOATER_H #define LL_IMFLOATER_H -#include "lltransientdockablefloater.h" +#include "llinstantmessage.h" #include "lllogchat.h" #include "lltooldraganddrop.h" +#include "lltransientdockablefloater.h" class LLLineEditor; class LLPanelChatControlPanel; diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp index 08d56f8b9f..f25d2ef574 100644 --- a/indra/newview/lllandmarkactions.cpp +++ b/indra/newview/lllandmarkactions.cpp @@ -38,6 +38,7 @@ #include "llinventory.h" #include "lllandmark.h" #include "llparcel.h" +#include "llregionhandle.h" #include "llnotificationsutil.h" diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index e65b7d8a0c..45ae8bdbb1 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -34,10 +34,12 @@ #include "llnavigationbar.h" -#include -#include -#include -#include +#include "llregionhandle.h" + +#include "llfloaterreg.h" +#include "llfocusmgr.h" +#include "lliconctrl.h" +#include "llmenugl.h" #include "llagent.h" #include "llviewerregion.h" diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 8fb4ea4211..8dbaa5ac53 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -32,6 +32,8 @@ #include "llviewerprecompiledheaders.h" +#include "message.h" + #include "llfloaterreg.h" #include "lltrans.h" diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 4ce6d14faa..4c99fca2dd 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -37,6 +37,7 @@ #include "llfloaterreg.h" #include "llsdutil.h" #include "llsdutil_math.h" +#include "llregionhandle.h" #include "llaccordionctrl.h" #include "llaccordionctrltab.h" diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index cc6e88a9d2..1569c102be 100644 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -37,6 +37,7 @@ #include "llagent.h" #include "llagentpicksinfo.h" #include "llavatarconstants.h" +#include "lldispatcher.h" #include "llflatlistview.h" #include "llfloaterreg.h" #include "llfloaterworldmap.h" diff --git a/indra/newview/llpanelplace.cpp b/indra/newview/llpanelplace.cpp index 71d763b562..6985b73200 100644 --- a/indra/newview/llpanelplace.cpp +++ b/indra/newview/llpanelplace.cpp @@ -40,6 +40,7 @@ #include "llsecondlifeurls.h" #include "llfloater.h" #include "llfloaterreg.h" +#include "llregionhandle.h" #include "llagent.h" #include "llviewerwindow.h" diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index 6ba3790fe2..b845f38ace 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -39,6 +39,8 @@ #include "llsecondlifeurls.h" #include "llsdutil_math.h" +#include "llregionhandle.h" +#include "message.h" #include "lliconctrl.h" #include "lltextbox.h" diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index 0c7cc9af38..402d50ba9c 100644 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -35,6 +35,7 @@ #include "llpanelplaceprofile.h" #include "llparcel.h" +#include "message.h" #include "lliconctrl.h" #include "lllineeditor.h" diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h index 9d26539453..6241869e18 100644 --- a/indra/newview/llpreviewgesture.h +++ b/indra/newview/llpreviewgesture.h @@ -46,6 +46,7 @@ class LLScrollListItem; class LLButton; class LLGestureStep; class LLRadioGroup; +class LLVFS; class LLPreviewGesture : public LLPreview { diff --git a/indra/newview/llremoteparcelrequest.h b/indra/newview/llremoteparcelrequest.h index 3a16e25ef6..c04f6b1858 100644 --- a/indra/newview/llremoteparcelrequest.h +++ b/indra/newview/llremoteparcelrequest.h @@ -38,6 +38,7 @@ #include "llhttpclient.h" #include "llpanel.h" +class LLMessageSystem; class LLRemoteParcelInfoObserver; class LLRemoteParcelRequestResponder : public LLHTTPClient::Responder diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 8d3dcf8a99..72ef383be9 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -31,8 +31,14 @@ */ #include "llviewerprecompiledheaders.h" -#include "llagent.h" + #include "lltexlayer.h" + +#include "llagent.h" +#include "llimagej2c.h" +#include "llimagetga.h" +#include "llvfile.h" +#include "llvfs.h" #include "llviewerstats.h" #include "llviewerregion.h" #include "llvoavatar.h" diff --git a/indra/newview/lltexlayerparams.cpp b/indra/newview/lltexlayerparams.cpp index 0c7e61d00e..d55468841d 100644 --- a/indra/newview/lltexlayerparams.cpp +++ b/indra/newview/lltexlayerparams.cpp @@ -30,11 +30,14 @@ */ #include "llviewerprecompiledheaders.h" + +#include "lltexlayerparams.h" + #include "llagent.h" +#include "llimagetga.h" #include "lltexlayer.h" #include "llvoavatarself.h" #include "llwearable.h" -#include "lltexlayerparams.h" #include "llui.h" //----------------------------------------------------------------------------- diff --git a/indra/newview/lltexlayerparams.h b/indra/newview/lltexlayerparams.h index 2b80dbdba4..93d01352d4 100644 --- a/indra/newview/lltexlayerparams.h +++ b/indra/newview/lltexlayerparams.h @@ -34,7 +34,11 @@ #include "llviewervisualparam.h" +class LLImageRaw; +class LLImageTGA; class LLTexLayer; +class LLTexLayerInterface; +class LLViewerTexture; class LLVOAvatar; class LLWearable; diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h index bc9c988648..4203cbbc43 100644 --- a/indra/newview/lltexturecache.h +++ b/indra/newview/lltexturecache.h @@ -40,6 +40,7 @@ #include "llworkerthread.h" +class LLImageFormatted; class LLTextureCacheWorker; class LLTextureCache : public LLWorkerThread diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 9bb2a4ad0a..40ee042eb1 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -43,8 +43,10 @@ #include "llhttpclient.h" #include "llhttpstatuscodes.h" #include "llimage.h" +#include "llimagej2c.h" #include "llimageworker.h" #include "llworkerthread.h" +#include "message.h" #include "llagent.h" #include "lltexturecache.h" diff --git a/indra/newview/lltexturestatsuploader.cpp b/indra/newview/lltexturestatsuploader.cpp index e0358e1fca..1df73db9b0 100644 --- a/indra/newview/lltexturestatsuploader.cpp +++ b/indra/newview/lltexturestatsuploader.cpp @@ -34,6 +34,8 @@ #include "lltexturestatsuploader.h" +#include "llhttpclient.h" + LLTextureStatsUploader::LLTextureStatsUploader() { } diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index f928b5f243..ae1f87b6cf 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -34,6 +34,7 @@ #include "lltoastimpanel.h" #include "llnotifications.h" +#include "llinstantmessage.h" const S32 LLToastIMPanel::DEFAULT_MESSAGE_MAX_LINE_COUNT = 6; diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 6b9bff7b9e..766cf83a01 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -38,6 +38,7 @@ #include "llviewercontrol.h" // library includes +#include "lldbstrings.h" #include "llnotifications.h" #include "lluiconstants.h" #include "llrect.h" diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index 46618d4026..164a45eed1 100644 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -41,6 +41,7 @@ #include "llfloaterurldisplay.h" #include "llfloaterworldmap.h" #include "llpanellogin.h" +#include "llregionhandle.h" #include "llsidetray.h" #include "llslurl.h" #include "llstartup.h" // gStartupState diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp index c32e67ef90..440828da68 100644 --- a/indra/newview/llviewerassetstorage.cpp +++ b/indra/newview/llviewerassetstorage.cpp @@ -32,13 +32,14 @@ #include "llviewerprecompiledheaders.h" -#include "linden_common.h" - -#include "llagent.h" #include "llviewerassetstorage.h" -#include "llviewerbuild.h" + #include "llvfile.h" #include "llvfs.h" +#include "message.h" + +#include "llagent.h" +#include "llviewerbuild.h" LLViewerAssetStorage::LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, LLVFS *vfs, const LLHost &upstream_host) diff --git a/indra/newview/llviewergenericmessage.h b/indra/newview/llviewergenericmessage.h index 6e1f0945b8..6b0a2e5d81 100644 --- a/indra/newview/llviewergenericmessage.h +++ b/indra/newview/llviewergenericmessage.h @@ -36,6 +36,7 @@ class LLUUID; class LLDispatcher; +class LLMessageSystem; void send_generic_message(const std::string& method, diff --git a/indra/newview/llviewerjoint.h b/indra/newview/llviewerjoint.h index 0e993a2ebe..08c4ec36fd 100644 --- a/indra/newview/llviewerjoint.h +++ b/indra/newview/llviewerjoint.h @@ -37,7 +37,6 @@ // Header Files //----------------------------------------------------------------------------- #include "lljoint.h" -#include "llapr.h" class LLFace; class LLViewerJointMesh; diff --git a/indra/newview/llviewerjointmesh.h b/indra/newview/llviewerjointmesh.h index 543679c44b..d62b0ada85 100644 --- a/indra/newview/llviewerjointmesh.h +++ b/indra/newview/llviewerjointmesh.h @@ -37,7 +37,6 @@ #include "llviewertexture.h" #include "llpolymesh.h" #include "v4color.h" -#include "llapr.h" class LLDrawable; class LLFace; diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index 01a6b34170..8266452d85 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -36,6 +36,7 @@ #include "llmenugl.h" #include "llsafehandle.h" +class LLMessageSystem; class LLSD; class LLUICtrl; class LLView; diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 4b0dc8f668..576528d543 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -40,6 +40,12 @@ #include "llfloaterreg.h" #include "llfloaterbuycurrency.h" #include "llfloatersnapshot.h" +#include "llimage.h" +#include "llimagebmp.h" +#include "llimagepng.h" +#include "llimagej2c.h" +#include "llimagejpeg.h" +#include "llimagetga.h" #include "llinventorymodel.h" // gInventory #include "llresourcedata.h" #include "llfloaterperms.h" @@ -47,6 +53,8 @@ #include "llviewercontrol.h" // gSavedSettings #include "llviewertexturelist.h" #include "lluictrlfactory.h" +#include "llvfile.h" +#include "llvfs.h" #include "llviewerinventory.h" #include "llviewermenu.h" // gMenuHolder #include "llviewerregion.h" @@ -67,6 +75,7 @@ #include "lltransactiontypes.h" #include "lluuid.h" #include "llvorbisencode.h" +#include "message.h" // system libraries #include diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h index da78537a29..1e6d13f1c6 100644 --- a/indra/newview/llviewermenufile.h +++ b/indra/newview/llviewermenufile.h @@ -34,6 +34,7 @@ #define LLVIEWERMENUFILE_H #include "llfoldertype.h" +#include "llassetstorage.h" #include "llinventorytype.h" class LLTransactionID; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 23d02af73d..33361f72cd 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -59,6 +59,8 @@ #include "llteleportflags.h" #include "lltracker.h" #include "lltransactionflags.h" +#include "llvfile.h" +#include "llvfs.h" #include "llxfermanager.h" #include "message.h" #include "sound_ids.h" diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h index 1a98828010..8404d6fde0 100644 --- a/indra/newview/llviewermessage.h +++ b/indra/newview/llviewermessage.h @@ -33,10 +33,12 @@ #ifndef LL_LLVIEWERMESSAGE_H #define LL_LLVIEWERMESSAGE_H +#include "llassettype.h" #include "llinstantmessage.h" #include "llpointer.h" #include "lltransactiontypes.h" #include "lluuid.h" +#include "message.h" #include "stdenums.h" // @@ -47,6 +49,7 @@ class LLInventoryObject; class LLInventoryItem; class LLMeanCollisionData; class LLMessageSystem; +class LLVFS; class LLViewerObject; class LLViewerRegion; diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp index 801c46035a..d7b55d7e97 100644 --- a/indra/newview/llviewernetwork.cpp +++ b/indra/newview/llviewernetwork.cpp @@ -34,8 +34,11 @@ #include "llviewerprecompiledheaders.h" #include "llviewernetwork.h" -#include "llviewercontrol.h" + #include "llevents.h" +#include "net.h" + +#include "llviewercontrol.h" #include "lllogin.h" struct LLGridData diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h index 86f59b6e2f..93a980d9e8 100644 --- a/indra/newview/llviewerprecompiledheaders.h +++ b/indra/newview/llviewerprecompiledheaders.h @@ -41,17 +41,6 @@ #include "linden_common.h" -// We may want to take the windows.h include out, but it used to be in -// linden_common.h, and hence in all the libraries. This is better. JC -#if LL_WINDOWS - // Limit Windows API to small and manageable set. - // If you get undefined symbols, find the appropriate - // Windows header file and include that in your .cpp file. - #define WIN32_LEAN_AND_MEAN - #include - #include -#endif - // Work around stupid Microsoft STL warning #ifdef LL_WINDOWS #pragma warning (disable : 4702) // warning C4702: unreachable code @@ -76,21 +65,14 @@ //#include "llpreprocessor.h" #include "llallocator.h" #include "llapp.h" -#include "llapr.h" #include "llcriticaldamp.h" -//#include "lldarray.h" -//#include "lldarrayptr.h" #include "lldefs.h" #include "lldepthstack.h" -//#include "lldqueueptr.h" -#include "llendianswizzle.h" #include "llerror.h" #include "llfasttimer.h" #include "llframetimer.h" #include "llhash.h" #include "lllocalidhashmap.h" -#include "llmap.h" -//#include "llmemory.h" #include "llnametable.h" #include "llpointer.h" #include "llpriqueuemap.h" @@ -100,7 +82,6 @@ //#include "llsecondlifeurls.h" #include "llsd.h" #include "llsingleton.h" -#include "llstack.h" #include "llstat.h" #include "llstl.h" #include "llstrider.h" @@ -118,19 +99,7 @@ #include "timing.h" #include "u64.h" -// Library includes from llimage -//#include "llblockdata.h" -#include "llimage.h" -#include "llimagebmp.h" -#include "llimagepng.h" -#include "llimagej2c.h" -#include "llimagejpeg.h" -#include "llimagetga.h" -#include "llmapimagetype.h" - // Library includes from llmath project -//#include "camera.h" -//#include "coordframe.h" #include "llmath.h" #include "llbboxlocal.h" #include "llcamera.h" @@ -158,80 +127,11 @@ ////#include "vmath.h" #include "xform.h" -// Library includes from llmessage project -//#include "llassetstorage.h" -#include "llcachename.h" -#include "llcircuit.h" -#include "lldatapacker.h" -#include "lldbstrings.h" -#include "lldispatcher.h" -#include "lleventflags.h" -#include "llhost.h" -#include "llinstantmessage.h" -#include "llinvite.h" -//#include "llloginflags.h" -#include "llmail.h" -#include "llmessagethrottle.h" -#include "llnamevalue.h" -#include "llpacketack.h" -#include "llpacketbuffer.h" -#include "llpacketring.h" -#include "llpartdata.h" -//#include "llqueryflags.h" -//#include "llregionflags.h" -#include "llregionhandle.h" -#include "lltaskname.h" -#include "llteleportflags.h" -#include "llthrottle.h" -#include "lltransfermanager.h" -#include "lltransfersourceasset.h" -#include "lltransfersourcefile.h" -#include "lltransfertargetfile.h" -#include "lltransfertargetvfile.h" -#include "lluseroperation.h" -#include "llvehicleparams.h" -#include "llxfer.h" -#include "llxfer_file.h" -#include "llxfer_mem.h" -#include "llxfer_vfile.h" -#include "llxfermanager.h" -#include "machine.h" -#include "mean_collision_data.h" -#include "message.h" -#include "message_prehash.h" -#include "net.h" -//#include "network.h" -#include "partsyspacket.h" -#include "patch_code.h" -#include "patch_dct.h" -#include "sound_ids.h" - -// Builds work with all headers below commented out as of 2009-09-10 JC - -// Library includes from llprimitive -#include "imageids.h" -#include "legacy_object_types.h" -#include "llmaterialtable.h" -//#include "llprimitive.h" -#include "lltextureanim.h" -//#include "lltextureentry.h" -#include "lltreeparams.h" -//#include "llvolume.h" -#include "llvolumemgr.h" -#include "material_codes.h" - // Library includes from llvfs -#include "llassettype.h" #include "lldir.h" -//#include "lldir_linux.h" -//#include "lldir_mac.h" -//#include "lldir_win32.h" -#include "llvfile.h" -#include "llvfs.h" -// Library includes from llui -// In skinning-7, llui.h dependencies are changing too often. -//#include "llui.h" +// Library includes from llmessage project +#include "llcachename.h" // llxuixml #include "llinitparam.h" diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 939d5e3970..a1a3bc6d6a 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -39,6 +39,7 @@ #include "llfloaterreg.h" #include "llmemory.h" #include "lltimer.h" +#include "llvfile.h" #include "llappviewer.h" diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 0d29efaedf..304b045423 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -108,6 +108,19 @@ const F64 log_2 = log(2.0); //---------------------------------------------------------------------------------------------- //namespace: LLViewerTextureAccess //---------------------------------------------------------------------------------------------- + +LLLoadedCallbackEntry::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) +{ +} + LLViewerMediaTexture* LLViewerTextureManager::createMediaTexture(const LLUUID &media_id, BOOL usemipmaps, LLImageGL* gl_image) { return new LLViewerMediaTexture(media_id, usemipmaps, gl_image) ; diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 141979052d..d6fbd5d570 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -49,12 +49,14 @@ class LLFace; class LLImageGL ; +class LLImageRaw; class LLViewerObject; 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; @@ -68,14 +70,7 @@ 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) - { - } + void* userdata ); loaded_callback_func mCallback; S32 mLastUsedDiscard; diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index 028f8441ab..ab55bfd04d 100644 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -53,6 +53,7 @@ const BOOL GL_TEXTURE_NO = FALSE; const BOOL IMMEDIATE_YES = TRUE; const BOOL IMMEDIATE_NO = FALSE; +class LLImageJ2C; class LLMessageSystem; class LLTextureView; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 9ba056a17c..e9f369ab1d 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -32,6 +32,8 @@ #include "llviewerprecompiledheaders.h" +#include "llviewerwindow.h" + #if LL_WINDOWS #pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally #endif @@ -46,7 +48,6 @@ #include "llpanellogin.h" #include "llviewerkeyboard.h" #include "llviewermenu.h" -#include "llviewerwindow.h" #include "llviewquery.h" #include "llxmltree.h" diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 1d564a1338..2b87fabb4f 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -50,6 +50,7 @@ #include "llmousehandler.h" #include "llcursortypes.h" #include "llhandle.h" +#include "llimage.h" #include #include diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index a9194c0c3b..9ff5769a3e 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -45,6 +45,7 @@ #include "llaudioengine.h" #include "noise.h" +#include "sound_ids.h" #include "llagent.h" // Get state values from here #include "llagentwearables.h" diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index 06e214b41e..5e42b9fad4 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -37,7 +37,6 @@ #include "llviewertexture.h" #include "llviewermedia.h" #include "llframetimer.h" -#include "llapr.h" #include "m3math.h" // LLMatrix3 #include "m4math.h" // LLMatrix4 #include diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp index c8cc6a3d8e..839fc30688 100644 --- a/indra/newview/llwaterparammanager.cpp +++ b/indra/newview/llwaterparammanager.cpp @@ -51,16 +51,13 @@ #include "llsdserialize.h" #include "v4math.h" -#include "llviewerdisplay.h" #include "llviewercontrol.h" -#include "llviewerwindow.h" #include "lldrawpoolwater.h" #include "llagent.h" #include "llviewerregion.h" #include "llwlparammanager.h" #include "llwaterparamset.h" -#include "llpostprocess.h" #include "llfloaterwater.h" #include "curl/curl.h" diff --git a/indra/newview/llwldaycycle.cpp b/indra/newview/llwldaycycle.cpp index fcc43c2b1f..000d50795f 100644 --- a/indra/newview/llwldaycycle.cpp +++ b/indra/newview/llwldaycycle.cpp @@ -33,11 +33,13 @@ #include "llviewerprecompiledheaders.h" #include "llwldaycycle.h" -#include "llsdserialize.h" -#include "llwlparammanager.h" + #include "llnotificationsutil.h" +#include "llsdserialize.h" #include "llxmlnode.h" +#include "llwlparammanager.h" + #include LLWLDayCycle::LLWLDayCycle() : mDayRate(120) diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp index c6fd35c142..d11a840545 100644 --- a/indra/newview/llwlparammanager.cpp +++ b/indra/newview/llwlparammanager.cpp @@ -42,17 +42,12 @@ #include "llspinctrl.h" #include "llcheckboxctrl.h" #include "lluictrlfactory.h" -#include "llviewercamera.h" #include "llcombobox.h" #include "lllineeditor.h" #include "llsdserialize.h" #include "v4math.h" -#include "llviewerdisplay.h" #include "llviewercontrol.h" -#include "llviewerwindow.h" -#include "lldrawpoolwater.h" -#include "llviewerregion.h" #include "llwlparamset.h" #include "llpostprocess.h" diff --git a/indra/newview/llworldmapmessage.cpp b/indra/newview/llworldmapmessage.cpp index 6a074d9697..06040a574c 100644 --- a/indra/newview/llworldmapmessage.cpp +++ b/indra/newview/llworldmapmessage.cpp @@ -33,6 +33,7 @@ #include "llviewerprecompiledheaders.h" #include "llworldmapmessage.h" +#include "message.h" #include "llworldmap.h" #include "llagent.h" diff --git a/indra/newview/llxmlrpclistener.cpp b/indra/newview/llxmlrpclistener.cpp index af8cb6b9fb..15417614af 100644 --- a/indra/newview/llxmlrpclistener.cpp +++ b/indra/newview/llxmlrpclistener.cpp @@ -21,13 +21,14 @@ // external library headers #include #include // boost::begin(), boost::end() +#include +#include "curl/curl.h" + // other Linden headers #include "llerror.h" #include "stringize.h" #include "llxmlrpctransaction.h" -#include - #if LL_WINDOWS #pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally #endif -- cgit v1.2.3 From 256b8aba31ad92200d6449305d59bf5937f0563b Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Wed, 2 Dec 2009 20:20:12 -0800 Subject: Fixed some more header file usage after the recent rebasing of my old precompiled header work. --- indra/newview/llagent.cpp | 2 +- indra/newview/lllogchat.cpp | 2 ++ indra/newview/llnotificationhandler.h | 1 + indra/newview/llpreviewgesture.h | 3 ++- indra/newview/llpreviewscript.h | 1 + 5 files changed, 7 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 2b582c90f0..628982973c 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -38,7 +38,6 @@ #include "llagentlistener.h" #include "llagentwearables.h" #include "llagentui.h" - #include "llanimationstates.h" #include "llbottomtray.h" #include "llcallingcard.h" @@ -65,6 +64,7 @@ #include "llsky.h" #include "llsmoothstep.h" #include "llstatusbar.h" +#include "llteleportflags.h" #include "lltool.h" #include "lltoolmgr.h" #include "lltrans.h" diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 33fd3e3bf1..fc9654e9ad 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -39,6 +39,8 @@ #include "lltrans.h" #include "llviewercontrol.h" +#include "llinstantmessage.h" + #include #include #include diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h index da8928321a..c5f2ab9f46 100644 --- a/indra/newview/llnotificationhandler.h +++ b/indra/newview/llnotificationhandler.h @@ -39,6 +39,7 @@ //#include "llnotificationsutil.h" #include "llchannelmanager.h" #include "llchat.h" +#include "llinstantmessage.h" #include "llnotificationptr.h" namespace LLNotificationsUI diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h index 6241869e18..19fa1dcc37 100644 --- a/indra/newview/llpreviewgesture.h +++ b/indra/newview/llpreviewgesture.h @@ -33,8 +33,9 @@ #ifndef LL_LLPREVIEWGESTURE_H #define LL_LLPREVIEWGESTURE_H -#include "llpreview.h" +#include "llassettype.h" #include "llmultigesture.h" +#include "llpreview.h" class LLMultiGesture; class LLLineEditor; diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 28a409d3ee..9d194c5557 100644 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -51,6 +51,7 @@ struct LLEntryAndEdCore; class LLMenuBarGL; class LLFloaterScriptSearch; class LLKeywordToken; +class LLVFS; class LLViewerInventoryItem; // Inner, implementation class. LLPreviewScript and LLLiveLSLEditor each own one of these. -- cgit v1.2.3 From 7c69928ff8892f0cb4a3a6ad155106ebef7e1f8a Mon Sep 17 00:00:00 2001 From: brad kittenbrink Date: Mon, 7 Dec 2009 18:43:47 -0800 Subject: Fixups for things broken after the last merge and for the linux build. --- indra/llcommon/llapp.h | 3 +++ indra/newview/llfilepicker.h | 5 ----- indra/newview/llviewermessage.cpp | 4 ++++ 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/llcommon/llapp.h b/indra/llcommon/llapp.h index 72b81f382c..963ea38249 100644 --- a/indra/llcommon/llapp.h +++ b/indra/llcommon/llapp.h @@ -39,8 +39,11 @@ #include "lloptioninterface.h" // Forward declarations +template class LLAtomic32; +typedef LLAtomic32 LLAtomicU32; class LLErrorThread; class LLLiveFile; +typedef struct siginfo siginfo_t; typedef void (*LLAppErrorHandler)(); typedef void (*LLAppChildCallback)(int pid, bool exited, int status); diff --git a/indra/newview/llfilepicker.h b/indra/newview/llfilepicker.h index ab2455620f..7ecbc3db60 100644 --- a/indra/newview/llfilepicker.h +++ b/indra/newview/llfilepicker.h @@ -64,11 +64,6 @@ extern "C" { #if LL_GTK # include "gtk/gtk.h" #endif // LL_GTK - -// also mostly for Linux, for some X11-specific filepicker usability tweaks -#if LL_X11 -#include "SDL/SDL_syswm.h" -#endif } class LLFilePicker diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index f72bbb70bf..d15214ed4b 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -38,10 +38,14 @@ #include "lleconomy.h" #include "llfloaterreg.h" #include "llfollowcamparams.h" +#include "llregionhandle.h" #include "llsdserialize.h" +#include "llteleportflags.h" #include "lltransactionflags.h" #include "llvfile.h" #include "llvfs.h" +#include "llxfermanager.h" +#include "mean_collision_data.h" #include "llagent.h" #include "llcallingcard.h" -- cgit v1.2.3 From 201e8419ee2e10fe7f3d25a91d0fb4039af3cc55 Mon Sep 17 00:00:00 2001 From: Lis Pardi Date: Wed, 9 Dec 2009 17:51:33 -0500 Subject: ext-3297 Input/Output Devices are cut off in Preferences --- .../default/xui/en/panel_preferences_sound.xml | 29 ++++++++-------------- 1 file changed, 10 insertions(+), 19 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml index 102a53ad90..d8e3f4ccfb 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml @@ -348,23 +348,24 @@ label="Input/Output devices" layout="topleft" left="30" - top="270" + top="262" name="device_settings_btn" width="190"> + width="501" + top="285"> Default @@ -397,7 +398,7 @@ left="165" max_chars="128" name="voice_input_device" - top_pad="0" + top_pad="-2" width="200" /> My volume: @@ -422,7 +423,7 @@ max_val="2" name="mic_volume_slider" tool_tip="Change the volume using this slider" - top_pad="0" + top_pad="-2" width="220" /> - -- cgit v1.2.3 From dab87201cd37e27d72a0e233ccfbdf3697457190 Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 9 Dec 2009 16:37:08 -0800 Subject: Partial EXT-3268 Object Profile option showing up in avatar 3D Context menu Renamed gPie* and menu_pie_* to just gMenu* and menu_* because they are no longer pie menus. Created separate other-attachment menus. Reviewed with Richard. --- indra/newview/llselectmgr.cpp | 42 ++-- indra/newview/lltoolpie.cpp | 22 +- indra/newview/llviewermenu.cpp | 76 ++++--- indra/newview/llviewermenu.h | 22 +- .../skins/default/xui/en/menu_attachment_other.xml | 116 +++++++++++ .../skins/default/xui/en/menu_attachment_self.xml | 124 +++++++++++ .../skins/default/xui/en/menu_avatar_other.xml | 105 ++++++++++ .../skins/default/xui/en/menu_avatar_self.xml | 227 +++++++++++++++++++++ indra/newview/skins/default/xui/en/menu_land.xml | 65 ++++++ indra/newview/skins/default/xui/en/menu_object.xml | 158 ++++++++++++++ 10 files changed, 883 insertions(+), 74 deletions(-) create mode 100644 indra/newview/skins/default/xui/en/menu_attachment_other.xml create mode 100644 indra/newview/skins/default/xui/en/menu_attachment_self.xml create mode 100644 indra/newview/skins/default/xui/en/menu_avatar_other.xml create mode 100644 indra/newview/skins/default/xui/en/menu_avatar_self.xml create mode 100644 indra/newview/skins/default/xui/en/menu_land.xml create mode 100644 indra/newview/skins/default/xui/en/menu_object.xml (limited to 'indra') diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 4d6c19157a..6e99d5a5f0 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -3494,7 +3494,7 @@ void LLSelectMgr::deselectAllIfTooFar() // HACK: Don't deselect when we're navigating to rate an object's // owner or creator. JC - if (gPieObject->getVisible() || gPieRate->getVisible() ) + if (gMenuObject->getVisible()) { return; } @@ -5493,11 +5493,15 @@ void dialog_refresh_all() gFloaterTools->dirty(); - gPieObject->needsArrange(); + gMenuObject->needsArrange(); - if( gPieAttachment->getVisible() ) + if( gMenuAttachmentSelf->getVisible() ) { - gPieAttachment->arrange(); + gMenuAttachmentSelf->arrange(); + } + if( gMenuAttachmentOther->getVisible() ) + { + gMenuAttachmentOther->arrange(); } LLFloaterProperties::dirtyAll(); @@ -5754,21 +5758,21 @@ void LLSelectMgr::redo() //----------------------------------------------------------------------------- BOOL LLSelectMgr::canDoDelete() const { - bool can_delete = false; - // This function is "logically const" - it does not change state in - // a way visible outside the selection manager. - LLSelectMgr* self = const_cast(this); - LLViewerObject* obj = self->mSelectedObjects->getFirstDeleteableObject(); - // Note: Can only delete root objects (see getFirstDeleteableObject() for more info) - if (obj!= NULL) - { - // all the faces needs to be selected - if(self->mSelectedObjects->contains(obj,SELECT_ALL_TES )) - { - can_delete = true; - } - } - + bool can_delete = false; + // This function is "logically const" - it does not change state in + // a way visible outside the selection manager. + LLSelectMgr* self = const_cast(this); + LLViewerObject* obj = self->mSelectedObjects->getFirstDeleteableObject(); + // Note: Can only delete root objects (see getFirstDeleteableObject() for more info) + if (obj!= NULL) + { + // all the faces needs to be selected + if(self->mSelectedObjects->contains(obj,SELECT_ALL_TES )) + { + can_delete = true; + } + } + return can_delete; } diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 5ed8dc5fb9..8a69c362b2 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -1445,28 +1445,29 @@ BOOL LLToolPie::pickRightMouseDownCallback() { LLParcelSelectionHandle selection = LLViewerParcelMgr::getInstance()->selectParcelAt( mPick.mPosGlobal ); gMenuHolder->setParcelSelection(selection); - gPieLand->show(x, y); + gMenuLand->show(x, y); showVisualContextMenuEffect(); } else if (mPick.mObjectID == gAgent.getID() ) { - if(!gPieSelf) + if(!gMenuAvatarSelf) { //either at very early startup stage or at late quitting stage, //this event is ignored. return TRUE ; } - gPieSelf->show(x, y); + gMenuAvatarSelf->show(x, y); } else if (object) { gMenuHolder->setObjectSelection(LLSelectMgr::getInstance()->getSelection()); + bool is_other_attachment = (object->isAttachment() && !object->isHUDAttachment() && !object->permYouOwner()); if (object->isAvatar() - || (object->isAttachment() && !object->isHUDAttachment() && !object->permYouOwner())) + || is_other_attachment) { // Find the attachment's avatar while( object && object->isAttachment()) @@ -1486,11 +1487,18 @@ BOOL LLToolPie::pickRightMouseDownCallback() gMenuHolder->childSetText("Avatar Mute", std::string("Mute")); // *TODO:Translate } - gPieAvatar->show(x, y); + if (is_other_attachment) + { + gMenuAttachmentOther->show(x, y); + } + else + { + gMenuAvatarOther->show(x, y); + } } else if (object->isAttachment()) { - gPieAttachment->show(x, y); + gMenuAttachmentSelf->show(x, y); } else { @@ -1510,7 +1518,7 @@ BOOL LLToolPie::pickRightMouseDownCallback() gMenuHolder->childSetText("Object Mute", std::string("Mute")); // *TODO:Translate } - gPieObject->show(x, y); + gMenuObject->show(x, y); showVisualContextMenuEffect(); } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 78322dda75..e1143adcb6 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -133,11 +133,12 @@ LLMenuGL *gPopupMenuView = NULL; LLMenuBarGL *gLoginMenuBarView = NULL; // Pie menus -LLContextMenu *gPieSelf = NULL; -LLContextMenu *gPieAvatar = NULL; -LLContextMenu *gPieObject = NULL; -LLContextMenu *gPieAttachment = NULL; -LLContextMenu *gPieLand = NULL; +LLContextMenu *gMenuAvatarSelf = NULL; +LLContextMenu *gMenuAvatarOther = NULL; +LLContextMenu *gMenuObject = NULL; +LLContextMenu *gMenuAttachmentSelf = NULL; +LLContextMenu *gMenuAttachmentOther = NULL; +LLContextMenu *gMenuLand = NULL; const std::string SAVE_INTO_INVENTORY("Save Object Back to My Inventory"); const std::string SAVE_INTO_TASK_INVENTORY("Save Object Back to Object Contents"); @@ -145,7 +146,6 @@ const std::string SAVE_INTO_TASK_INVENTORY("Save Object Back to Object Contents" LLMenuGL* gAttachSubMenu = NULL; LLMenuGL* gDetachSubMenu = NULL; LLMenuGL* gTakeOffClothes = NULL; -LLContextMenu* gPieRate = NULL; LLContextMenu* gAttachScreenPieMenu = NULL; LLContextMenu* gAttachPieMenu = NULL; LLContextMenu* gAttachBodyPartPieMenus[8]; @@ -375,25 +375,31 @@ void init_menus() gMenuHolder->addChild( gPopupMenuView ); /// - /// Pie menus + /// Context menus /// - gPieSelf = LLUICtrlFactory::getInstance()->createFromFile("menu_pie_self.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + const widget_registry_t& registry = + LLViewerMenuHolderGL::child_registry_t::instance(); + gMenuAvatarSelf = LLUICtrlFactory::createFromFile( + "menu_avatar_self.xml", gMenuHolder, registry); + gMenuAvatarOther = LLUICtrlFactory::createFromFile( + "menu_avatar_other.xml", gMenuHolder, registry); - // TomY TODO: what shall we do about these? gDetachScreenPieMenu = gMenuHolder->getChild("Object Detach HUD", true); gDetachPieMenu = gMenuHolder->getChild("Object Detach", true); - gPieAvatar = LLUICtrlFactory::getInstance()->createFromFile("menu_pie_avatar.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - - gPieObject = LLUICtrlFactory::getInstance()->createFromFile("menu_pie_object.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + gMenuObject = LLUICtrlFactory::createFromFile( + "menu_object.xml", gMenuHolder, registry); gAttachScreenPieMenu = gMenuHolder->getChild("Object Attach HUD"); gAttachPieMenu = gMenuHolder->getChild("Object Attach"); - gPieRate = gMenuHolder->getChild("Rate Menu"); - gPieAttachment = LLUICtrlFactory::getInstance()->createFromFile("menu_pie_attachment.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + gMenuAttachmentSelf = LLUICtrlFactory::createFromFile( + "menu_attachment_self.xml", gMenuHolder, registry); + gMenuAttachmentOther = LLUICtrlFactory::createFromFile( + "menu_attachment_other.xml", gMenuHolder, registry); - gPieLand = LLUICtrlFactory::getInstance()->createFromFile("menu_pie_land.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + gMenuLand = LLUICtrlFactory::createFromFile( + "menu_land.xml", gMenuHolder, registry); /// /// set up the colors @@ -402,12 +408,13 @@ void init_menus() LLColor4 context_menu_color = LLUIColorTable::instance().getColor("MenuPopupBgColor"); - gPieSelf->setBackgroundColor( context_menu_color ); - gPieAvatar->setBackgroundColor( context_menu_color ); - gPieObject->setBackgroundColor( context_menu_color ); - gPieAttachment->setBackgroundColor( context_menu_color ); + gMenuAvatarSelf->setBackgroundColor( context_menu_color ); + gMenuAvatarOther->setBackgroundColor( context_menu_color ); + gMenuObject->setBackgroundColor( context_menu_color ); + gMenuAttachmentSelf->setBackgroundColor( context_menu_color ); + gMenuAttachmentOther->setBackgroundColor( context_menu_color ); - gPieLand->setBackgroundColor( context_menu_color ); + gMenuLand->setBackgroundColor( context_menu_color ); color = LLUIColorTable::instance().getColor( "MenuPopupBgColor" ); gPopupMenuView->setBackgroundColor( color ); @@ -2262,20 +2269,23 @@ void cleanup_menus() delete gMenuParcelObserver; gMenuParcelObserver = NULL; - delete gPieSelf; - gPieSelf = NULL; + delete gMenuAvatarSelf; + gMenuAvatarSelf = NULL; + + delete gMenuAvatarOther; + gMenuAvatarOther = NULL; - delete gPieAvatar; - gPieAvatar = NULL; + delete gMenuObject; + gMenuObject = NULL; - delete gPieObject; - gPieObject = NULL; + delete gMenuAttachmentSelf; + gMenuAttachmentSelf = NULL; - delete gPieAttachment; - gPieAttachment = NULL; + delete gMenuAttachmentOther; + gMenuAttachmentSelf = NULL; - delete gPieLand; - gPieLand = NULL; + delete gMenuLand; + gMenuLand = NULL; delete gMenuBarView; gMenuBarView = NULL; @@ -4903,7 +4913,7 @@ class LLEditDelete : public view_listener_t // When deleting an object we may not actually be done // Keep selection so we know what to delete when confirmation is needed about the delete - gPieObject->hide(); + gMenuObject->hide(); return true; } }; @@ -4936,7 +4946,7 @@ void handle_object_delete() // When deleting an object we may not actually be done // Keep selection so we know what to delete when confirmation is needed about the delete - gPieObject->hide(); + gMenuObject->hide(); return; } @@ -6007,7 +6017,7 @@ public: protected: virtual void done() { - gPieAttachment->buildDrawLabels(); + gMenuAttachmentSelf->buildDrawLabels(); gInventory.removeObserver(this); delete this; } diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index 01a6b34170..71be4cb592 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -160,21 +160,13 @@ extern LLMenuGL* gPopupMenuView; extern LLViewerMenuHolderGL* gMenuHolder; extern LLMenuBarGL* gLoginMenuBarView; -// Pie menus -extern LLContextMenu *gPieSelf; -extern LLContextMenu *gPieAvatar; -extern LLContextMenu *gPieObject; -extern LLContextMenu *gPieAttachment; - -extern LLContextMenu *gPieLand; -extern LLContextMenu *gPieRate; - -// Pie menus -extern LLContextMenu *gPieSelfSimple; -extern LLContextMenu *gPieAvatarSimple; -extern LLContextMenu *gPieObjectSimple; -extern LLContextMenu *gPieAttachmentSimple; -extern LLContextMenu *gPieLandSimple; +// Context menus in 3D scene +extern LLContextMenu *gMenuAvatarSelf; +extern LLContextMenu *gMenuAvatarOther; +extern LLContextMenu *gMenuObject; +extern LLContextMenu *gMenuAttachmentSelf; +extern LLContextMenu *gMenuAttachmentOther; +extern LLContextMenu *gMenuLand; // Needed to build menus when attachment site list available extern LLMenuGL* gAttachSubMenu; diff --git a/indra/newview/skins/default/xui/en/menu_attachment_other.xml b/indra/newview/skins/default/xui/en/menu_attachment_other.xml new file mode 100644 index 0000000000..14229db08d --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_attachment_other.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml new file mode 100644 index 0000000000..c85dbbb1bc --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/menu_avatar_other.xml b/indra/newview/skins/default/xui/en/menu_avatar_other.xml new file mode 100644 index 0000000000..cf01a21f7c --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_avatar_other.xml @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/menu_avatar_self.xml b/indra/newview/skins/default/xui/en/menu_avatar_self.xml new file mode 100644 index 0000000000..c6ce612a76 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_avatar_self.xml @@ -0,0 +1,227 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/menu_land.xml b/indra/newview/skins/default/xui/en/menu_land.xml new file mode 100644 index 0000000000..fac1dcf6ec --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_land.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/menu_object.xml b/indra/newview/skins/default/xui/en/menu_object.xml new file mode 100644 index 0000000000..62500c5116 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_object.xml @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From 42120752bdc043caf690b1809f97d0ce77413a7e Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 9 Dec 2009 16:58:49 -0800 Subject: Cleanup unneeded topleft attributes, document similar menu files --- .../skins/default/xui/en/menu_attachment_other.xml | 17 +++-------------- .../newview/skins/default/xui/en/menu_avatar_other.xml | 13 ++----------- 2 files changed, 5 insertions(+), 25 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/menu_attachment_other.xml b/indra/newview/skins/default/xui/en/menu_attachment_other.xml index 14229db08d..5b94645b60 100644 --- a/indra/newview/skins/default/xui/en/menu_attachment_other.xml +++ b/indra/newview/skins/default/xui/en/menu_attachment_other.xml @@ -1,10 +1,10 @@ + @@ -22,31 +21,26 @@ - + @@ -55,7 +49,6 @@ @@ -86,7 +79,6 @@ - + diff --git a/indra/newview/skins/default/xui/en/menu_avatar_other.xml b/indra/newview/skins/default/xui/en/menu_avatar_other.xml index cf01a21f7c..0ad41546d2 100644 --- a/indra/newview/skins/default/xui/en/menu_avatar_other.xml +++ b/indra/newview/skins/default/xui/en/menu_avatar_other.xml @@ -1,10 +1,10 @@ + @@ -22,31 +21,26 @@ - + @@ -55,7 +49,6 @@ @@ -86,7 +79,6 @@ -- cgit v1.2.3 From 23610472d5e09b66cd05039a9c6cb96664fdbaeb Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 9 Dec 2009 17:17:07 -0800 Subject: lazy evaluation of lluistring to improve LLUIString::format performance reviewed by Mani --- indra/llui/lluistring.cpp | 51 ++++++++++++++++++++++++++++++----------------- indra/llui/lluistring.h | 32 +++++++++++++++++++---------- 2 files changed, 55 insertions(+), 28 deletions(-) (limited to 'indra') diff --git a/indra/llui/lluistring.cpp b/indra/llui/lluistring.cpp index 3a1e656364..f7a53e87de 100644 --- a/indra/llui/lluistring.cpp +++ b/indra/llui/lluistring.cpp @@ -39,22 +39,23 @@ LLFastTimer::DeclareTimer FTM_UI_STRING("UI String"); LLUIString::LLUIString(const std::string& instring, const LLStringUtil::format_map_t& args) - : mOrig(instring), - mArgs(args) +: mOrig(instring), + mArgs(args) { - format(); + dirty(); } void LLUIString::assign(const std::string& s) { mOrig = s; - format(); + dirty(); } void LLUIString::setArgList(const LLStringUtil::format_map_t& args) + { mArgs = args; - format(); + dirty(); } void LLUIString::setArgs(const LLSD& sd) @@ -68,40 +69,40 @@ void LLUIString::setArgs(const LLSD& sd) { setArg(sd_it->first, sd_it->second.asString()); } - format(); + dirty(); } void LLUIString::setArg(const std::string& key, const std::string& replacement) { mArgs[key] = replacement; - format(); + dirty(); } void LLUIString::truncate(S32 maxchars) { - if (mWResult.size() > (size_t)maxchars) + if (getUpdatedWResult().size() > (size_t)maxchars) { - LLWStringUtil::truncate(mWResult, maxchars); - mResult = wstring_to_utf8str(mWResult); + LLWStringUtil::truncate(getUpdatedWResult(), maxchars); + mResult = wstring_to_utf8str(getUpdatedWResult()); } } void LLUIString::erase(S32 charidx, S32 len) { - mWResult.erase(charidx, len); - mResult = wstring_to_utf8str(mWResult); + getUpdatedWResult().erase(charidx, len); + mResult = wstring_to_utf8str(getUpdatedWResult()); } void LLUIString::insert(S32 charidx, const LLWString& wchars) { - mWResult.insert(charidx, wchars); - mResult = wstring_to_utf8str(mWResult); + getUpdatedWResult().insert(charidx, wchars); + mResult = wstring_to_utf8str(getUpdatedWResult()); } void LLUIString::replace(S32 charidx, llwchar wc) { - mWResult[charidx] = wc; - mResult = wstring_to_utf8str(mWResult); + getUpdatedWResult()[charidx] = wc; + mResult = wstring_to_utf8str(getUpdatedWResult()); } void LLUIString::clear() @@ -112,8 +113,16 @@ void LLUIString::clear() mWResult.clear(); } -void LLUIString::format() +void LLUIString::dirty() { + mNeedsResult = true; + mNeedsWResult = true; +} + +void LLUIString::updateResult() const +{ + mNeedsResult = false; + LLFastTimer timer(FTM_UI_STRING); // optimize for empty strings (don't attempt string replacement) @@ -129,5 +138,11 @@ void LLUIString::format() LLStringUtil::format_map_t combined_args = LLTrans::getDefaultArgs(); combined_args.insert(mArgs.begin(), mArgs.end()); LLStringUtil::format(mResult, combined_args); - mWResult = utf8str_to_wstring(mResult); +} + +void LLUIString::updateWResult() const +{ + mNeedsWResult = false; + + mWResult = utf8str_to_wstring(getUpdatedResult()); } diff --git a/indra/llui/lluistring.h b/indra/llui/lluistring.h index 763de4d6a3..7ec0fd603a 100644 --- a/indra/llui/lluistring.h +++ b/indra/llui/lluistring.h @@ -76,19 +76,19 @@ public: void setArgs(const class LLSD& sd); void setArg(const std::string& key, const std::string& replacement); - const std::string& getString() const { return mResult; } - operator std::string() const { return mResult; } + const std::string& getString() const { return getUpdatedResult(); } + operator std::string() const { return getUpdatedResult(); } - const LLWString& getWString() const { return mWResult; } - operator LLWString() const { return mWResult; } + const LLWString& getWString() const { return getUpdatedWResult(); } + operator LLWString() const { return getUpdatedWResult(); } - bool empty() const { return mWResult.empty(); } - S32 length() const { return mWResult.size(); } + bool empty() const { return getUpdatedResult().empty(); } + S32 length() const { return getUpdatedWResult().size(); } void clear(); void clearArgs() { mArgs.clear(); } - // These utuilty functions are included for text editing. + // These utility functions are included for text editing. // They do not affect mOrig and do not perform argument substitution void truncate(S32 maxchars); void erase(S32 charidx, S32 len); @@ -96,12 +96,24 @@ public: void replace(S32 charidx, llwchar wc); private: - void format(); + // something changed, requiring reformatting of strings + void dirty(); + + std::string& getUpdatedResult() const { if (mNeedsResult) { updateResult(); } return mResult; } + LLWString& getUpdatedWResult() const{ if (mNeedsWResult) { updateWResult(); } return mWResult; } + + // do actual work of updating strings (non-inlined) + void updateResult() const; + void updateWResult() const; std::string mOrig; - std::string mResult; - LLWString mWResult; // for displaying + mutable std::string mResult; + mutable LLWString mWResult; // for displaying LLStringUtil::format_map_t mArgs; + + // controls lazy evaluation + mutable bool mNeedsResult; + mutable bool mNeedsWResult; }; #endif // LL_LLUISTRING_H -- cgit v1.2.3 From 6408298aad1af6c0a49fd41490070d7a65a7ec52 Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 9 Dec 2009 17:41:42 -0800 Subject: EXT-3112 - Bad font width information with SansSerif causing clipping of trailing "r"? better handling of ui scale != 1 reviewed by Mani --- indra/llrender/llfontgl.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra') diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index a28ffbfdc0..19afa997fa 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -195,7 +195,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons cur_y += mFontFreetype->getDescenderHeight(); break; case VCENTER: - cur_y -= ((mFontFreetype->getAscenderHeight() - mFontFreetype->getDescenderHeight())/2.f); + cur_y -= (mFontFreetype->getAscenderHeight() - mFontFreetype->getDescenderHeight()) / 2.f; break; case BASELINE: // Baseline, do nothing. @@ -221,7 +221,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons cur_render_y = cur_y; cur_render_x = cur_x; - F32 start_x = cur_x; + F32 start_x = llround(cur_x); const LLFontBitmapCache* font_bitmap_cache = mFontFreetype->getFontBitmapCache(); @@ -301,8 +301,8 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons // Must do this to cur_x, not just to cur_render_x, otherwise you // will squish sub-pixel kerned characters too close together. // For example, "CCCCC" looks bad. - cur_x = (F32)llfloor(cur_x + 0.5f); - //cur_y = (F32)llfloor(cur_y + 0.5f); + cur_x = (F32)llround(cur_x); + //cur_y = (F32)llround(cur_y); cur_render_x = cur_x; cur_render_y = cur_y; @@ -461,7 +461,7 @@ F32 LLFontGL::getWidthF32(const llwchar* wchars, S32 begin_offset, S32 max_chars cur_x += mFontFreetype->getXKerning(wch, next_char); } // Round after kerning. - cur_x = (F32)llfloor(cur_x + 0.5f); + cur_x = (F32)llround(cur_x); } // add in extra pixels for last character's width past its xadvance @@ -548,7 +548,7 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch } // Round after kerning. - cur_x = (F32)llfloor(cur_x + 0.5f); + cur_x = llround(cur_x); drawn_x = cur_x; } @@ -660,7 +660,7 @@ S32 LLFontGL::charFromPixelOffset(const llwchar* wchars, S32 begin_offset, F32 t } // Round after kerning. - cur_x = (F32)llfloor(cur_x + 0.5f); + cur_x = llround(cur_x); } return llmin(max_chars, pos - begin_offset); -- cgit v1.2.3 From 4cca7eb4259a7b0949fe9714e439b9e4ec2336ba Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 9 Dec 2009 18:26:34 -0800 Subject: EXT-299 "Mute" still showing in menu_pie_avatar.xml although label says "Block" --- indra/newview/lltoolpie.cpp | 13 +++++++++---- indra/newview/skins/default/xui/en/strings.xml | 4 ++++ 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 8a69c362b2..df8d1df609 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -1478,21 +1478,24 @@ BOOL LLToolPie::pickRightMouseDownCallback() // Object is an avatar, so check for mute by id. LLVOAvatar* avatar = (LLVOAvatar*)object; std::string name = avatar->getFullname(); + std::string mute_msg; if (LLMuteList::getInstance()->isMuted(avatar->getID(), avatar->getFullname())) { - gMenuHolder->childSetText("Avatar Mute", std::string("Unmute")); // *TODO:Translate + mute_msg = LLTrans::getString("UnmuteAvatar"); } else { - gMenuHolder->childSetText("Avatar Mute", std::string("Mute")); // *TODO:Translate + mute_msg = LLTrans::getString("MuteAvatar"); } if (is_other_attachment) { + gMenuAttachmentOther->getChild("Avatar Mute")->setValue(mute_msg); gMenuAttachmentOther->show(x, y); } else { + gMenuAvatarOther->getChild("Avatar Mute")->setValue(mute_msg); gMenuAvatarOther->show(x, y); } } @@ -1509,15 +1512,17 @@ BOOL LLToolPie::pickRightMouseDownCallback() { name = node->mName; } + std::string mute_msg; if (LLMuteList::getInstance()->isMuted(object->getID(), name)) { - gMenuHolder->childSetText("Object Mute", std::string("Unmute")); // *TODO:Translate + mute_msg = LLTrans::getString("UnmuteObject"); } else { - gMenuHolder->childSetText("Object Mute", std::string("Mute")); // *TODO:Translate + mute_msg = LLTrans::getString("MuteObject"); } + gMenuHolder->childSetText("Object Mute", mute_msg); gMenuObject->show(x, y); showVisualContextMenuEffect(); diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index d5022de089..4d507a4a61 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2112,6 +2112,10 @@ this texture in your inventory Unknown file extension .%s Expected .wav, .tga, .bmp, .jpg, .jpeg, or .bvh + Block + Block + Unblock + Unblock Add to My Landmarks... Edit my Landmark... -- cgit v1.2.3 From 08c0d3876bcddb2beeabb6fb2cd1a620eeb02576 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 10 Dec 2009 14:45:41 +0200 Subject: Work on major task EXT-2808 (Add speakers moderation (both voice and text) to the Voice Control Panel (Active Speakers List)) -- Implemented Actions to Mute/Unmute Participants without using Agent's Block List -- Updated missing strings to show error while moderating --HG-- branch : product-engine --- indra/newview/llparticipantlist.cpp | 101 ++++++++++++++++++++----- indra/newview/llparticipantlist.h | 4 +- indra/newview/skins/default/xui/en/strings.xml | 3 + 3 files changed, 90 insertions(+), 18 deletions(-) (limited to 'indra') diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 48a7a32a3b..a42b5e48cc 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -341,7 +341,7 @@ void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const if (uuids.size() == 0) return; const LLUUID speaker_id = mUUIDs.front(); - BOOL is_muted = LLMuteList::getInstance()->isMuted(speaker_id, LLMute::flagVoiceChat); + BOOL is_muted = isMuted(speaker_id); if (is_muted) { @@ -353,7 +353,6 @@ void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceUnMuteSelected", false); LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceUnMuteOthers", false); } - } void LLParticipantList::LLParticipantListMenu::toggleAllowTextChat(const LLSD& userdata) @@ -390,14 +389,14 @@ void LLParticipantList::LLParticipantListMenu::toggleAllowTextChat(const LLSD& u { gIMMgr->showSessionEventError( "mute", - "not_a_moderator", + "not_a_mod_error", mSessionID); } else { gIMMgr->showSessionEventError( "mute", - "generic", + "generic_request_error", mSessionID); } } @@ -450,34 +449,102 @@ void LLParticipantList::LLParticipantListMenu::toggleMuteVoice(const LLSD& userd toggleMute(userdata, LLMute::flagVoiceChat); } +bool LLParticipantList::LLParticipantListMenu::isMuted(const LLUUID& avatar_id) +{ + LLPointer selected_speakerp = mParent.mSpeakerMgr->findSpeaker(avatar_id); + if (!selected_speakerp) return true; + + return selected_speakerp->mStatus == LLSpeaker::STATUS_MUTED; +} + void LLParticipantList::LLParticipantListMenu::moderateVoice(const LLSD& userdata) { + if (!gAgent.getRegion()) return; + bool moderate_selected = userdata.asString() == "selected"; + const LLUUID& selected_avatar_id = mUUIDs.front(); + bool is_muted = isMuted(selected_avatar_id); + + if (moderate_selected) + { + moderateVoiceParticipant(selected_avatar_id, is_muted); + } + else + { + moderateVoiceOtherParticipants(selected_avatar_id, is_muted); + } } -void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(const LLSD& userdata) + +void LLParticipantList::LLParticipantListMenu::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute) +{ + if (gAgentID == avatar_id) return; // do not process myself + + std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest"); + LLSD data; + data["method"] = "mute update"; + data["session-id"] = mParent.mSpeakerMgr->getSessionID(); + data["params"] = LLSD::emptyMap(); + data["params"]["agent_id"] = avatar_id; + data["params"]["mute_info"] = LLSD::emptyMap(); + data["params"]["mute_info"]["voice"] = !unmute; + + class MuteVoiceResponder : public LLHTTPClient::Responder + { + public: + MuteVoiceResponder(const LLUUID& session_id) + { + mSessionID = session_id; + } + + virtual void error(U32 status, const std::string& reason) + { + llwarns << status << ": " << reason << llendl; + + if ( gIMMgr ) + { + //403 == you're not a mod + //should be disabled if you're not a moderator + if ( 403 == status ) + { + gIMMgr->showSessionEventError( + "mute", + "not_a_mod_error", + mSessionID); + } + else + { + gIMMgr->showSessionEventError( + "mute", + "generic_request_error", + mSessionID); + } + } + } + + private: + LLUUID mSessionID; + }; + + LLHTTPClient::post( + url, + data, + new MuteVoiceResponder(mParent.mSpeakerMgr->getSessionID())); +} + +void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute) { LLSpeakerMgr::speaker_list_t speakers; mParent.mSpeakerMgr->getSpeakerList(&speakers, true); - const LLUUID& excluded_avatar_id = mUUIDs.front(); - bool should_mute = userdata.asString() == "mute"; for (LLSpeakerMgr::speaker_list_t::iterator iter = speakers.begin(); iter != speakers.end(); ++iter) { LLSpeaker* speakerp = (*iter).get(); LLUUID speaker_id = speakerp->mID; - if (excluded_avatar_id == speaker_id) continue; - LLMute mute(speaker_id, speakerp->mDisplayName, speakerp->mType == LLSpeaker::SPEAKER_AGENT ? LLMute::AGENT : LLMute::OBJECT); + if (excluded_avatar_id == speaker_id) continue; - if (should_mute) - { - LLMuteList::getInstance()->add(mute, LLMute::flagVoiceChat); - } - else - { - LLMuteList::getInstance()->remove(mute, LLMute::flagVoiceChat); - } + moderateVoiceParticipant(speaker_id, unmute); } } diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index 83191a5b8d..388d0b4fee 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -130,8 +130,10 @@ class LLParticipantList void toggleMuteVoice(const LLSD& userdata); // Voice moderation support + bool isMuted(const LLUUID& avatar_id); void moderateVoice(const LLSD& userdata); - void moderateVoiceOtherParticipants(const LLSD& userdata); + void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute); + void moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute); }; private: diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index c3650c71c3..8ac4ca95b9 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2900,6 +2900,9 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. Unable to send your message to the chat session with [RECIPIENT]. + + Error while moderating. + You have been removed from the group. -- cgit v1.2.3 From e8d3afc99c3914a060384ee9eb6d2b673e76e36f Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 10 Dec 2009 15:15:45 +0200 Subject: Work on major task EXT-2808 (Add speakers moderation (both voice and text) to the Voice Control Panel (Active Speakers List)) -- Refactored moderating of text & voice chats to use the only LLHTTPClient::Responder class -- added doxygen comments for voice moderation functions --HG-- branch : product-engine --- indra/newview/llparticipantlist.cpp | 118 +++++++++++++----------------------- indra/newview/llparticipantlist.h | 39 ++++++++++++ 2 files changed, 81 insertions(+), 76 deletions(-) (limited to 'indra') diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index a42b5e48cc..9a6cafe0de 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -47,6 +47,44 @@ #if LL_MSVC #pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally #endif + +class ModerationResponder : public LLHTTPClient::Responder +{ +public: + ModerationResponder(const LLUUID& session_id) + { + mSessionID = session_id; + } + + virtual void error(U32 status, const std::string& reason) + { + llwarns << status << ": " << reason << llendl; + + if ( gIMMgr ) + { + //403 == you're not a mod + //should be disabled if you're not a moderator + if ( 403 == status ) + { + gIMMgr->showSessionEventError( + "mute", + "not_a_mod_error", + mSessionID); + } + else + { + gIMMgr->showSessionEventError( + "mute", + "generic_request_error", + mSessionID); + } + } + } + +private: + LLUUID mSessionID; +}; + LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, bool use_context_menu/* = true*/): mSpeakerMgr(data_source), mAvatarList(avatar_list), @@ -369,47 +407,10 @@ void LLParticipantList::LLParticipantListMenu::toggleAllowTextChat(const LLSD& u //current value represents ability to type, so invert data["params"]["mute_info"]["text"] = !mParent.mSpeakerMgr->findSpeaker(speaker_id)->mModeratorMutedText; - class MuteTextResponder : public LLHTTPClient::Responder - { - public: - MuteTextResponder(const LLUUID& session_id) - { - mSessionID = session_id; - } - - virtual void error(U32 status, const std::string& reason) - { - llwarns << status << ": " << reason << llendl; - - if ( gIMMgr ) - { - //403 == you're not a mod - //should be disabled if you're not a moderator - if ( 403 == status ) - { - gIMMgr->showSessionEventError( - "mute", - "not_a_mod_error", - mSessionID); - } - else - { - gIMMgr->showSessionEventError( - "mute", - "generic_request_error", - mSessionID); - } - } - } - - private: - LLUUID mSessionID; - }; - LLHTTPClient::post( url, data, - new MuteTextResponder(mParent.mSpeakerMgr->getSessionID())); + new ModerationResponder(mParent.mSpeakerMgr->getSessionID())); } void LLParticipantList::LLParticipantListMenu::toggleMute(const LLSD& userdata, U32 flags) @@ -488,47 +489,10 @@ void LLParticipantList::LLParticipantListMenu::moderateVoiceParticipant(const LL data["params"]["mute_info"] = LLSD::emptyMap(); data["params"]["mute_info"]["voice"] = !unmute; - class MuteVoiceResponder : public LLHTTPClient::Responder - { - public: - MuteVoiceResponder(const LLUUID& session_id) - { - mSessionID = session_id; - } - - virtual void error(U32 status, const std::string& reason) - { - llwarns << status << ": " << reason << llendl; - - if ( gIMMgr ) - { - //403 == you're not a mod - //should be disabled if you're not a moderator - if ( 403 == status ) - { - gIMMgr->showSessionEventError( - "mute", - "not_a_mod_error", - mSessionID); - } - else - { - gIMMgr->showSessionEventError( - "mute", - "generic_request_error", - mSessionID); - } - } - } - - private: - LLUUID mSessionID; - }; - LLHTTPClient::post( url, data, - new MuteVoiceResponder(mParent.mSpeakerMgr->getSessionID())); + new ModerationResponder(mParent.mSpeakerMgr->getSessionID())); } void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute) @@ -583,3 +547,5 @@ bool LLParticipantList::LLParticipantListMenu::checkContextMenuItem(const LLSD& } return false; } + +//EOF diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index 388d0b4fee..a130edb553 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -130,9 +130,48 @@ class LLParticipantList void toggleMuteVoice(const LLSD& userdata); // Voice moderation support + /** + * Check whether specified by argument avatar is muted for group chat or not. + */ bool isMuted(const LLUUID& avatar_id); + + /** + * Processes Voice moderation menu items. + * + * It calls either moderateVoiceParticipant() or moderateVoiceParticipant() depend on + * passed parameter. + * + * @param userdata can be "selected" or "others". + * + * @see moderateVoiceParticipant() + * @see moderateVoiceOtherParticipants() + */ void moderateVoice(const LLSD& userdata); + + /** + * Mutes/Unmutes avatar for current group voice chat. + * + * It only marks avatar as muted for session and does not use local Agent's Block list. + * It does not mute Agent itself. + * + * @param[in] avatar_id UUID of avatar to be processed + * @param[in] unmute if true - specified avatar will be muted, otherwise - unmuted. + * + * @see moderateVoiceOtherParticipants() + */ void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute); + + /** + * Mutes/Unmutes all avatars except specified for current group voice chat. + * + * It only marks avatars as muted for session and does not use local Agent's Block list. + * It based call moderateVoiceParticipant() for each avatar should be muted/unmuted. + * + * @param[in] excluded_avatar_id UUID of avatar NOT to be processed + * @param[in] unmute if true - avatars will be muted, otherwise - unmuted. + * + * @see moderateVoiceParticipant() + */ void moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute); }; -- cgit v1.2.3 From 722cd44d163f7195d361f249d0e455a5e4e9d674 Mon Sep 17 00:00:00 2001 From: "Justin C. Rounds (Chuck)" Date: Thu, 10 Dec 2009 11:37:33 -0500 Subject: Added missing reference to "Dropdown_On". --- indra/newview/skins/default/textures/textures.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 607df10048..39adb42369 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -143,6 +143,7 @@ with the same filename but different name + -- cgit v1.2.3 From ac5fa9294291058b08db12454d3f6a8f5a789837 Mon Sep 17 00:00:00 2001 From: "Justin C. Rounds (Chuck)" Date: Thu, 10 Dec 2009 11:58:53 -0500 Subject: Changed ObjectChatColor to EmphasisColor. http://jira.secondlife.com/browse/EXT-2303 --- indra/newview/skins/default/colors.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index cdbeed111e..33dd7791dc 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -513,7 +513,7 @@ reference="White" /> + reference="EmphasisColor" /> -- cgit v1.2.3 From 862681b53a61783d292782c2415e8c5caddde136 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Thu, 10 Dec 2009 20:07:16 +0200 Subject: Fixed normal bug EXT-3095 (Mute sign is shown in Voice control panel for speaking avatar (refer to screenshot)) --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 895b4ed80e..d9fc4d54ab 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -263,13 +263,18 @@ void LLCallFloater::updateTitle() void LLCallFloater::initAgentData() { - childSetValue("user_icon", gAgentID); + LLPanel* my_panel = getChild ("my_panel"); - std::string name; - gCacheName->getFullName(gAgentID, name); - childSetValue("user_text", name); + if ( my_panel ) + { + my_panel->childSetValue("user_icon", gAgentID); + + std::string name; + gCacheName->getFullName(gAgentID, name); + my_panel->childSetValue("user_text", name); - LLOutputMonitorCtrl* speaking_indicator = getChild("speaking_indicator"); - speaking_indicator->setSpeakerId(gAgentID); + LLOutputMonitorCtrl* speaking_indicator = my_panel->getChild("speaking_indicator"); + speaking_indicator->setSpeakerId(gAgentID); + } } //EOF -- cgit v1.2.3 From 1ad033d7fc6076f244f4664b1c778e36263d13af Mon Sep 17 00:00:00 2001 From: James Cook Date: Thu, 10 Dec 2009 10:45:05 -0800 Subject: EXT-1398 Objects with long descriptions flip between showing 3 lines and 4 lines Converted to use new clip_partial text attribute instead of custom text clipping logic. Reviewed with Richard. --- indra/newview/llinspectobject.cpp | 12 ------------ indra/newview/skins/default/xui/en/inspect_object.xml | 12 +++++++----- 2 files changed, 7 insertions(+), 17 deletions(-) (limited to 'indra') diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index 42d061ff72..cb35a287e9 100644 --- a/indra/newview/llinspectobject.cpp +++ b/indra/newview/llinspectobject.cpp @@ -416,18 +416,6 @@ void LLInspectObject::updateDescription(LLSelectNode* nodep) LLTextBox* textbox = getChild("object_description"); textbox->setValue(desc); - - // Truncate description text to fit in widget - // *HACK: OMG, use lower-left corner to truncate text - // Don't round the position, we want the left of the character - S32 corner_index = textbox->getDocIndexFromLocalCoord( 0, 0, FALSE); - LLWString desc_wide = textbox->getWText(); - // index == length if position is past last character - if (corner_index < (S32)desc_wide.length()) - { - desc_wide = desc_wide.substr(0, corner_index); - textbox->setWText(desc_wide); - } } void LLInspectObject::updateMediaCurrentURL() diff --git a/indra/newview/skins/default/xui/en/inspect_object.xml b/indra/newview/skins/default/xui/en/inspect_object.xml index 16f6e49092..cedf83f8b1 100644 --- a/indra/newview/skins/default/xui/en/inspect_object.xml +++ b/indra/newview/skins/default/xui/en/inspect_object.xml @@ -9,7 +9,7 @@ bg_opaque_image="Inspector_Background" can_close="false" can_minimize="false" - height="148" + height="150" layout="topleft" name="inspect_object" single_instance="true" @@ -71,13 +71,15 @@ owner secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about width="196"> L$300,000 - This is a really long description for an object being as how it is at least 80 characters in length and maybe more like 120 at this point. Who knows, really? @@ -90,7 +92,7 @@ This is a really long description for an object being as how it is at least 80 c height="13" left_delta="0" name="object_media_url" - top_pad="0" + top_pad="-1" width="291" max_length = "50" use_ellipses="true"> @@ -102,7 +104,7 @@ This is a really long description for an object being as how it is at least 80 c label="Buy" left="8" name="buy_btn" - top="119" + top="121" width="80" /> -- cgit v1.2.3 From b8fdf825102cdc260a54565f9ee5e67ab160c207 Mon Sep 17 00:00:00 2001 From: richard Date: Fri, 11 Dec 2009 13:50:40 -0800 Subject: fix for ellipses not appearing in single line text widgets fix for ellipses sometimes appearing at end of wrapped line of text reviewed by James --- indra/llrender/llfontfreetype.h | 3 +- indra/llrender/llfontgl.cpp | 16 ++++++++-- indra/llui/lldraghandle.cpp | 1 + indra/llui/lltextbase.cpp | 55 +++++++++++++++++++++++------------ indra/newview/llexpandabletextbox.cpp | 23 ++++++++++----- 5 files changed, 66 insertions(+), 32 deletions(-) (limited to 'indra') diff --git a/indra/llrender/llfontfreetype.h b/indra/llrender/llfontfreetype.h index 1325b4995b..7a5d029038 100644 --- a/indra/llrender/llfontfreetype.h +++ b/indra/llrender/llfontfreetype.h @@ -58,9 +58,8 @@ private: ~LLFontManager(); }; -class LLFontGlyphInfo +struct LLFontGlyphInfo { -public: LLFontGlyphInfo(U32 index); U32 mGlyphIndex; diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 19afa997fa..db1f019a81 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -235,7 +235,8 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons if (use_ellipses) { // check for too long of a string - if (getWidthF32(wstr.c_str(), begin_offset, max_chars) * sScaleX > scaled_max_pixels) + S32 string_width = llround(getWidthF32(wstr.c_str(), begin_offset, max_chars) * sScaleX); + if (string_width > scaled_max_pixels) { // use four dots for ellipsis width to generate padding const LLWString dots(utf8str_to_wstring(std::string("...."))); @@ -490,6 +491,7 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch // avoid S32 overflow when max_pixels == S32_MAX by staying in floating point F32 scaled_max_pixels = ceil(max_pixels * sScaleX); + F32 width_padding = 0.f; S32 i; for (i=0; (i < max_chars); i++) @@ -533,9 +535,17 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch } } - cur_x += mFontFreetype->getXAdvance(wch); + LLFontGlyphInfo* fgi = mFontFreetype->getGlyphInfo(wch); + + // account for glyphs that run beyond the starting point for the next glyphs + width_padding = llmax( 0.f, // always use positive padding amount + width_padding - fgi->mXAdvance, // previous padding left over after advance of current character + (F32)(fgi->mWidth + fgi->mXBearing) - fgi->mXAdvance); // difference between width of this character and advance to next character + + cur_x += fgi->mXAdvance; - if (scaled_max_pixels < cur_x) + // clip if current character runs past scaled_max_pixels (using width_padding) + if (scaled_max_pixels < cur_x + width_padding) { clip = TRUE; break; diff --git a/indra/llui/lldraghandle.cpp b/indra/llui/lldraghandle.cpp index d9b98b1c28..a93c666648 100644 --- a/indra/llui/lldraghandle.cpp +++ b/indra/llui/lldraghandle.cpp @@ -112,6 +112,7 @@ void LLDragHandleTop::setTitle(const std::string& title) params.font(font); params.follows.flags(FOLLOWS_TOP | FOLLOWS_LEFT | FOLLOWS_RIGHT); params.font_shadow(LLFontGL::DROP_SHADOW_SOFT); + params.use_ellipses = true; mTitleBox = LLUICtrlFactory::create (params); addChild( mTitleBox ); } diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index e0503a0844..d50abaa83a 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -561,14 +561,14 @@ void LLTextBase::drawText() S32 clipped_end = llmin( line_end, cur_segment->getEnd() ) - cur_segment->getStart(); - if (mUseEllipses - && clipped_end == line_end - && next_line == last_line - && last_line < (S32)mLineInfoList.size()) + if (mUseEllipses // using ellipses + && clipped_end == line_end // last segment on line + && next_line == last_line // this is the last visible line + && last_line < (S32)mLineInfoList.size()) // and there is more text to display { - // more text to go, but we can't fit it - // so attempt to draw one extra character to force ellipses - clipped_end++; + // more lines of text to go, but we can't fit them + // so shrink text rect to force ellipses + text_rect.mRight -= 2; } text_rect.mLeft = (S32)(cur_segment->draw(seg_start - cur_segment->getStart(), clipped_end, selection_left, selection_right, text_rect)); @@ -1071,7 +1071,7 @@ void LLTextBase::reflow(S32 start_index) while(mReflowNeeded) { - mReflowNeeded = FALSE; + mReflowNeeded = false; // shrink document to minimum size (visible portion of text widget) // to force inlined widgets with follows set to shrink @@ -1101,8 +1101,8 @@ void LLTextBase::reflow(S32 start_index) segment_set_t::iterator seg_iter = mSegments.begin(); S32 seg_offset = 0; S32 line_start_index = 0; - const S32 text_width = mTextRect.getWidth() - mHPad; // reserve room for margin - S32 remaining_pixels = text_width; + const S32 text_available_width = mTextRect.getWidth() - mHPad; // reserve room for margin + S32 remaining_pixels = text_available_width; LLWString text(getWText()); S32 line_count = 0; @@ -1142,10 +1142,11 @@ void LLTextBase::reflow(S32 start_index) S32 last_segment_char_on_line = segment->getStart() + seg_offset; - S32 text_left = getLeftOffset(text_width - remaining_pixels); + S32 text_actual_width = text_available_width - remaining_pixels; + S32 text_left = getLeftOffset(text_actual_width); LLRect line_rect(text_left, cur_top, - text_left + (text_width - remaining_pixels), + text_left + text_actual_width, cur_top - line_height); // if we didn't finish the current segment... @@ -1160,7 +1161,7 @@ void LLTextBase::reflow(S32 start_index) line_start_index = segment->getStart() + seg_offset; cur_top -= llround((F32)line_height * mLineSpacingMult) + mLineSpacingPixels; - remaining_pixels = text_width; + remaining_pixels = text_available_width; line_height = 0; } // ...just consumed last segment.. @@ -1188,7 +1189,7 @@ void LLTextBase::reflow(S32 start_index) line_start_index = segment->getStart() + seg_offset; cur_top -= llround((F32)line_height * mLineSpacingMult) + mLineSpacingPixels; line_height = 0; - remaining_pixels = text_width; + remaining_pixels = text_available_width; } ++seg_iter; seg_offset = 0; @@ -2096,7 +2097,13 @@ void LLTextBase::updateRects() LLRect doc_rect = mContentsRect; // use old mTextRect constraint document to width of viewable region doc_rect.mLeft = 0; - doc_rect.mRight = llmax(mTextRect.getWidth(), mContentsRect.mRight); + + // allow horizontal scrolling? + // if so, use entire width of text contents (sans scrollbars) + // otherwise, stop at width of mTextRect + doc_rect.mRight = mScroller + ? llmax(mScroller->getRect().mRight - mScroller->getBorderWidth(), mContentsRect.mRight) + : mTextRect.getWidth(); mDocumentView->setShape(doc_rect); @@ -2115,8 +2122,10 @@ void LLTextBase::updateRects() needsReflow(); } - // update document container again, using new mTextRect - doc_rect.mRight = llmax(mTextRect.getWidth(), mContentsRect.mRight); + // update document container again, using new mTextRect (that has scrollbars enabled as needed) + doc_rect.mRight = mScroller + ? llmax(mTextRect.getWidth(), mContentsRect.mRight) + : mTextRect.getWidth(); mDocumentView->setShape(doc_rect); } @@ -2413,10 +2422,18 @@ bool LLNormalTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& widt if (num_chars > 0) { LLWString text = mEditor.getWText(); - width = mStyle->getFont()->getWidth(text.c_str(), mStart + first_char, num_chars); // if last character is a newline, then return true, forcing line break llwchar last_char = text[mStart + first_char + num_chars - 1]; - force_newline = (last_char == '\n'); + if (last_char == '\n') + { + force_newline = true; + // don't count newline in font width + width = mStyle->getFont()->getWidth(text.c_str(), mStart + first_char, num_chars - 1); + } + else + { + width = mStyle->getFont()->getWidth(text.c_str(), mStart + first_char, num_chars); + } } else { diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index bd6936f05c..9c37c953fe 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -51,8 +51,16 @@ public: /*virtual*/ bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const { // more label always spans width of text box - width = mEditor.getTextRect().getWidth() - mEditor.getHPad(); - height = llceil(mStyle->getFont()->getLineHeight()); + if (num_chars == 0) + { + width = 0; + height = 0; + } + else + { + width = mEditor.getDocumentView()->getRect().getWidth() - mEditor.getHPad(); + height = llceil(mStyle->getFont()->getLineHeight()); + } return true; } /*virtual*/ S32 getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const @@ -104,7 +112,8 @@ private: LLExpandableTextBox::LLTextBoxEx::Params::Params() : more_label("more_label") -{} +{ +} LLExpandableTextBox::LLTextBoxEx::LLTextBoxEx(const Params& p) : LLTextBox(p), @@ -117,16 +126,13 @@ LLExpandableTextBox::LLTextBoxEx::LLTextBoxEx(const Params& p) void LLExpandableTextBox::LLTextBoxEx::reshape(S32 width, S32 height, BOOL called_from_parent) { + hideExpandText(); LLTextBox::reshape(width, height, called_from_parent); if (getTextPixelHeight() > getRect().getHeight()) { showExpandText(); } - else - { - hideExpandText(); - } } void LLExpandableTextBox::LLTextBoxEx::setText(const LLStringExplicit& text,const LLStyle::Params& input_params) @@ -317,7 +323,8 @@ void LLExpandableTextBox::expandTextBox() mTextBox->hideExpandText(); S32 text_delta = mTextBox->getVerticalTextDelta(); - text_delta += mTextBox->getVPad() * 2 + mScroll->getBorderWidth() * 2; + text_delta += mTextBox->getVPad() * 2; + text_delta += mScroll->getBorderWidth() * 2; // no need to expand if(text_delta <= 0) { -- cgit v1.2.3 From 401a51cac130a317204c2df9dd571fca92a861c3 Mon Sep 17 00:00:00 2001 From: richard Date: Fri, 11 Dec 2009 13:50:54 -0800 Subject: note to get rid of hack --- indra/llui/llfloater.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index fd7b64af02..9037578077 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -1649,6 +1649,7 @@ void LLFloater::draw() } else { + //FIXME: get rid of this hack // draw children LLView* focused_child = dynamic_cast(gFocusMgr.getKeyboardFocus()); BOOL focused_child_visible = FALSE; -- cgit v1.2.3 From c6234f352a318806fc5784d15440c5e632449719 Mon Sep 17 00:00:00 2001 From: richard Date: Fri, 11 Dec 2009 14:34:30 -0800 Subject: variable renames in LLTextBase --- indra/llui/lltextbase.cpp | 88 ++++++++++++++++++++--------------------- indra/llui/lltextbase.h | 8 ++-- indra/llui/lltextbox.cpp | 4 +- indra/llui/lltexteditor.cpp | 38 +++++++++--------- indra/newview/llchathistory.cpp | 12 +++--- indra/newview/lltoastpanel.cpp | 2 +- 6 files changed, 76 insertions(+), 76 deletions(-) (limited to 'indra') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index d50abaa83a..ead80658e2 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -312,7 +312,7 @@ void LLTextBase::drawSelectionBackground() S32 selection_left = llmin( mSelectionStart, mSelectionEnd ); S32 selection_right = llmax( mSelectionStart, mSelectionEnd ); - LLRect selection_rect = mTextRect; + LLRect selection_rect = mVisibleTextRect; // Skip through the lines we aren't drawing. LLRect content_display_rect = getVisibleDocumentRect(); @@ -391,7 +391,7 @@ void LLTextBase::drawSelectionBackground() ++rect_it) { LLRect selection_rect = *rect_it; - selection_rect.translate(mTextRect.mLeft - content_display_rect.mLeft, mTextRect.mBottom - content_display_rect.mBottom); + selection_rect.translate(mVisibleTextRect.mLeft - content_display_rect.mLeft, mVisibleTextRect.mBottom - content_display_rect.mBottom); gl_rect_2d(selection_rect, selection_color); } } @@ -538,10 +538,10 @@ void LLTextBase::drawText() line_end = next_start; } - LLRect text_rect(line.mRect.mLeft + mTextRect.mLeft - scrolled_view_rect.mLeft, - line.mRect.mTop - scrolled_view_rect.mBottom + mTextRect.mBottom, + LLRect text_rect(line.mRect.mLeft + mVisibleTextRect.mLeft - scrolled_view_rect.mLeft, + line.mRect.mTop - scrolled_view_rect.mBottom + mVisibleTextRect.mBottom, llmin(mDocumentView->getRect().getWidth(), line.mRect.mRight) - scrolled_view_rect.mLeft, - line.mRect.mBottom - scrolled_view_rect.mBottom + mTextRect.mBottom); + line.mRect.mBottom - scrolled_view_rect.mBottom + mVisibleTextRect.mBottom); // draw a single line of text S32 seg_start = line_start; @@ -949,7 +949,7 @@ void LLTextBase::reshape(S32 width, S32 height, BOOL called_from_parent) LLUICtrl::reshape( width, height, called_from_parent ); // do this first after reshape, because other things depend on - // up-to-date mTextRect + // up-to-date mVisibleTextRect updateRects(); needsReflow(); @@ -984,7 +984,7 @@ void LLTextBase::draw() : hasFocus() ? mFocusBgColor.get() : mWriteableBgColor.get(); - gl_rect_2d(mTextRect, bg_color, TRUE); + gl_rect_2d(mVisibleTextRect, bg_color, TRUE); } // draw document view @@ -1053,9 +1053,9 @@ S32 LLTextBase::getLeftOffset(S32 width) case LLFontGL::LEFT: return mHPad; case LLFontGL::HCENTER: - return mHPad + (mTextRect.getWidth() - width - mHPad) / 2; + return mHPad + (mVisibleTextRect.getWidth() - width - mHPad) / 2; case LLFontGL::RIGHT: - return mTextRect.getWidth() - width; + return mVisibleTextRect.getWidth() - width; default: return mHPad; } @@ -1075,13 +1075,13 @@ void LLTextBase::reflow(S32 start_index) // shrink document to minimum size (visible portion of text widget) // to force inlined widgets with follows set to shrink - mDocumentView->setShape(mTextRect); + mDocumentView->setShape(mVisibleTextRect); bool scrolled_to_bottom = mScroller ? mScroller->isAtBottom() : false; LLRect old_cursor_rect = getLocalRectFromDocIndex(mCursorPos); - bool follow_selection = mTextRect.overlaps(old_cursor_rect); // cursor is visible - old_cursor_rect.translate(-mTextRect.mLeft, -mTextRect.mBottom); + bool follow_selection = mVisibleTextRect.overlaps(old_cursor_rect); // cursor is visible + old_cursor_rect.translate(-mVisibleTextRect.mLeft, -mVisibleTextRect.mBottom); S32 first_line = getFirstVisibleLine(); @@ -1094,14 +1094,14 @@ void LLTextBase::reflow(S32 start_index) } LLRect first_char_rect = getLocalRectFromDocIndex(mScrollIndex); // subtract off effect of horizontal scrollbar from local position of first char - first_char_rect.translate(-mTextRect.mLeft, -mTextRect.mBottom); + first_char_rect.translate(-mVisibleTextRect.mLeft, -mVisibleTextRect.mBottom); S32 cur_top = 0; segment_set_t::iterator seg_iter = mSegments.begin(); S32 seg_offset = 0; S32 line_start_index = 0; - const S32 text_available_width = mTextRect.getWidth() - mHPad; // reserve room for margin + const S32 text_available_width = mVisibleTextRect.getWidth() - mHPad; // reserve room for margin S32 remaining_pixels = text_available_width; LLWString text(getWText()); S32 line_count = 0; @@ -1239,10 +1239,10 @@ void LLTextBase::reflow(S32 start_index) } } -LLRect LLTextBase::getContentsRect() +LLRect LLTextBase::getTextBoundingRect() { reflow(); - return mContentsRect; + return mTextBoundingRect; } @@ -1761,7 +1761,7 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round LLRect visible_region = getVisibleDocumentRect(); // binary search for line that starts before local_y - line_list_t::const_iterator line_iter = std::lower_bound(mLineInfoList.begin(), mLineInfoList.end(), local_y - mTextRect.mBottom + visible_region.mBottom, compare_bottom()); + line_list_t::const_iterator line_iter = std::lower_bound(mLineInfoList.begin(), mLineInfoList.end(), local_y - mVisibleTextRect.mBottom + visible_region.mBottom, compare_bottom()); if (line_iter == mLineInfoList.end()) { @@ -1769,7 +1769,7 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round } S32 pos = getLength(); - S32 start_x = mTextRect.mLeft + line_iter->mRect.mLeft; + S32 start_x = mVisibleTextRect.mLeft + line_iter->mRect.mLeft; segment_set_t::iterator line_seg_iter; S32 line_seg_offset; @@ -1880,7 +1880,7 @@ LLRect LLTextBase::getLocalRectFromDocIndex(S32 pos) const if (mLineInfoList.empty()) { // return default height rect in upper left - local_rect = mTextRect; + local_rect = mVisibleTextRect; local_rect.mBottom = local_rect.mTop - (S32)(mDefaultFont->getLineHeight()); return local_rect; } @@ -1891,8 +1891,8 @@ LLRect LLTextBase::getLocalRectFromDocIndex(S32 pos) const // compensate for scrolled, inset view of doc LLRect scrolled_view_rect = getVisibleDocumentRect(); local_rect = doc_rect; - local_rect.translate(mTextRect.mLeft - scrolled_view_rect.mLeft, - mTextRect.mBottom - scrolled_view_rect.mBottom); + local_rect.translate(mVisibleTextRect.mLeft - scrolled_view_rect.mLeft, + mVisibleTextRect.mBottom - scrolled_view_rect.mBottom); return local_rect; } @@ -1992,7 +1992,7 @@ void LLTextBase::changeLine( S32 delta ) LLRect visible_region = getVisibleDocumentRect(); - S32 new_cursor_pos = getDocIndexFromLocalCoord(mDesiredXPixel, mLineInfoList[new_line].mRect.mBottom + mTextRect.mBottom - visible_region.mBottom, TRUE); + S32 new_cursor_pos = getDocIndexFromLocalCoord(mDesiredXPixel, mLineInfoList[new_line].mRect.mBottom + mVisibleTextRect.mBottom - visible_region.mBottom, TRUE); setCursorPos(new_cursor_pos, true); } @@ -2068,64 +2068,64 @@ void LLTextBase::updateRects() { if (mLineInfoList.empty()) { - mContentsRect = LLRect(0, mVPad, mHPad, 0); + mTextBoundingRect = LLRect(0, mVPad, mHPad, 0); } else { - mContentsRect = mLineInfoList.begin()->mRect; + mTextBoundingRect = mLineInfoList.begin()->mRect; for (line_list_t::const_iterator line_iter = ++mLineInfoList.begin(); line_iter != mLineInfoList.end(); ++line_iter) { - mContentsRect.unionWith(line_iter->mRect); + mTextBoundingRect.unionWith(line_iter->mRect); } - mContentsRect.mTop += mVPad; + mTextBoundingRect.mTop += mVPad; // subtract a pixel off the bottom to deal with rounding errors in measuring font height - mContentsRect.mBottom -= 1; + mTextBoundingRect.mBottom -= 1; - S32 delta_pos = -mContentsRect.mBottom; + S32 delta_pos = -mTextBoundingRect.mBottom; // move line segments to fit new document rect for (line_list_t::iterator it = mLineInfoList.begin(); it != mLineInfoList.end(); ++it) { it->mRect.translate(0, delta_pos); } - mContentsRect.translate(0, delta_pos); + mTextBoundingRect.translate(0, delta_pos); } // update document container dimensions according to text contents - LLRect doc_rect = mContentsRect; - // use old mTextRect constraint document to width of viewable region + LLRect doc_rect = mTextBoundingRect; + // use old mVisibleTextRect constraint document to width of viewable region doc_rect.mLeft = 0; // allow horizontal scrolling? // if so, use entire width of text contents (sans scrollbars) - // otherwise, stop at width of mTextRect + // otherwise, stop at width of mVisibleTextRect doc_rect.mRight = mScroller - ? llmax(mScroller->getRect().mRight - mScroller->getBorderWidth(), mContentsRect.mRight) - : mTextRect.getWidth(); + ? llmax(mScroller->getRect().mRight - mScroller->getBorderWidth(), mTextBoundingRect.mRight) + : mVisibleTextRect.getWidth(); mDocumentView->setShape(doc_rect); - //update mTextRect *after* mDocumentView has been resized + //update mVisibleTextRect *after* mDocumentView has been resized // so that scrollbars are added if document needs to scroll - // since mTextRect does not include scrollbars - LLRect old_text_rect = mTextRect; - mTextRect = mScroller ? mScroller->getContentWindowRect() : getLocalRect(); + // since mVisibleTextRect does not include scrollbars + LLRect old_text_rect = mVisibleTextRect; + mVisibleTextRect = mScroller ? mScroller->getContentWindowRect() : getLocalRect(); //FIXME: replace border with image? if (mBorderVisible) { - mTextRect.stretch(-1); + mVisibleTextRect.stretch(-1); } - if (mTextRect != old_text_rect) + if (mVisibleTextRect != old_text_rect) { needsReflow(); } - // update document container again, using new mTextRect (that has scrollbars enabled as needed) + // update document container again, using new mVisibleTextRect (that has scrollbars enabled as needed) doc_rect.mRight = mScroller - ? llmax(mTextRect.getWidth(), mContentsRect.mRight) - : mTextRect.getWidth(); + ? llmax(mVisibleTextRect.getWidth(), mTextBoundingRect.mRight) + : mVisibleTextRect.getWidth(); mDocumentView->setShape(doc_rect); } @@ -2163,7 +2163,7 @@ LLRect LLTextBase::getVisibleDocumentRect() const LLRect doc_rect = mDocumentView->getLocalRect(); doc_rect.mLeft -= mDocumentView->getRect().mLeft; // adjust for height of text above widget baseline - doc_rect.mBottom = doc_rect.getHeight() - mTextRect.getHeight(); + doc_rect.mBottom = doc_rect.getHeight() - mVisibleTextRect.getHeight(); return doc_rect; } } diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 0138ca3704..a1f8ba39ae 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -156,8 +156,8 @@ public: void addDocumentChild(LLView* view); void removeDocumentChild(LLView* view); const LLView* getDocumentView() const { return mDocumentView; } - LLRect getTextRect() { return mTextRect; } - LLRect getContentsRect(); + LLRect getVisibleTextRect() { return mVisibleTextRect; } + LLRect getTextBoundingRect(); LLRect getVisibleDocumentRect() const; S32 getVPad() { return mVPad; } @@ -311,8 +311,8 @@ protected: // text segmentation and flow segment_set_t mSegments; line_list_t mLineInfoList; - LLRect mTextRect; // The rect in which text is drawn. Excludes borders. - LLRect mContentsRect; + LLRect mVisibleTextRect; // The rect in which text is drawn. Excludes borders. + LLRect mTextBoundingRect; // colors LLUIColor mCursorColor; diff --git a/indra/llui/lltextbox.cpp b/indra/llui/lltextbox.cpp index 0bd0ab59fb..a1f5b5726b 100644 --- a/indra/llui/lltextbox.cpp +++ b/indra/llui/lltextbox.cpp @@ -134,12 +134,12 @@ void LLTextBox::setClickedCallback( boost::function cb, void* user S32 LLTextBox::getTextPixelWidth() { - return getContentsRect().getWidth(); + return getTextBoundingRect().getWidth(); } S32 LLTextBox::getTextPixelHeight() { - return getContentsRect().getHeight(); + return getTextBoundingRect().getHeight(); } diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index faf9ccbeb8..e8fc9475a5 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -758,8 +758,8 @@ BOOL LLTextEditor::handleHover(S32 x, S32 y, MASK mask) { mScroller->autoScroll(x, y); } - S32 clamped_x = llclamp(x, mTextRect.mLeft, mTextRect.mRight); - S32 clamped_y = llclamp(y, mTextRect.mBottom, mTextRect.mTop); + S32 clamped_x = llclamp(x, mVisibleTextRect.mLeft, mVisibleTextRect.mRight); + S32 clamped_y = llclamp(y, mVisibleTextRect.mBottom, mVisibleTextRect.mTop); setCursorAtLocalPos( clamped_x, clamped_y, true ); mSelectionEnd = mCursorPos; } @@ -809,8 +809,8 @@ BOOL LLTextEditor::handleMouseUp(S32 x, S32 y, MASK mask) { mScroller->autoScroll(x, y); } - S32 clamped_x = llclamp(x, mTextRect.mLeft, mTextRect.mRight); - S32 clamped_y = llclamp(y, mTextRect.mBottom, mTextRect.mTop); + S32 clamped_x = llclamp(x, mVisibleTextRect.mLeft, mVisibleTextRect.mRight); + S32 clamped_y = llclamp(y, mVisibleTextRect.mBottom, mVisibleTextRect.mTop); setCursorAtLocalPos( clamped_x, clamped_y, true ); endSelection(); } @@ -2075,8 +2075,8 @@ void LLTextEditor::drawPreeditMarker() const S32 line_height = llround( mDefaultFont->getLineHeight() ); S32 line_start = getLineStart(cur_line); - S32 line_y = mTextRect.mTop - line_height; - while((mTextRect.mBottom <= line_y) && (num_lines > cur_line)) + S32 line_y = mVisibleTextRect.mTop - line_height; + while((mVisibleTextRect.mBottom <= line_y) && (num_lines > cur_line)) { S32 next_start = -1; S32 line_end = text_len; @@ -2108,12 +2108,12 @@ void LLTextEditor::drawPreeditMarker() continue; } - S32 preedit_left = mTextRect.mLeft; + S32 preedit_left = mVisibleTextRect.mLeft; if (left > line_start) { preedit_left += mDefaultFont->getWidth(text, line_start, left - line_start); } - S32 preedit_right = mTextRect.mLeft; + S32 preedit_right = mVisibleTextRect.mLeft; if (right < line_end) { preedit_right += mDefaultFont->getWidth(text, line_start, right - line_start); @@ -2154,7 +2154,7 @@ void LLTextEditor::drawLineNumbers() { LLGLSUIDefault gls_ui; LLRect scrolled_view_rect = getVisibleDocumentRect(); - LLRect content_rect = getTextRect(); + LLRect content_rect = getVisibleTextRect(); LLLocalClipRect clip(content_rect); S32 first_line = getFirstVisibleLine(); S32 num_lines = getLineCount(); @@ -2180,12 +2180,12 @@ void LLTextEditor::drawLineNumbers() { line_info& line = mLineInfoList[cur_line]; - if ((line.mRect.mTop - scrolled_view_rect.mBottom) < mTextRect.mBottom) + if ((line.mRect.mTop - scrolled_view_rect.mBottom) < mVisibleTextRect.mBottom) { break; } - S32 line_bottom = line.mRect.mBottom - scrolled_view_rect.mBottom + mTextRect.mBottom; + S32 line_bottom = line.mRect.mBottom - scrolled_view_rect.mBottom + mVisibleTextRect.mBottom; // draw the line numbers if(line.mLineNum != last_line_num && line.mRect.mTop <= scrolled_view_rect.mTop) { @@ -2216,8 +2216,8 @@ void LLTextEditor::draw() { { // pad clipping rectangle so that cursor can draw at full width - // when at left edge of mTextRect - LLRect clip_rect(mTextRect); + // when at left edge of mVisibleTextRect + LLRect clip_rect(mVisibleTextRect); clip_rect.stretch(1); LLLocalClipRect clip(clip_rect); drawPreeditMarker(); @@ -2781,7 +2781,7 @@ BOOL LLTextEditor::getPreeditLocation(S32 query_offset, LLCoordGL *coord, LLRect if (control) { LLRect control_rect_screen; - localRectToScreen(mTextRect, &control_rect_screen); + localRectToScreen(mVisibleTextRect, &control_rect_screen); LLUI::screenRectToGL(control_rect_screen, control); } @@ -2832,8 +2832,8 @@ BOOL LLTextEditor::getPreeditLocation(S32 query_offset, LLCoordGL *coord, LLRect if (coord) { - const S32 query_x = mTextRect.mLeft + mDefaultFont->getWidth(text, current_line_start, query - current_line_start); - const S32 query_y = mTextRect.mTop - (current_line - first_visible_line) * line_height - line_height / 2; + const S32 query_x = mVisibleTextRect.mLeft + mDefaultFont->getWidth(text, current_line_start, query - current_line_start); + const S32 query_y = mVisibleTextRect.mTop - (current_line - first_visible_line) * line_height - line_height / 2; S32 query_screen_x, query_screen_y; localPointToScreen(query_x, query_y, &query_screen_x, &query_screen_y); LLUI::screenPointToGL(query_screen_x, query_screen_y, &coord->mX, &coord->mY); @@ -2841,13 +2841,13 @@ BOOL LLTextEditor::getPreeditLocation(S32 query_offset, LLCoordGL *coord, LLRect if (bounds) { - S32 preedit_left = mTextRect.mLeft; + S32 preedit_left = mVisibleTextRect.mLeft; if (preedit_left_position > current_line_start) { preedit_left += mDefaultFont->getWidth(text, current_line_start, preedit_left_position - current_line_start); } - S32 preedit_right = mTextRect.mLeft; + S32 preedit_right = mVisibleTextRect.mLeft; if (preedit_right_position < current_line_end) { preedit_right += mDefaultFont->getWidth(text, current_line_start, preedit_right_position - current_line_start); @@ -2857,7 +2857,7 @@ BOOL LLTextEditor::getPreeditLocation(S32 query_offset, LLCoordGL *coord, LLRect preedit_right += mDefaultFont->getWidth(text, current_line_start, current_line_end - current_line_start); } - const S32 preedit_top = mTextRect.mTop - (current_line - first_visible_line) * line_height; + const S32 preedit_top = mVisibleTextRect.mTop - (current_line - first_visible_line) * line_height; const S32 preedit_bottom = preedit_top - line_height; const LLRect preedit_rect_local(preedit_left, preedit_top, preedit_right, preedit_bottom); diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index efe9ea4c35..6c843e1ec3 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -332,12 +332,12 @@ LLChatHistory::~LLChatHistory() { static LLUICachedControl texteditor_border ("UITextEditorBorder", 0); - LLRect old_text_rect = mTextRect; - mTextRect = mScroller->getContentWindowRect(); - mTextRect.stretch(-texteditor_border); - mTextRect.mLeft += mLeftTextPad; - mTextRect.mRight -= mRightTextPad; - if (mTextRect != old_text_rect) + LLRect old_text_rect = mVisibleTextRect; + mVisibleTextRect = mScroller->getContentWindowRect(); + mVisibleTextRect.stretch(-texteditor_border); + mVisibleTextRect.mLeft += mLeftTextPad; + mVisibleTextRect.mRight -= mRightTextPad; + if (mVisibleTextRect != old_text_rect) { needsReflow(); } diff --git a/indra/newview/lltoastpanel.cpp b/indra/newview/lltoastpanel.cpp index afb9e261b0..755e647777 100644 --- a/indra/newview/lltoastpanel.cpp +++ b/indra/newview/lltoastpanel.cpp @@ -80,7 +80,7 @@ void LLToastPanel::snapToMessageHeight(LLTextBase* message, S32 maxLineCount) //Knowing the height is set to max allowed, getTextPixelHeight returns needed text height //Perhaps we need to pass maxLineCount as parameter to getTextPixelHeight to avoid previous reshape. - S32 requiredTextHeight = message->getContentsRect().getHeight(); + S32 requiredTextHeight = message->getTextBoundingRect().getHeight(); S32 newTextHeight = llmin(requiredTextHeight, maxTextHeight); //Calculate last delta height deducting previous heightDelta -- cgit v1.2.3 From 9ad76199e50f35749eded1ab1c10bebd265c1dbf Mon Sep 17 00:00:00 2001 From: richard Date: Fri, 11 Dec 2009 16:25:38 -0800 Subject: fixed a regression that caused bottom 15 pixels of scrollable text editors to appear blank --- indra/llui/lltextbase.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index ead80658e2..18f0295d66 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2099,10 +2099,10 @@ void LLTextBase::updateRects() doc_rect.mLeft = 0; // allow horizontal scrolling? - // if so, use entire width of text contents (sans scrollbars) + // if so, use entire width of text contents // otherwise, stop at width of mVisibleTextRect doc_rect.mRight = mScroller - ? llmax(mScroller->getRect().mRight - mScroller->getBorderWidth(), mTextBoundingRect.mRight) + ? llmax(mVisibleTextRect.getWidth(), mTextBoundingRect.mRight) : mVisibleTextRect.getWidth(); mDocumentView->setShape(doc_rect); -- cgit v1.2.3 From 19d9cf8d8e4e195d83f9f67ced515bd6bd4566ed Mon Sep 17 00:00:00 2001 From: richard Date: Fri, 11 Dec 2009 16:48:05 -0800 Subject: ext-3404 - script editor scrolls to the bottom and sticks --- indra/llui/lltextbase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 18f0295d66..1f120a1483 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1075,7 +1075,7 @@ void LLTextBase::reflow(S32 start_index) // shrink document to minimum size (visible portion of text widget) // to force inlined widgets with follows set to shrink - mDocumentView->setShape(mVisibleTextRect); + mDocumentView->reshape(mVisibleTextRect.getWidth(), mDocumentView->getRect().getHeight()); bool scrolled_to_bottom = mScroller ? mScroller->isAtBottom() : false; -- cgit v1.2.3 From 6d444398e9054c2c3e3921c628c27476344df94d Mon Sep 17 00:00:00 2001 From: Erica Date: Sun, 13 Dec 2009 14:13:42 -0800 Subject: EXT-3422 Add IM/Notification pending button art, style and layout of overflow arrows, align message well with bottom bar --- indra/newview/skins/default/colors.xml | 2 +- .../default/textures/bottomtray/Notices_Unread.png | Bin 331 -> 3693 bytes .../default/textures/bottomtray/Unread_IM.png | Bin 416 -> 458 bytes .../default/textures/bottomtray/WellButton_Lit.png | Bin 288 -> 553 bytes .../bottomtray/WellButton_Lit_Selected.png | Bin 405 -> 687 bytes indra/newview/skins/default/textures/textures.xml | 6 +- indra/newview/skins/default/xui/en/menu_land.xml | 2 +- .../skins/default/xui/en/panel_bottomtray.xml | 84 +++++++++++---------- 8 files changed, 50 insertions(+), 44 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index 33dd7791dc..b6995d2122 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -67,7 +67,7 @@ value="0 0 1 1" /> + value="0.114 0.65 0.1" /> diff --git a/indra/newview/skins/default/textures/bottomtray/Notices_Unread.png b/indra/newview/skins/default/textures/bottomtray/Notices_Unread.png index aa3898ca99..0ac5b72b8f 100644 Binary files a/indra/newview/skins/default/textures/bottomtray/Notices_Unread.png and b/indra/newview/skins/default/textures/bottomtray/Notices_Unread.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/Unread_IM.png b/indra/newview/skins/default/textures/bottomtray/Unread_IM.png index 598342ea80..5c0c85b864 100644 Binary files a/indra/newview/skins/default/textures/bottomtray/Unread_IM.png and b/indra/newview/skins/default/textures/bottomtray/Unread_IM.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/WellButton_Lit.png b/indra/newview/skins/default/textures/bottomtray/WellButton_Lit.png index 60676b43fd..dd9133bcc4 100644 Binary files a/indra/newview/skins/default/textures/bottomtray/WellButton_Lit.png and b/indra/newview/skins/default/textures/bottomtray/WellButton_Lit.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/WellButton_Lit_Selected.png b/indra/newview/skins/default/textures/bottomtray/WellButton_Lit_Selected.png index 98cde96aff..0080e71f41 100644 Binary files a/indra/newview/skins/default/textures/bottomtray/WellButton_Lit_Selected.png and b/indra/newview/skins/default/textures/bottomtray/WellButton_Lit_Selected.png differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index bab39b10ab..0317d55768 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -593,9 +593,9 @@ with the same filename but different name - - - + + + diff --git a/indra/newview/skins/default/xui/en/menu_land.xml b/indra/newview/skins/default/xui/en/menu_land.xml index 54e2b7650e..d88a2f8d25 100644 --- a/indra/newview/skins/default/xui/en/menu_land.xml +++ b/indra/newview/skins/default/xui/en/menu_land.xml @@ -3,7 +3,7 @@ layout="topleft" name="Land Pie"> @@ -126,7 +126,7 @@ image_name="spacer24.tga" layout="topleft" left="0" - min_width="4" + min_width="4" name="DUMMY" top="0" width="4"/> @@ -168,7 +168,7 @@ image_name="spacer24.tga" layout="topleft" left="0" - min_width="4" + min_width="4" name="DUMMY" top="0" width="4"/> @@ -211,7 +211,7 @@ image_name="spacer24.tga" layout="topleft" left="0" - min_width="4" + min_width="4" name="DUMMY" top="0" width="4"/> @@ -243,7 +243,7 @@ - - - Controls: - - - - Standard - - - Mini - - - - + + Controls: + + + + Standard + + + Mini + + + Date: Mon, 14 Dec 2009 16:45:14 -0500 Subject: EXT-1940 combo-box with dropdown list of scales overlaps Cancel btn un the Texture dlg --- .../default/xui/en/floater_preview_texture.xml | 103 ++++++++++----------- 1 file changed, 48 insertions(+), 55 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/floater_preview_texture.xml b/indra/newview/skins/default/xui/en/floater_preview_texture.xml index 602a18ea56..abc30c335c 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_texture.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_texture.xml @@ -3,15 +3,15 @@ legacy_header_height="18" auto_tile="true" can_resize="true" - follows="left|bottom" - height="331" + follows="left|top" + height="313" layout="topleft" min_height="120" - min_width="300" + min_width="320" name="preview_texture" help_topic="preview_texture" - width="300"> - + Texture: [NAME] @@ -43,72 +43,38 @@ max_length="127" name="desc" width="190" /> -