Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5030)

Unified Diff: chrome/browser/resources/file_manager/js/image_editor/gallery.js

Issue 10387129: [filemanager] In gallery, do not create a copy when renaming while editing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/file_manager/js/image_editor/gallery.js
===================================================================
--- chrome/browser/resources/file_manager/js/image_editor/gallery.js (revision 137110)
+++ chrome/browser/resources/file_manager/js/image_editor/gallery.js (working copy)
@@ -541,7 +541,8 @@
}
function doRename() {
- if (self.imageChanges_ > 0) {
+ if (item.hasNameForSaving()) {
+ //if (self.imageChanges_ > 0) {
Vladislav Kaznacheev 2012/05/15 15:05:12 Code in comment
dgozman 2012/05/15 15:10:33 Done.
// Use this name in the next save operation.
item.setNameForSaving(newName);
self.filenameSpacer_.removeAttribute('overwrite');
@@ -1181,6 +1182,10 @@
return this.nameForSaving_ || ImageUtil.getFullNameFromUrl(this.url_);
};
+Ribbon.Item.prototype.hasNameForSaving = function() {
+ return !!this.nameForSaving_;
+};
+
Ribbon.Item.prototype.isSelected = function() {
return this.box_.hasAttribute('selected');
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698