[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 rlvactions.cpp
rlvcommon.cpp rlvcommon.cpp
rlvextensions.cpp rlvextensions.cpp
rlvfloaterbehaviour.cpp rlvfloaters.cpp
rlvhandler.cpp rlvhandler.cpp
rlvhelper.cpp rlvhelper.cpp
rlvinventory.cpp rlvinventory.cpp
@@ -1105,7 +1105,7 @@ set(viewer_HEADER_FILES
rlvcommon.h rlvcommon.h
rlvdefines.h rlvdefines.h
rlvextensions.h rlvextensions.h
rlvfloaterbehaviour.h rlvfloaters.h
rlvhandler.h rlvhandler.h
rlvhelper.h rlvhelper.h
rlvinventory.h rlvinventory.h

View File

@@ -209,7 +209,7 @@ void init_debug_xui_menu(LLMenuGL* menu);
void init_debug_avatar_menu(LLMenuGL* menu); void init_debug_avatar_menu(LLMenuGL* menu);
// [RLVa:KB] // [RLVa:KB]
#include "rlvhandler.h" #include "rlvhandler.h"
#include "rlvfloaterbehaviour.h" #include "rlvfloaters.h"
#include "rlvlocks.h" #include "rlvlocks.h"
void init_debug_rlva_menu(LLMenuGL* menu); void init_debug_rlva_menu(LLMenuGL* menu);
// [/RLVa:KB] // [/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 * 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 * 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 * 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/gpl-2.0.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 * By copying, modifying or distributing this software, you acknowledge that
* you have read and understood your obligations described above, and agree to * you have read and understood your obligations described above, and agree to
@@ -23,7 +23,7 @@
#include "llvoavatarself.h" #include "llvoavatarself.h"
#include "lluictrlfactory.h" #include "lluictrlfactory.h"
#include "rlvfloaterbehaviour.h" #include "rlvfloaters.h"
#include "rlvhelper.h" #include "rlvhelper.h"
#include "rlvhandler.h" #include "rlvhandler.h"
#include "rlvlocks.h" #include "rlvlocks.h"
@@ -32,7 +32,8 @@
// Helper functions // 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) std::string rlvGetItemNameFromObjID(const LLUUID& idObj, bool fIncludeAttachPt = true)
{ {
const LLViewerObject* pObj = gObjectList.findObject(idObj); const LLViewerObject* pObj = gObjectList.findObject(idObj);
@@ -69,6 +70,7 @@ bool rlvGetShowException(ERlvBehaviour eBhvr)
// ============================================================================ // ============================================================================
// RlvFloaterBehaviours member functions // RlvFloaterBehaviours member functions
//
// Checked: 2010-04-18 (RLVa-1.3.1c) | Modified: RLVa-1.2.0e // Checked: 2010-04-18 (RLVa-1.3.1c) | Modified: RLVa-1.2.0e
void RlvFloaterBehaviours::onOpen() void RlvFloaterBehaviours::onOpen()
@@ -85,23 +87,11 @@ void RlvFloaterBehaviours::onClose(bool fQuitting)
LLFloater::onClose(fQuitting); LLFloater::onClose(fQuitting);
} }
RlvFloaterBehaviours::RlvFloaterBehaviours(const LLSD& key) RlvFloaterBehaviours::RlvFloaterBehaviours(const LLSD& key) : LLFloater(std::string("rlvBehaviours"))
: LLFloater(std::string("rlvBehaviours"))
{ {
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_rlv_behaviours.xml"); 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 // Checked: 2010-04-18 (RLVa-1.3.1c) | Modified: RLVa-1.2.0e
void RlvFloaterBehaviours::onAvatarNameLookup(const LLUUID& idAgent, const LLAvatarName& avName) void RlvFloaterBehaviours::onAvatarNameLookup(const LLUUID& idAgent, const LLAvatarName& avName)
{ {
@@ -148,8 +138,8 @@ void RlvFloaterBehaviours::onBtnCopyToClipboard()
} }
} }
LLWString text = utf8str_to_wstring(strRestrictions.str()); LLWString wstrRestrictions = utf8str_to_wstring(strRestrictions.str());
gClipboard.copyFromSubstring(text,0,text.length()); gClipboard.copyFromSubstring(wstrRestrictions, 0, wstrRestrictions.length());
} }
// Checked: 2011-05-23 (RLVa-1.3.1c) | Modified: RLVa-1.3.1c // Checked: 2011-05-23 (RLVa-1.3.1c) | Modified: RLVa-1.3.1c
@@ -250,7 +240,7 @@ void RlvFloaterBehaviours::refreshAll()
// RlvFloaterLocks member functions // 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() void RlvFloaterLocks::onOpen()
{ {
m_ConnRlvCommand = gRlvHandler.setCommandCallback(boost::bind(&RlvFloaterLocks::onRlvCommand, this, _1, _2)); m_ConnRlvCommand = gRlvHandler.setCommandCallback(boost::bind(&RlvFloaterLocks::onRlvCommand, this, _1, _2));
@@ -258,28 +248,24 @@ void RlvFloaterLocks::onOpen()
refreshAll(); 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) void RlvFloaterLocks::onClose(bool fQuitting)
{ {
m_ConnRlvCommand.disconnect(); m_ConnRlvCommand.disconnect();
LLFloater::onClose(fQuitting); LLFloater::onClose(fQuitting);
} }
RlvFloaterLocks::RlvFloaterLocks(const LLSD& key) RlvFloaterLocks::RlvFloaterLocks(const LLSD& key) : LLFloater("rlvLocks")
: LLFloater(std::string("rlvLocks"))
{ {
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_rlv_locks.xml"); LLUICtrlFactory::getInstance()->buildFloater(this, "floater_rlv_locks.xml");
} }
// Checked: 2012-07-14 (RLVa-1.4.7)
void RlvFloaterLocks::toggle(void*) BOOL RlvFloaterLocks::postBuild()
{ {
RlvFloaterLocks::toggleInstance(); getChild<LLUICtrl>("refresh_btn")->setCommitCallback(boost::bind(&RlvFloaterLocks::refreshAll, this));
}
BOOL RlvFloaterLocks::visible(void*) return TRUE;
{
return RlvFloaterLocks::instanceVisible();
} }
// Checked: 2010-03-11 (RLVa-1.2.0a) | Added: RLVa-1.2.0a // 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() void RlvFloaterLocks::refreshAll()
{ {
LLCtrlListInterface* pLockList = childGetListInterface("lock_list"); LLScrollListCtrl* pLockList = getChild<LLScrollListCtrl>("lock_list");
if (!pLockList)
return;
pLockList->operateOnAll(LLCtrlListInterface::OP_DELETE); pLockList->operateOnAll(LLCtrlListInterface::OP_DELETE);
if (!isAgentAvatarValid()) 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 * 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 * 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 * 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/gpl-2.0.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 * By copying, modifying or distributing this software, you acknowledge that
* you have read and understood your obligations described above, and agree to * you have read and understood your obligations described above, and agree to
@@ -29,7 +29,7 @@
class RlvFloaterBehaviours : public LLFloater, public LLFloaterSingleton<RlvFloaterBehaviours> class RlvFloaterBehaviours : public LLFloater, public LLFloaterSingleton<RlvFloaterBehaviours>
{ {
friend class LLUISingleton<RlvFloaterBehaviours, VisibilityPolicy<LLFloater> >; friend class LLUISingleton<RlvFloaterBehaviours, VisibilityPolicy<LLFloater> >;
private:
RlvFloaterBehaviours(const LLSD& sdKey); RlvFloaterBehaviours(const LLSD& sdKey);
/* /*
@@ -40,8 +40,8 @@ public:
/*virtual*/ void onClose(bool fQuitting); /*virtual*/ void onClose(bool fQuitting);
/*virtual*/ BOOL postBuild(); /*virtual*/ BOOL postBuild();
static void toggle(void* a=NULL); static void toggle(void*) { return toggleInstance(); }
static BOOL visible(void* a=NULL); static BOOL visible(void*) { return instanceVisible(); }
/* /*
* Member functions * Member functions
@@ -67,29 +67,25 @@ protected:
class RlvFloaterLocks : public LLFloater, public LLFloaterSingleton<RlvFloaterLocks> class RlvFloaterLocks : public LLFloater, public LLFloaterSingleton<RlvFloaterLocks>
{ {
friend class LLUISingleton<RlvFloaterLocks, VisibilityPolicy<LLFloater> >; friend class LLUISingleton<RlvFloaterLocks, VisibilityPolicy<LLFloater> >;
private:
RlvFloaterLocks(const LLSD& sdKey); RlvFloaterLocks(const LLSD& sdKey);
/* /*
* LLFloater overrides * LLFloater overrides
*/ */
public: public:
virtual void onOpen(); /*virtual*/ void onOpen();
virtual void onClose(bool fQuitting); /*virtual*/ void onClose(bool fQuitting);
/*virtual*/ BOOL postBuild();
static void toggle(void* a=NULL); static void toggle(void*) { return toggleInstance(); }
static BOOL visible(void* a=NULL); static BOOL visible(void*) { return instanceVisible(); }
/*
* Event handlers
*/
protected:
void onRlvCommand(const RlvCommand& rlvCmd, ERlvCmdRet eRet);
/* /*
* Member functions * Member functions
*/ */
protected: protected:
void onRlvCommand(const RlvCommand& rlvCmd, ERlvCmdRet eRet);
void refreshAll(); void refreshAll();
/* /*