diff options
author | Jacek Antonelli | 2008-09-22 14:56:05 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-22 14:56:05 -0500 |
commit | 9d2b36a2d0c91a73b91b981fea56e1437327dbb4 (patch) | |
tree | 3a57a6862ba95112a51206d458494eedd9c1c311 | |
parent | Merge branch 'VWR-2072' into next-merge (diff) | |
parent | VWR-8024: simplify group invites: invite to group from groups list. (diff) | |
download | meta-impy-9d2b36a2d0c91a73b91b981fea56e1437327dbb4.zip meta-impy-9d2b36a2d0c91a73b91b981fea56e1437327dbb4.tar.gz meta-impy-9d2b36a2d0c91a73b91b981fea56e1437327dbb4.tar.bz2 meta-impy-9d2b36a2d0c91a73b91b981fea56e1437327dbb4.tar.xz |
Merge branch 'VWR-8024' into next-merge
-rw-r--r-- | ChangeLog.txt | 3 | ||||
-rw-r--r-- | linden/indra/newview/llfloatergroups.cpp | 32 | ||||
-rw-r--r-- | linden/indra/newview/llfloatergroups.h | 2 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/panel_groups.xml | 2 |
4 files changed, 39 insertions, 0 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt index 309eb86..e8e83c6 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt | |||
@@ -68,6 +68,9 @@ | |||
68 | 68 | ||
69 | 2008-09-19 McCabe Maxsted <hakushakukun@gmail.com> | 69 | 2008-09-19 McCabe Maxsted <hakushakukun@gmail.com> |
70 | 70 | ||
71 | * linden/indra/newview/skins/default/xui/en-us/panel_groups.xml: | ||
72 | VWR-8024: simplify group invites: invite to group from groups list. | ||
73 | |||
71 | * linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml: | 74 | * linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml: |
72 | VWR-1363: Add "Return Object" to the Tools menu. | 75 | VWR-1363: Add "Return Object" to the Tools menu. |
73 | 76 | ||
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 | { |
diff --git a/linden/indra/newview/llfloatergroups.h b/linden/indra/newview/llfloatergroups.h index 5eda8ba..ad3ecac 100644 --- a/linden/indra/newview/llfloatergroups.h +++ b/linden/indra/newview/llfloatergroups.h | |||
@@ -110,6 +110,7 @@ protected: | |||
110 | static void onBtnLeave(void* userdata); | 110 | static void onBtnLeave(void* userdata); |
111 | static void onBtnSearch(void* userdata); | 111 | static void onBtnSearch(void* userdata); |
112 | static void onBtnVote(void* userdata); | 112 | static void onBtnVote(void* userdata); |
113 | static void onBtnInvite(void* userdata); | ||
113 | static void onDoubleClickGroup(void* userdata); | 114 | static void onDoubleClickGroup(void* userdata); |
114 | 115 | ||
115 | void create(); | 116 | void create(); |
@@ -119,6 +120,7 @@ protected: | |||
119 | void leave(); | 120 | void leave(); |
120 | void search(); | 121 | void search(); |
121 | void callVote(); | 122 | void callVote(); |
123 | void invite(); | ||
122 | 124 | ||
123 | static void callbackLeaveGroup(S32 option, void* userdata); | 125 | static void callbackLeaveGroup(S32 option, void* userdata); |
124 | 126 | ||
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_groups.xml b/linden/indra/newview/skins/default/xui/en-us/panel_groups.xml index 416f58b..02d5504 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_groups.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_groups.xml | |||
@@ -34,4 +34,6 @@ | |||
34 | label="Create..." name="Create" width="80" /> | 34 | label="Create..." name="Create" width="80" /> |
35 | <button bottom_delta="-25" follows="top|right" font="SansSerif" height="22" | 35 | <button bottom_delta="-25" follows="top|right" font="SansSerif" height="22" |
36 | label="Search..." name="Search..." width="80" /> | 36 | label="Search..." name="Search..." width="80" /> |
37 | <button bottom_delta="-25" follows="top|right" font="SansSerif" height="22" | ||
38 | label="Invite..." name="Invite..." width="80" /> | ||
37 | </panel> | 39 | </panel> |