OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <set> | 5 #include <set> |
6 | 6 |
7 #include <X11/Xlib.h> | 7 #include <X11/Xlib.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 command_line->AppendArg(GetMimeTypeFilterString()); | 347 command_line->AppendArg(GetMimeTypeFilterString()); |
348 VLOG(1) << "KDialog command line: " << command_line->GetCommandLineString(); | 348 VLOG(1) << "KDialog command line: " << command_line->GetCommandLineString(); |
349 } | 349 } |
350 | 350 |
351 void SelectFileDialogImplKDE::FileSelected(const base::FilePath& path, | 351 void SelectFileDialogImplKDE::FileSelected(const base::FilePath& path, |
352 void* params) { | 352 void* params) { |
353 if (type_ == SELECT_SAVEAS_FILE) | 353 if (type_ == SELECT_SAVEAS_FILE) |
354 *last_saved_path_ = path.DirName(); | 354 *last_saved_path_ = path.DirName(); |
355 else if (type_ == SELECT_OPEN_FILE) | 355 else if (type_ == SELECT_OPEN_FILE) |
356 *last_opened_path_ = path.DirName(); | 356 *last_opened_path_ = path.DirName(); |
357 else if (type_ == SELECT_FOLDER) | 357 else if (type_ == SELECT_FOLDER || type_ == SELECT_UPLOAD_FOLDER) |
358 *last_opened_path_ = path; | 358 *last_opened_path_ = path; |
359 else | 359 else |
360 NOTREACHED(); | 360 NOTREACHED(); |
361 if (listener_) { // What does the filter index actually do? | 361 if (listener_) { // What does the filter index actually do? |
362 // TODO(dfilimon): Get a reasonable index value from somewhere. | 362 // TODO(dfilimon): Get a reasonable index value from somewhere. |
363 listener_->FileSelected(path, 1, params); | 363 listener_->FileSelected(path, 1, params); |
364 } | 364 } |
365 } | 365 } |
366 | 366 |
367 void SelectFileDialogImplKDE::MultiFilesSelected( | 367 void SelectFileDialogImplKDE::MultiFilesSelected( |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 } | 501 } |
502 | 502 |
503 if (filenames_fp.empty()) { | 503 if (filenames_fp.empty()) { |
504 FileNotSelected(params); | 504 FileNotSelected(params); |
505 return; | 505 return; |
506 } | 506 } |
507 MultiFilesSelected(filenames_fp, params); | 507 MultiFilesSelected(filenames_fp, params); |
508 } | 508 } |
509 | 509 |
510 } // namespace libgtk2ui | 510 } // namespace libgtk2ui |
OLD | NEW |