diff options
Diffstat (limited to 'linden/indra/newview/lldirpicker.cpp')
-rw-r--r-- | linden/indra/newview/lldirpicker.cpp | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/linden/indra/newview/lldirpicker.cpp b/linden/indra/newview/lldirpicker.cpp index 532e375..b0868b5 100644 --- a/linden/indra/newview/lldirpicker.cpp +++ b/linden/indra/newview/lldirpicker.cpp | |||
@@ -67,7 +67,7 @@ LLDirPicker::~LLDirPicker() | |||
67 | // nothing | 67 | // nothing |
68 | } | 68 | } |
69 | 69 | ||
70 | BOOL LLDirPicker::getDir(LLString* filename) | 70 | BOOL LLDirPicker::getDir(std::string* filename) |
71 | { | 71 | { |
72 | if( mLocked ) | 72 | if( mLocked ) |
73 | { | 73 | { |
@@ -114,7 +114,7 @@ BOOL LLDirPicker::getDir(LLString* filename) | |||
114 | return success; | 114 | return success; |
115 | } | 115 | } |
116 | 116 | ||
117 | LLString LLDirPicker::getDirName() | 117 | std::string LLDirPicker::getDirName() |
118 | { | 118 | { |
119 | return mDir; | 119 | return mDir; |
120 | } | 120 | } |
@@ -225,7 +225,7 @@ OSStatus LLDirPicker::doNavChooseDialog() | |||
225 | return error; | 225 | return error; |
226 | } | 226 | } |
227 | 227 | ||
228 | BOOL LLDirPicker::getDir(LLString* filename) | 228 | BOOL LLDirPicker::getDir(std::string* filename) |
229 | { | 229 | { |
230 | if( mLocked ) return FALSE; | 230 | if( mLocked ) return FALSE; |
231 | BOOL success = FALSE; | 231 | BOOL success = FALSE; |
@@ -252,7 +252,7 @@ BOOL LLDirPicker::getDir(LLString* filename) | |||
252 | return success; | 252 | return success; |
253 | } | 253 | } |
254 | 254 | ||
255 | LLString LLDirPicker::getDirName() | 255 | std::string LLDirPicker::getDirName() |
256 | { | 256 | { |
257 | return mDir; | 257 | return mDir; |
258 | } | 258 | } |
@@ -260,7 +260,7 @@ LLString LLDirPicker::getDirName() | |||
260 | void LLDirPicker::reset() | 260 | void LLDirPicker::reset() |
261 | { | 261 | { |
262 | mLocked = FALSE; | 262 | mLocked = FALSE; |
263 | mDir = NULL; | 263 | mDir.clear(); |
264 | } | 264 | } |
265 | 265 | ||
266 | #elif LL_LINUX | 266 | #elif LL_LINUX |
@@ -283,7 +283,7 @@ void LLDirPicker::reset() | |||
283 | mFilePicker->reset(); | 283 | mFilePicker->reset(); |
284 | } | 284 | } |
285 | 285 | ||
286 | BOOL LLDirPicker::getDir(LLString* filename) | 286 | BOOL LLDirPicker::getDir(std::string* filename) |
287 | { | 287 | { |
288 | reset(); | 288 | reset(); |
289 | if (mFilePicker) | 289 | if (mFilePicker) |
@@ -296,19 +296,17 @@ BOOL LLDirPicker::getDir(LLString* filename) | |||
296 | gtk_window_set_title(GTK_WINDOW(picker), "Choose Directory"); | 296 | gtk_window_set_title(GTK_WINDOW(picker), "Choose Directory"); |
297 | gtk_widget_show_all(GTK_WIDGET(picker)); | 297 | gtk_widget_show_all(GTK_WIDGET(picker)); |
298 | gtk_main(); | 298 | gtk_main(); |
299 | return (NULL != mFilePicker->getFirstFile()); | 299 | return (!mFilePicker->getFirstFile().empty()); |
300 | } | 300 | } |
301 | } | 301 | } |
302 | return FALSE; | 302 | return FALSE; |
303 | } | 303 | } |
304 | 304 | ||
305 | LLString LLDirPicker::getDirName() | 305 | std::string LLDirPicker::getDirName() |
306 | { | 306 | { |
307 | if (mFilePicker) | 307 | if (mFilePicker) |
308 | { | 308 | { |
309 | const char* name = mFilePicker->getFirstFile(); | 309 | return mFilePicker->getFirstFile(); |
310 | if (name) | ||
311 | return name; | ||
312 | } | 310 | } |
313 | return ""; | 311 | return ""; |
314 | } | 312 | } |
@@ -329,12 +327,12 @@ void LLDirPicker::reset() | |||
329 | { | 327 | { |
330 | } | 328 | } |
331 | 329 | ||
332 | BOOL LLDirPicker::getDir(LLString* filename) | 330 | BOOL LLDirPicker::getDir(std::string* filename) |
333 | { | 331 | { |
334 | return FALSE; | 332 | return FALSE; |
335 | } | 333 | } |
336 | 334 | ||
337 | LLString LLDirPicker::getDirName() | 335 | std::string LLDirPicker::getDirName() |
338 | { | 336 | { |
339 | return ""; | 337 | return ""; |
340 | } | 338 | } |