summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelpicks.h
diff options
context:
space:
mode:
authorDmitry Zaporozhan <dzaporozhan@productengine.com>2010-03-10 10:21:19 +0200
committerDmitry Zaporozhan <dzaporozhan@productengine.com>2010-03-10 10:21:19 +0200
commit2197304984f8e32d8b8fcddf7271188a98259c64 (patch)
treed9930424892be9931214147a64ffc71f2da67e00 /indra/newview/llpanelpicks.h
parenta45544f9a0adca7bd765929ffe321756ffb09609 (diff)
Fixed major bug EXT-5942 - Entering a Classified with a banned keyword doesn't publish, and doesn't let you edit.
Changed the way panels handle classified publishing - each classified panel will keep listening to callbacks and will know when classified is published successfuly. If publish failed, panel will allow user to edit classified and try publishing again. All unpublished classifieds will be lost on Viewer restart. --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llpanelpicks.h')
-rw-r--r--indra/newview/llpanelpicks.h41
1 files changed, 38 insertions, 3 deletions
diff --git a/indra/newview/llpanelpicks.h b/indra/newview/llpanelpicks.h
index 11e811275b..6d013035a2 100644
--- a/indra/newview/llpanelpicks.h
+++ b/indra/newview/llpanelpicks.h
@@ -114,6 +114,8 @@ private:
void onPanelClassifiedEdit();
void onClickMenuEdit();
+ bool onEnableMenuItem(const LLSD& user_data);
+
void createNewPick();
void createNewClassified();
@@ -140,7 +142,7 @@ private:
void createPickInfoPanel();
void createPickEditPanel();
void createClassifiedInfoPanel();
- void createClassifiedEditPanel();
+ void createClassifiedEditPanel(LLPanelClassifiedEdit** panel);
LLMenuGL* mPopupMenu;
LLPanelProfile* mProfilePanel;
@@ -149,10 +151,16 @@ private:
LLFlatListView* mClassifiedsList;
LLPanelPickInfo* mPanelPickInfo;
LLPanelClassifiedInfo* mPanelClassifiedInfo;
- LLPanelClassifiedEdit* mPanelClassifiedEdit;
LLPanelPickEdit* mPanelPickEdit;
LLToggleableMenu* mPlusMenu;
+ // <classified_id, edit_panel>
+ typedef std::map<LLUUID, LLPanelClassifiedEdit*> panel_classified_edit_map_t;
+
+ // This map is needed for newly created classifieds. The purpose of panel is to
+ // sit in this map and listen to LLPanelClassifiedEdit::processProperties callback.
+ panel_classified_edit_map_t mEditClassifiedPanels;
+
LLAccordionCtrlTab* mPicksAccTab;
LLAccordionCtrlTab* mClassifiedsAccTab;
@@ -245,6 +253,8 @@ public:
/*virtual*/ void setValue(const LLSD& value);
+ void fillIn(LLPanelClassifiedEdit* panel);
+
LLUUID getAvatarId() {return mAvatarId;}
void setAvatarId(const LLUUID& avatar_id) {mAvatarId = avatar_id;}
@@ -255,7 +265,11 @@ public:
void setPosGlobal(const LLVector3d& pos) { mPosGlobal = pos; }
- const LLVector3d& getPosGlobal() { return mPosGlobal; }
+ const LLVector3d getPosGlobal() { return mPosGlobal; }
+
+ void setLocationText(const std::string location) { mLocationText = location; }
+
+ std::string getLocationText() { return mLocationText; }
void setClassifiedName (const std::string& name);
@@ -269,10 +283,31 @@ public:
LLUUID getSnapshotId();
+ void setCategory(U32 cat) { mCategory = cat; }
+
+ U32 getCategory() { return mCategory; }
+
+ void setContentType(U32 ct) { mContentType = ct; }
+
+ U32 getContentType() { return mContentType; }
+
+ void setAutoRenew(U32 renew) { mAutoRenew = renew; }
+
+ bool getAutoRenew() { return mAutoRenew; }
+
+ void setPriceForListing(S32 price) { mPriceForListing = price; }
+
+ S32 getPriceForListing() { return mPriceForListing; }
+
private:
LLUUID mAvatarId;
LLUUID mClassifiedId;
LLVector3d mPosGlobal;
+ std::string mLocationText;
+ U32 mCategory;
+ U32 mContentType;
+ bool mAutoRenew;
+ S32 mPriceForListing;
};
#endif // LL_LLPANELPICKS_H