summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonroe Linden <monroe@lindenlab.com>2010-09-23 16:30:30 -0700
committerMonroe Linden <monroe@lindenlab.com>2010-09-23 16:30:30 -0700
commit568496eb323e575f9b4bed7866dec0aeef5d7eb4 (patch)
tree07d957aff0c5a01b5817d21c66e5ea9c3d684691
parent7f929cc288b1aa2dfa128da619d2d10a29a73da0 (diff)
Fixed some build errors in llmediaplugintest.cpp.
Reviewed by Richard.
-rw-r--r--indra/test_apps/llplugintest/llmediaplugintest.cpp62
1 files changed, 30 insertions, 32 deletions
diff --git a/indra/test_apps/llplugintest/llmediaplugintest.cpp b/indra/test_apps/llplugintest/llmediaplugintest.cpp
index 1ca328567e..873fa23db8 100644
--- a/indra/test_apps/llplugintest/llmediaplugintest.cpp
+++ b/indra/test_apps/llplugintest/llmediaplugintest.cpp
@@ -2160,39 +2160,32 @@ void LLMediaPluginTest::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent e
// retrieve the event parameters
std::string url = self->getClickURL();
std::string target = self->getClickTarget();
- U32 target_type = self->getClickTargetType();
-
- switch (target_type)
+
+ if(target == "_external")
{
- case LLPluginClassMedia::TARGET_NONE:
- // ignore this click
- break;
-
- case LLPluginClassMedia::TARGET_EXTERNAL:
- // this should open in an external browser, but since this is a test app we don't care.
- break;
-
- case LLPluginClassMedia::TARGET_BLANK:
- // Create a new panel with the specified URL.
- addMediaPanel(url);
- break;
-
- case LLPluginClassMedia::TARGET_OTHER:
- mediaPanel *target_panel = findMediaPanel(target);
- if(target_panel)
- {
- target_panel = replaceMediaPanel(target_panel, url);
- }
- else
- {
- target_panel = addMediaPanel(url);
- }
+ // this should open in an external browser, but since this is a test app we don't care.
+ }
+ else if(target == "_blank")
+ {
+ // Create a new panel with the specified URL.
+ addMediaPanel(url);
+ }
+ else // other named target
+ {
+ mediaPanel *target_panel = findMediaPanel(target);
+ if(target_panel)
+ {
+ target_panel = replaceMediaPanel(target_panel, url);
+ }
+ else
+ {
+ target_panel = addMediaPanel(url);
+ }
- if(target_panel)
- {
- target_panel->mTarget = target;
- }
- break;
+ if(target_panel)
+ {
+ target_panel->mTarget = target;
+ }
}
}
break;
@@ -2220,7 +2213,12 @@ void LLMediaPluginTest::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent e
break;
case MEDIA_EVENT_GEOMETRY_CHANGE:
- std::cerr << "Media event: MEDIA_EVENT_GEOMETRY_CHANGE, uuid is " << self->getClickUUID() << ", rect is " << self->getGeometryRect() << std::endl;
+ std::cerr << "Media event: MEDIA_EVENT_GEOMETRY_CHANGE, uuid is " << self->getClickUUID()
+ << ", x = " << self->getGeometryX()
+ << ", y = " << self->getGeometryY()
+ << ", width = " << self->getGeometryWidth()
+ << ", height = " << self->getGeometryHeight()
+ << std::endl;
break;
}
}