diff options
Diffstat (limited to 'indra/newview/llpanelprimmediacontrols.cpp')
-rw-r--r-- | indra/newview/llpanelprimmediacontrols.cpp | 48 |
1 files changed, 21 insertions, 27 deletions
diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 2822abe1f5..c662206e77 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -127,7 +127,7 @@ BOOL LLPanelPrimMediaControls::postBuild() scroll_left_ctrl->setMouseUpCallback(onScrollStop, this); LLButton* scroll_right_ctrl = getChild<LLButton>("scrollright"); scroll_right_ctrl->setClickedCallback(onScrollRight, this); - scroll_right_ctrl->setHeldDownCallback(onScrollLeftHeld, this); + scroll_right_ctrl->setHeldDownCallback(onScrollRightHeld, this); scroll_right_ctrl->setMouseUpCallback(onScrollStop, this); LLButton* scroll_down_ctrl = getChild<LLButton>("scrolldown"); scroll_down_ctrl->setClickedCallback(onScrollDown, this); @@ -292,7 +292,7 @@ void LLPanelPrimMediaControls::updateShape() // Disable zoom if HUD zoom_ctrl->setEnabled(!objectp->isHUDAttachment()); secure_lock_icon->setVisible(false); - mCurrentURL = media_impl->getMediaURL(); + mCurrentURL = media_impl->getCurrentMediaURL(); back_ctrl->setEnabled((media_impl != NULL) && media_impl->canNavigateBack() && can_navigate); fwd_ctrl->setEnabled((media_impl != NULL) && media_impl->canNavigateForward() && can_navigate); @@ -473,7 +473,7 @@ void LLPanelPrimMediaControls::updateShape() } } - if(media_plugin) + if(media_impl) { // // Handle Scrolling @@ -481,16 +481,18 @@ void LLPanelPrimMediaControls::updateShape() switch (mScrollState) { case SCROLL_UP: - media_plugin->scrollEvent(0, -1, MASK_NONE); + media_impl->scrollWheel(0, -1, MASK_NONE); break; case SCROLL_DOWN: - media_plugin->scrollEvent(0, 1, MASK_NONE); + media_impl->scrollWheel(0, 1, MASK_NONE); break; case SCROLL_LEFT: - media_impl->handleKeyHere(KEY_LEFT, MASK_NONE); + media_impl->scrollWheel(1, 0, MASK_NONE); +// media_impl->handleKeyHere(KEY_LEFT, MASK_NONE); break; case SCROLL_RIGHT: - media_impl->handleKeyHere(KEY_RIGHT, MASK_NONE); + media_impl->scrollWheel(-1, 0, MASK_NONE); +// media_impl->handleKeyHere(KEY_RIGHT, MASK_NONE); break; case SCROLL_NONE: default: @@ -759,20 +761,10 @@ void LLPanelPrimMediaControls::onClickHome() void LLPanelPrimMediaControls::onClickOpen() { - LLViewerMediaImpl* impl =getTargetMediaImpl(); + LLViewerMediaImpl* impl = getTargetMediaImpl(); if(impl) { - if(impl->getMediaPlugin()) - { - if(impl->getMediaPlugin()->getLocation().empty()) - { - LLWeb::loadURL(impl->getMediaURL()); - } - else - { - LLWeb::loadURL( impl->getMediaPlugin()->getLocation()); - } - } + LLWeb::loadURL(impl->getCurrentMediaURL()); } } @@ -896,11 +888,11 @@ void LLPanelPrimMediaControls::onScrollUp(void* user_data) LLPanelPrimMediaControls* this_panel = static_cast<LLPanelPrimMediaControls*> (user_data); this_panel->focusOnTarget(); - LLPluginClassMedia* plugin = this_panel->getTargetMediaPlugin(); + LLViewerMediaImpl* impl = this_panel->getTargetMediaImpl(); - if(plugin) + if(impl) { - plugin->scrollEvent(0, -1, MASK_NONE); + impl->scrollWheel(0, -1, MASK_NONE); } } void LLPanelPrimMediaControls::onScrollUpHeld(void* user_data) @@ -917,7 +909,8 @@ void LLPanelPrimMediaControls::onScrollRight(void* user_data) if(impl) { - impl->handleKeyHere(KEY_RIGHT, MASK_NONE); + impl->scrollWheel(-1, 0, MASK_NONE); +// impl->handleKeyHere(KEY_RIGHT, MASK_NONE); } } void LLPanelPrimMediaControls::onScrollRightHeld(void* user_data) @@ -935,7 +928,8 @@ void LLPanelPrimMediaControls::onScrollLeft(void* user_data) if(impl) { - impl->handleKeyHere(KEY_LEFT, MASK_NONE); + impl->scrollWheel(1, 0, MASK_NONE); +// impl->handleKeyHere(KEY_LEFT, MASK_NONE); } } void LLPanelPrimMediaControls::onScrollLeftHeld(void* user_data) @@ -949,11 +943,11 @@ void LLPanelPrimMediaControls::onScrollDown(void* user_data) LLPanelPrimMediaControls* this_panel = static_cast<LLPanelPrimMediaControls*> (user_data); this_panel->focusOnTarget(); - LLPluginClassMedia* plugin = this_panel->getTargetMediaPlugin(); + LLViewerMediaImpl* impl = this_panel->getTargetMediaImpl(); - if(plugin) + if(impl) { - plugin->scrollEvent(0, 1, MASK_NONE); + impl->scrollWheel(0, 1, MASK_NONE); } } void LLPanelPrimMediaControls::onScrollDownHeld(void* user_data) |