diff options
Diffstat (limited to 'linden/indra/newview/llpanelgroupgeneral.cpp')
-rw-r--r-- | linden/indra/newview/llpanelgroupgeneral.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/linden/indra/newview/llpanelgroupgeneral.cpp b/linden/indra/newview/llpanelgroupgeneral.cpp index 8006981..402929e 100644 --- a/linden/indra/newview/llpanelgroupgeneral.cpp +++ b/linden/indra/newview/llpanelgroupgeneral.cpp | |||
@@ -47,6 +47,7 @@ | |||
47 | #include "llcheckboxctrl.h" | 47 | #include "llcheckboxctrl.h" |
48 | #include "llcombobox.h" | 48 | #include "llcombobox.h" |
49 | #include "lldbstrings.h" | 49 | #include "lldbstrings.h" |
50 | #include "llimview.h" | ||
50 | #include "lllineeditor.h" | 51 | #include "lllineeditor.h" |
51 | #include "llnamebox.h" | 52 | #include "llnamebox.h" |
52 | #include "llnamelistctrl.h" | 53 | #include "llnamelistctrl.h" |
@@ -89,6 +90,7 @@ LLPanelGroupGeneral::LLPanelGroupGeneral(const std::string& name, | |||
89 | mCtrlEnrollmentFee(NULL), | 90 | mCtrlEnrollmentFee(NULL), |
90 | mSpinEnrollmentFee(NULL), | 91 | mSpinEnrollmentFee(NULL), |
91 | mCtrlReceiveNotices(NULL), | 92 | mCtrlReceiveNotices(NULL), |
93 | mCtrlReceiveChat(NULL), | ||
92 | mCtrlListGroup(NULL), | 94 | mCtrlListGroup(NULL), |
93 | mActiveTitleLabel(NULL), | 95 | mActiveTitleLabel(NULL), |
94 | mComboActiveTitle(NULL) | 96 | mComboActiveTitle(NULL) |
@@ -217,6 +219,15 @@ BOOL LLPanelGroupGeneral::postBuild() | |||
217 | mCtrlReceiveNotices->set(accept_notices); | 219 | mCtrlReceiveNotices->set(accept_notices); |
218 | mCtrlReceiveNotices->setEnabled(data.mID.notNull()); | 220 | mCtrlReceiveNotices->setEnabled(data.mID.notNull()); |
219 | } | 221 | } |
222 | |||
223 | mCtrlReceiveChat = getChild<LLCheckBoxCtrl>("receive_chat", recurse); | ||
224 | if (mCtrlReceiveChat) | ||
225 | { | ||
226 | mCtrlReceiveChat->setCommitCallback(onCommitUserOnly); | ||
227 | mCtrlReceiveChat->setCallbackUserData(this); | ||
228 | mCtrlReceiveChat->set(!gIMMgr->getIgnoreGroup(mGroupID)); | ||
229 | mCtrlReceiveChat->setEnabled(mGroupID.notNull()); | ||
230 | } | ||
220 | 231 | ||
221 | mCtrlListGroup = getChild<LLCheckBoxCtrl>("list_groups_in_profile", recurse); | 232 | mCtrlListGroup = getChild<LLCheckBoxCtrl>("list_groups_in_profile", recurse); |
222 | if (mCtrlListGroup) | 233 | if (mCtrlListGroup) |
@@ -534,6 +545,7 @@ bool LLPanelGroupGeneral::apply(std::string& mesg) | |||
534 | } | 545 | } |
535 | 546 | ||
536 | BOOL receive_notices = false; | 547 | BOOL receive_notices = false; |
548 | BOOL receive_chat = false; | ||
537 | BOOL list_in_profile = false; | 549 | BOOL list_in_profile = false; |
538 | if (mCtrlReceiveNotices) | 550 | if (mCtrlReceiveNotices) |
539 | receive_notices = mCtrlReceiveNotices->get(); | 551 | receive_notices = mCtrlReceiveNotices->get(); |
@@ -542,6 +554,15 @@ bool LLPanelGroupGeneral::apply(std::string& mesg) | |||
542 | 554 | ||
543 | gAgent.setUserGroupFlags(mGroupID, receive_notices, list_in_profile); | 555 | gAgent.setUserGroupFlags(mGroupID, receive_notices, list_in_profile); |
544 | 556 | ||
557 | if (mCtrlReceiveChat) | ||
558 | { | ||
559 | receive_chat = mCtrlReceiveChat->get(); | ||
560 | } | ||
561 | |||
562 | gIMMgr->updateIgnoreGroup(mGroupID, receive_chat); | ||
563 | // Save here too in case we crash somewhere down the road -- MC | ||
564 | gIMMgr->saveIgnoreGroup(); | ||
565 | |||
545 | mChanged = FALSE; | 566 | mChanged = FALSE; |
546 | 567 | ||
547 | return true; | 568 | return true; |
@@ -758,6 +779,13 @@ void LLPanelGroupGeneral::update(LLGroupChange gc) | |||
758 | mCtrlReceiveNotices->resetDirty(); | 779 | mCtrlReceiveNotices->resetDirty(); |
759 | } | 780 | } |
760 | 781 | ||
782 | if (mCtrlReceiveChat) | ||
783 | { | ||
784 | mCtrlReceiveChat->setVisible(is_member); | ||
785 | mCtrlReceiveChat->setEnabled(TRUE); | ||
786 | mCtrlReceiveChat->resetDirty(); | ||
787 | } | ||
788 | |||
761 | 789 | ||
762 | if (mInsignia) mInsignia->setEnabled(mAllowEdit && can_change_ident); | 790 | if (mInsignia) mInsignia->setEnabled(mAllowEdit && can_change_ident); |
763 | if (mEditCharter) mEditCharter->setEnabled(mAllowEdit && can_change_ident); | 791 | if (mEditCharter) mEditCharter->setEnabled(mAllowEdit && can_change_ident); |
@@ -902,6 +930,7 @@ void LLPanelGroupGeneral::updateChanged() | |||
902 | mCtrlEnrollmentFee, | 930 | mCtrlEnrollmentFee, |
903 | mSpinEnrollmentFee, | 931 | mSpinEnrollmentFee, |
904 | mCtrlReceiveNotices, | 932 | mCtrlReceiveNotices, |
933 | mCtrlReceiveChat, | ||
905 | mCtrlListGroup, | 934 | mCtrlListGroup, |
906 | mActiveTitleLabel, | 935 | mActiveTitleLabel, |
907 | mComboActiveTitle | 936 | mComboActiveTitle |