Consolidate check for standalone place details floater into FSFloaterPlaceDetails

master
Ansariel 2016-02-04 11:41:57 +01:00
parent c65b98ace8
commit d58d2e2c20
14 changed files with 54 additions and 176 deletions

View File

@ -40,6 +40,7 @@
#include "llagent.h"
#include "llagentpicksinfo.h"
#include "llfloaterreg.h"
#include "llfloatersidepanelcontainer.h"
#include "llfloaterworldmap.h"
#include "llinventoryobserver.h"
#include "lllandmarkactions.h"
@ -50,6 +51,7 @@
#include "llpanellandmarkinfo.h"
#include "llparcel.h"
#include "llteleporthistorystorage.h"
#include "llviewercontrol.h"
#include "llviewermessage.h"
#include "llviewermenu.h"
#include "llviewerparcelmgr.h"
@ -560,6 +562,19 @@ void FSFloaterPlaceDetails::togglePickPanel(BOOL visible)
}
}
// static
void FSFloaterPlaceDetails::showPlaceDetails(const LLSD& key)
{
if (gSavedSettings.getBOOL("FSUseStandalonePlaceDetailsFloater"))
{
LLFloaterReg::showInstance("fs_placedetails", key);
}
else
{
LLFloaterSidePanelContainer::showPanel("places", key);
}
}
/////////////////////////////////
// Button event handlers
/////////////////////////////////

View File

@ -63,6 +63,8 @@ public:
void processParcelDetails(const LLParcelData& parcel_details);
void togglePickPanel(BOOL visible);
static void showPlaceDetails(const LLSD& key);
private:
enum ePlaceDisplayInfo
{

View File

@ -55,6 +55,7 @@
#include "llsdserialize.h"
#include "llviewernetwork.h" // <FS:CR> FIRE-10122 - User@grid stored_favorites.xml - getGrid()
#include "fsfloaterplacedetails.h"
static LLDefaultChildRegistry::Register<LLFavoritesBarCtrl> r("favorites_bar");
@ -1263,14 +1264,7 @@ void LLFavoritesBarCtrl::doToSelected(const LLSD& userdata)
// <FS:Ansariel> FIRE-817: Separate place details floater
//LLFloaterSidePanelContainer::showPanel("places", key);
if (gSavedSettings.getBOOL("FSUseStandalonePlaceDetailsFloater"))
{
LLFloaterReg::showInstance("fs_placedetails", key);
}
else
{
LLFloaterSidePanelContainer::showPanel("places", key);
}
FSFloaterPlaceDetails::showPlaceDetails(key);
// </FS:Ansariel>
}
else if (action == "copy_slurl")

View File

@ -97,6 +97,7 @@
#include "fsgridhandler.h"
#endif
// </FS:Zi>
#include "fsfloaterplacedetails.h"
#include <boost/shared_ptr.hpp>
@ -5827,14 +5828,7 @@ void LLLandmarkBridge::performAction(LLInventoryModel* model, std::string action
// <FS:Ansariel> FIRE-817: Separate place details floater
//LLFloaterSidePanelContainer::showPanel("places", key);
if (gSavedSettings.getBOOL("FSUseStandalonePlaceDetailsFloater"))
{
LLFloaterReg::showInstance("fs_placedetails", key);
}
else
{
LLFloaterSidePanelContainer::showPanel("places", key);
}
FSFloaterPlaceDetails::showPlaceDetails(key);
// </FS:Ansariel>
}
}

View File

