From e9116575bfd2238e80eaac08bceb8f797d0e933c Mon Sep 17 00:00:00 2001 From: Ricky Curtice Date: Thu, 13 Mar 2014 20:36:05 -0700 Subject: OPEN-209: Corrected all instances of trigraphs in the code. Trigraphs can cause some real special headaches. The only part that's annoying is the comment in newview/llimview.cpp where there's an unfortunate collision of a trigraph sequence with a character sequence that could be displayed by the viewer. Thankfully, it's only a comment! --- indra/llwindow/llwindow.cpp | 4 ++-- indra/llwindow/llwindowsdl.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/llwindow') diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp index 93b9d36939..a2824db70a 100755 --- a/indra/llwindow/llwindow.cpp +++ b/indra/llwindow/llwindow.cpp @@ -72,7 +72,7 @@ S32 OSMessageBox(const std::string& text, const std::string& caption, U32 type) } S32 result = 0; -#if LL_MESA_HEADLESS // !!! *FIX: (???) +#if LL_MESA_HEADLESS // !!! *FIX: (?) llwarns << "OSMessageBox: " << text << llendl; return OSBTN_OK; #elif LL_WINDOWS @@ -324,7 +324,7 @@ bool LLSplashScreen::isVisible() // static LLSplashScreen *LLSplashScreen::create() { -#if LL_MESA_HEADLESS || LL_SDL // !!! *FIX: (???) +#if LL_MESA_HEADLESS || LL_SDL // !!! *FIX: (?) return 0; #elif LL_WINDOWS return new LLSplashScreenWin32; diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index 205466e936..18e9eb0ee9 100755 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -223,7 +223,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks, mOriginalAspectRatio = 1024.0 / 768.0; if (title.empty()) - mWindowTitle = "SDL Window"; // *FIX: (???) + mWindowTitle = "SDL Window"; // *FIX: (?) else mWindowTitle = title; @@ -956,7 +956,7 @@ BOOL LLWindowSDL::setPosition(const LLCoordScreen position) { if(mWindow) { - // *FIX: (???) + // *FIX: (?) //MacMoveWindow(mWindow, position.mX, position.mY, false); } -- cgit v1.2.3 From b533844945a648ab1613a305c072809bbd6d76a8 Mon Sep 17 00:00:00 2001 From: Cinder Biscuits Date: Fri, 18 Apr 2014 20:06:39 +0000 Subject: STORM-2023: Restore system color picker on OSX --- indra/llwindow/llwindowmacosx.cpp | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) (limited to 'indra/llwindow') diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 11c0b51086..832e08d181 100755 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -39,6 +39,7 @@ #include "indra_constants.h" #include +#include #include extern BOOL gDebugWindowProc; @@ -1743,16 +1744,40 @@ LLSD LLWindowMacOSX::getNativeKeyData() return result; } - BOOL LLWindowMacOSX::dialogColorPicker( F32 *r, F32 *g, F32 *b) { - // Is this even used anywhere? Do we really need an OS color picker? BOOL retval = FALSE; - //S32 error = 0; + OSErr error = noErr; + NColorPickerInfo info; + + memset(&info, 0, sizeof(info)); + info.theColor.color.rgb.red = (UInt16)(*r * 65535.f); + info.theColor.color.rgb.green = (UInt16)(*g * 65535.f); + info.theColor.color.rgb.blue = (UInt16)(*b * 65535.f); + info.placeWhere = kCenterOnMainScreen; + + if(gWindowImplementation != NULL) + gWindowImplementation->beforeDialog(); + + error = NPickColor(&info); + + if(gWindowImplementation != NULL) + gWindowImplementation->afterDialog(); + + if (error == noErr) + { + retval = info.newColorChosen; + if (info.newColorChosen) + { + *r = ((float) info.theColor.color.rgb.red) / 65535.0; + *g = ((float) info.theColor.color.rgb.green) / 65535.0; + *b = ((float) info.theColor.color.rgb.blue) / 65535.0; + } + } + return (retval); } - void *LLWindowMacOSX::getPlatformWindow() { // NOTE: this will be NULL in fullscreen mode. Plan accordingly. -- cgit v1.2.3 From 1173dde898d5b61749b1c1631d060bf6730b9642 Mon Sep 17 00:00:00 2001 From: Cinder Biscuits Date: Fri, 18 Apr 2014 21:05:20 +0000 Subject: Remove calls to now unused methods --- indra/llwindow/llwindowmacosx.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'indra/llwindow') diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 832e08d181..ed0348e10e 100755 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -1755,15 +1755,9 @@ BOOL LLWindowMacOSX::dialogColorPicker( F32 *r, F32 *g, F32 *b) info.theColor.color.rgb.green = (UInt16)(*g * 65535.f); info.theColor.color.rgb.blue = (UInt16)(*b * 65535.f); info.placeWhere = kCenterOnMainScreen; - - if(gWindowImplementation != NULL) - gWindowImplementation->beforeDialog(); - + error = NPickColor(&info); - if(gWindowImplementation != NULL) - gWindowImplementation->afterDialog(); - if (error == noErr) { retval = info.newColorChosen; -- cgit v1.2.3