diff options
author | elektrahesse | 2010-09-07 22:34:40 +0200 |
---|---|---|
committer | McCabe Maxsted | 2010-09-10 19:09:08 -0700 |
commit | e06ab7e8e6acd094d354bd5d383abc5c8869bfc9 (patch) | |
tree | 93b3e3684f6159c336dca87501c3afe160f663e7 | |
parent | Ported use group name in chat feature from Emerald (diff) | |
download | meta-impy-e06ab7e8e6acd094d354bd5d383abc5c8869bfc9.zip meta-impy-e06ab7e8e6acd094d354bd5d383abc5c8869bfc9.tar.gz meta-impy-e06ab7e8e6acd094d354bd5d383abc5c8869bfc9.tar.bz2 meta-impy-e06ab7e8e6acd094d354bd5d383abc5c8869bfc9.tar.xz |
Made the texture fix cross platform and removed boost::filesystem dep for loaterlocalassetbrowse.cpp
-rw-r--r-- | linden/indra/newview/floaterlocalassetbrowse.cpp | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/linden/indra/newview/floaterlocalassetbrowse.cpp b/linden/indra/newview/floaterlocalassetbrowse.cpp index 0ff24ca..0c313fb 100644 --- a/linden/indra/newview/floaterlocalassetbrowse.cpp +++ b/linden/indra/newview/floaterlocalassetbrowse.cpp | |||
@@ -40,12 +40,6 @@ this feature is still a work in progress. | |||
40 | #include "llviewerprecompiledheaders.h" | 40 | #include "llviewerprecompiledheaders.h" |
41 | #include "lluictrlfactory.h" | 41 | #include "lluictrlfactory.h" |
42 | 42 | ||
43 | /* boost madness from hell */ | ||
44 | #ifdef equivalent | ||
45 | #undef equivalent | ||
46 | #endif | ||
47 | #include <boost/filesystem.hpp> | ||
48 | |||
49 | /* own class header && upload floater header */ | 43 | /* own class header && upload floater header */ |
50 | #include "floaterlocalassetbrowse.h" | 44 | #include "floaterlocalassetbrowse.h" |
51 | //#include "floaterlocaluploader.h" <- in development. | 45 | //#include "floaterlocaluploader.h" <- in development. |
@@ -65,6 +59,7 @@ this feature is still a work in progress. | |||
65 | #include "llfilepicker.h" | 59 | #include "llfilepicker.h" |
66 | #include "llviewermenufile.h" | 60 | #include "llviewermenufile.h" |
67 | #include "llfloaterimagepreview.h" | 61 | #include "llfloaterimagepreview.h" |
62 | #include "llfile.h" | ||
68 | 63 | ||
69 | /* repeated in header */ | 64 | /* repeated in header */ |
70 | #include "lltexturectrl.h" | 65 | #include "lltexturectrl.h" |
@@ -124,7 +119,11 @@ LocalBitmap::LocalBitmap(std::string fullpath) | |||
124 | else { return; } // no valid extension. | 119 | else { return; } // no valid extension. |
125 | 120 | ||
126 | /* getting file's last modified */ | 121 | /* getting file's last modified */ |
127 | const std::time_t time = boost::filesystem::last_write_time( boost::filesystem::path( this->filename ) ); | 122 | |
123 | llstat temp_stat; | ||
124 | LLFile::stat(this->filename, &temp_stat); | ||
125 | std::time_t time = temp_stat.st_mtime; | ||
126 | |||
128 | this->last_modified = asctime( localtime(&time) ); | 127 | this->last_modified = asctime( localtime(&time) ); |
129 | 128 | ||
130 | /* checking if the bitmap is valid && decoding if it is */ | 129 | /* checking if the bitmap is valid && decoding if it is */ |
@@ -161,7 +160,19 @@ void LocalBitmap::updateSelf() | |||
161 | if ( !gDirUtilp->fileExists(this->filename) ) { this->linkstatus = LINK_BROKEN; return; } | 160 | if ( !gDirUtilp->fileExists(this->filename) ) { this->linkstatus = LINK_BROKEN; return; } |
162 | 161 | ||
163 | /* exists, let's check if it's lastmod has changed */ | 162 | /* exists, let's check if it's lastmod has changed */ |
163 | std::time_t temp_time; | ||
164 | #ifdef LL_DARWIN | ||
165 | struct stat temp_stat; | ||
166 | stat(this->filename.c_str(), &temp_stat); | ||
167 | temp_time = temp_stat.st_mtime; | ||
168 | #else | ||
169 | temp_time = boost::filesystem::last_write_time( boost::filesystem::path( this->filename ) ); | ||
170 | #endif | ||
164 | const std::time_t temp_time = boost::filesystem::last_write_time( boost::filesystem::path( this->filename ) ); | 171 | const std::time_t temp_time = boost::filesystem::last_write_time( boost::filesystem::path( this->filename ) ); |
172 | llstat temp_stat; | ||
173 | LLFile::stat(this->filename, &temp_stat); | ||
174 | std::time_t temp_time = temp_stat.st_mtime; | ||
175 | |||
165 | LLSD new_last_modified = asctime( localtime(&temp_time) ); | 176 | LLSD new_last_modified = asctime( localtime(&temp_time) ); |
166 | if ( this->last_modified.asString() == new_last_modified.asString() ) { return; } | 177 | if ( this->last_modified.asString() == new_last_modified.asString() ) { return; } |
167 | 178 | ||