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 // Setting the src of an img to an empty string can crash the browser, so we | 5 // Setting the src of an img to an empty string can crash the browser, so we |
6 // use an empty 1x1 gif instead. | 6 // use an empty 1x1 gif instead. |
7 | 7 |
8 /** | 8 /** |
9 * FileManager constructor. | 9 * FileManager constructor. |
10 * | 10 * |
(...skipping 3760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3771 this.updateCommonActionButtons_(); | 3771 this.updateCommonActionButtons_(); |
3772 this.updateOkButton_(); | 3772 this.updateOkButton_(); |
3773 this.updateBreadcrumbs_(); | 3773 this.updateBreadcrumbs_(); |
3774 this.updateColumnModel_(); | 3774 this.updateColumnModel_(); |
3775 | 3775 |
3776 // Updated when a user clicks on the label of a file, used to detect | 3776 // Updated when a user clicks on the label of a file, used to detect |
3777 // when a click is eligible to trigger a rename. Can be null, or | 3777 // when a click is eligible to trigger a rename. Can be null, or |
3778 // an object with 'path' and 'date' properties. | 3778 // an object with 'path' and 'date' properties. |
3779 this.lastLabelClick_ = null; | 3779 this.lastLabelClick_ = null; |
3780 | 3780 |
3781 var dirEntry = event.newDirEntry; | 3781 // Sometimes we rescan the same directory, do not update the location then. |
SeRya
2012/04/13 12:32:11
I think it's a wrong fix.
Rescan doesn't cause di
| |
3782 this.updateLocation_(event.initial, dirEntry.fullPath); | 3782 if (event.newDirEntry.fullPath != event.previousDirEntry.fullPath) { |
3783 this.updateLocation_(event.initial, event.newDirEntry.fullPath); | |
3784 } | |
3783 | 3785 |
3784 this.checkFreeSpace_(this.getCurrentDirectory()); | 3786 this.checkFreeSpace_(this.getCurrentDirectory()); |
3785 | 3787 |
3786 // TODO(dgozman): title may be better than this. | 3788 // TODO(dgozman): title may be better than this. |
3787 this.document_.title = this.getCurrentDirectory().substr(1); | 3789 this.document_.title = this.getCurrentDirectory().substr(1); |
3788 | 3790 |
3789 var self = this; | 3791 var self = this; |
3790 | 3792 |
3791 if (this.watchedDirectoryUrl_) { | 3793 if (this.watchedDirectoryUrl_) { |
3792 if (this.watchedDirectoryUrl_ != event.previousDirEntry.toURL()) { | 3794 if (this.watchedDirectoryUrl_ != event.previousDirEntry.toURL()) { |
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4697 | 4699 |
4698 chrome.fileBrowserPrivate.setGDataPreferences(changeInfo); | 4700 chrome.fileBrowserPrivate.setGDataPreferences(changeInfo); |
4699 | 4701 |
4700 if (oldValue) { | 4702 if (oldValue) { |
4701 event.target.removeAttribute('checked'); | 4703 event.target.removeAttribute('checked'); |
4702 } else { | 4704 } else { |
4703 event.target.setAttribute('checked', 'checked'); | 4705 event.target.setAttribute('checked', 'checked'); |
4704 } | 4706 } |
4705 }; | 4707 }; |
4706 })(); | 4708 })(); |
OLD | NEW |