summaryrefslogtreecommitdiff
path: root/indra/newview/llpreviewnotecard.h
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-09-10 12:07:01 -0700
committerGraham Linden <graham@lindenlab.com>2019-09-10 12:07:01 -0700
commit3609eabe5460023d1460664feb5de10d68457725 (patch)
tree533d03aadf36730eb59c2627cfd09e35593dd03c /indra/newview/llpreviewnotecard.h
parent3191a5ddc9b3512b79a8505072d13583eb9012c6 (diff)
parente241670694959833feaa0e667222b337095eb683 (diff)
Merge viewer-release 6.3.2
Diffstat (limited to 'indra/newview/llpreviewnotecard.h')
-rw-r--r--indra/newview/llpreviewnotecard.h31
1 files changed, 22 insertions, 9 deletions
diff --git a/indra/newview/llpreviewnotecard.h b/indra/newview/llpreviewnotecard.h
index 46a6d0ef50..d9c14815c1 100644
--- a/indra/newview/llpreviewnotecard.h
+++ b/indra/newview/llpreviewnotecard.h
@@ -29,6 +29,7 @@
#include "llpreview.h"
#include "llassetstorage.h"
+#include "llpreviewscript.h"
#include "lliconctrl.h"
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -47,18 +48,18 @@ public:
virtual ~LLPreviewNotecard();
bool saveItem();
- void setObjectID(const LLUUID& object_id);
+ void setObjectID(const LLUUID& object_id) override;
// llview
- virtual void draw();
- virtual BOOL handleKeyHere(KEY key, MASK mask);
- virtual void setEnabled( BOOL enabled );
+ void draw() override;
+ BOOL handleKeyHere(KEY key, MASK mask) override;
+ void setEnabled( BOOL enabled ) override;
// llfloater
- virtual BOOL canClose();
+ BOOL canClose() override;
// llpanel
- virtual BOOL postBuild();
+ BOOL postBuild() override;
// reach into the text editor, and grab the drag item
const LLInventoryItem* getDragItem();
@@ -72,11 +73,13 @@ public:
// asset system. :(
void refreshFromInventory(const LLUUID& item_id = LLUUID::null);
+ void syncExternal();
+
protected:
- void updateTitleButtons();
- virtual void loadAsset();
- bool saveIfNeeded(LLInventoryItem* copyitem = NULL);
+ void updateTitleButtons() override;
+ void loadAsset() override;
+ bool saveIfNeeded(LLInventoryItem* copyitem = NULL, bool sync = true);
void deleteNotecard();
@@ -89,6 +92,8 @@ protected:
static void onClickDelete(void* data);
+ static void onClickEdit(void* data);
+
static void onSaveComplete(const LLUUID& asset_uuid,
void* user_data,
S32 status, LLExtStat ext_status);
@@ -99,6 +104,12 @@ protected:
static void finishInventoryUpload(LLUUID itemId, LLUUID newAssetId, LLUUID newItemId);
static void finishTaskUpload(LLUUID itemId, LLUUID newAssetId, LLUUID taskId);
+ void openInExternalEditor();
+ bool onExternalChange(const std::string& filename);
+ bool loadNotecardText(const std::string& filename);
+ bool writeToFile(const std::string& filename);
+ std::string getTmpFileName();
+
protected:
LLViewerTextEditor* mEditor;
LLButton* mSaveBtn;
@@ -106,6 +117,8 @@ protected:
LLUUID mAssetID;
LLUUID mObjectID;
+
+ LLLiveLSLFile* mLiveFile;
};