aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpaneldirfind.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:11 -0500
committerJacek Antonelli2008-08-15 23:45:11 -0500
commit215f423cbe18fe9ca14a26caef918d303bad28ff (patch)
tree0743442b286216cc8e19aa487c26f4e9345ffd64 /linden/indra/newview/llpaneldirfind.cpp
parentSecond Life viewer sources 1.18.3.5-RC (diff)
downloadmeta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.zip
meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.gz
meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.bz2
meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.xz
Second Life viewer sources 1.18.4.0-RC
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llpaneldirfind.cpp27
1 files changed, 21 insertions, 6 deletions
diff --git a/linden/indra/newview/llpaneldirfind.cpp b/linden/indra/newview/llpaneldirfind.cpp
index 38669f8..73643bf 100644
--- a/linden/indra/newview/llpaneldirfind.cpp
+++ b/linden/indra/newview/llpaneldirfind.cpp
@@ -2,6 +2,8 @@
2 * @file llpaneldirfind.cpp 2 * @file llpaneldirfind.cpp
3 * @brief The "Find All" panel in the Find directory. 3 * @brief The "Find All" panel in the Find directory.
4 * 4 *
5 * $LicenseInfo:firstyear=2001&license=viewergpl$
6 *
5 * Copyright (c) 2001-2007, Linden Research, Inc. 7 * Copyright (c) 2001-2007, Linden Research, Inc.
6 * 8 *
7 * Second Life Viewer Source Code 9 * Second Life Viewer Source Code
@@ -24,6 +26,7 @@
24 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 26 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
25 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 27 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
26 * COMPLETENESS OR PERFORMANCE. 28 * COMPLETENESS OR PERFORMANCE.
29 * $/LicenseInfo$
27 */ 30 */
28 31
29#include "llviewerprecompiledheaders.h" 32#include "llviewerprecompiledheaders.h"
@@ -117,7 +120,17 @@ void LLPanelDirFind::onClickSearch(void *userdata)
117 scope |= DFQ_EVENTS; // events 120 scope |= DFQ_EVENTS; // events
118 scope |= DFQ_GROUPS; // groups 121 scope |= DFQ_GROUPS; // groups
119 122
120 if (!gSavedSettings.getBOOL("ShowMatureFindAll") || gAgent.mAccess <= SIM_ACCESS_PG) scope |= DFQ_PG_SIMS_ONLY; 123 BOOL filter_mature = (!gSavedSettings.getBOOL("ShowMatureFindAll") ||
124 gAgent.mAccess <= SIM_ACCESS_PG ||
125 !self->childGetValue("incmature").asBoolean() );
126
127 if ( filter_mature )
128 {
129 scope |= DFQ_PG_SIMS_ONLY;
130 scope |= DFQ_PG_EVENTS_ONLY;
131 scope |= DFQ_FILTER_MATURE;
132 scope |= DFQ_PG_PARCELS_ONLY;
133 }
121 134
122 // send the message 135 // send the message
123 LLMessageSystem *msg = gMessageSystem; 136 LLMessageSystem *msg = gMessageSystem;
@@ -125,8 +138,6 @@ void LLPanelDirFind::onClickSearch(void *userdata)
125 sendDirFindQuery(msg, self->mSearchID, self->childGetValue("name").asString(), scope, start_row); 138 sendDirFindQuery(msg, self->mSearchID, self->childGetValue("name").asString(), scope, start_row);
126 139
127 // Also look up classified ads. JC 12/2005 140 // Also look up classified ads. JC 12/2005
128 BOOL filter_mature = !gSavedSettings.getBOOL("ShowMatureFindAll");
129 if (gAgent.mAccess <= SIM_ACCESS_PG) filter_mature = TRUE;
130 BOOL filter_auto_renew = FALSE; 141 BOOL filter_auto_renew = FALSE;
131 U32 classified_flags = pack_classified_flags(filter_mature, filter_auto_renew); 142 U32 classified_flags = pack_classified_flags(filter_mature, filter_auto_renew);
132 msg->newMessage("DirClassifiedQuery"); 143 msg->newMessage("DirClassifiedQuery");
@@ -141,11 +152,15 @@ void LLPanelDirFind::onClickSearch(void *userdata)
141 msg->addS32("QueryStart", 0); 152 msg->addS32("QueryStart", 0);
142 gAgent.sendReliableMessage(); 153 gAgent.sendReliableMessage();
143 154
144 U32 query_flags = DFQ_DWELL_SORT;
145 if (!gSavedSettings.getBOOL("ShowMatureFindAll") || gAgent.mAccess <= SIM_ACCESS_PG) query_flags |= DFQ_PG_SIMS_ONLY;
146
147 // Need to use separate find places query because places are 155 // Need to use separate find places query because places are
148 // sent using the more compact DirPlacesReply message. 156 // sent using the more compact DirPlacesReply message.
157 U32 query_flags = DFQ_DWELL_SORT;
158 if ( filter_mature )
159 {
160 query_flags |= DFQ_PG_SIMS_ONLY;
161 query_flags |= DFQ_PG_PARCELS_ONLY; // FWIW, currently DFQ_PG_PARCELS_ONLY is only supported
162 query_flags |= DFQ_FILTER_MATURE;
163 }
149 msg->newMessage("DirPlacesQuery"); 164 msg->newMessage("DirPlacesQuery");
150 msg->nextBlock("AgentData"); 165 msg->nextBlock("AgentData");
151 msg->addUUID("AgentID", gAgent.getID() ); 166 msg->addUUID("AgentID", gAgent.getID() );