diff options
author | callum <none@none> | 2009-11-30 20:19:39 -0800 |
---|---|---|
committer | callum <none@none> | 2009-11-30 20:19:39 -0800 |
commit | e0a7b7608f087b7d3a4b91ba7868e0a5c04aaa86 (patch) | |
tree | a4f225f5bb94495cd794d2f16d019b738de7baee /indra | |
parent | aae1917d2e7a5af03f525d44eb177317495ead29 (diff) |
Add support for dropping a region SLURL on login page and populating the UI
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpanellogin.cpp | 15 | ||||
-rw-r--r-- | indra/newview/llpanellogin.h | 3 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 6 |
3 files changed, 22 insertions, 2 deletions
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index d2a17dbd97..ba3782bf53 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -683,6 +683,21 @@ void LLPanelLogin::refreshLocation( bool force_visible ) } // static +void LLPanelLogin::updateLocationUI() +{ + std::string sim_string = LLURLSimString::sInstance.mSimString; + if (!sim_string.empty()) + { + // Replace "<Type region name>" with this region name + LLComboBox* combo = sInstance->getChild<LLComboBox>("start_location_combo"); + combo->remove(2); + combo->add( sim_string ); + combo->setTextEntry(sim_string); + combo->setCurrentByIndex( 2 ); + } +} + +// static void LLPanelLogin::closePanel() { if (sInstance) diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index acb2001c22..8f24450c08 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -70,6 +70,7 @@ public: static void addServer(const std::string& server, S32 domain_name); static void refreshLocation( bool force_visible ); + static void updateLocationUI(); static void getFields(std::string *firstname, std::string *lastname, std::string *password); @@ -99,7 +100,7 @@ private: static void onPassKey(LLLineEditor* caller, void* user_data); static void onSelectServer(LLUICtrl*, void*); static void onServerComboLostFocus(LLFocusableElement*); - + private: LLPointer<LLUIImage> mLogoImage; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index f953a45890..31b30344be 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -50,6 +50,7 @@ #include "llviewquery.h" #include "llxmltree.h" +#include "llslurl.h" //#include "llviewercamera.h" #include "llrender.h" @@ -828,9 +829,12 @@ BOOL LLViewerWindow::handleDragNDrop( LLWindow *window, LLCoordGL pos, MASK mas if (gSavedSettings.getBOOL("PrimMediaDragNDrop")) { // special case SLURLs - if ( slurl ) + if ( drop && slurl ) { LLURLDispatcher::dispatch( data, NULL, true ); + LLURLSimString::setString( LLSLURL::stripProtocol( data ) ); + LLPanelLogin::refreshLocation( true ); + LLPanelLogin::updateLocationUI(); return TRUE; }; |