@ -74,6 +74,7 @@
#include "llviewernetwork.h"
#endif // OPENSIM
// </FS:CR>
#include "fsfloaterplacedetails.h"
//============================================================================
/*
@ -654,14 +655,7 @@ void LLLocationInputCtrl::onInfoButtonClicked()
// <FS:Ansariel> FIRE-817: Separate place details floater
//LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "agent"));
if (gSavedSettings.getBOOL("FSUseStandalonePlaceDetailsFloater"))
{
LLFloaterReg::showInstance("fs_placedetails", LLSD().with("type", "agent"));
}
else
{
LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "agent"));
}
FSFloaterPlaceDetails::showPlaceDetails(LLSD().with("type", "agent"));
// </FS:Ansariel>
}
@ -692,28 +686,14 @@ void LLLocationInputCtrl::onAddLandmarkButtonClicked()
// <FS:Ansariel> FIRE-817: Separate place details floater
//LLFloaterSidePanelContainer::showPanel("places", key);
if (gSavedSettings.getBOOL("FSUseStandalonePlaceDetailsFloater"))
{
LLFloaterReg::showInstance("fs_placedetails", key);
}
else
{
LLFloaterSidePanelContainer::showPanel("places", key);
}
FSFloaterPlaceDetails::showPlaceDetails(key);
// </FS:Ansariel>
}
else
{
// <FS:Ansariel> FIRE-817: Separate place details floater
//LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark"));
if (gSavedSettings.getBOOL("FSUseStandalonePlaceDetailsFloater"))
{
LLFloaterReg::showInstance("fs_placedetails", LLSD().with("type", "create_landmark"));
}
else
{
LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark"));
}
FSFloaterPlaceDetails::showPlaceDetails(LLSD().with("type", "create_landmark"));
// </FS:Ansariel>
}
}
@ -1232,28 +1212,14 @@ void LLLocationInputCtrl::onLocationContextMenuItemClicked(const LLSD& userdata)
{
// <FS:Ansariel> FIRE-817: Separate place details floater
//LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark"));
if (gSavedSettings.getBOOL("FSUseStandalonePlaceDetailsFloater"))
{
LLFloaterReg::showInstance("fs_placedetails", LLSD().with("type", "create_landmark"));
}
else
{
LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark"));
}
FSFloaterPlaceDetails::showPlaceDetails(LLSD().with("type", "create_landmark"));
// </FS:Ansariel>
}
else
{
// <FS:Ansariel> FIRE-817: Separate place details floater
//LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "landmark").with("id",landmark->getUUID()));
if (gSavedSettings.getBOOL("FSUseStandalonePlaceDetailsFloater"))
{
LLFloaterReg::showInstance("fs_placedetails", LLSD().with("type", "landmark").with("id",landmark->getUUID()));
}
else
{
LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "landmark").with("id",landmark->getUUID()));
}
FSFloaterPlaceDetails::showPlaceDetails(LLSD().with("type", "landmark").with("id",landmark->getUUID()));
// </FS:Ansariel>
}
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d

View File

@ -79,6 +79,7 @@
// [/RLVa:KB]
#include "llmutelist.h"
#include "lfsimfeaturehandler.h"
#include "fsfloaterplacedetails.h"
// Ansariel: For accessing the radar data
#include "fsradar.h"
@ -1530,14 +1531,7 @@ void LLNetMap::handleShowProfile(const LLSD& sdParam) const
sdParams["y"] = mPosGlobalRightClick.mdV[VY];
sdParams["z"] = mPosGlobalRightClick.mdV[VZ];
if (gSavedSettings.getBOOL("FSUseStandalonePlaceDetailsFloater"))
{
LLFloaterReg::showInstance("fs_placedetails", sdParams);
}
else
{
LLFloaterSidePanelContainer::showPanel("places", sdParams);
}
FSFloaterPlaceDetails::showPlaceDetails(sdParams);
}
}

View File

@ -56,6 +56,7 @@
#include "lltoggleablemenu.h"
#include "llviewermenu.h"
#include "llviewerregion.h"
#include "fsfloaterplacedetails.h"
// [RLVa:KB]
#include "rlvhandler.h"
// [/RLVa:KB]
@ -379,14 +380,7 @@ void LLLandmarksPanel::onSelectorButtonClicked()
// <FS:Ansariel> FIRE-817: Separate place details floater
//LLFloaterSidePanelContainer::showPanel("places", key);
if (gSavedSettings.getBOOL("FSUseStandalonePlaceDetailsFloater"))
{
LLFloaterReg::showInstance("fs_placedetails", key);
}
else
{
LLFloaterSidePanelContainer::showPanel("places", key);
}
FSFloaterPlaceDetails::showPlaceDetails(key);
// </FS:Ansariel>
}
}
@ -814,14 +808,7 @@ void LLLandmarksPanel::onAddAction(const LLSD& userdata) const
{
// <FS:Ansariel> FIRE-817: Separate place details floater
//LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark"));
if (gSavedSettings.getBOOL("FSUseStandalonePlaceDetailsFloater"))
{
LLFloaterReg::showInstance("fs_placedetails", LLSD().with("type", "create_landmark"));
}
else
{
LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark"));
}
FSFloaterPlaceDetails::showPlaceDetails(LLSD().with("type", "create_landmark"));
// </FS:Ansariel>
}
// [RLVa:KB] - Checked: 2012-02-08 (RLVa-1.4.5) | Added: RLVa-1.4.5

View File

@ -73,6 +73,7 @@
#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
#include "llviewerwindow.h"
#include "fsfloaterplacedetails.h"
// Constants
static const F32 PLACE_INFO_UPDATE_INTERVAL = 3.0;
@ -120,14 +121,7 @@ public:
// <FS:Ansariel> FIRE-817: Separate place details floater
//LLFloaterSidePanelContainer::showPanel("places", key);
if (gSavedSettings.getBOOL("FSUseStandalonePlaceDetailsFloater"))
{
LLFloaterReg::showInstance("fs_placedetails", key);
}
else
{
LLFloaterSidePanelContainer::showPanel("places", key);
}
FSFloaterPlaceDetails::showPlaceDetails(key);
// </FS:Ansariel>
return true;
}

View File

@ -49,6 +49,8 @@
#include "llviewercontrol.h"
#include "fsfloaterplacedetails.h"
// Maximum number of items that can be added to a list in one pass.
// Used to limit time spent for items list update per frame.
static const U32 ADD_LIMIT = 50;
@ -322,14 +324,7 @@ void LLTeleportHistoryFlatItem::showPlaceInfoPanel(S32 index)
// <FS:Ansariel> FIRE-817: Separate place details floater
//LLFloaterSidePanelContainer::showPanel("places", params);
if (gSavedSettings.getBOOL("FSUseStandalonePlaceDetailsFloater"))
{
LLFloaterReg::showInstance("fs_placedetails", params);
}
else
{
LLFloaterSidePanelContainer::showPanel("places", params);
}
FSFloaterPlaceDetails::showPlaceDetails(params);
// </FS:Ansariel>
}

View File

@ -47,6 +47,7 @@
// [RLVa:KB] - Checked: 2012-02-08 (RLVa-1.4.5) | Added: RLVa-1.4.5
#include "rlvhandler.h"
// [/RLVa:KB]
#include "fsfloaterplacedetails.h"
#include "llfloaterreg.h"
@ -477,28 +478,14 @@ void LLPanelTopInfoBar::onContextMenuItemClicked(const LLSD::String& item)
{
// <FS:Ansariel> FIRE-817: Separate place details floater
//LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark"));
if (gSavedSettings.getBOOL("FSUseStandalonePlaceDetailsFloater"))
{
LLFloaterReg::showInstance("fs_placedetails", LLSD().with("type", "create_landmark"));
}
else
{
LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark"));
}
FSFloaterPlaceDetails::showPlaceDetails(LLSD().with("type", "create_landmark"));
// </FS:Ansariel>
}
else
{
// <FS:Ansariel> FIRE-817: Separate place details floater
//LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "landmark").with("id",landmark->getUUID()));
if (gSavedSettings.getBOOL("FSUseStandalonePlaceDetailsFloater"))
{
LLFloaterReg::showInstance("fs_placedetails", LLSD().with("type", "landmark").with("id",landmark->getUUID()));
}
else
{
LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "landmark").with("id",landmark->getUUID()));
}
FSFloaterPlaceDetails::showPlaceDetails(LLSD().with("type", "landmark").with("id",landmark->getUUID()));
// </FS:Ansariel>
}
// [RLVa:KB] - Checked: 2012-02-08 (RLVa-1.4.5) | Added: RLVa-1.4.5
@ -531,14 +518,7 @@ void LLPanelTopInfoBar::onInfoButtonClicked()
// <FS:Ansariel> FIRE-817: Separate place details floater
//LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "agent"));
//if (gSavedSettings.getBOOL("FSUseStandalonePlaceDetailsFloater"))
//{
// LLFloaterReg::showInstance("fs_placedetails", LLSD().with("type", "agent"));
//}
//else
//{
// LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "agent"));
//}
//FSFloaterPlaceDetails::showPlaceDetails(LLSD().with("type", "agent"));
// </FS:Ansariel>
LLFloaterReg::showInstance("about_land");
}

View File

@ -52,6 +52,8 @@
#include "llnotificationsutil.h"
#include "llsd.h"
#include "fsfloaterplacedetails.h"
static LLURLDispatcherListener sURLDispatcherListener;
class LLURLDispatcherImpl
@ -302,14 +304,7 @@ void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const LLSLURL&
// <FS:Ansariel> FIRE-817: Separate place details floater
//LLFloaterSidePanelContainer::showPanel("places", key);
if (gSavedSettings.getBOOL("FSUseStandalonePlaceDetailsFloater"))
{
LLFloaterReg::showInstance("fs_placedetails", key);
}
else
{
LLFloaterSidePanelContainer::showPanel("places", key);
}
FSFloaterPlaceDetails::showPlaceDetails(key);
// </FS:Ansariel>
}
}

View File

@ -159,6 +159,7 @@
#include "llfloaterpreference.h" //<FS:KC> Volume controls prefs
#include "llcheckboxctrl.h" //<FS:KC> Volume controls prefs
#include "llscenemonitor.h"
#include "fsfloaterplacedetails.h"
using namespace LLAvatarAppearanceDefines;
@ -7142,14 +7143,7 @@ class LLWorldCreateLandmark : public view_listener_t
// <FS:Ansariel> FIRE-817: Separate place details floater
//LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark"));
if (gSavedSettings.getBOOL("FSUseStandalonePlaceDetailsFloater"))
{
LLFloaterReg::showInstance("fs_placedetails", LLSD().with("type", "create_landmark"));
}
else
{
LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "create_landmark"));
}
FSFloaterPlaceDetails::showPlaceDetails(LLSD().with("type", "create_landmark"));
// </FS:Ansariel>
return true;
@ -7167,14 +7161,7 @@ class LLWorldPlaceProfile : public view_listener_t
// <FS:Ansariel> FIRE-817: Separate place details floater
//LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "agent"));
if (gSavedSettings.getBOOL("FSUseStandalonePlaceDetailsFloater"))
{
LLFloaterReg::showInstance("fs_placedetails", LLSD().with("type", "agent"));
}
else
{
LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "agent"));
}
FSFloaterPlaceDetails::showPlaceDetails(LLSD().with("type", "agent"));
// </FS:Ansariel>
return true;

View File

@ -132,6 +132,7 @@
#include "fsareasearch.h"
#include "fscommon.h"
#include "fsdata.h"
#include "fsfloaterplacedetails.h"
#include "fsradar.h"
#include "fskeywords.h" // <FS:PP> FIRE-10178: Keyword Alerts in group IM do not work unless the group is in the foreground
#include "fslightshare.h" // <FS:CR> FIRE-5118 - Lightshare support
@ -1415,14 +1416,7 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam
{
// <FS:Ansariel> FIRE-817: Separate place details floater
//LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "landmark").with("id", item->getUUID()));
if (gSavedSettings.getBOOL("FSUseStandalonePlaceDetailsFloater"))
{
LLFloaterReg::showInstance("fs_placedetails", LLSD().with("type", "landmark").with("id", item->getUUID()));
}
else
{
LLFloaterSidePanelContainer::showPanel("places", LLSD().with("type", "landmark").with("id", item->getUUID()));
}
FSFloaterPlaceDetails::showPlaceDetails(LLSD().with("type", "landmark").with("id", item->getUUID()));
// </FS:Ansariel>
}
else if("group_offer" == from_name)
@ -1435,14 +1429,7 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam
// <FS:Ansariel> FIRE-817: Separate place details floater
//LLFloaterSidePanelContainer::showPanel("places", args);
if (gSavedSettings.getBOOL("FSUseStandalonePlaceDetailsFloater"))
{
LLFloaterReg::showInstance("fs_placedetails", args);
}
else
{
LLFloaterSidePanelContainer::showPanel("places", args);
}
FSFloaterPlaceDetails::showPlaceDetails(args);
// </FS:Ansariel>
continue;

View File

@ -61,6 +61,8 @@
#include "llviewertexturelist.h"
#include "llviewerwindow.h"
#include "fsfloaterplacedetails.h"
static LLDefaultChildRegistry::Register<LLViewerTextEditor> r("text_editor");
///-----------------------------------------------------------------------
@ -83,14 +85,7 @@ public:
// <FS:Ansariel> FIRE-817: Separate place details floater
//LLFloaterSidePanelContainer::showPanel("places", key);
if (gSavedSettings.getBOOL("FSUseStandalonePlaceDetailsFloater"))
{
LLFloaterReg::showInstance("fs_placedetails", key);
}
else
{
LLFloaterSidePanelContainer::showPanel("places", key);
}
FSFloaterPlaceDetails::showPlaceDetails(key);
// </FS:Ansariel>
}
@ -105,14 +100,7 @@ public:
// <FS:Ansariel> FIRE-817: Separate place details floater
//LLFloaterSidePanelContainer::showPanel("places", key);
if (gSavedSettings.getBOOL("FSUseStandalonePlaceDetailsFloater"))
{
LLFloaterReg::showInstance("fs_placedetails", key);
}
else
{
LLFloaterSidePanelContainer::showPanel("places", key);
}
FSFloaterPlaceDetails::showPlaceDetails(key);
// </FS:Ansariel>
}
// [/SL:KB]