Add Destination Guide
Adds llfloaterdestinations.* and floater_destinations.xml (needs translations, but not really) Adds GenericErrorPageURL, DestinationGuideURL (not persistent), DestinationGuideShown, and DestinationGuideRect to debug settings Removes ShowcaseURLDefault in favor of DestinationGuideURL from upstream. Also Adds ToolbarVisibleDestinations for the toolbar button, but I'll need to set up a nice way to make the button invisible when the url is empty before adding it to the gui... maybe.. or maybe it's just not important. This commit comes with support for dynamically changing destination guide page based on opensimextras simulator features cap
This commit is contained in:
@@ -204,6 +204,7 @@ set(viewer_SOURCE_FILES
|
||||
llfloatercolorpicker.cpp
|
||||
llfloatercustomize.cpp
|
||||
llfloaterdaycycle.cpp
|
||||
llfloaterdestinations.cpp
|
||||
llfloaterdirectory.cpp
|
||||
llfloaterdisplayname.cpp
|
||||
llfloatereditui.cpp
|
||||
@@ -731,6 +732,7 @@ set(viewer_HEADER_FILES
|
||||
llfloatercolorpicker.h
|
||||
llfloatercustomize.h
|
||||
llfloaterdaycycle.h
|
||||
llfloaterdestinations.h
|
||||
llfloaterdirectory.h
|
||||
llfloaterdisplayname.h
|
||||
llfloatereditui.h
|
||||
|
||||
@@ -547,17 +547,6 @@
|
||||
<key>Value</key>
|
||||
<string />
|
||||
</map>
|
||||
<key>ShowcaseURLDefault</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>URL to load for the Showcase tab in Second Life</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>http://secondlife.com/app/showcase/index.php?</string>
|
||||
</map>
|
||||
|
||||
<key>CheckForGridUpdates</key>
|
||||
<map>
|
||||
@@ -6069,6 +6058,44 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<string>89556747-24cb-43ed-920b-47caed15465f</string>
|
||||
</map>
|
||||
<key>DestinationGuideRect</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Rectangle for destination guide</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Rect</string>
|
||||
<key>Value</key>
|
||||
<array>
|
||||
<integer>0</integer>
|
||||
<integer>0</integer>
|
||||
<integer>0</integer>
|
||||
<integer>0</integer>
|
||||
</array>
|
||||
</map>
|
||||
<key>DestinationGuideShown</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Show destination guide</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>DestinationGuideURL</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Destination guide contents</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>http://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/guide.html</string>
|
||||
</map>
|
||||
<key>DisableCameraConstraints</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -17887,6 +17914,17 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>GenericErrorPageURL</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>URL to set as a property on LLMediaControl to navigate to if the a page completes with a 400-499 HTTP status code</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>http://common-flash-secondlife-com.s3.amazonaws.com/viewer/v2.6/agni/404.html</string>
|
||||
</map>
|
||||
<key>WebProfileFloaterRect</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -1173,6 +1173,17 @@
|
||||
<key>Value</key>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>ToolbarVisibleDestinations</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether or not the button for destinations is on the toolbar</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>ToolbarVisibleDisplayName</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
LFSimFeatureHandler::LFSimFeatureHandler()
|
||||
: mSupportsExport(false)
|
||||
, mDestinationGuideURL(gSavedSettings.getString("ShowcaseURLDefault"))
|
||||
, mDestinationGuideURL(gSavedSettings.getString("DestinationGuideURL"))
|
||||
, mSearchURL(gSavedSettings.getString("SearchURL"))
|
||||
, mSayRange(20)
|
||||
, mShoutRange(100)
|
||||
|
||||
77
indra/newview/llfloaterdestinations.cpp
Normal file
77
indra/newview/llfloaterdestinations.cpp
Normal file
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* @file llfloaterdestinations.h
|
||||
* @author Leyla Farazha
|
||||
* @brief floater for the destinations guide
|
||||
*
|
||||
* $LicenseInfo:firstyear=2011&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2011, 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$
|
||||
*/
|
||||
|
||||
/**
|
||||
* Floater that appears when buying an object, giving a preview
|
||||
* of its contents and their permissions.
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "lfsimfeaturehandler.h"
|
||||
#include "llfloaterdestinations.h"
|
||||
#include "llmediactrl.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llweb.h"
|
||||
|
||||
|
||||
LLFloaterDestinations::LLFloaterDestinations(const LLSD& key)
|
||||
: LLFloater(key)
|
||||
{
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_destinations.xml", NULL, false);
|
||||
}
|
||||
|
||||
LLFloaterDestinations::~LLFloaterDestinations()
|
||||
{
|
||||
}
|
||||
|
||||
BOOL LLFloaterDestinations::postBuild()
|
||||
{
|
||||
enableResizeCtrls(true, true, false);
|
||||
LLMediaCtrl* destinations = getChild<LLMediaCtrl>("destination_guide_contents");
|
||||
if (destinations)
|
||||
{
|
||||
destinations->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL"));
|
||||
std::string url = gSavedSettings.getString("DestinationGuideURL");
|
||||
changeURL(destinations, url);
|
||||
LFSimFeatureHandler::instance().setDestinationGuideURLCallback(boost::bind(&LLFloaterDestinations::changeURL, this, destinations, _1));
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLFloaterDestinations::changeURL(LLMediaCtrl* destinations, const std::string& url)
|
||||
{
|
||||
if (url.empty())
|
||||
{
|
||||
close();
|
||||
return;
|
||||
}
|
||||
|
||||
destinations->navigateTo(LLWeb::expandURLSubstitutions(url, LLSD()), "text/html");
|
||||
}
|
||||
|
||||
|
||||
45
indra/newview/llfloaterdestinations.h
Normal file
45
indra/newview/llfloaterdestinations.h
Normal file
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* @file llfloaterdestinations.h
|
||||
* @author Leyla Farazha
|
||||
* @brief floater for the destinations guide
|
||||
*
|
||||
* $LicenseInfo:firstyear=2011&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2011, 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$
|
||||
*/
|
||||
|
||||
#ifndef LL_FLOATER_DESTINATIONS_H
|
||||
#define LL_FLOATER_DESTINATIONS_H
|
||||
|
||||
#include "llfloater.h"
|
||||
|
||||
class LLFloaterDestinations :
|
||||
public LLFloater
|
||||
, public LLFloaterSingleton<LLFloaterDestinations>
|
||||
{
|
||||
friend class LLUISingleton<LLFloaterDestinations, VisibilityPolicy<LLFloater> >;
|
||||
private:
|
||||
LLFloaterDestinations(const LLSD& key);
|
||||
/*virtual*/ ~LLFloaterDestinations();
|
||||
/*virtual*/ BOOL postBuild();
|
||||
void changeURL(class LLMediaCtrl* destinations, const std::string& url);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -58,6 +58,7 @@
|
||||
#include "llfloaterchatterbox.h"
|
||||
#include "llfloatercustomize.h"
|
||||
#include "llfloaterdaycycle.h"
|
||||
#include "llfloaterdestinations.h"
|
||||
#include "llfloaterdisplayname.h"
|
||||
#include "llfloatereditui.h"
|
||||
#include "llfloaterenvsettings.h"
|
||||
@@ -224,6 +225,7 @@ struct MenuFloaterDict : public LLSingleton<MenuFloaterDict>
|
||||
registerFloater<LLFloaterCamera> ("camera controls");
|
||||
registerFloater<LLFloaterChat> ("chat history");
|
||||
registerFloater<LLFloaterChatterBox> ("communicate");
|
||||
registerFloater<LLFloaterDestinations> ("destinations");
|
||||
registerFloater<LLFloaterMyFriends> ("friends", 0);
|
||||
registerFloater<LLFloaterGesture> ("gestures");
|
||||
registerFloater<LLFloaterMyFriends> ("groups", 1);
|
||||
|
||||
@@ -1597,7 +1597,7 @@ bool idle_startup()
|
||||
if (!secondlife)
|
||||
{
|
||||
LFSimFeatureHandler& inst(LFSimFeatureHandler::instance());
|
||||
inst.setDestinationGuideURLCallback(boost::bind(simfeature_debug_update, _1, "ShowcaseURLDefault"));
|
||||
inst.setDestinationGuideURLCallback(boost::bind(simfeature_debug_update, _1, "DestinationGuideURL"));
|
||||
inst.setSearchURLCallback(boost::bind(simfeature_debug_update, _1, "SearchURL"));
|
||||
}
|
||||
|
||||
@@ -4199,7 +4199,7 @@ bool process_login_success_response(std::string& password, U32& first_sim_size_x
|
||||
if (opensim)
|
||||
{
|
||||
gSavedSettings.setString("SearchURL", tmp); // Singu Note: For web search purposes, always set this setting
|
||||
gSavedSettings.setString("ShowcaseURLDefault", response["destination_guide_url"].asString());
|
||||
gSavedSettings.setString("DestinationGuideURL", response["destination_guide_url"].asString());
|
||||
}
|
||||
tmp = response["currency"].asString();
|
||||
if (!tmp.empty())
|
||||
|
||||
@@ -6471,6 +6471,15 @@ BOOL enable_buy_land(void*)
|
||||
LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel(), false);
|
||||
}
|
||||
|
||||
class LLWorldVisibleDestinations : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
bool visible(!LFSimFeatureHandler::instance().destinationGuideURL().empty());
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(visible);
|
||||
return visible;
|
||||
}
|
||||
};
|
||||
|
||||
class LLObjectAttachToAvatar : public view_listener_t
|
||||
{
|
||||
@@ -9339,6 +9348,7 @@ void initialize_menus()
|
||||
addMenu(new LLWorldEnableSetHomeLocation(), "World.EnableSetHomeLocation");
|
||||
addMenu(new LLWorldEnableTeleportHome(), "World.EnableTeleportHome");
|
||||
addMenu(new LLWorldEnableBuyLand(), "World.EnableBuyLand");
|
||||
addMenu(new LLWorldVisibleDestinations(), "World.VisibleDestinations");
|
||||
(new LLWorldEnvSettings())->registerListener(gMenuHolder, "World.EnvSettings");
|
||||
(new LLWorldEnableEnvSettings())->registerListener(gMenuHolder, "World.EnableEnvSettings");
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 22 B |
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater
|
||||
positioning="cascading"
|
||||
legacy_header_height="225"
|
||||
can_minimize="true"
|
||||
can_close="true"
|
||||
can_resize="true"
|
||||
min_height="230"
|
||||
min_width="350"
|
||||
height="235"
|
||||
layout="topleft"
|
||||
name="Destinations"
|
||||
single_instance="true"
|
||||
help_topic="destinations"
|
||||
rect_control="DestinationGuideRect"
|
||||
control_name="DestinationGuideShown"
|
||||
title="Destinations"
|
||||
width="550">
|
||||
<web_browser
|
||||
bottom="-235"
|
||||
height="215"
|
||||
width="550"
|
||||
follows="all"
|
||||
name="destination_guide_contents"
|
||||
trusted_content="true"/>
|
||||
</floater>
|
||||
@@ -590,6 +590,11 @@
|
||||
<menu_item_call bottom="-29" height="19" label="Favorites" left="0" name="Favorites" width="166">
|
||||
<on_click function="ShowFloater" userdata="floater_inventory_favs.xml" />
|
||||
</menu_item_call>
|
||||
<menu_item_check label="Destinations" name="Destinations">
|
||||
<on_click function="ShowFloater" userdata="destinations"/>
|
||||
<on_check function="FloaterVisible" userdata="destinations"/>
|
||||
<on_visible function="World.VisibleDestinations"/>
|
||||
</menu_item_check>
|
||||
<menu_item_separator bottom="-213" label="-----------" left="0" name="separator5"/>
|
||||
<menu_item_call bottom="-251" enabled="true" height="19" label="My Land..." left="0"
|
||||
mouse_opaque="true" name="My Land..." width="185">
|
||||
|
||||
@@ -287,6 +287,11 @@
|
||||
<button.commit_callback function="ShowFloater" parameter="teleport history"/>
|
||||
</button>
|
||||
</layout_panel>
|
||||
<layout_panel name="paneldestinations" height="24" width="50" user_resize="false" visibility_control="ToolbarVisibleDestinations">
|
||||
<button bottom="0" height="24" label="Destinations" name="destinations_btn" image_overlay="icn_toolbar_destinations.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" width="50" follows="left|right">
|
||||
<button.commit_callback function="ShowFloater" parameter="destinations"/>
|
||||
</button>
|
||||
</layout_panel>
|
||||
<layout_panel name="panel11" height="24" width="50" user_resize="false" visibility_control="ToolbarVisibleWorldMap">
|
||||
<button bottom="0" height="24" label="Map" name="map_btn" image_overlay="icn_toolbar_map.tga" image_overlay_alignment="left" image_selected="toolbar_btn_selected.tga" image_unselected="toolbar_btn_enabled.tga" image_disabled="toolbar_btn_disabled.tga" scale_image="true" tool_tip="Map of the world. (Ctrl-M)" width="50" follows="left|right" control_name="ShowWorldMap">
|
||||
<button.commit_callback function="ShowFloater" parameter="world map"/>
|
||||
|
||||
Reference in New Issue
Block a user