summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanelface.cpp20
-rw-r--r--indra/newview/llpanelface.h6
-rw-r--r--indra/newview/skins/default/xui/en/panel_tools_texture.xml10
3 files changed, 15 insertions, 21 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index dd89efda3e..8e7d4a2d11 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -157,10 +157,8 @@ BOOL LLPanelFace::postBuild()
childSetCommitCallback("glossiness",&LLPanelFace::onCommitMaterialGloss, this);
childSetCommitCallback("environment",&LLPanelFace::onCommitMaterialEnv, this);
childSetCommitCallback("maskcutoff",&LLPanelFace::onCommitMaterialMaskCutoff, this);
-
- mCommitCallbackRegistrar.add("BuildTool.AddMedia", boost::bind(&LLPanelFace::onClickBtnAddMedia, this));
- mCommitCallbackRegistrar.add("BuildTool.DeleteMedia", boost::bind(&LLPanelFace::onClickBtnDeleteMedia, this));
- mCommitCallbackRegistrar.add("BuildTool.EditMedia", boost::bind(&LLPanelFace::onClickBtnEditMedia, this));
+ childSetCommitCallback("add_media", &LLPanelFace::onClickBtnAddMedia, this);
+ childSetCommitCallback("delete_media", &LLPanelFace::onClickBtnDeleteMedia, this);
childSetAction("button align",&LLPanelFace::onClickAutoFix,this);
childSetAction("button align textures", &LLPanelFace::onAlignTexture, this);
@@ -2797,32 +2795,34 @@ void LLPanelFace::onSelectNormalTexture(const LLSD& data)
//////////////////////////////////////////////////////////////////////////////
// called when a user wants to edit existing media settings on a prim or prim face
// TODO: test if there is media on the item and only allow editing if present
-void LLPanelFace::onClickBtnEditMedia()
+void LLPanelFace::onClickBtnEditMedia(LLUICtrl* ctrl, void* userdata)
{
- refreshMedia();
+ LLPanelFace* self = (LLPanelFace*)userdata;
+ self->refreshMedia();
LLFloaterReg::showInstance("media_settings");
}
//////////////////////////////////////////////////////////////////////////////
// called when a user wants to delete media from a prim or prim face
-void LLPanelFace::onClickBtnDeleteMedia()
+void LLPanelFace::onClickBtnDeleteMedia(LLUICtrl* ctrl, void* userdata)
{
LLNotificationsUtil::add("DeleteMedia", LLSD(), LLSD(), deleteMediaConfirm);
}
//////////////////////////////////////////////////////////////////////////////
// called when a user wants to add media to a prim or prim face
-void LLPanelFace::onClickBtnAddMedia()
+void LLPanelFace::onClickBtnAddMedia(LLUICtrl* ctrl, void* userdata)
{
// check if multiple faces are selected
if (LLSelectMgr::getInstance()->getSelection()->isMultipleTESelected())
{
- refreshMedia();
+ LLPanelFace* self = (LLPanelFace*)userdata;
+ self->refreshMedia();
LLNotificationsUtil::add("MultipleFacesSelected", LLSD(), LLSD(), multipleFacesSelectedConfirm);
}
else
{
- onClickBtnEditMedia();
+ onClickBtnEditMedia(ctrl, userdata);
}
}
diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h
index 0e3ee0ac63..58c66bfdac 100644
--- a/indra/newview/llpanelface.h
+++ b/indra/newview/llpanelface.h
@@ -149,9 +149,6 @@ protected:
void onCommitNormalTexture(const LLSD& data);
void onCancelNormalTexture(const LLSD& data);
void onSelectNormalTexture(const LLSD& data);
- void onClickBtnEditMedia();
- void onClickBtnDeleteMedia();
- void onClickBtnAddMedia();
void onCommitColor(const LLSD& data);
void onCommitShinyColor(const LLSD& data);
void onCommitAlpha(const LLSD& data);
@@ -209,6 +206,9 @@ protected:
static void onCommitMaterialsMedia( LLUICtrl* ctrl, void* userdata);
static void onCommitMaterialType( LLUICtrl* ctrl, void* userdata);
+ static void onClickBtnEditMedia(LLUICtrl* ctrl, void* userdata);
+ static void onClickBtnDeleteMedia(LLUICtrl* ctrl, void* userdata);
+ static void onClickBtnAddMedia(LLUICtrl* ctrl, void* userdata);
static void onCommitBump( LLUICtrl* ctrl, void* userdata);
static void onCommitTexGen( LLUICtrl* ctrl, void* userdata);
static void onCommitShiny( LLUICtrl* ctrl, void* userdata);
diff --git a/indra/newview/skins/default/xui/en/panel_tools_texture.xml b/indra/newview/skins/default/xui/en/panel_tools_texture.xml
index 90f32ae452..594ca08a38 100644
--- a/indra/newview/skins/default/xui/en/panel_tools_texture.xml
+++ b/indra/newview/skins/default/xui/en/panel_tools_texture.xml
@@ -498,10 +498,7 @@
top_pad="4"
tool_tip="Add Media"
label="Choose..."
- width="85">
- <button.commit_callback
- function="BuildTool.AddMedia"/>
- </button>
+ width="85"/>
<button
follows="top|left"
height="18"
@@ -511,10 +508,7 @@
tool_tip="Delete this media texture"
top_delta="0"
label="Remove"
- width="85">
- <button.commit_callback
- function="BuildTool.DeleteMedia"/>
- </button>
+ width="85"/>
<button
follows="left|top"
height="18"