diff options
Diffstat (limited to 'indra/newview/llpanelprofile.h')
-rw-r--r-- | indra/newview/llpanelprofile.h | 49 |
1 files changed, 32 insertions, 17 deletions
diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h index 4985ec0015..5b30a6c536 100644 --- a/indra/newview/llpanelprofile.h +++ b/indra/newview/llpanelprofile.h @@ -75,27 +75,27 @@ public: LLPanelProfileSecondLife(); /*virtual*/ ~LLPanelProfileSecondLife(); - /*virtual*/ void onOpen(const LLSD& key); + void onOpen(const LLSD& key) override; /** * LLFriendObserver trigger */ - virtual void changed(U32 mask); + void changed(U32 mask) override; // Implements LLVoiceClientStatusObserver::onChange() to enable the call // button when voice is available - /*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal); + void onChange(EStatusType status, const std::string &channelURI, bool proximal) override; - /*virtual*/ void setAvatarId(const LLUUID& avatar_id); + void setAvatarId(const LLUUID& avatar_id) override; - /*virtual*/ BOOL postBuild(); + BOOL postBuild() override; void resetData(); /** * Sends update data request to server. */ - /*virtual*/ void updateData(); + void updateData() override; void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name); @@ -103,6 +103,9 @@ public: void setProfileImageUploading(bool loading); void setProfileImageUploaded(const LLUUID &image_asset_id); + bool hasUnsavedChanges() override; + void commitUnsavedChanges() override; + friend void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id); protected: @@ -171,7 +174,7 @@ protected: void processOnlineStatus(bool is_friend, bool show_online, bool online); private: - /*virtual*/ void setLoaded(); + void setLoaded() override; void onCommitMenu(const LLSD& userdata); bool onEnableMenu(const LLSD& userdata); bool onCheckMenu(const LLSD& userdata); @@ -208,6 +211,7 @@ private: LLHandle<LLFloater> mFloaterPermissionsHandle; + bool mHasUnsavedDescriptionChanges; bool mVoiceStatus; bool mWaitingForImageUpload; bool mAllowPublish; @@ -270,9 +274,9 @@ public: LLPanelProfileFirstLife(); /*virtual*/ ~LLPanelProfileFirstLife(); - /*virtual*/ void onOpen(const LLSD& key); + void onOpen(const LLSD& key) override; - /*virtual*/ BOOL postBuild(); + BOOL postBuild() override; void processProperties(const LLAvatarData* avatar_data); @@ -281,10 +285,13 @@ public: void setProfileImageUploading(bool loading); void setProfileImageUploaded(const LLUUID &image_asset_id); + bool hasUnsavedChanges() override { return mHasUnsavedChanges; } + void commitUnsavedChanges() override; + friend void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id); protected: - /*virtual*/ void setLoaded(); + void setLoaded() override; void onChangePhoto(); void onRemovePhoto(); @@ -301,6 +308,7 @@ protected: LLButton* mDiscardChanges; std::string mCurrentDescription; + bool mHasUnsavedChanges; }; /** @@ -313,17 +321,20 @@ public: LLPanelProfileNotes(); /*virtual*/ ~LLPanelProfileNotes(); - virtual void setAvatarId(const LLUUID& avatar_id); + void setAvatarId(const LLUUID& avatar_id) override; - /*virtual*/ void onOpen(const LLSD& key); + void onOpen(const LLSD& key) override; - /*virtual*/ BOOL postBuild(); + BOOL postBuild() override; void processProperties(LLAvatarNotes* avatar_notes); void resetData(); - /*virtual*/ void updateData(); + void updateData() override; + + bool hasUnsavedChanges() override { return mHasUnsavedChanges; } + void commitUnsavedChanges() override; protected: void setNotesText(const std::string &text); @@ -336,6 +347,7 @@ protected: LLButton* mDiscardChanges; std::string mCurrentNotes; + bool mHasUnsavedChanges; }; @@ -349,16 +361,19 @@ public: LLPanelProfile(); /*virtual*/ ~LLPanelProfile(); - /*virtual*/ BOOL postBuild(); + BOOL postBuild() override; - /*virtual*/ void updateData(); + void updateData() override; - /*virtual*/ void onOpen(const LLSD& key); + void onOpen(const LLSD& key) override; void createPick(const LLPickData &data); void showPick(const LLUUID& pick_id = LLUUID::null); bool isPickTabSelected(); bool isNotesTabSelected(); + bool hasUnsavedChanges() override; + bool hasUnpublishedClassifieds(); + void commitUnsavedChanges() override; void showClassified(const LLUUID& classified_id = LLUUID::null, bool edit = false); |