summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelplaces.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelplaces.cpp')
-rw-r--r--indra/newview/llpanelplaces.cpp31
1 files changed, 19 insertions, 12 deletions
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 257a21ca15..f7f3c5830d 100644
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -43,7 +43,7 @@
#include "llcombobox.h"
#include "llfiltereditor.h"
#include "llfloaterreg.h"
-#include "llnotifications.h"
+#include "llnotificationsutil.h"
#include "lltabcontainer.h"
#include "lltexteditor.h"
#include "lltrans.h"
@@ -118,7 +118,6 @@ static LLRegisterPanelClassWrapper<LLPanelPlaces> t_places("panel_places");
LLPanelPlaces::LLPanelPlaces()
: LLPanel(),
- mFilterSubString(LLStringUtil::null),
mActivePanel(NULL),
mFilterEditor(NULL),
mPlaceProfile(NULL),
@@ -262,6 +261,10 @@ void LLPanelPlaces::onOpen(const LLSD& key)
}
mLandmarkInfo->displayParcelInfo(LLUUID(), mPosGlobal);
+
+ // Disable Save button because there is no item to save yet.
+ // The button will be enabled in onLandmarkLoaded callback.
+ mSaveBtn->setEnabled(FALSE);
}
else if (mPlaceInfoType == LANDMARK_INFO_TYPE)
{
@@ -381,20 +384,24 @@ void LLPanelPlaces::onLandmarkLoaded(LLLandmark* landmark)
landmark->getRegionID(region_id);
landmark->getGlobalPos(mPosGlobal);
mLandmarkInfo->displayParcelInfo(region_id, mPosGlobal);
+
+ mSaveBtn->setEnabled(TRUE);
}
void LLPanelPlaces::onFilterEdit(const std::string& search_string, bool force_filter)
{
- if (force_filter || mFilterSubString != search_string)
+ if (!mActivePanel)
+ return;
+
+ if (force_filter || mActivePanel->getFilterSubString() != search_string)
{
- mFilterSubString = search_string;
+ std::string string = search_string;
// Searches are case-insensitive
- LLStringUtil::toUpper(mFilterSubString);
- LLStringUtil::trimHead(mFilterSubString);
+ LLStringUtil::toUpper(string);
+ LLStringUtil::trimHead(string);
- if (mActivePanel)
- mActivePanel->onSearchEdit(mFilterSubString);
+ mActivePanel->onSearchEdit(string);
}
}
@@ -404,7 +411,7 @@ void LLPanelPlaces::onTabSelected()
if (!mActivePanel)
return;
- onFilterEdit(mFilterSubString, true);
+ onFilterEdit(mActivePanel->getFilterSubString(), true);
mActivePanel->updateVerbs();
}
@@ -417,7 +424,7 @@ void LLPanelPlaces::onTeleportButtonClicked()
{
LLSD payload;
payload["asset_id"] = mItem->getAssetUUID();
- LLNotifications::instance().add("TeleportFromLandmark", LLSD(), payload);
+ LLNotificationsUtil::add("TeleportFromLandmark", LLSD(), payload);
}
else if (mPlaceInfoType == AGENT_INFO_TYPE ||
mPlaceInfoType == REMOTE_PLACE_INFO_TYPE ||
@@ -815,7 +822,7 @@ void LLPanelPlaces::changedInventory(U32 mask)
// Filter applied to show all items.
if (mActivePanel)
- mActivePanel->onSearchEdit(mFilterSubString);
+ mActivePanel->onSearchEdit(mActivePanel->getFilterSubString());
// we don't need to monitor inventory changes anymore,
// so remove the observer
@@ -906,5 +913,5 @@ static void onSLURLBuilt(std::string& slurl)
LLSD args;
args["SLURL"] = slurl;
- LLNotifications::instance().add("CopySLURL", args);
+ LLNotificationsUtil::add("CopySLURL", args);
}