[RLVa] rlvfloaterbehaviour.* -> rlvfloaters.*

This commit is contained in:
Inusaito Sayori
2014-01-28 00:31:40 -05:00
parent 14a885f8d0
commit 9e82297303
4 changed files with 38 additions and 58 deletions

View File

@@ -577,7 +577,7 @@ set(viewer_SOURCE_FILES
rlvactions.cpp
rlvcommon.cpp
rlvextensions.cpp
rlvfloaterbehaviour.cpp
rlvfloaters.cpp
rlvhandler.cpp
rlvhelper.cpp
rlvinventory.cpp
@@ -1105,7 +1105,7 @@ set(viewer_HEADER_FILES
rlvcommon.h
rlvdefines.h
rlvextensions.h
rlvfloaterbehaviour.h
rlvfloaters.h
rlvhandler.h
rlvhelper.h
rlvinventory.h

View File

@@ -209,7 +209,7 @@ void init_debug_xui_menu(LLMenuGL* menu);
void init_debug_avatar_menu(LLMenuGL* menu);
// [RLVa:KB]
#include "rlvhandler.h"
#include "rlvfloaterbehaviour.h"
#include "rlvfloaters.h"
#include "rlvlocks.h"
void init_debug_rlva_menu(LLMenuGL* menu);
// [/RLVa:KB]

View File

@@ -1,12 +1,12 @@
/**
*
* Copyright (c) 2009-2010, Kitty Barnett
* Copyright (c) 2009-2011, Kitty Barnett
*
* The source code in this file is provided to you under the terms of the
* GNU General Public License, version 2.0, but WITHOUT ANY WARRANTY;
* 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 GPL can be found in doc/GPL-license.txt
* in this distribution, or online at http://www.gnu.org/licenses/gpl-2.0.txt
* 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
@@ -23,7 +23,7 @@
#include "llvoavatarself.h"
#include "lluictrlfactory.h"
#include "rlvfloaterbehaviour.h"
#include "rlvfloaters.h"
#include "rlvhelper.h"
#include "rlvhandler.h"
#include "rlvlocks.h"
@@ -32,7 +32,8 @@
// Helper functions
//
// Checked: 2010-03-11 (RLVa-1.1.3b) | Modified: RLVa-1.2.0g
// Checked: 2010-03-11 (RLVa-1.2.0a) | Modified: RLVa-1.2.0g
std::string rlvGetItemNameFromObjID(const LLUUID& idObj, bool fIncludeAttachPt = true)
{
const LLViewerObject* pObj = gObjectList.findObject(idObj);
@@ -69,6 +70,7 @@ bool rlvGetShowException(ERlvBehaviour eBhvr)
// ============================================================================
// RlvFloaterBehaviours member functions
//
// Checked: 2010-04-18 (RLVa-1.3.1c) | Modified: RLVa-1.2.0e
void RlvFloaterBehaviours::onOpen()
@@ -85,23 +87,11 @@ void RlvFloaterBehaviours::onClose(bool fQuitting)
LLFloater::onClose(fQuitting);
}
RlvFloaterBehaviours::RlvFloaterBehaviours(const LLSD& key)
: LLFloater(std::string("rlvBehaviours"))
RlvFloaterBehaviours::RlvFloaterBehaviours(const LLSD& key) : LLFloater(std::string("rlvBehaviours"))
{
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_rlv_behaviours.xml");
}
void RlvFloaterBehaviours::toggle(void*)
{
RlvFloaterBehaviours::toggleInstance();
}
BOOL RlvFloaterBehaviours::visible(void*)
{
return RlvFloaterBehaviours::instanceVisible();
}
// Checked: 2010-04-18 (RLVa-1.3.1c) | Modified: RLVa-1.2.0e
void RlvFloaterBehaviours::onAvatarNameLookup(const LLUUID& idAgent, const LLAvatarName& avName)
{
@@ -148,8 +138,8 @@ void RlvFloaterBehaviours::onBtnCopyToClipboard()
}
}
LLWString text = utf8str_to_wstring(strRestrictions.str());
gClipboard.copyFromSubstring(text,0,text.length());
LLWString wstrRestrictions = utf8str_to_wstring(strRestrictions.str());
gClipboard.copyFromSubstring(wstrRestrictions, 0, wstrRestrictions.length());
}
// Checked: 2011-05-23 (RLVa-1.3.1c) | Modified: RLVa-1.3.1c
@@ -250,7 +240,7 @@ void RlvFloaterBehaviours::refreshAll()
// RlvFloaterLocks member functions
//
// Checked: 2010-03-11 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
// Checked: 2010-03-11 (RLVa-1.2.0)
void RlvFloaterLocks::onOpen()
{
m_ConnRlvCommand = gRlvHandler.setCommandCallback(boost::bind(&RlvFloaterLocks::onRlvCommand, this, _1, _2));
@@ -258,28 +248,24 @@ void RlvFloaterLocks::onOpen()
refreshAll();
}
// Checked: 2010-03-11 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
// Checked: 2010-03-11 (RLVa-1.2.0)
void RlvFloaterLocks::onClose(bool fQuitting)
{
m_ConnRlvCommand.disconnect();
LLFloater::onClose(fQuitting);
}
RlvFloaterLocks::RlvFloaterLocks(const LLSD& key)
: LLFloater(std::string("rlvLocks"))
RlvFloaterLocks::RlvFloaterLocks(const LLSD& key) : LLFloater("rlvLocks")
{
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_rlv_locks.xml");
}
void RlvFloaterLocks::toggle(void*)
// Checked: 2012-07-14 (RLVa-1.4.7)
BOOL RlvFloaterLocks::postBuild()
{
RlvFloaterLocks::toggleInstance();
}
getChild<LLUICtrl>("refresh_btn")->setCommitCallback(boost::bind(&RlvFloaterLocks::refreshAll, this));
BOOL RlvFloaterLocks::visible(void*)
{
return RlvFloaterLocks::instanceVisible();
return TRUE;
}
// Checked: 2010-03-11 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
@@ -303,12 +289,10 @@ void RlvFloaterLocks::onRlvCommand(const RlvCommand& rlvCmd, ERlvCmdRet eRet)
}
}
// Checked: 2010-03-18 (RLVa-1.2.0a) | Added: RLVa-1.2.0a
// Checked: 2010-03-18 (RLVa-1.2.0)
void RlvFloaterLocks::refreshAll()
{
LLCtrlListInterface* pLockList = childGetListInterface("lock_list");
if (!pLockList)
return;
LLScrollListCtrl* pLockList = getChild<LLScrollListCtrl>("lock_list");
pLockList->operateOnAll(LLCtrlListInterface::OP_DELETE);
if (!isAgentAvatarValid())

View File

@@ -1,12 +1,12 @@
/**
*
* Copyright (c) 2009-2010, Kitty Barnett
* Copyright (c) 2009-2011, Kitty Barnett
*
* The source code in this file is provided to you under the terms of the
* GNU General Public License, version 2.0, but WITHOUT ANY WARRANTY;
* 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 GPL can be found in doc/GPL-license.txt
* in this distribution, or online at http://www.gnu.org/licenses/gpl-2.0.txt
* 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
@@ -29,7 +29,7 @@
class RlvFloaterBehaviours : public LLFloater, public LLFloaterSingleton<RlvFloaterBehaviours>
{
friend class LLUISingleton<RlvFloaterBehaviours, VisibilityPolicy<LLFloater> >;
private:
RlvFloaterBehaviours(const LLSD& sdKey);
/*
@@ -39,9 +39,9 @@ public:
/*virtual*/ void onOpen();
/*virtual*/ void onClose(bool fQuitting);
/*virtual*/ BOOL postBuild();
static void toggle(void* a=NULL);
static BOOL visible(void* a=NULL);
static void toggle(void*) { return toggleInstance(); }
static BOOL visible(void*) { return instanceVisible(); }
/*
* Member functions
@@ -67,29 +67,25 @@ protected:
class RlvFloaterLocks : public LLFloater, public LLFloaterSingleton<RlvFloaterLocks>
{
friend class LLUISingleton<RlvFloaterLocks, VisibilityPolicy<LLFloater> >;
private:
RlvFloaterLocks(const LLSD& sdKey);
/*
* LLFloater overrides
*/
public:
virtual void onOpen();
virtual void onClose(bool fQuitting);
static void toggle(void* a=NULL);
static BOOL visible(void* a=NULL);
/*virtual*/ void onOpen();
/*virtual*/ void onClose(bool fQuitting);
/*virtual*/ BOOL postBuild();
/*
* Event handlers
*/
protected:
void onRlvCommand(const RlvCommand& rlvCmd, ERlvCmdRet eRet);
static void toggle(void*) { return toggleInstance(); }
static BOOL visible(void*) { return instanceVisible(); }
/*
* Member functions
*/
protected:
void onRlvCommand(const RlvCommand& rlvCmd, ERlvCmdRet eRet);
void refreshAll();
/*