diff options
author | Mark Palange (Mani) <palange@lindenlab.com> | 2009-10-01 18:19:45 -0700 |
---|---|---|
committer | Mark Palange (Mani) <palange@lindenlab.com> | 2009-10-01 18:19:45 -0700 |
commit | dde2153014cd7d7b8fa704f7067a41344bfbb1c2 (patch) | |
tree | f7633ccef179644660897c8bf3684abeda3545f8 /indra/newview/llfloaterurlentry.cpp | |
parent | 9b8b0571645f8b607ecc24221c807cc02a03692f (diff) | |
parent | 85ea690d47208f6dda020c8ff81021179fbdd0b8 (diff) |
merge of latest lindenlab/svn-imports-viewer-20
Diffstat (limited to 'indra/newview/llfloaterurlentry.cpp')
-rw-r--r-- | indra/newview/llfloaterurlentry.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp index 1e975cd447..2b01a56373 100644 --- a/indra/newview/llfloaterurlentry.cpp +++ b/indra/newview/llfloaterurlentry.cpp @@ -35,6 +35,7 @@ #include "llfloaterurlentry.h" #include "llpanellandmedia.h" +#include "llpanelface.h" // project includes #include "llcombobox.h" @@ -145,13 +146,23 @@ void LLFloaterURLEntry::buildURLHistory() void LLFloaterURLEntry::headerFetchComplete(U32 status, const std::string& mime_type) { - LLPanelLandMedia* panel_media = (LLPanelLandMedia*)mPanelLandMediaHandle.get(); + LLPanelLandMedia* panel_media = dynamic_cast<LLPanelLandMedia*>(mPanelLandMediaHandle.get()); if (panel_media) { // status is ignored for now -- error = "none/none" panel_media->setMediaType(mime_type); panel_media->setMediaURL(mMediaURLEdit->getValue().asString()); } + else + { + LLPanelFace* panel_face = dynamic_cast<LLPanelFace*>(mPanelLandMediaHandle.get()); + if(panel_face) + { + panel_face->setMediaType(mime_type); + panel_face->setMediaURL(mMediaURLEdit->getValue().asString()); + } + + } // Decrement the cursor getWindow()->decBusyCount(); childSetVisible("loading_label", false); @@ -159,29 +170,18 @@ void LLFloaterURLEntry::headerFetchComplete(U32 status, const std::string& mime_ } // static -LLHandle<LLFloater> LLFloaterURLEntry::show(LLHandle<LLPanel> parent) +LLHandle<LLFloater> LLFloaterURLEntry::show(LLHandle<LLPanel> parent, const std::string media_url) { - if (sInstance) - { - sInstance->openFloater(); - } - else + if (!sInstance) { sInstance = new LLFloaterURLEntry(parent); } - sInstance->updateFromLandMediaPanel(); + sInstance->openFloater(); + sInstance->addURLToCombobox(media_url); return sInstance->getHandle(); } -void LLFloaterURLEntry::updateFromLandMediaPanel() -{ - LLPanelLandMedia* panel_media = (LLPanelLandMedia*)mPanelLandMediaHandle.get(); - if (panel_media) - { - std::string media_url = panel_media->getMediaURL(); - addURLToCombobox(media_url); - } -} + bool LLFloaterURLEntry::addURLToCombobox(const std::string& media_url) { |