diff options
author | Jacek Antonelli | 2008-08-15 23:45:11 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:11 -0500 |
commit | 215f423cbe18fe9ca14a26caef918d303bad28ff (patch) | |
tree | 0743442b286216cc8e19aa487c26f4e9345ffd64 /linden/indra/newview/llinventoryview.cpp | |
parent | Second Life viewer sources 1.18.3.5-RC (diff) | |
download | meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.zip meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.gz meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.bz2 meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.xz |
Second Life viewer sources 1.18.4.0-RC
Diffstat (limited to 'linden/indra/newview/llinventoryview.cpp')
-rw-r--r-- | linden/indra/newview/llinventoryview.cpp | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp index 8b7809d..2ac46ab 100644 --- a/linden/indra/newview/llinventoryview.cpp +++ b/linden/indra/newview/llinventoryview.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file llinventoryview.cpp | 2 | * @file llinventoryview.cpp |
3 | * @brief Implementation of the inventory view and associated stuff. | 3 | * @brief Implementation of the inventory view and associated stuff. |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2001&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 7 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #include "llviewerprecompiledheaders.h" | 32 | #include "llviewerprecompiledheaders.h" |
@@ -121,17 +124,40 @@ LLInventoryViewFinder::LLInventoryViewFinder(const LLString& name, | |||
121 | mSpinSinceDays = LLUICtrlFactory::getSpinnerByName(this, "spin_days_ago"); | 124 | mSpinSinceDays = LLUICtrlFactory::getSpinnerByName(this, "spin_days_ago"); |
122 | childSetCommitCallback("spin_days_ago", onTimeAgo, this); | 125 | childSetCommitCallback("spin_days_ago", onTimeAgo, this); |
123 | 126 | ||
127 | // mCheckSinceLogoff = LLUICtrlFactory::getSpinnerByName(this, "check_since_logoff"); | ||
128 | childSetCommitCallback("check_since_logoff", onCheckSinceLogoff, this); | ||
129 | |||
124 | childSetAction("Close", onCloseBtn, this); | 130 | childSetAction("Close", onCloseBtn, this); |
125 | 131 | ||
126 | updateElementsFromFilter(); | 132 | updateElementsFromFilter(); |
127 | } | 133 | } |
128 | 134 | ||
129 | void LLInventoryViewFinder::onTimeAgo(LLUICtrl *ctrl, void *user_data) | 135 | |
136 | void LLInventoryViewFinder::onCheckSinceLogoff(LLUICtrl *ctrl, void *user_data) | ||
130 | { | 137 | { |
131 | LLInventoryViewFinder *self = (LLInventoryViewFinder *)user_data; | 138 | LLInventoryViewFinder *self = (LLInventoryViewFinder *)user_data; |
132 | if (!self) return; | 139 | if (!self) return; |
133 | 140 | ||
134 | self->childSetValue("check_since_logoff", FALSE); | 141 | bool since_logoff= self->childGetValue("check_since_logoff"); |
142 | |||
143 | if (!since_logoff && | ||
144 | !( self->mSpinSinceDays->get() || self->mSpinSinceHours->get() ) ) | ||
145 | { | ||
146 | self->mSpinSinceHours->set(1.0f); | ||
147 | } | ||
148 | } | ||
149 | |||
150 | void LLInventoryViewFinder::onTimeAgo(LLUICtrl *ctrl, void *user_data) | ||
151 | { | ||
152 | LLInventoryViewFinder *self = (LLInventoryViewFinder *)user_data; | ||
153 | if (!self) return; | ||
154 | |||
155 | bool since_logoff=true; | ||
156 | if ( self->mSpinSinceDays->get() || self->mSpinSinceHours->get() ) | ||
157 | { | ||
158 | since_logoff = false; | ||
159 | } | ||
160 | self->childSetValue("check_since_logoff", since_logoff); | ||
135 | } | 161 | } |
136 | 162 | ||
137 | void LLInventoryViewFinder::changeFilter(LLInventoryFilter* filter) | 163 | void LLInventoryViewFinder::changeFilter(LLInventoryFilter* filter) |