Sync more stuff with upstream! (Mainly updates stuff involving LLFloaterGroupPicker)
Updates llfloatergroups to be a lot similar to upstream - Adds LLFLoaterGroupPicker::removeNoneOption and changes LLFloaterGroupPicker to use modern style callback - Switched from using per ui xml string for the none entry in groups to the strings.xml one, updated and cleaned existing translations to use this. - Changes LLFLoaterGroupPicker into an instance tracker by id, because it was already acting like one. Updates llpanelpermissions RLVa bits and fixes last owner label never enabled
This commit is contained in:
@@ -46,20 +46,26 @@
|
||||
|
||||
#include "lluuid.h"
|
||||
#include "llfloater.h"
|
||||
#include "llinstancetracker.h"
|
||||
#include <map>
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
class LLUICtrl;
|
||||
class LLTextBox;
|
||||
class LLScrollListCtrl;
|
||||
class LLButton;
|
||||
|
||||
class LLFloaterGroupPicker : public LLFloater, public LLUIFactory<LLFloaterGroupPicker, LLFloaterGroupPicker, VisibilityPolicy<LLFloater> >
|
||||
class LLFloaterGroupPicker : public LLFloater, public LLInstanceTracker<LLFloaterGroupPicker, LLUUID>
|
||||
{
|
||||
friend class LLUIFactory<LLFloaterGroupPicker>;
|
||||
public:
|
||||
static LLFloaterGroupPicker* showInstance(const LLSD& seed);
|
||||
LLFloaterGroupPicker(const LLSD& seed);
|
||||
~LLFloaterGroupPicker();
|
||||
void setSelectCallback( void (*callback)(LLUUID, void*),
|
||||
void* userdata);
|
||||
|
||||
// Note: Don't return connection; use boost::bind + boost::signals2::trackable to disconnect slots
|
||||
typedef boost::signals2::signal<void (LLUUID id)> signal_t;
|
||||
void setSelectGroupCallback(const signal_t::slot_type& cb) { mGroupSelectSignal.connect(cb); }
|
||||
void setPowersMask(U64 powers_mask);
|
||||
BOOL postBuild();
|
||||
|
||||
@@ -67,8 +73,10 @@ public:
|
||||
static LLFloaterGroupPicker* findInstance(const LLSD& seed);
|
||||
static LLFloaterGroupPicker* createInstance(const LLSD& seed);
|
||||
|
||||
// for cases like inviting avatar to group we don't want the none option
|
||||
void removeNoneOption();
|
||||
|
||||
protected:
|
||||
LLFloaterGroupPicker(const LLSD& seed);
|
||||
void ok();
|
||||
static void onBtnOK(void* userdata);
|
||||
static void onBtnCancel(void* userdata);
|
||||
@@ -76,8 +84,7 @@ protected:
|
||||
protected:
|
||||
LLUUID mID;
|
||||
U64 mPowersMask;
|
||||
void (*mSelectCallback)(LLUUID id, void* userdata);
|
||||
void* mCallbackUserdata;
|
||||
signal_t mGroupSelectSignal;
|
||||
|
||||
typedef std::map<const LLUUID, LLFloaterGroupPicker*> instance_map_t;
|
||||
static instance_map_t sInstances;
|
||||
|
||||
Reference in New Issue
Block a user