diff options
author | Jacek Antonelli | 2008-09-28 13:56:00 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-28 19:55:41 -0500 |
commit | 9a4f5702473e7540cde1bbff2d7189d9ed71fd86 (patch) | |
tree | 53d52a965085be43c89ef45592a8198f7befc4be /linden/indra/newview/llfloatergroups.cpp | |
parent | Second Life viewer sources 1.21.2-RC (diff) | |
parent | Merge branch 'VWR-8341' into next-merge (diff) | |
download | meta-impy-9a4f5702473e7540cde1bbff2d7189d9ed71fd86.zip meta-impy-9a4f5702473e7540cde1bbff2d7189d9ed71fd86.tar.gz meta-impy-9a4f5702473e7540cde1bbff2d7189d9ed71fd86.tar.bz2 meta-impy-9a4f5702473e7540cde1bbff2d7189d9ed71fd86.tar.xz |
Updated to SL source 1.21.2.
Conflicts:
linden/indra/SConstruct
linden/indra/newview/files.lst
linden/indra/newview/llfloatertools.cpp
linden/indra/newview/llfloatertools.h
linden/indra/newview/lloverlaybar.cpp
linden/indra/newview/lloverlaybar.h
linden/indra/newview/llviewermenu.cpp
linden/indra/newview/skins/default/xui/en-us/floater_tools.xml
linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
linden/indra/newview/skins/default/xui/en-us/panel_overlaybar.xml
linden/indra/newview/viewer_manifest.py
Diffstat (limited to '')
-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 c0ea9df..39f6b7a 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 | { |