Patch by Zi Ree FIRE-663 for group UUID text and copy buttons in Firestorm Grey, & W/sidetabs. This resolves FIRE-659.
--HG-- branch : Firestorm_2.4.2meow-7.2.2
parent
489acfb9e1
commit
cea5a5d34f
|
|
@ -32,6 +32,10 @@
|
|||
#include "llagent.h"
|
||||
#include "roles_constants.h"
|
||||
|
||||
// for copy URI button
|
||||
#include "llclipboard.h"
|
||||
|
||||
|
||||
// UI elements
|
||||
#include "llbutton.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
|
|
@ -96,7 +100,8 @@ BOOL LLPanelGroupGeneral::postBuild()
|
|||
mEditCharter->setFocusReceivedCallback(boost::bind(onFocusEdit, _1, this));
|
||||
mEditCharter->setFocusChangedCallback(boost::bind(onFocusEdit, _1, this));
|
||||
}
|
||||
|
||||
// set up callback for copy URI button
|
||||
childSetCommitCallback("copy_uri",boost::bind(&LLPanelGroupGeneral::onCopyURI,this),NULL);
|
||||
|
||||
|
||||
mListVisibleMembers = getChild<LLNameListCtrl>("visible_members", recurse);
|
||||
|
|
@ -897,12 +902,28 @@ void LLPanelGroupGeneral::resetDirty()
|
|||
void LLPanelGroupGeneral::setGroupID(const LLUUID& id)
|
||||
{
|
||||
LLPanelGroupTab::setGroupID(id);
|
||||
|
||||
// get group key display and copy URI button pointers
|
||||
LLTextEditor* groupKeyEditor = getChild<LLTextEditor>("group_key");
|
||||
LLButton* copyURIButton = getChild<LLButton>("copy_uri");
|
||||
// happens when a new group is created
|
||||
if(id == LLUUID::null)
|
||||
{
|
||||
if (groupKeyEditor)
|
||||
groupKeyEditor->setValue(LLSD());
|
||||
|
||||
if (copyURIButton)
|
||||
copyURIButton->setEnabled(FALSE);
|
||||
|
||||
reset();
|
||||
return;
|
||||
}
|
||||
// fill in group key
|
||||
if (groupKeyEditor)
|
||||
groupKeyEditor->setValue(id.asString());
|
||||
|
||||
// activate copy URI button
|
||||
if (copyURIButton)
|
||||
copyURIButton->setEnabled(TRUE);
|
||||
|
||||
BOOL accept_notices = FALSE;
|
||||
BOOL list_in_profile = FALSE;
|
||||
|
|
@ -955,3 +976,12 @@ S32 LLPanelGroupGeneral::sortMembersList(S32 col_idx,const LLScrollListItem* i1,
|
|||
|
||||
return LLStringUtil::compareDict(cell1->getValue().asString(), cell2->getValue().asString());
|
||||
}
|
||||
|
||||
// protected
|
||||
|
||||
// Copy URI button callback
|
||||
void LLPanelGroupGeneral::onCopyURI()
|
||||
{
|
||||
std::string name = "secondlife:///app/group/"+getChild<LLUICtrl>("group_key")->getValue().asString()+"/about";
|
||||
gClipboard.copyFromString(utf8str_to_wstring(name));
|
||||
}
|
||||
|
|
@ -62,6 +62,9 @@ public:
|
|||
|
||||
virtual void setupCtrls (LLPanel* parent);
|
||||
|
||||
protected:
|
||||
void onCopyURI();
|
||||
|
||||
private:
|
||||
void reset();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue