diff options
author | McCabe Maxsted | 2008-09-19 19:38:00 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-19 19:38:00 -0500 |
commit | acc9543916089ede930df2363e91247c80bec5d1 (patch) | |
tree | c050da276372fb90ef9990b113463f1d02f23011 /linden/indra/newview/llfloatergroups.cpp | |
parent | New optional SConstruct flag to specify an exact path to build (diff) | |
download | meta-impy-acc9543916089ede930df2363e91247c80bec5d1.zip meta-impy-acc9543916089ede930df2363e91247c80bec5d1.tar.gz meta-impy-acc9543916089ede930df2363e91247c80bec5d1.tar.bz2 meta-impy-acc9543916089ede930df2363e91247c80bec5d1.tar.xz |
VWR-8024: simplify group invites: invite to group from groups list.
Diffstat (limited to 'linden/indra/newview/llfloatergroups.cpp')
-rw-r--r-- | linden/indra/newview/llfloatergroups.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/linden/indra/newview/llfloatergroups.cpp b/linden/indra/newview/llfloatergroups.cpp index f6e226d..01624c6 100644 --- a/linden/indra/newview/llfloatergroups.cpp +++ b/linden/indra/newview/llfloatergroups.cpp | |||
@@ -39,6 +39,7 @@ | |||
39 | #include "llviewerprecompiledheaders.h" | 39 | #include "llviewerprecompiledheaders.h" |
40 | 40 | ||
41 | #include "llfloatergroups.h" | 41 | #include "llfloatergroups.h" |
42 | #include "llfloatergroupinvite.h" | ||
42 | 43 | ||
43 | #include "message.h" | 44 | #include "message.h" |
44 | #include "roles_constants.h" | 45 | #include "roles_constants.h" |
@@ -223,6 +224,8 @@ BOOL LLPanelGroups::postBuild() | |||
223 | childSetAction("Create", onBtnCreate, this); | 224 | childSetAction("Create", onBtnCreate, this); |
224 | 225 | ||
225 | childSetAction("Search...", onBtnSearch, this); | 226 | childSetAction("Search...", onBtnSearch, this); |
227 | |||
228 | childSetAction("Invite...", onBtnInvite, this); | ||
226 | 229 | ||
227 | setDefaultBtn("IM"); | 230 | setDefaultBtn("IM"); |
228 | 231 | ||
@@ -271,6 +274,14 @@ void LLPanelGroups::enableButtons() | |||
271 | { | 274 | { |
272 | childDisable("Create"); | 275 | childDisable("Create"); |
273 | } | 276 | } |
277 | if (group_id.notNull() && gAgent.hasPowerInGroup(group_id, GP_MEMBER_INVITE)) | ||
278 | { | ||
279 | LLPanelGroups::childEnable("Invite..."); | ||
280 | } | ||
281 | else | ||
282 | { | ||
283 | LLPanelGroups::childDisable("Invite..."); | ||
284 | } | ||
274 | } | 285 | } |
275 | 286 | ||
276 | 287 | ||
@@ -280,6 +291,12 @@ void LLPanelGroups::onBtnCreate(void* userdata) | |||
280 | if(self) self->create(); | 291 | if(self) self->create(); |
281 | } | 292 | } |
282 | 293 | ||
294 | void LLPanelGroups::onBtnInvite(void* userdata) | ||
295 | { | ||
296 | LLPanelGroups* self = (LLPanelGroups*)userdata; | ||
297 | if(self) self->invite(); | ||
298 | } | ||
299 | |||
283 | void LLPanelGroups::onBtnActivate(void* userdata) | 300 | void LLPanelGroups::onBtnActivate(void* userdata) |
284 | { | 301 | { |
285 | LLPanelGroups* self = (LLPanelGroups*)userdata; | 302 | LLPanelGroups* self = (LLPanelGroups*)userdata; |
@@ -401,6 +418,21 @@ void LLPanelGroups::search() | |||
401 | LLFloaterDirectory::showGroups(); | 418 | LLFloaterDirectory::showGroups(); |
402 | } | 419 | } |
403 | 420 | ||
421 | void LLPanelGroups::invite() | ||
422 | { | ||
423 | LLCtrlListInterface *group_list = childGetListInterface("group list"); | ||
424 | LLUUID group_id; | ||
425 | |||
426 | //if (group_list && (group_id = group_list->getCurrentID()).notNull()) | ||
427 | |||
428 | if (group_list) | ||
429 | { | ||
430 | group_id = group_list->getCurrentID(); | ||
431 | } | ||
432 | |||
433 | LLFloaterGroupInvite::showForGroup(group_id); | ||
434 | } | ||
435 | |||
404 | // static | 436 | // static |
405 | void LLPanelGroups::callbackLeaveGroup(S32 option, void* userdata) | 437 | void LLPanelGroups::callbackLeaveGroup(S32 option, void* userdata) |
406 | { | 438 | { |