Files
SingularityViewer/indra/newview/rlvui.h
Lirusaito c701c61566 LLAvatarActions all hooked up!
Rlva style~ So update to RLVa stuff!
Adds support for @startim and @startimto
Enables hasOpenIM and hasOpenProfile, Yay functionality!
RLV_BHVR_STARTIM and RLV_BHVR_STARTIMTO added

While I was working, I was updating LLAgentHandler, after long enough it was identical enough to the one in llpanelprofile, so we're using that now.
Cleans up llfloateravatarinfo to the point of being a floater and instancetracker wrapper for a panelavatar (profile panel)
Bypasses looking up expired names that we know via get, this should avoid chats (and profiles, but that bug never got out) never opening for people we already know the name of on a bad connection; of course, this will only cause a faster reaction on the UI's part, messages may never get sent still (and profiles may never load) if the connection is truly terrible.
Cleans up llfloaterfriends and some parts of llfloateravatarlist (avatarlist could be cleaned up more from this perhaps in the future)
May slightly look better with copy detection and without space changes..

llgivemoney.cpp changes fix up some dummy view warnings I noticed while testing these changes
llpreview.cpp changes avoid segfault caused by llfloateravatarinfo not being a preview anymore but being inside a multipreview nonetheless.

Translators, don't worry, I covered this one with updates from v3 (Except German team)
2013-05-29 23:56:33 -04:00

101 lines
3.4 KiB
C++

/**
*
* Copyright (c) 2009-2011, Kitty Barnett
*
* The source code in this file is provided to you under the terms of the
* GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt
* in this distribution, or online at http://www.gnu.org/licenses/lgpl-2.1.txt
*
* By copying, modifying or distributing this software, you acknowledge that
* you have read and understood your obligations described above, and agree to
* abide by those obligations.
*
*/
#ifndef RLV_UI_H
#define RLV_UI_H
#include "llsingleton.h"
#include "rlvdefines.h"
// ============================================================================
// RlvUIEnabler - self-contained class that handles disabling or reenabling certain aspects of the viewer's UI
//
class RlvUIEnabler : public LLSingleton<RlvUIEnabler>
{
protected:
RlvUIEnabler();
friend class LLSingleton<RlvUIEnabler>;
friend class RlvHandler;
/*
* Signal callbacks
*/
public:
void onBehaviourToggle(ERlvBehaviour eBhvr, ERlvParamType eType); // RlvHandler::rlv_behaviour_signal_t
/*
* Behaviour handlers
*/
protected:
void onRefreshHoverText(); // showloc, shownames, showhovertext(all|world|hud)
void onToggleEdit(); // edit
void onToggleMovement(); // fly, alwaysrun and temprun
void onToggleSetDebug(); // setdebug
void onToggleSetEnv(); // setenv
void onToggleShowInv(bool fQuitting); // showinv
void onToggleShowLoc(); // showloc
void onToggleShowMinimap(); // showminimap
void onToggleShowNames(bool fQuitting); // shownames
void onToggleShowWorldMap(); // showworldmap
void onToggleTp(); // tploc and tplm
void onToggleUnsit(); // unsit
void onToggleViewXXX(); // viewnote, viewscript, viewtexture
void onUpdateLoginLastLocation(bool fQuitting); // tploc and unsit
/*
* Floater and sidebar validation callbacks
*/
protected:
void addGenericFloaterFilter(const std::string& strFloaterName);
void removeGenericFloaterFilter(const std::string& strFloaterName);
/*bool filterFloaterGeneric(const std::string&, const LLSD&);
boost::signals2::connection m_ConnFloaterGeneric;
bool filterFloaterShowLoc(const std::string&, const LLSD& );
boost::signals2::connection m_ConnFloaterShowLoc; // showloc
bool filterFloaterViewXXX(const std::string&, const LLSD&);
boost::signals2::connection m_ConnFloaterViewXXX; // viewnote, viewscript, viewtexture
bool filterPanelShowLoc(const std::string&, const std::string&, const LLSD& );
boost::signals2::connection m_ConnPanelShowLoc;*/ // showloc
/*
* Helper functions
*/
public:
static bool canViewParcelProperties(); // showloc
static bool canViewRegionProperties(); // showloc
static bool hasOpenIM(const LLUUID& idAgent); // shownames
static bool hasOpenProfile(const LLUUID& idAgent); // shownames
static bool isBuildEnabled(); // edit and rez
/*
* Member variables
*/
protected:
typedef boost::function<void(bool)> behaviour_handler_t;
typedef std::multimap<ERlvBehaviour, behaviour_handler_t> behaviour_handler_map_t;
behaviour_handler_map_t m_Handlers;
std::multiset<std::string> m_FilteredFloaters;
};
// ============================================================================
#endif // RLV_UI_H