From d294d568d1c97650bba4c388c8a7eab5a5c49c94 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 21 Oct 2025 22:05:07 +0300 Subject: #4411 WIP initial restoring of Legacy Search --- indra/newview/llpaneldirevents.cpp | 280 +++++++++++++++++++++++++++++++++++++ 1 file changed, 280 insertions(+) create mode 100644 indra/newview/llpaneldirevents.cpp (limited to 'indra/newview/llpaneldirevents.cpp') diff --git a/indra/newview/llpaneldirevents.cpp b/indra/newview/llpaneldirevents.cpp new file mode 100644 index 0000000000..07a76e050b --- /dev/null +++ b/indra/newview/llpaneldirevents.cpp @@ -0,0 +1,280 @@ +/** + * @file llpaneldirevents.cpp + * @brief Events panel in the legacy Search directory. + * + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2025, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llpaneldirevents.h" + +#include + +// linden library includes +#include "message.h" +#include "llqueryflags.h" + +// viewer project includes +#include "llagent.h" +#include "llviewercontrol.h" +#include "llnotificationsutil.h" +#include "llpaneldirbrowser.h" +#include "llresmgr.h" +#include "lluiconstants.h" +#include "llappviewer.h" + +static LLPanelInjector t_panel_dir_events("panel_dir_events"); + +LLPanelDirEvents::LLPanelDirEvents() + : LLPanelDirBrowser(), + mDoneQuery(FALSE), + mDay(0) +{ + // more results per page for this + mResultsPerPage = 200; +} + +bool LLPanelDirEvents::postBuild() +{ + LLPanelDirBrowser::postBuild(); + + childSetCommitCallback("date_mode", onDateModeCallback, this); + + childSetAction("<<", onBackBtn, this); + childSetAction(">>", onForwardBtn, this); + + childSetAction("Today", onClickToday, this); + + childSetCommitCallback("mature", onCommitMature, this); + + childSetAction("Search", LLPanelDirBrowser::onClickSearchCore, this); + setDefaultBtn("Search"); + + onDateModeCallback(NULL, this); + + mCurrentSortColumn = "time"; + + setDay(0); // for today + + return TRUE; +} + +LLPanelDirEvents::~LLPanelDirEvents() +{ +} + + +void LLPanelDirEvents::draw() +{ + refresh(); + + LLPanelDirBrowser::draw(); +} + +void LLPanelDirEvents::refresh() +{ + updateMaturityCheckbox(); +} + + +void LLPanelDirEvents::setDay(S32 day) +{ + mDay = day; + + // Get time UTC + time_t utc_time = time_corrected(); + + // Correct for offset + utc_time += day * 24 * 60 * 60; + + // There's only one internal tm buffer. + struct tm* internal_time; + + // Convert to Pacific, based on server's opinion of whether + // it's daylight savings time there. + internal_time = utc_to_pacific_time(utc_time, is_daylight_savings()); + + std::string buffer = llformat("%d/%d", + 1 + internal_time->tm_mon, // Jan = 0 + internal_time->tm_mday); // 2001 = 101 + childSetValue("date_text", buffer); +} + +// virtual +void LLPanelDirEvents::performQuery() +{ + // event_id 0 will perform no delete action. + performQueryOrDelete(0); +} + +void LLPanelDirEvents::performQueryOrDelete(U32 event_id) +{ + S32 relative_day = mDay; + // Update the date field to show the date IN THE SERVER'S + // TIME ZONE, as that is what will be displayed in each event + + // Get time UTC + time_t utc_time = time_corrected(); + + // Correct for offset + utc_time += relative_day * 24 * 60 * 60; + + // There's only one internal tm buffer. + struct tm* internal_time; + + // Convert to Pacific, based on server's opinion of whether + // it's daylight savings time there. + internal_time = utc_to_pacific_time(utc_time, is_daylight_savings()); + + std::string buffer = llformat("%d/%d", + 1 + internal_time->tm_mon, // Jan = 0 + internal_time->tm_mday); // 2001 = 101 + childSetValue("date_text", buffer); + + // Record the relative day so back and forward buttons + // offset from this day. + mDay = relative_day; + + mDoneQuery = TRUE; + + U32 scope = DFQ_DATE_EVENTS; + if ( gAgent.wantsPGOnly()) scope |= DFQ_PG_SIMS_ONLY; + if ( childGetValue("incpg").asBoolean() ) scope |= DFQ_INC_PG; + if ( childGetValue("incmature").asBoolean() ) scope |= DFQ_INC_MATURE; + if ( childGetValue("incadult").asBoolean() ) scope |= DFQ_INC_ADULT; + + // Add old query flags in case we are talking to an old server + if ( childGetValue("incpg").asBoolean() && !childGetValue("incmature").asBoolean()) + { + scope |= DFQ_PG_EVENTS_ONLY; + } + + if ( !( scope & (DFQ_INC_PG | DFQ_INC_MATURE | DFQ_INC_ADULT ))) + { + LLNotificationsUtil::add("NoContentToSearch"); + return; + } + + setupNewSearch(); + + std::ostringstream params; + + // Date mode for the search + if ("current" == childGetValue("date_mode").asString()) + { + params << "u|"; + } + else + { + params << mDay << "|"; + } + + // Categories are stored in the database in table indra.event_category + // XML must match. + U32 cat_id = childGetValue("category combo").asInteger(); + + params << cat_id << "|"; + params << childGetValue("event_search_text").asString(); + + // send the message + if (0 == event_id) + { + sendDirFindQuery(gMessageSystem, mSearchID, params.str(), scope, mSearchStart); + } + else + { + // This delete will also perform a query. + LLMessageSystem* msg = gMessageSystem; + + msg->newMessageFast(_PREHASH_EventGodDelete); + + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + + msg->nextBlockFast(_PREHASH_EventData); + msg->addU32Fast(_PREHASH_EventID, event_id); + + msg->nextBlockFast(_PREHASH_QueryData); + msg->addUUIDFast(_PREHASH_QueryID, mSearchID); + msg->addStringFast(_PREHASH_QueryText, params.str()); + msg->addU32Fast(_PREHASH_QueryFlags, scope); + msg->addS32Fast(_PREHASH_QueryStart, mSearchStart); + gAgent.sendReliableMessage(); + } +} + +// static +void LLPanelDirEvents::onDateModeCallback(LLUICtrl* ctrl, void *data) +{ + LLPanelDirEvents* self = (LLPanelDirEvents*)data; + if (self->childGetValue("date_mode").asString() == "date") + { + self->childEnable("Today"); + self->childEnable(">>"); + self->childEnable("<<"); + } + else + { + self->childDisable("Today"); + self->childDisable(">>"); + self->childDisable("<<"); + } +} + +// static +void LLPanelDirEvents::onClickToday(void *userdata) +{ + LLPanelDirEvents *self = (LLPanelDirEvents *)userdata; + self->resetSearchStart(); + self->setDay(0); + self->performQuery(); +} + + +// static +void LLPanelDirEvents::onBackBtn(void* data) +{ + LLPanelDirEvents* self = (LLPanelDirEvents*)data; + self->resetSearchStart(); + self->setDay(self->mDay - 1); + self->performQuery(); +} + + +// static +void LLPanelDirEvents::onForwardBtn(void* data) +{ + LLPanelDirEvents* self = (LLPanelDirEvents*)data; + self->resetSearchStart(); + self->setDay(self->mDay + 1); + self->performQuery(); +} + + +// static +void LLPanelDirEvents::onCommitMature(LLUICtrl* ctrl, void* data) +{ + // just perform another search + onClickSearchCore(data); +} -- cgit v1.3 From b44074c1b33883337c7371f802a51ee2ae50f89a Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 23 Oct 2025 19:05:18 +0300 Subject: #4411 fix additional search options - category and maturity --- indra/newview/app_settings/settings.xml | 52 +++++++++++++++++ indra/newview/llpaneldirbrowser.cpp | 67 ++++------------------ indra/newview/llpaneldirbrowser.h | 3 - indra/newview/llpaneldirclassified.cpp | 51 +++------------- indra/newview/llpaneldirclassified.h | 4 -- indra/newview/llpaneldirevents.cpp | 48 +++------------- indra/newview/llpaneldirevents.h | 9 +-- indra/newview/llpaneldirgroups.cpp | 2 - indra/newview/llpaneldirland.cpp | 23 ++------ indra/newview/llpaneldirland.h | 2 - indra/newview/llpaneldirplaces.cpp | 28 +++------ indra/newview/llpaneldirplaces.h | 6 +- .../skins/default/xui/en/panel_classified_info.xml | 1 - .../skins/default/xui/en/panel_dir_classified.xml | 42 ++++---------- .../skins/default/xui/en/panel_dir_events.xml | 54 +++++------------ .../skins/default/xui/en/panel_dir_land.xml | 67 ++++++++++++++-------- .../skins/default/xui/en/panel_dir_places.xml | 56 +++++------------- .../skins/default/xui/en/panel_event_info.xml | 3 - 18 files changed, 172 insertions(+), 346 deletions(-) (limited to 'indra/newview/llpaneldirevents.cpp') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 98bf49b55a..47cebe6472 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11107,6 +11107,45 @@ Value 0 + ShowPGClassifieds + + Comment + Display results of find classifieds that are flagged as general + Persist + 1 + HideFromEditor + 1 + Type + Boolean + Value + 1 + + ShowMatureClassifieds + + Comment + Display results of find classifieds that are flagged as moderate + Persist + 1 + HideFromEditor + 1 + Type + Boolean + Value + 0 + + ShowAdultClassifieds + + Comment + Display results of find classifieds that are flagged as adult + Persist + 1 + HideFromEditor + 1 + Type + Boolean + Value + 0 + ShowPGSims Comment @@ -11159,6 +11198,19 @@ Value 1 + ShowMatureGroups + + Comment + Include groups that are flagged as mature to Search results + Persist + 1 + HideFromEditor + 1 + Type + Boolean + Value + 0 + ShowNearClip Comment diff --git a/indra/newview/llpaneldirbrowser.cpp b/indra/newview/llpaneldirbrowser.cpp index 2391ced6ed..686a4866d5 100644 --- a/indra/newview/llpaneldirbrowser.cpp +++ b/indra/newview/llpaneldirbrowser.cpp @@ -249,52 +249,6 @@ std::string LLPanelDirBrowser::filterShortWords(const std::string source_string, return dest_string.str(); } -void LLPanelDirBrowser::updateMaturityCheckbox() -{ - BOOL godlike = gAgent.isGodlike(); - // You only have a choice if your maturity is 'mature' or higher. - // Logic: if you're not at least mature, hide the mature and adult options - // After that, enable only the options you can legitimately choose. - // If you're PG only, show you the checkbox but don't let you change it. - // If you're God, you have everything. - bool mature_enabled = gAgent.canAccessMature() || godlike; - bool adult_enabled = gAgent.canAccessAdult() || godlike; - - // TODO: fix maturity settings - // These check boxes can only be checked if you have the right access to use them - //std::string control_name_pg = getChild("incpg")->getControlName(); - //std::string control_name_mature = getChild("incmature")->getControlName(); - //std::string control_name_adult = getChild("incadult")->getControlName(); - - //childSetValue("incpg", gSavedSettings.getBOOL(control_name_pg)); - //childSetValue("incmature", gSavedSettings.getBOOL(control_name_mature) && mature_enabled); - //childSetValue("incadult", gSavedSettings.getBOOL(control_name_adult) && adult_enabled); - - childSetValue("incpg", true); - childSetValue("incmature", true); - childSetValue("incadult", true); - - // Teens don't get mature/adult choices - if (gAgent.wantsPGOnly()) - { - childSetVisible("incmature", false); - childSetVisible("incadult", false); - childSetValue("incpg", TRUE); - childDisable("incpg"); - } - - childSetEnabled("incmature", mature_enabled); - childSetEnabled("incadult", adult_enabled); - - if (mature_enabled) - { - childEnable("incpg"); - childSetVisible("incpg", TRUE); - childSetVisible("incmature", TRUE); - childSetVisible("incadult", TRUE); - } -} - void LLPanelDirBrowser::selectByUUID(const LLUUID& id) { LLCtrlListInterface *list = childGetListInterface("results"); @@ -598,7 +552,7 @@ void LLPanelDirBrowser::processDirPlacesReply(LLMessageSystem* msg, void**) std::string buffer = llformat("%.0f", (F64)dwell); row["columns"][3]["column"] = "dwell"; row["columns"][3]["value"] = buffer; - row["columns"][3]["font"] = "SANSSERIFSMALL"; + row["columns"][3]["font"] = "SansSerifSmall"; list->addElement(row); self->mResultsContents[parcel_id.asString()] = content; @@ -736,11 +690,11 @@ void LLPanelDirBrowser::processDirEventsReply(LLMessageSystem* msg, void**) row["columns"][2]["column"] = "date"; row["columns"][2]["value"] = date; - row["columns"][2]["font"] = "SANSSERIFSMALL"; + row["columns"][2]["font"] = "SansSerifSmall"; row["columns"][3]["column"] = "time"; row["columns"][3]["value"] = llformat("%u", unix_time); - row["columns"][3]["font"] = "SANSSERIFSMALL"; + row["columns"][3]["font"] = "SansSerifSmall"; list->addElement(row, ADD_TOP /*ADD_SORTED*/); @@ -822,7 +776,7 @@ void LLPanelDirBrowser::processDirGroupsReply(LLMessageSystem* msg, void**) row["columns"][2]["column"] = "members"; row["columns"][2]["value"] = members; - row["columns"][2]["font"] = "SANSSERIFSMALL"; + row["columns"][2]["font"] = "SansSerifSmall"; row["columns"][3]["column"] = "score"; row["columns"][3]["value"] = search_order; @@ -979,7 +933,6 @@ void LLPanelDirBrowser::processDirLandReply(LLMessageSystem *msg, void**) if ( msg->getSizeFast(_PREHASH_QueryReplies, i, _PREHASH_ProductSKU) > 0 ) { msg->getStringFast(_PREHASH_QueryReplies, _PREHASH_ProductSKU, land_sku, i); - LL_INFOS() << "Land sku: " << land_sku << LL_ENDL; land_type = LLProductInfoRequestManager::instance().getDescriptionForSku(land_sku); } else @@ -1011,12 +964,12 @@ void LLPanelDirBrowser::processDirLandReply(LLMessageSystem *msg, void**) } row["columns"][3]["column"] = "price"; row["columns"][3]["value"] = buffer; - row["columns"][3]["font"] = "SANSSERIFSMALL"; + row["columns"][3]["font"] = "SansSerifSmall"; buffer = llformat("%d", actual_area); row["columns"][4]["column"] = "area"; row["columns"][4]["value"] = buffer; - row["columns"][4]["font"] = "SANSSERIFSMALL"; + row["columns"][4]["font"] = "SansSerifSmall"; if (!auction) { @@ -1033,19 +986,19 @@ void LLPanelDirBrowser::processDirLandReply(LLMessageSystem *msg, void**) buffer = llformat("%.1f", price_per_meter); row["columns"][5]["column"] = "per_meter"; row["columns"][5]["value"] = buffer; - row["columns"][5]["font"] = "SANSSERIFSMALL"; + row["columns"][5]["font"] = "SansSerifSmall"; } else { // Auctions start at L$1 per meter row["columns"][5]["column"] = "per_meter"; row["columns"][5]["value"] = "1.0"; - row["columns"][5]["font"] = "SANSSERIFSMALL"; + row["columns"][5]["font"] = "SansSerifSmall"; } row["columns"][6]["column"] = "landtype"; row["columns"][6]["value"] = land_type; - row["columns"][6]["font"] = "SANSSERIFSMALL"; + row["columns"][6]["font"] = "SansSerifSmall"; list->addElement(row); self->mResultsContents[parcel_id.asString()] = content; @@ -1080,7 +1033,7 @@ void LLPanelDirBrowser::addClassified(LLCtrlListInterface *list, const LLUUID& p row["columns"][2]["column"] = "price"; row["columns"][2]["value"] = price_for_listing; - row["columns"][2]["font"] = "SANSSERIFSMALL"; + row["columns"][2]["font"] = "SansSerifSmall"; list->addElement(row); } diff --git a/indra/newview/llpaneldirbrowser.h b/indra/newview/llpaneldirbrowser.h index e3bc94c2c8..9891b7b0db 100644 --- a/indra/newview/llpaneldirbrowser.h +++ b/indra/newview/llpaneldirbrowser.h @@ -105,9 +105,6 @@ public: std::string filterShortWords( const std::string source_string, int shortest_word_length, bool& was_filtered ); - // Logic to control maturity checkboxes in Classified/Events/Places/'Land for Sale' tabs. - void updateMaturityCheckbox(); - protected: void updateResultCount(); diff --git a/indra/newview/llpaneldirclassified.cpp b/indra/newview/llpaneldirclassified.cpp index 9ce6b88b25..cedd91e1bd 100644 --- a/indra/newview/llpaneldirclassified.cpp +++ b/indra/newview/llpaneldirclassified.cpp @@ -61,33 +61,7 @@ bool LLPanelDirClassified::postBuild() { LLPanelDirBrowser::postBuild(); - // Teens don't get mature checkbox - if (gAgent.wantsPGOnly()) - { - childSetValue("incmature", FALSE); - childSetValue("incadult", FALSE); - childSetVisible("incmature", false); - childSetVisible("incadult", false); - childSetValue("incpg", TRUE); - childDisable("incpg"); - } - - bool mature_enabled = gAgent.canAccessMature(); - if (!mature_enabled) - { - childSetValue("incmature", FALSE); - childDisable("incmature"); - } - - bool adult_enabled = gAgent.canAccessAdult(); - if (!adult_enabled) - { - childSetValue("incadult", FALSE); - childDisable("incadult"); - } - childSetAction("Search", onClickSearchCore, this); - return true; } @@ -95,23 +69,12 @@ LLPanelDirClassified::~LLPanelDirClassified() { } -void LLPanelDirClassified::draw() -{ - refresh(); - - LLPanelDirBrowser::draw(); -} - -void LLPanelDirClassified::refresh() -{ - updateMaturityCheckbox(); -} - void LLPanelDirClassified::performQuery() { - BOOL inc_pg = childGetValue("incpg").asBoolean(); - BOOL inc_mature = childGetValue("incmature").asBoolean(); - BOOL inc_adult = childGetValue("incadult").asBoolean(); + static LLUICachedControl inc_pg("ShowPGClassifieds", true); + static LLUICachedControl inc_mature("ShowMatureClassifieds", false); + static LLUICachedControl inc_adult("ShowAdultClassifieds", false); + if (!(inc_pg || inc_mature || inc_adult)) { LLNotificationsUtil::add("NoContentToSearch"); @@ -129,9 +92,9 @@ void LLPanelDirClassified::performQuery() msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); bool filter_auto_renew = false; - U32 query_flags = pack_classified_flags_request(filter_auto_renew, inc_pg, inc_mature, inc_adult); - //if (gAgent.isTeen()) query_flags |= DFQ_PG_SIMS_ONLY; - + U32 query_flags = pack_classified_flags_request(filter_auto_renew, inc_pg, + inc_mature && gAgent.canAccessMature(), + inc_adult && gAgent.canAccessAdult()); U32 category = childGetValue("Category").asInteger(); msg->nextBlockFast(_PREHASH_QueryData); diff --git a/indra/newview/llpaneldirclassified.h b/indra/newview/llpaneldirclassified.h index 76c3d8635a..6682f73929 100644 --- a/indra/newview/llpaneldirclassified.h +++ b/indra/newview/llpaneldirclassified.h @@ -42,12 +42,8 @@ public: LLPanelDirClassified(); /*virtual*/ ~LLPanelDirClassified(); - /*virtual*/ void draw(); - bool postBuild(); - void refresh(); - // Request the classifieds from the database void performQuery(); diff --git a/indra/newview/llpaneldirevents.cpp b/indra/newview/llpaneldirevents.cpp index 07a76e050b..868ccc4c33 100644 --- a/indra/newview/llpaneldirevents.cpp +++ b/indra/newview/llpaneldirevents.cpp @@ -47,7 +47,6 @@ static LLPanelInjector t_panel_dir_events("panel_dir_events"); LLPanelDirEvents::LLPanelDirEvents() : LLPanelDirBrowser(), - mDoneQuery(FALSE), mDay(0) { // more results per page for this @@ -63,8 +62,6 @@ bool LLPanelDirEvents::postBuild() childSetAction("<<", onBackBtn, this); childSetAction(">>", onForwardBtn, this); - childSetAction("Today", onClickToday, this); - childSetCommitCallback("mature", onCommitMature, this); childSetAction("Search", LLPanelDirBrowser::onClickSearchCore, this); @@ -83,20 +80,6 @@ LLPanelDirEvents::~LLPanelDirEvents() { } - -void LLPanelDirEvents::draw() -{ - refresh(); - - LLPanelDirBrowser::draw(); -} - -void LLPanelDirEvents::refresh() -{ - updateMaturityCheckbox(); -} - - void LLPanelDirEvents::setDay(S32 day) { mDay = day; @@ -155,19 +138,14 @@ void LLPanelDirEvents::performQueryOrDelete(U32 event_id) // offset from this day. mDay = relative_day; - mDoneQuery = TRUE; + static LLUICachedControl incpg("ShowPGEvents", true); + static LLUICachedControl incmature("ShowMatureEvents", false); + static LLUICachedControl incadult("ShowAdultEvents", false); U32 scope = DFQ_DATE_EVENTS; - if ( gAgent.wantsPGOnly()) scope |= DFQ_PG_SIMS_ONLY; - if ( childGetValue("incpg").asBoolean() ) scope |= DFQ_INC_PG; - if ( childGetValue("incmature").asBoolean() ) scope |= DFQ_INC_MATURE; - if ( childGetValue("incadult").asBoolean() ) scope |= DFQ_INC_ADULT; - - // Add old query flags in case we are talking to an old server - if ( childGetValue("incpg").asBoolean() && !childGetValue("incmature").asBoolean()) - { - scope |= DFQ_PG_EVENTS_ONLY; - } + if (incpg) scope |= DFQ_INC_PG; + if (incmature && gAgent.canAccessMature()) scope |= DFQ_INC_MATURE; + if (incadult && gAgent.canAccessAdult()) scope |= DFQ_INC_ADULT; if ( !( scope & (DFQ_INC_PG | DFQ_INC_MATURE | DFQ_INC_ADULT ))) { @@ -191,7 +169,7 @@ void LLPanelDirEvents::performQueryOrDelete(U32 event_id) // Categories are stored in the database in table indra.event_category // XML must match. - U32 cat_id = childGetValue("category combo").asInteger(); + U32 cat_id = childGetValue("category_combo").asInteger(); params << cat_id << "|"; params << childGetValue("event_search_text").asString(); @@ -230,28 +208,16 @@ void LLPanelDirEvents::onDateModeCallback(LLUICtrl* ctrl, void *data) LLPanelDirEvents* self = (LLPanelDirEvents*)data; if (self->childGetValue("date_mode").asString() == "date") { - self->childEnable("Today"); self->childEnable(">>"); self->childEnable("<<"); } else { - self->childDisable("Today"); self->childDisable(">>"); self->childDisable("<<"); } } -// static -void LLPanelDirEvents::onClickToday(void *userdata) -{ - LLPanelDirEvents *self = (LLPanelDirEvents *)userdata; - self->resetSearchStart(); - self->setDay(0); - self->performQuery(); -} - - // static void LLPanelDirEvents::onBackBtn(void* data) { diff --git a/indra/newview/llpaneldirevents.h b/indra/newview/llpaneldirevents.h index 0383edbe6c..6a86826749 100644 --- a/indra/newview/llpaneldirevents.h +++ b/indra/newview/llpaneldirevents.h @@ -38,16 +38,12 @@ public: LLPanelDirEvents(); virtual ~LLPanelDirEvents(); - /*virtual*/ void draw(); - - bool postBuild(); + bool postBuild() override; /*virtual*/ void performQuery(); void performQueryOrDelete(U32 event_id); - void refresh(); - // pass 0 for today, 1 for tomorrow void setDay(S32 day); @@ -55,12 +51,9 @@ protected: static void onDateModeCallback(LLUICtrl* ctrl, void *data); static void onBackBtn(void* data); static void onForwardBtn(void* data); - static void onClickToday(void *userdata); static void onCommitMature(LLUICtrl* ctrl, void* data); - static void onClickSearch(void *data); protected: - bool mDoneQuery; S32 mDay; // 0 = today, 1 = tomorrow }; diff --git a/indra/newview/llpaneldirgroups.cpp b/indra/newview/llpaneldirgroups.cpp index 63ae0f59ab..4809dffe6b 100644 --- a/indra/newview/llpaneldirgroups.cpp +++ b/indra/newview/llpaneldirgroups.cpp @@ -32,7 +32,6 @@ #include "llqueryflags.h" #include "llviewercontrol.h" #include "llsearcheditor.h" -#include "message.h" static LLPanelInjector t_panel_dir_groups("panel_dir_groups"); @@ -58,7 +57,6 @@ bool LLPanelDirGroups::postBuild() LLPanelDirGroups::~LLPanelDirGroups() { - // Children all cleaned up by default view destructor. } // virtual diff --git a/indra/newview/llpaneldirland.cpp b/indra/newview/llpaneldirland.cpp index cce0e4656c..ae1dfae092 100644 --- a/indra/newview/llpaneldirland.cpp +++ b/indra/newview/llpaneldirland.cpp @@ -34,21 +34,14 @@ #include "llpaneldirland.h" -// linden library includes -#include "llfontgl.h" -#include "llparcel.h" -#include "llqueryflags.h" -#include "message.h" - -// viewer project includes #include "llagent.h" #include "llcheckboxctrl.h" #include "llcombobox.h" #include "lllineeditor.h" #include "llnotificationsutil.h" +#include "llqueryflags.h" #include "llscrolllistctrl.h" #include "llstatusbar.h" -#include "lluiconstants.h" #include "lltextbox.h" #include "llviewercontrol.h" #include "llviewermessage.h" @@ -124,14 +117,6 @@ LLPanelDirLand::~LLPanelDirLand() // Children all cleaned up by default view destructor. } -// virtual -void LLPanelDirLand::draw() -{ - updateMaturityCheckbox(); - - LLPanelDirBrowser::draw(); -} - void LLPanelDirLand::onClickSort() { performQuery(); @@ -159,9 +144,9 @@ void LLPanelDirLand::onCommitArea(LLUICtrl* ctrl, void* data) void LLPanelDirLand::performQuery() { - BOOL inc_pg = childGetValue("incpg").asBoolean(); - BOOL inc_mature = childGetValue("incmature").asBoolean(); - BOOL inc_adult = childGetValue("incadult").asBoolean(); + static LLUICachedControl inc_pg("ShowPGLand", true); + static LLUICachedControl inc_mature("ShowMatureLand", false); + static LLUICachedControl inc_adult("ShowAdultLand", false); if (!(inc_pg || inc_mature || inc_adult)) { LLNotificationsUtil::add("NoContentToSearch"); diff --git a/indra/newview/llpaneldirland.h b/indra/newview/llpaneldirland.h index 50fc633f23..1d3168f19f 100644 --- a/indra/newview/llpaneldirland.h +++ b/indra/newview/llpaneldirland.h @@ -44,8 +44,6 @@ public: LLPanelDirLand(); /*virtual*/ ~LLPanelDirLand(); - /*virtual*/ void draw(); - bool postBuild(); void performQuery(); diff --git a/indra/newview/llpaneldirplaces.cpp b/indra/newview/llpaneldirplaces.cpp index 631057b101..4268decfe4 100644 --- a/indra/newview/llpaneldirplaces.cpp +++ b/indra/newview/llpaneldirplaces.cpp @@ -40,7 +40,6 @@ #include "llfloaterdirectory.h" #include "lllineeditor.h" #include "llnotificationsutil.h" -#include "llviewerwindow.h" #include "llpaneldirbrowser.h" #include "llsearcheditor.h" #include "lltextbox.h" @@ -66,9 +65,6 @@ bool LLPanelDirPlaces::postBuild() mCurrentSortColumn = "dwell"; mCurrentSortAscending = FALSE; - childSetVisible("Category", true); - childSetEnabled("Category", true); - return true; } @@ -76,14 +72,6 @@ LLPanelDirPlaces::~LLPanelDirPlaces() { } -// virtual -void LLPanelDirPlaces::draw() -{ - updateMaturityCheckbox(); - - LLPanelDirBrowser::draw(); -} - // virtual void LLPanelDirPlaces::performQuery() { @@ -130,27 +118,25 @@ void LLPanelDirPlaces::performQuery() bool adult_enabled = gAgent.canAccessAdult(); bool mature_enabled = gAgent.canAccessMature(); - if( gSavedSettings.getBOOL("ShowPGSims")) + static LLUICachedControl inc_pg("ShowPGSims", true); + static LLUICachedControl inc_mature("ShowMatureSims", false); + static LLUICachedControl inc_adult("ShowAdultSims", false); + + if (inc_pg) { flags |= DFQ_INC_PG; } - if( gSavedSettings.getBOOL("ShowMatureSims") && mature_enabled) + if (inc_mature && mature_enabled) { flags |= DFQ_INC_MATURE; } - if( gSavedSettings.getBOOL("ShowAdultSims") && adult_enabled) + if (inc_adult && adult_enabled) { flags |= DFQ_INC_ADULT; } - // Pack old query flag in case we are talking to an old server - if ( ((flags & DFQ_INC_PG) == DFQ_INC_PG) && !((flags & DFQ_INC_MATURE) == DFQ_INC_MATURE) ) - { - flags |= DFQ_PG_PARCELS_ONLY; - } - if (0x0 == flags) { LLNotificationsUtil::add("NoContentToSearch"); diff --git a/indra/newview/llpaneldirplaces.h b/indra/newview/llpaneldirplaces.h index 9dea576e87..5d91d75810 100644 --- a/indra/newview/llpaneldirplaces.h +++ b/indra/newview/llpaneldirplaces.h @@ -37,11 +37,7 @@ public: LLPanelDirPlaces(); virtual ~LLPanelDirPlaces(); - /*virtual*/ void draw(); - - bool postBuild(); - - static void onClickSearch(void *userdata); + bool postBuild() override; void performQuery(); diff --git a/indra/newview/skins/default/xui/en/panel_classified_info.xml b/indra/newview/skins/default/xui/en/panel_classified_info.xml index afd3f9410b..b05904cd28 100644 --- a/indra/newview/skins/default/xui/en/panel_classified_info.xml +++ b/indra/newview/skins/default/xui/en/panel_classified_info.xml @@ -344,7 +344,6 @@ width="290" height="215"> - - Any Category - - - Shopping - - - Land Rental - - - Property Rental - - - Special Attraction - - - New Products - - - Employment - - - Wanted - - - Service - - - Personal - - + + + + + + + + + + + - - Any Category - - - Discussion - - - Sports - - - Live Music - - - Commercial - - - Nightlife/Entertainment - - - Games/Contests - - - Pageants - - - Education - - - Arts and Culture - - - Charity/Support Groups - - - Miscellaneous - + + + + + + + + + + + + + - - All Types - - - Auction - - - For Sale - Mainland - - - For Sale - Estate - + + + + - -