summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/lltooltip.cpp4
-rw-r--r--indra/newview/llinspectobject.cpp33
-rw-r--r--indra/newview/lltoolpie.cpp39
3 files changed, 43 insertions, 33 deletions
diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp
index 23c87c7522..4bc9a9c042 100644
--- a/indra/llui/lltooltip.cpp
+++ b/indra/llui/lltooltip.cpp
@@ -198,6 +198,7 @@ LLToolTip::LLToolTip(const LLToolTip::Params& p)
{
LLButton::Params icon_params;
icon_params.name = "tooltip_info";
+ icon_params.label(""); // provid label but set to empty so name does not overwrite it -angela
LLRect icon_rect;
LLUIImage* imagep = p.image;
TOOLTIP_ICON_SIZE = (imagep ? imagep->getWidth() : 16);
@@ -206,6 +207,7 @@ LLToolTip::LLToolTip(const LLToolTip::Params& p)
//icon_params.follows.flags = FOLLOWS_LEFT | FOLLOWS_BOTTOM;
icon_params.image_unselected(imagep);
icon_params.image_selected(imagep);
+
icon_params.scale_image(true);
icon_params.flash_color(icon_params.highlight_color());
mInfoButton = LLUICtrlFactory::create<LLButton>(icon_params);
@@ -223,6 +225,7 @@ LLToolTip::LLToolTip(const LLToolTip::Params& p)
{
LLButton::Params p_button;
p_button.name(std::string("play_media"));
+ p_button.label(""); // provid label but set to empty so name does not overwrite it -angela
TOOLTIP_PLAYBUTTON_SIZE = 16;
LLRect button_rect;
button_rect.setOriginAndSize((mPadding +TOOLTIP_ICON_SIZE+ mPadding ), mPadding, TOOLTIP_ICON_SIZE, TOOLTIP_ICON_SIZE);
@@ -247,6 +250,7 @@ LLToolTip::LLToolTip(const LLToolTip::Params& p)
{
LLButton::Params p_w_button;
p_w_button.name(std::string("home_page"));
+ p_w_button.label(""); // provid label but set to empty so name does not overwrite it -angela
TOOLTIP_PLAYBUTTON_SIZE = 16;
LLRect button_rect;
button_rect.setOriginAndSize((mPadding +TOOLTIP_ICON_SIZE+ mPadding ), mPadding, TOOLTIP_ICON_SIZE, TOOLTIP_ICON_SIZE);
diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp
index 050a61c79b..e3780f93ff 100644
--- a/indra/newview/llinspectobject.cpp
+++ b/indra/newview/llinspectobject.cpp
@@ -112,6 +112,7 @@ private:
LLUUID mObjectID;
S32 mObjectFace;
viewer_media_t mMediaImpl;
+ LLMediaEntry* mMediaEntry;
LLSafeHandle<LLObjectSelection> mObjectSelection;
};
@@ -120,7 +121,8 @@ LLInspectObject::LLInspectObject(const LLSD& sd)
mObjectID(NULL), // set in onOpen()
mObjectFace(0),
mObjectSelection(NULL),
- mMediaImpl(NULL)
+ mMediaImpl(NULL),
+ mMediaEntry(NULL)
{
// can't make the properties request until the widgets are constructed
// as it might return immediately, so do it in postBuild.
@@ -231,11 +233,11 @@ void LLInspectObject::onOpen(const LLSD& data)
if (!tep)
return;
- const LLMediaEntry* mep = tep->hasMedia() ? tep->getMediaData() : NULL;
- if(!mep)
+ mMediaEntry = tep->hasMedia() ? tep->getMediaData() : NULL;
+ if(!mMediaEntry)
return;
- mMediaImpl = LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID());
+ mMediaImpl = LLViewerMedia::getMediaImplFromTextureID(mMediaEntry->getMediaID());
}
}
@@ -282,11 +284,11 @@ void LLInspectObject::update()
if (!tep)
return;
- const LLMediaEntry* mep = tep->hasMedia() ? tep->getMediaData() : NULL;
- if(!mep)
+ mMediaEntry = tep->hasMedia() ? tep->getMediaData() : NULL;
+ if(!mMediaEntry)
return;
- mMediaImpl = LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID());
+ mMediaImpl = LLViewerMedia::getMediaImplFromTextureID(mMediaEntry->getMediaID());
updateMediaCurrentURL();
updateSecureBrowsing();
@@ -430,14 +432,17 @@ void LLInspectObject::updateDescription(LLSelectNode* nodep)
void LLInspectObject::updateMediaCurrentURL()
{
+ if(!mMediaEntry)
+ return;
LLTextBox* textbox = getChild<LLTextBox>("object_media_url");
std::string media_url = "";
textbox->setValue(media_url);
textbox->setToolTip(media_url);
+ LLStringUtil::format_map_t args;
if(mMediaImpl.notNull() && mMediaImpl->hasMedia())
{
- LLStringUtil::format_map_t args;
+
LLPluginClassMedia* media_plugin = NULL;
media_plugin = mMediaImpl->getMediaPlugin();
if(media_plugin)
@@ -451,15 +456,17 @@ void LLInspectObject::updateMediaCurrentURL()
args["[CurrentURL]"] = media_plugin->getLocation();
}
media_url = LLTrans::getString("CurrentURL", args);
- textbox->setText(media_url);
- textbox->setToolTip(media_url);
+
}
}
- else
+ else if(mMediaEntry->getCurrentURL() != "")
{
- textbox->setText(media_url);
- textbox->setToolTip(media_url);
+ args["[CurrentURL]"] = mMediaEntry->getCurrentURL();
+ media_url = LLTrans::getString("CurrentURL", args);
}
+
+ textbox->setText(media_url);
+ textbox->setToolTip(media_url);
}
void LLInspectObject::updateCreator(LLSelectNode* nodep)
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 0a9e72506b..24017202cc 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -761,14 +761,14 @@ BOOL LLToolPie::handleToolTip(S32 local_x, S32 local_y, MASK mask)
{
is_time_based_media = true;
is_web_based_media = false;
- args["[CurrentURL]"] = media_impl->getMediaURL();
+ //args["[CurrentURL]"] = media_impl->getMediaURL();
is_media_playing = media_impl->isMediaPlaying();
}
else
{
is_time_based_media = false;
is_web_based_media = true;
- args["[CurrentURL]"] = media_plugin->getLocation();
+ //args["[CurrentURL]"] = media_plugin->getLocation();
}
//tooltip_msg.append(LLTrans::getString("CurrentURL", args));
}
@@ -1039,31 +1039,28 @@ void LLToolPie::playCurrentMedia(const LLPickInfo& info)
if(!mep)
return;
+ //TODO: Can you Use it?
+
LLPluginClassMedia* media_plugin = NULL;
-// if (gSavedSettings.getBOOL("MediaOnAPrimUI"))
-// {
- viewer_media_t media_impl = LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID());
+ viewer_media_t media_impl = LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID());
- if(media_impl.notNull() && media_impl->hasMedia())
+ if(media_impl.notNull() && media_impl->hasMedia())
+ {
+ media_plugin = media_impl->getMediaPlugin();
+ if (media_plugin && media_plugin->pluginSupportsMediaTime())
{
- media_plugin = media_impl->getMediaPlugin();
-
- if (media_plugin && media_plugin->pluginSupportsMediaTime())
+ if(media_impl->isMediaPlaying())
{
- if(media_impl->isMediaPlaying())
- {
- media_impl->pause();
- }
- else //if(media_impl->isMediaPaused())
- {
- media_impl->play();
- }
-
+ media_impl->pause();
+ }
+ else
+ {
+ media_impl->play();
}
-
}
-// }
+ }
+
}
@@ -1094,6 +1091,8 @@ void LLToolPie::VisitHomePage(const LLPickInfo& info)
if(!mep)
return;
+ //TODO: Can you Use it?
+
LLPluginClassMedia* media_plugin = NULL;
viewer_media_t media_impl = LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID());