Merge branch 'DRTVWR-518-ui' of https://bitbucket.org/lindenlab/viewer
commit
618057fa04
|
|
@ -124,6 +124,7 @@ set(llui_SOURCE_FILES
|
|||
lluictrl.cpp
|
||||
lluictrlfactory.cpp
|
||||
lluistring.cpp
|
||||
lluiusage.cpp
|
||||
llundo.cpp
|
||||
llurlaction.cpp
|
||||
llurlentry.cpp
|
||||
|
|
@ -245,6 +246,7 @@ set(llui_HEADER_FILES
|
|||
llui.h
|
||||
lluicolor.h
|
||||
lluistring.h
|
||||
lluiusage.h
|
||||
llundo.h
|
||||
llurlaction.h
|
||||
llurlentry.h
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@
|
|||
#include "llnotificationsutil.h"
|
||||
#include "llrender.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "lluiusage.h"
|
||||
#include "llhelp.h"
|
||||
#include "lldockablefloater.h"
|
||||
#include "llviewereventrecorder.h"
|
||||
|
|
@ -494,6 +495,13 @@ BOOL LLButton::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
setFocus(TRUE);
|
||||
}
|
||||
|
||||
if (!mFunctionName.empty())
|
||||
{
|
||||
LL_DEBUGS("UIUsage") << "calling mouse down function " << mFunctionName << LL_ENDL;
|
||||
LLUIUsage::instance().logCommand(mFunctionName);
|
||||
LLUIUsage::instance().logControl(getPathname());
|
||||
}
|
||||
|
||||
/*
|
||||
* ATTENTION! This call fires another mouse down callback.
|
||||
* If you wish to remove this call emit that signal directly
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@
|
|||
#include "llhelp.h"
|
||||
#include "llmultifloater.h"
|
||||
#include "llsdutil.h"
|
||||
#include "lluiusage.h"
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
|
||||
|
|
@ -213,6 +214,8 @@ LLFloater::Params::Params()
|
|||
open_callback("open_callback"),
|
||||
close_callback("close_callback"),
|
||||
follows("follows"),
|
||||
rel_x("rel_x", 0),
|
||||
rel_y("rel_y", 0),
|
||||
hosted_floater_show_titlebar("hosted_floater_show_titlebar", true) // <FS:Ansariel> MultiFloater without titlebar for hosted floater
|
||||
{
|
||||
changeDefault(visible, false);
|
||||
|
|
@ -284,6 +287,8 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p)
|
|||
mHasBeenDraggedWhileMinimized(FALSE),
|
||||
mPreviousMinimizedBottom(0),
|
||||
mPreviousMinimizedLeft(0),
|
||||
mDefaultRelativeX(p.rel_x),
|
||||
mDefaultRelativeY(p.rel_y),
|
||||
mMinimizeSignal(NULL),
|
||||
mHostedFloaterShowtitlebar(p.hosted_floater_show_titlebar) // <FS:Ansariel> MultiFloater without titlebar for hosted floater
|
||||
// mNotificationContext(NULL)
|
||||
|
|
@ -1021,6 +1026,15 @@ bool LLFloater::applyRectControl()
|
|||
|
||||
saved_rect = true;
|
||||
}
|
||||
else if ((mDefaultRelativeX != 0) && (mDefaultRelativeY != 0))
|
||||
{
|
||||
mPosition.mX = mDefaultRelativeX;
|
||||
mPosition.mY = mDefaultRelativeY;
|
||||
mPositioning = LLFloaterEnums::POSITIONING_RELATIVE;
|
||||
applyRelativePosition();
|
||||
|
||||
saved_rect = true;
|
||||
}
|
||||
|
||||
// remember updated position
|
||||
if (rect_specified)
|
||||
|
|
@ -1720,6 +1734,7 @@ void LLFloater::bringToFront( S32 x, S32 y )
|
|||
// virtual
|
||||
void LLFloater::setVisibleAndFrontmost(BOOL take_focus,const LLSD& key)
|
||||
{
|
||||
LLUIUsage::instance().logFloater(getInstanceName());
|
||||
LLMultiFloater* hostp = getHost();
|
||||
if (hostp)
|
||||
{
|
||||
|
|
@ -3525,6 +3540,9 @@ void LLFloater::initFromParams(const LLFloater::Params& p)
|
|||
mSingleInstance = p.single_instance;
|
||||
mReuseInstance = p.reuse_instance.isProvided() ? p.reuse_instance : p.single_instance;
|
||||
|
||||
mDefaultRelativeX = p.rel_x;
|
||||
mDefaultRelativeY = p.rel_y;
|
||||
|
||||
mPositioning = p.positioning;
|
||||
|
||||
mHostedFloaterShowtitlebar = p.hosted_floater_show_titlebar; // <FS:Ansariel> MultiFloater without titlebar for hosted floater
|
||||
|
|
|
|||
|
|
@ -178,6 +178,9 @@ public:
|
|||
label_v_padding, // <FS:Zi> Make vertical label padding a per-skin option
|
||||
legacy_header_height; // HACK see initFromXML()
|
||||
|
||||
Optional<F32> rel_x,
|
||||
rel_y;
|
||||
|
||||
// Images for top-right controls
|
||||
Optional<LLUIImage*> close_image,
|
||||
snooze_image, // <FS:Ansariel> FIRE-11724: Snooze group chat
|
||||
|
|
@ -547,6 +550,9 @@ private:
|
|||
S32 mPreviousMinimizedBottom;
|
||||
S32 mPreviousMinimizedLeft;
|
||||
|
||||
F32 mDefaultRelativeX;
|
||||
F32 mDefaultRelativeY;
|
||||
|
||||
// <FS:Ansariel> MultiFloater without titlebar for hosted floater
|
||||
bool mHostedFloaterShowtitlebar;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
#include "llfloater.h"
|
||||
#include "llmultifloater.h"
|
||||
#include "llfloaterreglistener.h"
|
||||
#include "lluiusage.h"
|
||||
#include <string>
|
||||
|
||||
//*******************************************************
|
||||
|
|
@ -513,7 +514,6 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD&
|
|||
std::string name = sdname.asString();
|
||||
LLFloater* instance = getInstance(name, key);
|
||||
|
||||
|
||||
if (!instance)
|
||||
{
|
||||
LL_DEBUGS() << "Unable to get instance of floater '" << name << "'" << LL_ENDL;
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
#include "llrender.h"
|
||||
#include "llfloater.h"
|
||||
#include "lltrans.h"
|
||||
#include "lluiusage.h"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -1716,6 +1717,8 @@ BOOL LLTabContainer::setTab(S32 which)
|
|||
|
||||
if (is_selected)
|
||||
{
|
||||
LLUIUsage::instance().logPanel(tuple->mTabPanel->getName());
|
||||
|
||||
// Make sure selected tab is within scroll region
|
||||
if (mIsVertical)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1167,6 +1167,8 @@ LLToolBarButton* LLToolBar::createButton(const LLCommandId& id)
|
|||
executeStopParam.function_name = executeStopFunction;
|
||||
executeStopParam.parameter = commandp->executeStopParameters();
|
||||
LLUICtrl::commit_callback_t execute_func = initCommitCallback(executeParam);
|
||||
button->setFunctionName(commandp->executeFunctionName());
|
||||
LL_DEBUGS("UIUsage") << "button function name a -> " << commandp->executeFunctionName() << LL_ENDL;
|
||||
LLUICtrl::commit_callback_t stop_func = initCommitCallback(executeStopParam);
|
||||
|
||||
button->setMouseDownCallback(boost::bind(&LLToolBarButton::callIfEnabled, button, execute_func, _1, _2));
|
||||
|
|
@ -1174,7 +1176,8 @@ LLToolBarButton* LLToolBar::createButton(const LLCommandId& id)
|
|||
}
|
||||
else
|
||||
{
|
||||
// <FS:Ansariel> Check enabled state of button before executing!
|
||||
button->setFunctionName(commandp->executeFunctionName());
|
||||
LL_DEBUGS("UIUsage") << "button function name b -> " << commandp->executeFunctionName() << LL_ENDL; // <FS:Ansariel> Check enabled state of button before executing!
|
||||
//button->setCommitCallback(executeParam);
|
||||
LLUICtrl::commit_callback_t execute_func = initCommitCallback(executeParam);
|
||||
button->setCommitCallback(boost::bind(&LLToolBarButton::callIfEnabled, button, execute_func, _1, _2));
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
#include "lluictrlfactory.h"
|
||||
#include "lltabcontainer.h"
|
||||
#include "llaccordionctrltab.h"
|
||||
#include "lluiusage.h"
|
||||
|
||||
static LLDefaultChildRegistry::Register<LLUICtrl> r("ui_ctrl");
|
||||
|
||||
|
|
@ -290,6 +291,7 @@ LLUICtrl::commit_signal_t::slot_type LLUICtrl::initCommitCallback(const CommitCa
|
|||
else
|
||||
{
|
||||
std::string function_name = cb.function_name;
|
||||
setFunctionName(function_name);
|
||||
commit_callback_t* func = (CommitCallbackRegistry::getValue(function_name));
|
||||
if (func)
|
||||
{
|
||||
|
|
@ -430,7 +432,19 @@ BOOL LLUICtrl::canFocusChildren() const
|
|||
void LLUICtrl::onCommit()
|
||||
{
|
||||
if (mCommitSignal)
|
||||
(*mCommitSignal)(this, getValue());
|
||||
{
|
||||
if (!mFunctionName.empty())
|
||||
{
|
||||
LL_DEBUGS("UIUsage") << "calling commit function " << mFunctionName << LL_ENDL;
|
||||
LLUIUsage::instance().logCommand(mFunctionName);
|
||||
LLUIUsage::instance().logControl(getPathname());
|
||||
}
|
||||
else
|
||||
{
|
||||
//LL_DEBUGS("UIUsage") << "calling commit function " << "UNKNOWN" << LL_ENDL;
|
||||
}
|
||||
(*mCommitSignal)(this, getValue());
|
||||
}
|
||||
}
|
||||
|
||||
//virtual
|
||||
|
|
@ -615,6 +629,12 @@ void LLUICtrl::setMakeInvisibleControlVariable(LLControlVariable* control)
|
|||
// </FS:Zi>
|
||||
}
|
||||
}
|
||||
|
||||
void LLUICtrl::setFunctionName(const std::string& function_name)
|
||||
{
|
||||
mFunctionName = function_name;
|
||||
}
|
||||
|
||||
// static
|
||||
bool LLUICtrl::controlListener(const LLSD& newvalue, LLHandle<LLUICtrl> handle, std::string type)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -197,6 +197,8 @@ public:
|
|||
void setMakeVisibleControlVariable(LLControlVariable* control);
|
||||
void setMakeInvisibleControlVariable(LLControlVariable* control);
|
||||
|
||||
void setFunctionName(const std::string& function_name);
|
||||
|
||||
virtual void setTentative(BOOL b);
|
||||
virtual BOOL getTentative() const;
|
||||
virtual void setValue(const LLSD& value);
|
||||
|
|
@ -326,6 +328,8 @@ protected:
|
|||
LLControlVariable* mMakeInvisibleControlVariable;
|
||||
boost::signals2::connection mMakeInvisibleControlConnection;
|
||||
|
||||
std::string mFunctionName;
|
||||
|
||||
static F32 sActiveControlTransparency;
|
||||
static F32 sInactiveControlTransparency;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,146 @@
|
|||
/**
|
||||
* @file lluiuisage.cpp
|
||||
* @brief Source file for LLUIUsage
|
||||
*
|
||||
* $LicenseInfo:firstyear=2021&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2021, 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$
|
||||
*/
|
||||
|
||||
#include "linden_common.h"
|
||||
#include "lluiusage.h"
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
LLUIUsage::LLUIUsage()
|
||||
{
|
||||
}
|
||||
|
||||
LLUIUsage::~LLUIUsage()
|
||||
{
|
||||
}
|
||||
|
||||
// static
|
||||
std::string LLUIUsage::sanitized(const std::string& s)
|
||||
{
|
||||
// Remove characters that make the ViewerStats db unhappy
|
||||
std::string result(s);
|
||||
std::replace(result.begin(), result.end(), '.', '_');
|
||||
std::replace(result.begin(), result.end(), ' ', '_');
|
||||
return result;
|
||||
}
|
||||
|
||||
// static
|
||||
void LLUIUsage::setLLSDPath(LLSD& sd, const std::string& path, S32 max_elts, const LLSD& val)
|
||||
{
|
||||
// Keep the last max_elts components of the specified path
|
||||
std::vector<std::string> fields;
|
||||
boost::split(fields, path, boost::is_any_of("/"));
|
||||
auto first_pos = std::max(fields.begin(), fields.end() - max_elts);
|
||||
auto end_pos = fields.end();
|
||||
std::vector<std::string> last_fields(first_pos,end_pos);
|
||||
|
||||
setLLSDNested(sd, last_fields, val);
|
||||
}
|
||||
|
||||
// setLLSDNested()
|
||||
// Accomplish the equivalent of
|
||||
// sd[fields[0]][fields[1]]... = val;
|
||||
// for an arbitrary number of fields.
|
||||
// This might be useful as an LLSD utility function; is not specific to LLUIUsage
|
||||
//
|
||||
// static
|
||||
void LLUIUsage::setLLSDNested(LLSD& sd, const std::vector<std::string>& fields, const LLSD& val)
|
||||
{
|
||||
LLSD* fsd = &sd;
|
||||
for (auto it=fields.begin(); it!=fields.end(); ++it)
|
||||
{
|
||||
if (it == fields.end()-1)
|
||||
{
|
||||
(*fsd)[*it] = val;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(*fsd)[*it].isMap())
|
||||
{
|
||||
(*fsd)[*it] = LLSD::emptyMap();
|
||||
}
|
||||
fsd = &(*fsd)[*it];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLUIUsage::logCommand(const std::string& command)
|
||||
{
|
||||
mCommandCounts[sanitized(command)]++;
|
||||
LL_DEBUGS("UIUsage") << "command " << command << LL_ENDL;
|
||||
}
|
||||
|
||||
void LLUIUsage::logControl(const std::string& control)
|
||||
{
|
||||
mControlCounts[sanitized(control)]++;
|
||||
LL_DEBUGS("UIUsage") << "control " << control << LL_ENDL;
|
||||
}
|
||||
|
||||
|
||||
void LLUIUsage::logFloater(const std::string& floater)
|
||||
{
|
||||
mFloaterCounts[sanitized(floater)]++;
|
||||
LL_DEBUGS("UIUsage") << "floater " << floater << LL_ENDL;
|
||||
}
|
||||
|
||||
void LLUIUsage::logPanel(const std::string& p)
|
||||
{
|
||||
mPanelCounts[sanitized(p)]++;
|
||||
LL_DEBUGS("UIUsage") << "panel " << p << LL_ENDL;
|
||||
}
|
||||
|
||||
LLSD LLUIUsage::asLLSD() const
|
||||
{
|
||||
LLSD result;
|
||||
for (auto const& it : mCommandCounts)
|
||||
{
|
||||
result["commands"][it.first] = LLSD::Integer(it.second);
|
||||
}
|
||||
for (auto const& it : mControlCounts)
|
||||
{
|
||||
setLLSDPath(result["controls"], it.first, 2, LLSD::Integer(it.second));
|
||||
}
|
||||
for (auto const& it : mFloaterCounts)
|
||||
{
|
||||
result["floaters"][it.first] = LLSD::Integer(it.second);
|
||||
}
|
||||
for (auto const& it : mPanelCounts)
|
||||
{
|
||||
result["panels"][it.first] = LLSD::Integer(it.second);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// Clear up some junk content generated during initial login/UI initialization
|
||||
void LLUIUsage::clear()
|
||||
{
|
||||
|
||||
LL_DEBUGS("UIUsage") << "clear" << LL_ENDL;
|
||||
mCommandCounts.clear();
|
||||
mControlCounts.clear();
|
||||
mFloaterCounts.clear();
|
||||
mPanelCounts.clear();
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
/**
|
||||
* @file lluiuisage.h
|
||||
* @brief Header file for LLUIUsage
|
||||
*
|
||||
* $LicenseInfo:firstyear=2021&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2021, 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_LLUIUSAGE_H
|
||||
#define LL_LLUIUSAGE_H
|
||||
|
||||
#include <map>
|
||||
#include "llsd.h"
|
||||
#include "llsingleton.h"
|
||||
|
||||
// UIUsage tracking to see which operations and UI elements are most popular in a session
|
||||
class LLUIUsage : public LLSingleton<LLUIUsage>
|
||||
{
|
||||
public:
|
||||
LLSINGLETON(LLUIUsage);
|
||||
~LLUIUsage();
|
||||
public:
|
||||
static std::string sanitized(const std::string& s);
|
||||
static void setLLSDPath(LLSD& sd, const std::string& path, S32 max_elts, const LLSD& val);
|
||||
static void setLLSDNested(LLSD& sd, const std::vector<std::string>& fields, const LLSD& val);
|
||||
void logCommand(const std::string& command);
|
||||
void logControl(const std::string& control);
|
||||
void logFloater(const std::string& floater);
|
||||
void logPanel(const std::string& p);
|
||||
LLSD asLLSD() const;
|
||||
void clear();
|
||||
private:
|
||||
std::map<std::string,U32> mCommandCounts;
|
||||
std::map<std::string,U32> mControlCounts;
|
||||
std::map<std::string,U32> mFloaterCounts;
|
||||
std::map<std::string,U32> mPanelCounts;
|
||||
};
|
||||
|
||||
#endif // LLUIUIUSAGE.h
|
||||
|
|
@ -59,6 +59,7 @@
|
|||
#include "llmultigesture.h"
|
||||
#include "llui.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "lluiusage.h"
|
||||
|
||||
//
|
||||
// Globals
|
||||
|
|
@ -567,6 +568,8 @@ void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL
|
|||
// as soon as we say something, we no longer care about teaching the user
|
||||
// how to chat
|
||||
gWarningSettings.setBOOL("FirstOtherChatBeforeUser", FALSE);
|
||||
|
||||
LLUIUsage::instance().logCommand("Chat.Send"); // Pseudo-command
|
||||
|
||||
// Look for "/20 foo" channel chats.
|
||||
S32 channel = 0;
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@
|
|||
#include "llviewerchat.h"
|
||||
#include "lltranslate.h"
|
||||
#include "llautoreplace.h"
|
||||
#include "lluiusage.h"
|
||||
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b)
|
||||
#include "rlvactions.h"
|
||||
#include "rlvcommon.h"
|
||||
|
|
@ -707,6 +708,7 @@ void LLFloaterIMNearbyChat::sendChatFromViewer(const std::string &utf8text, ECha
|
|||
|
||||
void LLFloaterIMNearbyChat::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate)
|
||||
{
|
||||
LLUIUsage::instance().logCommand("Chat.Send"); // pseuo-command
|
||||
// Look for "/20 foo" channel chats.
|
||||
S32 channel = 0;
|
||||
LLWString out_text = stripChannelNumber(wtext, &channel);
|
||||
|
|
|
|||
|
|
@ -289,6 +289,10 @@ LLToggleableMenu* LLLandmarksPanel::getCreateMenu()
|
|||
|
||||
void LLLandmarksPanel::updateVerbs()
|
||||
{
|
||||
if (sRemoveBtn)
|
||||
{
|
||||
sRemoveBtn->setEnabled(isActionEnabled("delete") && (isFolderSelected() || isLandmarkSelected()));
|
||||
}
|
||||
}
|
||||
|
||||
void LLLandmarksPanel::setItemSelected(const LLUUID& obj_id, BOOL take_keyboard_focus)
|
||||
|
|
@ -429,6 +433,7 @@ void LLLandmarksPanel::initLandmarksPanel(LLPlacesInventoryPanel* inventory_list
|
|||
{
|
||||
inventory_list->getFilter().setEmptyLookupMessage("PlacesNoMatchingItems");
|
||||
inventory_list->setFilterTypes(0x1 << LLInventoryType::IT_LANDMARK);
|
||||
inventory_list->setSelectCallback(boost::bind(&LLLandmarksPanel::updateVerbs, this));
|
||||
|
||||
inventory_list->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
|
||||
bool sorting_order = gSavedSettings.getBOOL("LandmarksSortedByDate");
|
||||
|
|
@ -1049,6 +1054,7 @@ bool LLLandmarksPanel::handleDragAndDropToTrash(BOOL drop, EDragAndDropType carg
|
|||
break;
|
||||
}
|
||||
|
||||
updateVerbs();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -690,7 +690,18 @@ void LLPanelPlaces::onTabSelected()
|
|||
// Hide menus
|
||||
bool supports_create = mActivePanel->getCreateMenu() != NULL;
|
||||
childSetVisible("add_btn_panel", supports_create);
|
||||
childSetVisible("trash_btn_panel", supports_create);
|
||||
|
||||
// favorites and inventory can remove items, history can clear history
|
||||
childSetVisible("trash_btn_panel", TRUE);
|
||||
|
||||
if (supports_create)
|
||||
{
|
||||
mRemoveSelectedBtn->setToolTip(getString("tooltip_trash_items"));
|
||||
}
|
||||
else
|
||||
{
|
||||
mRemoveSelectedBtn->setToolTip(getString("tooltip_trash_history"));
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelPlaces::onTeleportButtonClicked()
|
||||
|
|
@ -1262,7 +1273,21 @@ void LLPanelPlaces::createTabs()
|
|||
// Hide menus
|
||||
bool supports_create = mActivePanel->getCreateMenu() != NULL;
|
||||
childSetVisible("add_btn_panel", supports_create);
|
||||
childSetVisible("trash_btn_panel", supports_create);
|
||||
|
||||
// favorites and inventory can remove items, history can clear history
|
||||
childSetVisible("trash_btn_panel", TRUE);
|
||||
|
||||
if (supports_create)
|
||||
{
|
||||
mRemoveSelectedBtn->setToolTip(getString("tooltip_trash_items"));
|
||||
}
|
||||
else
|
||||
{
|
||||
mRemoveSelectedBtn->setToolTip(getString("tooltip_trash_history"));
|
||||
}
|
||||
|
||||
mActivePanel->setRemoveBtn(mRemoveSelectedBtn);
|
||||
mActivePanel->updateVerbs();
|
||||
}
|
||||
|
||||
mTabsCreated = true;
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
#include "llworldmap.h"
|
||||
|
||||
std::string LLPanelPlacesTab::sFilterSubString = LLStringUtil::null;
|
||||
LLButton* LLPanelPlacesTab::sRemoveBtn = NULL;
|
||||
|
||||
bool LLPanelPlacesTab::isTabVisible()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -67,9 +67,12 @@ public:
|
|||
const std::string& getFilterSubString() { return sFilterSubString; }
|
||||
void setFilterSubString(const std::string& string) { sFilterSubString = string; }
|
||||
|
||||
void setRemoveBtn(LLButton* trash_btn) { sRemoveBtn = trash_btn; }
|
||||
|
||||
protected:
|
||||
// Search string for filtering landmarks and teleport history locations
|
||||
static std::string sFilterSubString;
|
||||
static LLButton* sRemoveBtn;
|
||||
};
|
||||
|
||||
#endif //LL_LLPANELPLACESTAB_H
|
||||
|
|
|
|||
|
|
@ -621,6 +621,12 @@ void LLTeleportHistoryPanel::onTeleport()
|
|||
confirmTeleport(itemp->getIndex());
|
||||
}
|
||||
|
||||
// virtual
|
||||
void LLTeleportHistoryPanel::onRemoveSelected()
|
||||
{
|
||||
LLNotificationsUtil::add("ConfirmClearTeleportHistory", LLSD(), LLSD(), boost::bind(&LLTeleportHistoryPanel::onClearTeleportHistoryDialog, this, _1, _2));
|
||||
}
|
||||
|
||||
/*
|
||||
// virtual
|
||||
void LLTeleportHistoryPanel::onCopySLURL()
|
||||
|
|
@ -651,9 +657,9 @@ void LLTeleportHistoryPanel::updateVerbs()
|
|||
if (!isTabVisible())
|
||||
return;
|
||||
|
||||
if (!mLastSelectedFlatlList)
|
||||
if (sRemoveBtn)
|
||||
{
|
||||
return;
|
||||
sRemoveBtn->setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1200,10 +1206,6 @@ void LLTeleportHistoryPanel::onGearMenuAction(const LLSD& userdata)
|
|||
mLastSelectedFlatlList->resetSelection();
|
||||
}
|
||||
}
|
||||
else if ("clear_history" == command_name)
|
||||
{
|
||||
LLNotificationsUtil::add("ConfirmClearTeleportHistory", LLSD(), LLSD(), boost::bind(&LLTeleportHistoryPanel::onClearTeleportHistoryDialog, this, _1, _2));
|
||||
}
|
||||
|
||||
S32 index = -1;
|
||||
if (mLastSelectedFlatlList)
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public:
|
|||
void onShowProfile() override;
|
||||
void onTeleport() override;
|
||||
///*virtual*/ void onCopySLURL();
|
||||
void onRemoveSelected() override {};
|
||||
void onRemoveSelected() override;
|
||||
void updateVerbs() override;
|
||||
bool isSingleItemSelected() override;
|
||||
|
||||
|
|
|
|||
|
|
@ -147,6 +147,7 @@
|
|||
#include "lltoolmgr.h"
|
||||
#include "lltrans.h"
|
||||
#include "llui.h"
|
||||
#include "lluiusage.h"
|
||||
#include "llurldispatcher.h"
|
||||
#include "llurlentry.h"
|
||||
#include "llslurl.h"
|
||||
|
|
@ -3129,6 +3130,8 @@ bool idle_startup()
|
|||
LLParcel::C_ANY,
|
||||
"");
|
||||
|
||||
LLUIUsage::instance().clear();
|
||||
|
||||
// <FS:Techwolf Lupindo> FIRE-6643 Display MOTD when login screens are disabled
|
||||
if (gSavedSettings.getBOOL("FSDisableLoginScreens"))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -126,7 +126,6 @@
|
|||
#include "rlvui.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
#include <boost/algorithm/string/split.hpp> //
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
#include "llnotificationmanager.h" //
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@
|
|||
#include "llsdutil.h"
|
||||
#include "llcorehttputil.h"
|
||||
#include "llvoicevivox.h"
|
||||
#include "lluiusage.h"
|
||||
|
||||
namespace LLStatViewer
|
||||
{
|
||||
|
|
@ -580,6 +581,8 @@ void send_viewer_stats(bool include_preferences)
|
|||
fail["invalid"] = (S32) gMessageSystem->mInvalidOnCircuitPackets;
|
||||
fail["missing_updater"] = (S32) LLAppViewer::instance()->isUpdaterMissing();
|
||||
|
||||
body["ui"] = LLUIUsage::instance().asLLSD();
|
||||
|
||||
body["stats"]["voice"] = LLVoiceVivoxStats::getInstance()->read();
|
||||
|
||||
// Misc stats, two strings and two ints
|
||||
|
|
|
|||
|
|
@ -201,6 +201,8 @@ LLPointer<LLViewerFetchedTexture> LLWorldMipmap::loadObjectsTile(U32 grid_x, U32
|
|||
//LL_INFOS("WorldMap") << "LLWorldMipmap::loadObjectsTile(), URL = " << imageurl << LL_ENDL;
|
||||
|
||||
LLPointer<LLViewerFetchedTexture> img = LLViewerTextureManager::getFetchedTextureFromUrl(imageurl, FTT_MAP_TILE, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
|
||||
LL_INFOS("MAPURL") << "fetching map tile from " << imageurl << LL_ENDL;
|
||||
|
||||
img->setBoostLevel(LLGLTexture::BOOST_MAP);
|
||||
|
||||
// Return the smart pointer
|
||||
|
|
|
|||
|
|
@ -12,4 +12,6 @@
|
|||
save_rect="true"
|
||||
title="How to"
|
||||
width="310"
|
||||
rel_x="-0.469309"
|
||||
rel_y="-0.011166"
|
||||
filename="floater_web_content.xml"/>
|
||||
|
|
@ -9387,7 +9387,7 @@ This upload will cost L$[PRICE], do you wish to continue with the upload?
|
|||
icon="alertmodal.tga"
|
||||
name="ConfirmClearTeleportHistory"
|
||||
type="alertmodal">
|
||||
Are you sure you want to delete your teleport history?
|
||||
This will delete the entire list of places you have visited, and cannot be undone. Continue?
|
||||
<tag>confirm</tag>
|
||||
<usetemplate
|
||||
name="okcancelbuttons"
|
||||
|
|
|
|||
|
|
@ -19,6 +19,12 @@
|
|||
<string
|
||||
name="favorites_tab_title"
|
||||
value="Favorites" />
|
||||
<string
|
||||
name="tooltip_trash_items"
|
||||
value="Remove selected landmark or folder" />
|
||||
<string
|
||||
name="tooltip_trash_history"
|
||||
value="Delete list of visited places" />
|
||||
<layout_stack
|
||||
animate="false"
|
||||
border_size="0"
|
||||
|
|
@ -145,7 +151,6 @@
|
|||
left="0"
|
||||
layout="topleft"
|
||||
name="trash_btn"
|
||||
tool_tip="Remove selected landmark or folder"
|
||||
top="0"
|
||||
width="31"/>
|
||||
</layout_panel>
|
||||
|
|
|
|||
Loading…
Reference in New Issue