diff options
Diffstat (limited to 'linden/indra/newview/llpanelmsgs.cpp')
-rw-r--r-- | linden/indra/newview/llpanelmsgs.cpp | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/linden/indra/newview/llpanelmsgs.cpp b/linden/indra/newview/llpanelmsgs.cpp index 3f5314c..3a8729c 100644 --- a/linden/indra/newview/llpanelmsgs.cpp +++ b/linden/indra/newview/llpanelmsgs.cpp | |||
@@ -35,14 +35,29 @@ | |||
35 | #include "llviewercontrol.h" | 35 | #include "llviewercontrol.h" |
36 | #include "llvieweruictrlfactory.h" | 36 | #include "llvieweruictrlfactory.h" |
37 | 37 | ||
38 | class LLPopupData | ||
39 | { | ||
40 | public: | ||
41 | LLPopupData() : mShowNewInventory(FALSE), mAutoAcceptNewInventory(FALSE) { } | ||
42 | |||
43 | BOOL mShowNewInventory; | ||
44 | BOOL mAutoAcceptNewInventory; | ||
45 | }; | ||
46 | |||
47 | LLPopupData sPopupData; | ||
38 | 48 | ||
39 | //----------------------------------------------------------------------------- | 49 | //----------------------------------------------------------------------------- |
40 | LLPanelMsgs::LLPanelMsgs() : | 50 | LLPanelMsgs::LLPanelMsgs() : |
41 | LLPanel("Messages Panel"), | 51 | LLPanel("Messages Panel"), |
42 | mDisabledPopups( 0 ), | 52 | mDisabledPopups( NULL ), |
43 | mEnabledPopups( 0 ) | 53 | mEnabledPopups( NULL ) |
44 | { | 54 | { |
45 | }; | 55 | gUICtrlFactory->buildPanel(this, "panel_preferences_popups.xml"); |
56 | } | ||
57 | |||
58 | |||
59 | LLPanelMsgs::~LLPanelMsgs() | ||
60 | { } | ||
46 | 61 | ||
47 | //----------------------------------------------------------------------------- | 62 | //----------------------------------------------------------------------------- |
48 | // postBuild() | 63 | // postBuild() |
@@ -54,6 +69,10 @@ BOOL LLPanelMsgs::postBuild() | |||
54 | childSetAction("enable_popup", onClickEnablePopup, this); | 69 | childSetAction("enable_popup", onClickEnablePopup, this); |
55 | childSetAction("reset_dialogs_btn", onClickResetDialogs, this); | 70 | childSetAction("reset_dialogs_btn", onClickResetDialogs, this); |
56 | buildLists(); | 71 | buildLists(); |
72 | |||
73 | sPopupData.mAutoAcceptNewInventory = gSavedSettings.getBOOL("AutoAcceptNewInventory"); | ||
74 | sPopupData.mShowNewInventory = gSavedSettings.getBOOL("ShowNewInventory"); | ||
75 | |||
57 | return TRUE; | 76 | return TRUE; |
58 | } | 77 | } |
59 | 78 | ||
@@ -132,14 +151,19 @@ void LLPanelMsgs::draw() | |||
132 | LLPanel::draw(); | 151 | LLPanel::draw(); |
133 | } | 152 | } |
134 | 153 | ||
154 | |||
135 | void LLPanelMsgs::apply() | 155 | void LLPanelMsgs::apply() |
136 | { | 156 | { |
137 | } | 157 | } |
138 | 158 | ||
159 | |||
139 | void LLPanelMsgs::cancel() | 160 | void LLPanelMsgs::cancel() |
140 | { | 161 | { |
162 | gSavedSettings.setBOOL("ShowNewInventory", sPopupData.mShowNewInventory); | ||
163 | gSavedSettings.setBOOL("AutoAcceptNewInventory", sPopupData.mAutoAcceptNewInventory); | ||
141 | } | 164 | } |
142 | 165 | ||
166 | |||
143 | //static | 167 | //static |
144 | void LLPanelMsgs::onClickEnablePopup(void* user_data) | 168 | void LLPanelMsgs::onClickEnablePopup(void* user_data) |
145 | { | 169 | { |