diff --git a/indra/newview/llclassifiedstatsresponder.cpp b/indra/newview/llclassifiedstatsresponder.cpp index a218e2b4e..8cc61f43d 100644 --- a/indra/newview/llclassifiedstatsresponder.cpp +++ b/indra/newview/llclassifiedstatsresponder.cpp @@ -59,7 +59,7 @@ void LLClassifiedStatsResponder::result(const LLSD& content) S32 search_map = content["search_map_clicks"].asInteger(); S32 search_profile = content["search_profile_clicks"].asInteger(); - LLPanelClassified* classified_panelp = (LLPanelClassified*)mClassifiedPanelHandle.get(); + LLPanelClassifiedInfo* classified_panelp = (LLPanelClassifiedInfo*)mClassifiedPanelHandle.get(); if(classified_panelp) { diff --git a/indra/newview/llfloaterclassified.cpp b/indra/newview/llfloaterclassified.cpp index f695da399..9ce3439bd 100644 --- a/indra/newview/llfloaterclassified.cpp +++ b/indra/newview/llfloaterclassified.cpp @@ -106,7 +106,7 @@ void LLFloaterClassifiedInfo::displayClassifiedInfo(const LLUUID& classified_id) void* LLFloaterClassifiedInfo::createClassifiedDetail(void* userdata) { LLFloaterClassifiedInfo *self = (LLFloaterClassifiedInfo*)userdata; - self->mClassifiedPanel = new LLPanelClassified(true, true); + self->mClassifiedPanel = new LLPanelClassifiedInfo(true, true); self->mClassifiedPanel->childSetValue("classified_url", self->mClassifiedID); return self->mClassifiedPanel; } diff --git a/indra/newview/llfloaterclassified.h b/indra/newview/llfloaterclassified.h index 732a5584a..d049467b4 100644 --- a/indra/newview/llfloaterclassified.h +++ b/indra/newview/llfloaterclassified.h @@ -2,7 +2,7 @@ * @file llfloaterclassified.h * @brief Classified information as shown in a floating window from * secondlife:// command handler. - * Just a wrapper for LLPanelClassified. + * Just a wrapper for LLPanelClassifiedInfo. * * $LicenseInfo:firstyear=2002&license=viewergpl$ * @@ -37,7 +37,7 @@ #include "llfloater.h" -class LLPanelClassified; +class LLPanelClassifiedInfo; class LLFloaterClassifiedInfo : LLFloater { @@ -53,7 +53,7 @@ public: private: - LLPanelClassified* mClassifiedPanel; + LLPanelClassifiedInfo* mClassifiedPanel; LLUUID mClassifiedID; }; diff --git a/indra/newview/llfloaterdirectory.cpp b/indra/newview/llfloaterdirectory.cpp index 64f721dd3..a0244eb18 100644 --- a/indra/newview/llfloaterdirectory.cpp +++ b/indra/newview/llfloaterdirectory.cpp @@ -361,7 +361,7 @@ void *LLFloaterDirectory::createFindAllOld(void* userdata) void* LLFloaterDirectory::createClassifiedDetail(void* userdata) { LLFloaterDirectory *self = (LLFloaterDirectory*)userdata; - self->mPanelClassifiedp = new LLPanelClassified(true, false); + self->mPanelClassifiedp = new LLPanelClassifiedInfo(true, false); self->mPanelClassifiedp->setVisible(FALSE); return self->mPanelClassifiedp; } diff --git a/indra/newview/llfloaterdirectory.h b/indra/newview/llfloaterdirectory.h index b4cbf1f18..a1bce3efc 100644 --- a/indra/newview/llfloaterdirectory.h +++ b/indra/newview/llfloaterdirectory.h @@ -54,7 +54,7 @@ class LLPanelAvatar; class LLPanelEvent; class LLPanelGroup; class LLPanelPlace; -class LLPanelClassified; +class LLPanelClassifiedInfo; // Floater to find people, places, things class LLFloaterDirectory : public LLFloater @@ -131,7 +131,7 @@ public: LLPanel* mPanelGroupHolderp; LLPanelPlace* mPanelPlacep; LLPanelPlace* mPanelPlaceSmallp; - LLPanelClassified* mPanelClassifiedp; + LLPanelClassifiedInfo* mPanelClassifiedp; static S32 sOldSearchCount; // debug static S32 sNewSearchCount; // debug diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 4dbb576c0..94cd97200 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -913,7 +913,7 @@ BOOL LLPanelAvatarClassified::canClose() LLTabContainer* tabs = getChild("classified tab"); for (S32 i = 0; i < tabs->getTabCount(); i++) { - LLPanelClassified* panel = (LLPanelClassified*)tabs->getPanelByIndex(i); + LLPanelClassifiedInfo* panel = (LLPanelClassifiedInfo*)tabs->getPanelByIndex(i); if (!panel->canClose()) { return FALSE; @@ -927,7 +927,7 @@ BOOL LLPanelAvatarClassified::titleIsValid() LLTabContainer* tabs = getChild("classified tab"); if ( tabs ) { - LLPanelClassified* panel = (LLPanelClassified*)tabs->getCurrentPanel(); + LLPanelClassifiedInfo* panel = (LLPanelClassifiedInfo*)tabs->getCurrentPanel(); if ( panel ) { if ( ! panel->titleIsValid() ) @@ -945,7 +945,7 @@ void LLPanelAvatarClassified::apply() LLTabContainer* tabs = getChild("classified tab"); for (S32 i = 0; i < tabs->getTabCount(); i++) { - LLPanelClassified* panel = (LLPanelClassified*)tabs->getPanelByIndex(i); + LLPanelClassifiedInfo* panel = (LLPanelClassifiedInfo*)tabs->getPanelByIndex(i); panel->apply(); } } @@ -977,7 +977,7 @@ void LLPanelAvatarClassified::processProperties(void* data, EAvatarProcessorType for(LLAvatarClassifieds::classifieds_list_t::iterator it = c_info->classifieds_list.begin(); it != c_info->classifieds_list.end(); ++it) { - LLPanelClassified* panel_classified = new LLPanelClassified(false, false); + LLPanelClassifiedInfo* panel_classified = new LLPanelClassifiedInfo(false, false); panel_classified->setClassifiedID(it->classified_id); @@ -1027,7 +1027,7 @@ bool LLPanelAvatarClassified::callbackNew(const LLSD& notification, const LLSD& S32 option = LLNotification::getSelectedOption(notification, response); if (0 == option) { - LLPanelClassified* panel_classified = new LLPanelClassified(false, false); + LLPanelClassifiedInfo* panel_classified = new LLPanelClassifiedInfo(false, false); panel_classified->initNewClassified(); LLTabContainer* tabs = getChild("classified tab"); if(tabs) @@ -1046,10 +1046,10 @@ void LLPanelAvatarClassified::onClickDelete(void* data) LLPanelAvatarClassified* self = (LLPanelAvatarClassified*)data; LLTabContainer* tabs = self->getChild("classified tab"); - LLPanelClassified* panel_classified = NULL; + LLPanelClassifiedInfo* panel_classified = NULL; if(tabs) { - panel_classified = (LLPanelClassified*)tabs->getCurrentPanel(); + panel_classified = (LLPanelClassifiedInfo*)tabs->getCurrentPanel(); } if (!panel_classified) return; @@ -1064,10 +1064,10 @@ bool LLPanelAvatarClassified::callbackDelete(const LLSD& notification, const LL { S32 option = LLNotification::getSelectedOption(notification, response); LLTabContainer* tabs = getChild("classified tab"); - LLPanelClassified* panel_classified=NULL; + LLPanelClassifiedInfo* panel_classified=NULL; if(tabs) { - panel_classified = (LLPanelClassified*)tabs->getCurrentPanel(); + panel_classified = (LLPanelClassifiedInfo*)tabs->getCurrentPanel(); } if (!panel_classified) return false; diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index de5f765cc..c82168610 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -82,7 +82,7 @@ const S32 PG_CONTENT = 2; const S32 DECLINE_TO_STATE = 0; //static -std::list LLPanelClassified::sAllPanels; +LLPanelClassifiedInfo::panel_list_t LLPanelClassifiedInfo::sAllPanels; // "classifiedclickthrough" // strings[0] = classified_id @@ -103,10 +103,10 @@ public: S32 teleport_clicks = atoi(strings[1].c_str()); S32 map_clicks = atoi(strings[2].c_str()); S32 profile_clicks = atoi(strings[3].c_str()); - LLPanelClassified::setClickThrough(classified_id, teleport_clicks, - map_clicks, - profile_clicks, - false); + + LLPanelClassifiedInfo::setClickThrough( + classified_id, teleport_clicks, map_clicks, profile_clicks, false); + return true; } }; @@ -143,7 +143,7 @@ public: // *TODO: separately track old search, sidebar, and new search // Right now detail HTML pages count as new search. const bool from_search = true; - LLPanelClassified::sendClassifiedClickMessage(classified_id, "teleport", from_search); + LLPanelClassifiedInfo::sendClassifiedClickMessage(classified_id, "teleport", from_search); // Invoke teleport LLMediaCtrl* web = NULL; const bool trusted_browser = true; @@ -154,7 +154,11 @@ public: LLClassifiedTeleportHandler gClassifiedTeleportHandler; */ -LLPanelClassified::LLPanelClassified(bool in_finder, bool from_search) +////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// + +LLPanelClassifiedInfo::LLPanelClassifiedInfo(bool in_finder, bool from_search) : LLPanel(std::string("Classified Panel")), mInFinder(in_finder), mFromSearch(from_search), @@ -202,22 +206,24 @@ LLPanelClassified::LLPanelClassified(bool in_finder, bool from_search) } // Register dispatcher - gGenericDispatcher.addHandler("classifiedclickthrough", - &sClassifiedClickThrough); + gGenericDispatcher.addHandler("classifiedclickthrough", &sClassifiedClickThrough); } - -LLPanelClassified::~LLPanelClassified() +LLPanelClassifiedInfo::~LLPanelClassifiedInfo() { - if(mCreatorID.notNull()) + if (mCreatorID.notNull()) { LLAvatarPropertiesProcessor::getInstance()->removeObserver(mCreatorID, this); } - sAllPanels.remove(this); + else + { + LLAvatarPropertiesProcessor::getInstance()->removeObserver(LLUUID::null, this); + } + sAllPanels.remove(this); } -void LLPanelClassified::reset() +void LLPanelClassifiedInfo::reset() { if(mCreatorID.notNull()) { @@ -240,41 +246,40 @@ void LLPanelClassified::reset() resetDirty(); } - -BOOL LLPanelClassified::postBuild() +BOOL LLPanelClassifiedInfo::postBuild() { - mSnapshotCtrl = getChild("snapshot_ctrl"); - mSnapshotCtrl->setCommitCallback(boost::bind(&LLPanelClassified::checkDirty, this)); + mSnapshotCtrl = getChild("snapshot_ctrl"); + mSnapshotCtrl->setCommitCallback(boost::bind(&LLPanelClassifiedInfo::checkDirty, this)); mSnapshotSize = mSnapshotCtrl->getRect(); - mNameEditor = getChild("given_name_editor"); + mNameEditor = getChild("given_name_editor"); mNameEditor->setMaxTextLength(DB_PARCEL_NAME_LEN); mNameEditor->setCommitOnFocusLost(TRUE); - mNameEditor->setFocusReceivedCallback(boost::bind(&LLPanelClassified::checkDirty, this)); - mNameEditor->setCommitCallback(boost::bind(&LLPanelClassified::checkDirty, this)); + mNameEditor->setFocusReceivedCallback(boost::bind(&LLPanelClassifiedInfo::checkDirty, this)); + mNameEditor->setCommitCallback(boost::bind(&LLPanelClassifiedInfo::checkDirty, this)); mNameEditor->setPrevalidate( LLLineEditor::prevalidateASCII ); - mDescEditor = getChild("desc_editor"); + mDescEditor = getChild("desc_editor"); mDescEditor->setCommitOnFocusLost(TRUE); - mDescEditor->setFocusReceivedCallback(boost::bind(&LLPanelClassified::checkDirty, this)); - mDescEditor->setCommitCallback(boost::bind(&LLPanelClassified::checkDirty, this)); + mDescEditor->setFocusReceivedCallback(boost::bind(&LLPanelClassifiedInfo::checkDirty, this)); + mDescEditor->setCommitCallback(boost::bind(&LLPanelClassifiedInfo::checkDirty, this)); mDescEditor->setTabsToNextField(TRUE); - mLocationEditor = getChild("location_editor"); + mLocationEditor = getChild("location_editor"); - mSetBtn = getChild( "set_location_btn"); - mSetBtn->setCommitCallback(boost::bind(&LLPanelClassified::onClickSet, this)); + mSetBtn = getChild( "set_location_btn"); + mSetBtn->setCommitCallback(boost::bind(&LLPanelClassifiedInfo::onClickSet, this)); - mTeleportBtn = getChild( "classified_teleport_btn"); - mTeleportBtn->setCommitCallback(boost::bind(&LLPanelClassified::onClickTeleport, this)); + mTeleportBtn = getChild( "classified_teleport_btn"); + mTeleportBtn->setCommitCallback(boost::bind(&LLPanelClassifiedInfo::onClickTeleport, this)); - mMapBtn = getChild( "classified_map_btn"); - mMapBtn->setCommitCallback(boost::bind(&LLPanelClassified::onClickMap, this)); + mMapBtn = getChild( "classified_map_btn"); + mMapBtn->setCommitCallback(boost::bind(&LLPanelClassifiedInfo::onClickMap, this)); if(mInFinder) { mProfileBtn = getChild( "classified_profile_btn"); - mProfileBtn->setCommitCallback(boost::bind(&LLPanelClassified::onClickProfile, this)); + mProfileBtn->setCommitCallback(boost::bind(&LLPanelClassifiedInfo::onClickProfile, this)); } mCategoryCombo = getChild( "classified_category_combo"); @@ -286,11 +291,11 @@ BOOL LLPanelClassified::postBuild() mCategoryCombo->add(iter->second, (void *)((intptr_t)iter->first), ADD_BOTTOM); } mCategoryCombo->setCurrentByIndex(0); - mCategoryCombo->setCommitCallback(boost::bind(&LLPanelClassified::checkDirty, this)); + mCategoryCombo->setCommitCallback(boost::bind(&LLPanelClassifiedInfo::checkDirty, this)); mMatureCombo = getChild( "classified_mature_check"); mMatureCombo->setCurrentByIndex(0); - mMatureCombo->setCommitCallback(boost::bind(&LLPanelClassified::checkDirty, this)); + mMatureCombo->setCommitCallback(boost::bind(&LLPanelClassifiedInfo::checkDirty, this)); if (gAgent.wantsPGOnly()) { // Teens don't get to set mature flag. JC @@ -301,11 +306,11 @@ BOOL LLPanelClassified::postBuild() if (!mInFinder) { mAutoRenewCheck = getChild( "auto_renew_check"); - mAutoRenewCheck->setCommitCallback(boost::bind(&LLPanelClassified::checkDirty, this)); + mAutoRenewCheck->setCommitCallback(boost::bind(&LLPanelClassifiedInfo::checkDirty, this)); } mUpdateBtn = getChild("classified_update_btn"); - mUpdateBtn->setCommitCallback(boost::bind(&LLPanelClassified::onClickUpdate, this)); + mUpdateBtn->setCommitCallback(boost::bind(&LLPanelClassifiedInfo::onClickUpdate, this)); if (!mInFinder) { @@ -313,29 +318,29 @@ BOOL LLPanelClassified::postBuild() } resetDirty(); - return TRUE; + return TRUE; } -void LLPanelClassified::processProperties(void* data, EAvatarProcessorType type) +void LLPanelClassifiedInfo::processProperties(void* data, EAvatarProcessorType type) { if(APT_CLASSIFIED_INFO == type) { lldebugs << "processClassifiedInfoReply()" << llendl; - + LLAvatarClassifiedInfo* c_info = static_cast(data); if(c_info && mClassifiedID == c_info->classified_id) { LLAvatarPropertiesProcessor::getInstance()->removeObserver(LLUUID::null, this); - // "Location text" is actually the original - // name that owner gave the parcel, and the location. + // "Location text" is actually the original + // name that owner gave the parcel, and the location. std::string location_text = c_info->parcel_name; if (!location_text.empty()) location_text.append(", "); - S32 region_x = llround((F32)c_info->pos_global.mdV[VX]) % REGION_WIDTH_UNITS; - S32 region_y = llround((F32)c_info->pos_global.mdV[VY]) % REGION_WIDTH_UNITS; + S32 region_x = llround((F32)c_info->pos_global.mdV[VX]) % REGION_WIDTH_UNITS; + S32 region_y = llround((F32)c_info->pos_global.mdV[VY]) % REGION_WIDTH_UNITS; S32 region_z = llround((F32)c_info->pos_global.mdV[VZ]); std::string buffer = llformat("%s (%d, %d, %d)", c_info->sim_name.c_str(), region_x, region_y, region_z); @@ -347,7 +352,7 @@ void LLPanelClassified::processProperties(void* data, EAvatarProcessorType type) tm *now=localtime(&tim); - // Found the panel, now fill in the information + // Found the panel, now fill in the information mClassifiedID = c_info->classified_id; mCreatorID = c_info->creator_id; mParcelID = c_info->parcel_id; @@ -356,10 +361,10 @@ void LLPanelClassified::processProperties(void* data, EAvatarProcessorType type) mPosGlobal = c_info->pos_global; // Update UI controls - mNameEditor->setText(c_info->name); - mDescEditor->setText(c_info->description); - mSnapshotCtrl->setImageAssetID(c_info->snapshot_id); - mLocationEditor->setText(location_text); + mNameEditor->setText(c_info->name); + mDescEditor->setText(c_info->description); + mSnapshotCtrl->setImageAssetID(c_info->snapshot_id); + mLocationEditor->setText(location_text); mLocationChanged = false; mCategoryCombo->setCurrentByIndex(c_info->category - 1); @@ -386,10 +391,10 @@ void LLPanelClassified::processProperties(void* data, EAvatarProcessorType type) resetDirty(); } - } + } } -BOOL LLPanelClassified::titleIsValid() +BOOL LLPanelClassifiedInfo::titleIsValid() { // Disallow leading spaces, punctuation, etc. that screw up // sort order. @@ -408,7 +413,7 @@ BOOL LLPanelClassified::titleIsValid() return TRUE; } -void LLPanelClassified::apply() +void LLPanelClassifiedInfo::apply() { // Apply is used for automatically saving results, so only // do that if there is a difference, and this is a save not create. @@ -418,7 +423,7 @@ void LLPanelClassified::apply() } } -bool LLPanelClassified::saveCallback(const LLSD& notification, const LLSD& response) +bool LLPanelClassifiedInfo::saveCallback(const LLSD& notification, const LLSD& response) { S32 option = LLNotification::getSelectedOption(notification, response); @@ -442,26 +447,26 @@ bool LLPanelClassified::saveCallback(const LLSD& notification, const LLSD& respo case 2: // Cancel default: - LLAppViewer::instance()->abortQuit(); + LLAppViewer::instance()->abortQuit(); break; } return false; } -BOOL LLPanelClassified::canClose() +BOOL LLPanelClassifiedInfo::canClose() { if (mForceClose || !checkDirty()) return TRUE; LLSD args; args["NAME"] = mNameEditor->getText(); - LLNotificationsUtil::add("ClassifiedSave", args, LLSD(), boost::bind(&LLPanelClassified::saveCallback, this, _1, _2)); + LLNotificationsUtil::add("ClassifiedSave", args, LLSD(), boost::bind(&LLPanelClassifiedInfo::saveCallback, this, _1, _2)); return FALSE; } // Fill in some reasonable defaults for a new classified. -void LLPanelClassified::initNewClassified() +void LLPanelClassifiedInfo::initNewClassified() { // TODO: Don't generate this on the client. mClassifiedID.generate(); @@ -490,13 +495,14 @@ void LLPanelClassified::initNewClassified() } -void LLPanelClassified::setClassifiedID(const LLUUID& id) +void LLPanelClassifiedInfo::setClassifiedID(const LLUUID& id) { mClassifiedID = id; } //static -void LLPanelClassified::setClickThrough(const LLUUID& classified_id, +void LLPanelClassifiedInfo::setClickThrough( + const LLUUID& classified_id, S32 teleport, S32 map, S32 profile, @@ -504,7 +510,7 @@ void LLPanelClassified::setClickThrough(const LLUUID& classified_id, { for (panel_list_t::iterator iter = sAllPanels.begin(); iter != sAllPanels.end(); ++iter) { - LLPanelClassified* self = *iter; + LLPanelClassifiedInfo* self = *iter; // For top picks, must match pick id if (self->mClassifiedID != classified_id) { @@ -541,19 +547,19 @@ void LLPanelClassified::setClickThrough(const LLUUID& classified_id, // Schedules the panel to request data // from the server next time it is drawn. -void LLPanelClassified::markForServerRequest() +void LLPanelClassifiedInfo::markForServerRequest() { mDataRequested = FALSE; } -std::string LLPanelClassified::getClassifiedName() +std::string LLPanelClassifiedInfo::getClassifiedName() { return mNameEditor->getText(); } -void LLPanelClassified::sendClassifiedInfoRequest() +void LLPanelClassifiedInfo::sendClassifiedInfoRequest() { if (mClassifiedID != mRequestedID) { @@ -578,7 +584,7 @@ void LLPanelClassified::sendClassifiedInfoRequest() } } -void LLPanelClassified::sendClassifiedInfoUpdate() +void LLPanelClassifiedInfo::sendClassifiedInfoUpdate() { LLAvatarClassifiedInfo c_data; @@ -608,7 +614,7 @@ void LLPanelClassified::sendClassifiedInfoUpdate() mDirty = false; } -void LLPanelClassified::draw() +void LLPanelClassifiedInfo::draw() { refresh(); @@ -616,25 +622,25 @@ void LLPanelClassified::draw() } -void LLPanelClassified::refresh() +void LLPanelClassifiedInfo::refresh() { if (!mDataRequested) { sendClassifiedInfoRequest(); } - // Check for god mode - BOOL godlike = gAgent.isGodlike(); + // Check for god mode + BOOL godlike = gAgent.isGodlike(); BOOL is_self = (gAgent.getID() == mCreatorID); - // Set button visibility/enablement appropriately + // Set button visibility/enablement appropriately if (mInFinder) { // End user doesn't ned to see price twice, or date posted. mSnapshotCtrl->setEnabled(godlike); - if(godlike) + if (godlike) { //make it smaller, so text is more legible mSnapshotCtrl->setOrigin(20, 175); @@ -673,22 +679,22 @@ void LLPanelClassified::refresh() mMatureCombo->setEnabled(is_self); if( is_self ) - { + { if( mMatureCombo->getCurrentIndex() == 0 ) { // It's a new panel. // PG regions should have PG classifieds. AO should have mature. - + setDefaultAccessCombo(); } } - + if (mAutoRenewCheck) { mAutoRenewCheck->setEnabled(is_self); mAutoRenewCheck->setVisible(is_self); } - + mClickThroughText->setEnabled(is_self); mClickThroughText->setVisible(is_self); @@ -703,7 +709,7 @@ void LLPanelClassified::refresh() } } -void LLPanelClassified::onClickUpdate() +void LLPanelClassifiedInfo::onClickUpdate() { // Disallow leading spaces, punctuation, etc. that screw up // sort order. @@ -719,7 +725,7 @@ void LLPanelClassified::onClickUpdate() LLNotificationsUtil::add("SetClassifiedMature", LLSD(), LLSD(), - boost::bind(&LLPanelClassified::confirmMature, this, _1, _2)); + boost::bind(&LLPanelClassifiedInfo::confirmMature, this, _1, _2)); return; } @@ -728,7 +734,7 @@ void LLPanelClassified::onClickUpdate() } // Callback from a dialog indicating response to mature notification -bool LLPanelClassified::confirmMature(const LLSD& notification, const LLSD& response) +bool LLPanelClassifiedInfo::confirmMature(const LLSD& notification, const LLSD& response) { S32 option = LLNotification::getSelectedOption(notification, response); @@ -754,23 +760,23 @@ bool LLPanelClassified::confirmMature(const LLSD& notification, const LLSD& resp // Called after we have determined whether this classified has // mature content or not. -void LLPanelClassified::gotMature() +void LLPanelClassifiedInfo::gotMature() { // if already paid for, just do the update if (mPaidFor) { LLNotification::Params params("PublishClassified"); - params.functor(boost::bind(&LLPanelClassified::confirmPublish, this, _1, _2)); + params.functor(boost::bind(&LLPanelClassifiedInfo::confirmPublish, this, _1, _2)); LLNotifications::instance().forceResponse(params, 0); } else { // Ask the user how much they want to pay - new LLFloaterPriceForListing(boost::bind(&LLPanelClassified::callbackGotPriceForListing, this, _1)); + new LLFloaterPriceForListing(boost::bind(&LLPanelClassifiedInfo::callbackGotPriceForListing, this, _1)); } } -void LLPanelClassified::callbackGotPriceForListing(const std::string& text) +void LLPanelClassifiedInfo::callbackGotPriceForListing(const std::string& text) { S32 price_for_listing = strtol(text.c_str(), NULL, 10); if (price_for_listing < MINIMUM_PRICE_FOR_LISTING) @@ -789,10 +795,10 @@ void LLPanelClassified::callbackGotPriceForListing(const std::string& text) args["AMOUNT"] = llformat("%d", price_for_listing); args["CURRENCY"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); LLNotificationsUtil::add("PublishClassified", args, LLSD(), - boost::bind(&LLPanelClassified::confirmPublish, this, _1, _2)); + boost::bind(&LLPanelClassifiedInfo::confirmPublish, this, _1, _2)); } -void LLPanelClassified::resetDirty() +void LLPanelClassifiedInfo::resetDirty() { // Tell all the widgets to reset their dirty state since the ad was just saved if (mSnapshotCtrl) @@ -813,7 +819,7 @@ void LLPanelClassified::resetDirty() } // invoked from callbackConfirmPublish -bool LLPanelClassified::confirmPublish(const LLSD& notification, const LLSD& response) +bool LLPanelClassifiedInfo::confirmPublish(const LLSD& notification, const LLSD& response) { S32 option = LLNotification::getSelectedOption(notification, response); // Option 0 = publish @@ -839,18 +845,18 @@ bool LLPanelClassified::confirmPublish(const LLSD& notification, const LLSD& res return false; } -void LLPanelClassified::onClickTeleport() +void LLPanelClassifiedInfo::onClickTeleport() { if (!mPosGlobal.isExactlyZero()) - { + { gAgent.teleportViaLocation(mPosGlobal); gFloaterWorldMap->trackLocation(mPosGlobal); sendClassifiedClickMessage("teleport"); - } + } } -void LLPanelClassified::onClickMap() +void LLPanelClassifiedInfo::onClickMap() { gFloaterWorldMap->trackLocation(mPosGlobal); LLFloaterWorldMap::show(true); @@ -858,20 +864,20 @@ void LLPanelClassified::onClickMap() sendClassifiedClickMessage("map"); } -void LLPanelClassified::onClickProfile() +void LLPanelClassifiedInfo::onClickProfile() { LLAvatarActions::showProfile(mCreatorID); sendClassifiedClickMessage("profile"); } /* -void LLPanelClassified::onClickLandmark() +void LLPanelClassifiedInfo::onClickLandmark() { create_landmark(mNameEditor->getText(), "", mPosGlobal); } */ -void LLPanelClassified::onClickSet() +void LLPanelClassifiedInfo::onClickSet() { // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a) if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) @@ -896,9 +902,9 @@ void LLPanelClassified::onClickSet() S32 region_x = llround((F32)mPosGlobal.mdV[VX]) % REGION_WIDTH_UNITS; S32 region_y = llround((F32)mPosGlobal.mdV[VY]) % REGION_WIDTH_UNITS; S32 region_z = llround((F32)mPosGlobal.mdV[VZ]); - + location_text.append(mSimName); - location_text.append(llformat(" (%d, %d, %d)", region_x, region_y, region_z)); + location_text.append(llformat(" (%d, %d, %d)", region_x, region_y, region_z)); mLocationEditor->setText(location_text); mLocationChanged = true; @@ -912,14 +918,14 @@ void LLPanelClassified::onClickSet() } -BOOL LLPanelClassified::checkDirty() +BOOL LLPanelClassifiedInfo::checkDirty() { mDirty = FALSE; if ( mSnapshotCtrl ) mDirty |= mSnapshotCtrl->isDirty(); if ( mNameEditor ) mDirty |= mNameEditor->isDirty(); if ( mDescEditor ) mDirty |= mDescEditor->isDirty(); if ( mLocationEditor ) mDirty |= mLocationEditor->isDirty(); - if ( mLocationChanged ) mDirty |= TRUE; + if ( mLocationChanged ) mDirty |= TRUE; if ( mCategoryCombo ) mDirty |= mCategoryCombo->isDirty(); if ( mMatureCombo ) mDirty |= mMatureCombo->isDirty(); if ( mAutoRenewCheck ) mDirty |= mAutoRenewCheck->isDirty(); @@ -928,7 +934,7 @@ BOOL LLPanelClassified::checkDirty() } -void LLPanelClassified::sendClassifiedClickMessage(const std::string& type) +void LLPanelClassifiedInfo::sendClassifiedClickMessage(const std::string& type) { // You're allowed to click on your own ads to reassure yourself // that the system is working. @@ -941,7 +947,7 @@ void LLPanelClassified::sendClassifiedClickMessage(const std::string& type) body["region_name"] = mSimName; std::string url = gAgent.getRegion()->getCapability("SearchStatTracking"); - llinfos << "LLPanelClassified::sendClassifiedClickMessage via capability" << llendl; + llinfos << "LLPanelClassifiedInfo::sendClassifiedClickMessage via capability" << llendl; LLHTTPClient::post(url, body, new LLHTTPClient::ResponderIgnore); } @@ -991,7 +997,7 @@ void LLFloaterPriceForListing::buttonCore() close(); } -void LLPanelClassified::setDefaultAccessCombo() +void LLPanelClassifiedInfo::setDefaultAccessCombo() { // PG regions should have PG classifieds. AO should have mature. @@ -1010,3 +1016,5 @@ void LLPanelClassified::setDefaultAccessCombo() break; } } + +//EOF diff --git a/indra/newview/llpanelclassified.h b/indra/newview/llpanelclassified.h index 04432edfd..36b84e6d2 100644 --- a/indra/newview/llpanelclassified.h +++ b/indra/newview/llpanelclassified.h @@ -1,6 +1,6 @@ /** * @file llpanelclassified.h - * @brief LLPanelClassified class definition + * @brief LLPanelClassifiedInfo class definition * * $LicenseInfo:firstyear=2005&license=viewergpl$ * @@ -52,11 +52,11 @@ class LLTextEditor; class LLTextureCtrl; class LLUICtrl; -class LLPanelClassified : public LLPanel, public LLAvatarPropertiesObserver +class LLPanelClassifiedInfo : public LLPanel, public LLAvatarPropertiesObserver { public: - LLPanelClassified(bool in_finder, bool from_search); - /*virtual*/ ~LLPanelClassified(); + LLPanelClassifiedInfo(bool in_finder, bool from_search); + /*virtual*/ ~LLPanelClassifiedInfo(); void reset(); @@ -167,7 +167,7 @@ protected: LLTextBox* mClickThroughText; LLRect mSnapshotSize; - typedef std::list panel_list_t; + typedef std::list panel_list_t; static panel_list_t sAllPanels; };