diff options
author | Michelle2 Zenovka | 2008-09-20 13:16:14 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-20 13:16:14 -0500 |
commit | 3282c5ff73176cb9fe8a8be6a372790516237448 (patch) | |
tree | 07d019937b7d6ad84c4213f609de1f48da1e207f /linden/indra/newview/llfloaterbulkpermission.h | |
parent | New optional SConstruct flag to specify an exact path to build (diff) | |
download | meta-impy-3282c5ff73176cb9fe8a8be6a372790516237448.zip meta-impy-3282c5ff73176cb9fe8a8be6a372790516237448.tar.gz meta-impy-3282c5ff73176cb9fe8a8be6a372790516237448.tar.bz2 meta-impy-3282c5ff73176cb9fe8a8be6a372790516237448.tar.xz |
VWR-5082: 'Set permissions on selected task inventory' feature.
Diffstat (limited to 'linden/indra/newview/llfloaterbulkpermission.h')
-rw-r--r-- | linden/indra/newview/llfloaterbulkpermission.h | 143 |
1 files changed, 143 insertions, 0 deletions
diff --git a/linden/indra/newview/llfloaterbulkpermission.h b/linden/indra/newview/llfloaterbulkpermission.h new file mode 100644 index 0000000..3de871b --- /dev/null +++ b/linden/indra/newview/llfloaterbulkpermission.h | |||
@@ -0,0 +1,143 @@ | |||
1 | /** | ||
2 | * @file llfloaterbulkpermissions.h | ||
3 | * @brief A floater which allows task inventory item's properties to be changed on mass. | ||
4 | * | ||
5 | * $LicenseInfo:firstyear=2008&license=viewergpl$ | ||
6 | * | ||
7 | * Copyright (c) 2008, Linden Research, Inc. | ||
8 | * | ||
9 | * Second Life Viewer Source Code | ||
10 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
11 | * to you under the terms of the GNU General Public License, version 2.0 | ||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
16 | * | ||
17 | * There are special exceptions to the terms and conditions of the GPL as | ||
18 | * it is applied to this Source Code. View the full text of the exception | ||
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | ||
22 | * By copying, modifying or distributing this software, you acknowledge | ||
23 | * that you have read and understood your obligations described above, | ||
24 | * and agree to abide by those obligations. | ||
25 | * | ||
26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
28 | * COMPLETENESS OR PERFORMANCE. | ||
29 | * $/LicenseInfo$ | ||
30 | */ | ||
31 | |||
32 | /* Allow multiple task inventory properties to be set in one go, by Michelle2 Zenovka */ | ||
33 | |||
34 | #ifndef LL_LLBULKPERMISSION_H | ||
35 | #define LL_LLBULKPERMISSION_H | ||
36 | |||
37 | #include "lldarray.h" | ||
38 | #include "llinventory.h" | ||
39 | #include "llviewerobject.h" | ||
40 | #include "llvoinventorylistener.h" | ||
41 | #include "llmap.h" | ||
42 | #include "lluuid.h" | ||
43 | |||
44 | #include "llfloater.h" | ||
45 | #include "llscrolllistctrl.h" | ||
46 | |||
47 | #include "llviewerinventory.h" | ||
48 | |||
49 | class LLFloaterBulkPermission : public LLFloater, public LLVOInventoryListener | ||
50 | { | ||
51 | public: | ||
52 | // addObject() accepts an object id. | ||
53 | void addObject(const LLUUID& id); | ||
54 | |||
55 | // start() returns TRUE if the queue has started, otherwise FALSE. | ||
56 | BOOL start(); | ||
57 | |||
58 | // Use this method to create a reset queue. Once created, it | ||
59 | // will be responsible for it's own destruction. | ||
60 | static LLFloaterBulkPermission * create(); | ||
61 | |||
62 | protected: | ||
63 | LLFloaterBulkPermission(const std::string& name, const LLRect& rect, | ||
64 | const char* title, const char* start_string); | ||
65 | virtual ~LLFloaterBulkPermission(); | ||
66 | |||
67 | // This is the callback method for the viewer object currently | ||
68 | // being worked on. | ||
69 | /*virtual*/ void inventoryChanged(LLViewerObject* obj, | ||
70 | InventoryObjectList* inv, | ||
71 | S32 serial_num, | ||
72 | void* queue); | ||
73 | |||
74 | // This is called by inventoryChanged | ||
75 | void handleInventory(LLViewerObject* viewer_obj, | ||
76 | InventoryObjectList* inv); | ||
77 | |||
78 | |||
79 | void updateInventory(LLViewerObject* object, | ||
80 | LLViewerInventoryItem* item, | ||
81 | U8 key, | ||
82 | bool is_new); | ||
83 | |||
84 | |||
85 | static void onCloseBtn(void* user_data); | ||
86 | static void onApplyBtn(void* user_data); | ||
87 | static void onCommitPermissions(LLUICtrl* ctrl, void* data); | ||
88 | static void InvSelection(LLUICtrl* ctrl, void* data); | ||
89 | static void onRecurse(LLUICtrl* ctrl, void* data); | ||
90 | static void onParent(LLUICtrl* ctrl, void* data); | ||
91 | |||
92 | // returns true if this is done | ||
93 | BOOL isDone() const; | ||
94 | |||
95 | //Read the settings and Apply the permissions | ||
96 | void doApply(); | ||
97 | |||
98 | // go to the next object. If no objects left, it falls out | ||
99 | // silently and waits to be killed by the deleteIfDone() callback. | ||
100 | BOOL nextObject(); | ||
101 | BOOL popNext(); | ||
102 | |||
103 | // Get this instances ID. | ||
104 | const LLUUID& getID() const { return mID; } | ||
105 | |||
106 | // find an instance by ID. Return NULL if it does not exist. | ||
107 | static LLFloaterBulkPermission* findInstance(const LLUUID& id); | ||
108 | |||
109 | U32 req_perm_mask; | ||
110 | |||
111 | BOOL processObject; | ||
112 | BOOL processScript; | ||
113 | BOOL processTexture; | ||
114 | BOOL processSound; | ||
115 | BOOL processAnimation; | ||
116 | BOOL processCallingcard; | ||
117 | BOOL processNotecard; | ||
118 | BOOL processGesture; | ||
119 | BOOL processClothing; | ||
120 | BOOL processBodypart; | ||
121 | BOOL processLandmark; | ||
122 | |||
123 | BOOL recurse; | ||
124 | BOOL parent; | ||
125 | |||
126 | protected: | ||
127 | // UI | ||
128 | LLScrollListCtrl* mMessages; | ||
129 | LLButton* mCloseBtn; | ||
130 | |||
131 | // Object Queue | ||
132 | LLDynamicArray<LLUUID> mObjectIDs; | ||
133 | LLUUID mCurrentObjectID; | ||
134 | BOOL mDone; | ||
135 | |||
136 | LLUUID mID; | ||
137 | static LLMap<LLUUID, LLFloaterBulkPermission*> sInstances; | ||
138 | |||
139 | const char* mStartString; | ||
140 | |||
141 | }; | ||
142 | |||
143 | #endif | ||