diff options
author | Loren Shih <seraph@lindenlab.com> | 2009-12-10 14:25:25 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2009-12-10 14:25:25 -0500 |
commit | e85cf743e51e93379f7f7afd04cdcd4b9e6b01c1 (patch) | |
tree | 11507cced90ffb96c1c7fe3d499c56eb1ff4ec4a /indra/newview/llfloatersearch.cpp | |
parent | 1ca104f325d60d4f91a6227f06720977b17da1b1 (diff) | |
parent | d575af6a6545708d05e06a1e8614a84ca5cab458 (diff) |
automated merge viewer2.0->viewer2.0
Diffstat (limited to 'indra/newview/llfloatersearch.cpp')
-rw-r--r-- | indra/newview/llfloatersearch.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index 2c618263ec..c658963708 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -42,7 +42,8 @@ LLFloaterSearch::LLFloaterSearch(const LLSD& key) : LLFloater(key), LLViewerMediaObserver(), - mBrowser(NULL) + mBrowser(NULL), + mSearchGodLevel(0) { // declare a map that transforms a category name into // the URL suffix that is used to search that category @@ -86,12 +87,21 @@ void LLFloaterSearch::handleMediaEvent(LLPluginClassMedia *self, EMediaEvent eve case MEDIA_EVENT_NAVIGATE_COMPLETE: childSetText("status_text", getString("done_text")); break; - + default: break; } } +void LLFloaterSearch::godLevelChanged(U8 godlevel) +{ + // search results can change based upon god level - if the user + // changes god level, then give them a warning (we don't refresh + // the search as this might undo any page navigation or + // AJAX-driven changes since the last search). + childSetVisible("refresh_search", (godlevel != mSearchGodLevel)); +} + void LLFloaterSearch::search(const LLSD &key) { if (! mBrowser) @@ -99,6 +109,10 @@ void LLFloaterSearch::search(const LLSD &key) return; } + // reset the god level warning as we're sending the latest state + childHide("refresh_search"); + mSearchGodLevel = gAgent.getGodLevel(); + // get the URL for the search page std::string url = getString("search_url"); if (! LLStringUtil::endsWith(url, "/")) |