summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llpreviewnotecard.cpp27
-rw-r--r--indra/newview/llpreviewnotecard.h1
-rw-r--r--indra/newview/skins/default/xui/en/floater_preview_notecard.xml16
3 files changed, 10 insertions, 34 deletions
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index f3d0dc538d..ce9fcd9da2 100644
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -73,10 +73,9 @@ LLPreviewNotecard::LLPreviewNotecard(const LLSD& key) //const LLUUID& item_id,
const LLInventoryItem *item = getItem();
if (item)
{
- mShowKeepDiscard = item->getPermissions().getCreator() != gAgent.getID();
- //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_notecard.xml", FALSE);
mAssetID = item->getAssetUUID();
}
+ //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_notecard.xml", FALSE);
}
LLPreviewNotecard::~LLPreviewNotecard()
@@ -91,18 +90,8 @@ BOOL LLPreviewNotecard::postBuild()
ed->setNotecardInfo(mItemUUID, mObjectID, getKey());
ed->makePristine();
}
- if (mShowKeepDiscard)
- {
- childSetAction("Keep",onKeepBtn,this);
- childSetAction("Discard",onDiscardBtn,this);
- }
- else
- {
- getChild<LLButton>("Keep")->setLabel(getString("Save"));
- childSetAction("Keep",onClickSave,this);
- childSetVisible("Discard", false);
- }
+ childSetAction("Save", onClickSave, this);
childSetVisible("lock", FALSE);
const LLInventoryItem* item = getItem();
@@ -137,18 +126,16 @@ void LLPreviewNotecard::setEnabled( BOOL enabled )
childSetEnabled("Notecard Editor", enabled);
childSetVisible("lock", !enabled);
childSetEnabled("desc", enabled);
- childSetEnabled("Keep", enabled && editor && (!editor->isPristine()));
-
+ childSetEnabled("Save", enabled && editor && (!editor->isPristine()));
}
void LLPreviewNotecard::draw()
{
-
LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
- BOOL script_changed = !editor->isPristine();
+ BOOL changed = !editor->isPristine();
- childSetEnabled("Keep", script_changed && getEnabled());
+ childSetEnabled("Save", changed && getEnabled());
LLPreview::draw();
}
@@ -293,7 +280,9 @@ void LLPreviewNotecard::loadAsset()
editor->setText(LLStringUtil::null);
editor->makePristine();
editor->setEnabled(TRUE);
- mAssetStatus = PREVIEW_ASSET_LOADED;
+ // Don't set asset status here; we may not have set the item id yet
+ // (e.g. when this gets called initially)
+ //mAssetStatus = PREVIEW_ASSET_LOADED;
}
}
diff --git a/indra/newview/llpreviewnotecard.h b/indra/newview/llpreviewnotecard.h
index 2a008be1e6..5b8cf1c2f6 100644
--- a/indra/newview/llpreviewnotecard.h
+++ b/indra/newview/llpreviewnotecard.h
@@ -102,7 +102,6 @@ protected:
LLUUID mAssetID;
LLUUID mObjectID;
- BOOL mShowKeepDiscard;
};
diff --git a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml
index 3327dc8c8b..f8f1abd179 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml
@@ -83,23 +83,11 @@
<button
follows="left|bottom"
height="20"
- label="Discard"
+ label="Save"
label_selected="Discard"
layout="topleft"
left="9"
- name="Discard"
+ name="Save"
top="332"
width="100" />
- <button
- enabled="false"
- follows="left|bottom"
- height="20"
- label="Keep"
- label_selected="Keep"
- layout="topleft"
- left_pad="5"
- mouse_opaque="false"
- name="Keep"
- top_delta="0"
- width="100" />
</floater>