diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-04-07 14:47:25 -0400 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-04-07 14:47:25 -0400 |
commit | 52293aa4bb7af45d2c3733f20982f4acb030c2d8 (patch) | |
tree | f963815f91b6259ea403d41807d19b69e759897e /indra/newview/llviewerwindow.cpp | |
parent | 516ec63f52245a777725d29efe3c35e4e4e72936 (diff) | |
parent | 8ac6310020bd2d524c97c729c29a0afe4a529ecf (diff) |
automated merge
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 4c6a02db87..81033485ee 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -85,6 +85,7 @@ #include "lltooltip.h" #include "llmediaentry.h" #include "llurldispatcher.h" +#include "llurlsimstring.h" // newview includes #include "llagent.h" @@ -798,7 +799,7 @@ BOOL LLViewerWindow::handleRightMouseUp(LLWindow *window, LLCoordGL pos, MASK m BOOL LLViewerWindow::handleMiddleMouseDown(LLWindow *window, LLCoordGL pos, MASK mask) { BOOL down = TRUE; - LLVoiceClient::getInstance()->middleMouseState(true); + gVoiceClient->middleMouseState(true); handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_MIDDLE,down); // Always handled as far as the OS is concerned. @@ -825,15 +826,20 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi if (slurl_dnd_enabled) { - LLSLURL dropped_slurl(data); - if(dropped_slurl.isSpatial()) + + // special case SLURLs + // isValidSLURL() call was added here to make sure that dragged SLURL is valid (EXT-4964) + if ( LLSLURL::isSLURL( data ) && LLSLURL::isValidSLURL( data ) ) { if (drop) { - LLURLDispatcher::dispatch( dropped_slurl.getSLURLString(), NULL, true ); - return LLWindowCallbacks::DND_MOVE; + LLURLDispatcher::dispatch( data, NULL, true ); + LLURLSimString::setStringRaw( LLSLURL::stripProtocol( data ) ); + LLPanelLogin::refreshLocation( true ); + LLPanelLogin::updateLocationUI(); } - } + return LLWindowCallbacks::DND_COPY; + }; } if (prim_media_dnd_enabled) @@ -951,7 +957,7 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi BOOL LLViewerWindow::handleMiddleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask) { BOOL down = FALSE; - LLVoiceClient::getInstance()->middleMouseState(false); + gVoiceClient->middleMouseState(false); handleAnyMouseClick(window,pos,mask,LLMouseHandler::CLICK_MIDDLE,down); // Always handled as far as the OS is concerned. @@ -1068,7 +1074,7 @@ void LLViewerWindow::handleFocusLost(LLWindow *window) BOOL LLViewerWindow::handleTranslatedKeyDown(KEY key, MASK mask, BOOL repeated) { // Let the voice chat code check for its PTT key. Note that this never affects event processing. - LLVoiceClient::getInstance()->keyDown(key, mask); + gVoiceClient->keyDown(key, mask); if (gAwayTimer.getElapsedTimeF32() > MIN_AFK_TIME) { @@ -1090,7 +1096,7 @@ BOOL LLViewerWindow::handleTranslatedKeyDown(KEY key, MASK mask, BOOL repeated) BOOL LLViewerWindow::handleTranslatedKeyUp(KEY key, MASK mask) { // Let the voice chat code check for its PTT key. Note that this never affects event processing. - LLVoiceClient::getInstance()->keyUp(key, mask); + gVoiceClient->keyUp(key, mask); return FALSE; } @@ -1949,7 +1955,7 @@ void LLViewerWindow::setNormalControlsVisible( BOOL visible ) // ...and set the menu color appropriately. setMenuBackgroundColor(gAgent.getGodLevel() > GOD_NOT, - LLGridManager::getInstance()->isInProductionGrid()); + LLViewerLogin::getInstance()->isInProductionGrid()); } if ( gStatusBar ) @@ -1970,15 +1976,15 @@ void LLViewerWindow::setMenuBackgroundColor(bool god_mode, bool dev_grid) LLSD args; LLColor4 new_bg_color; - if(god_mode && LLGridManager::getInstance()->isInProductionGrid()) + if(god_mode && LLViewerLogin::getInstance()->isInProductionGrid()) { new_bg_color = LLUIColorTable::instance().getColor( "MenuBarGodBgColor" ); } - else if(god_mode && !LLGridManager::getInstance()->isInProductionGrid()) + else if(god_mode && !LLViewerLogin::getInstance()->isInProductionGrid()) { new_bg_color = LLUIColorTable::instance().getColor( "MenuNonProductionGodBgColor" ); } - else if(!god_mode && !LLGridManager::getInstance()->isInProductionGrid()) + else if(!god_mode && !LLViewerLogin::getInstance()->isInProductionGrid()) { new_bg_color = LLUIColorTable::instance().getColor( "MenuNonProductionBgColor" ); } @@ -2194,6 +2200,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) } return TRUE; } + // hidden edit menu for cut/copy/paste if (gEditMenu && gEditMenu->handleAcceleratorKey(key, mask)) { |