Chromium Code Reviews

Unified Diff: chrome/browser/cocoa/bookmark_editor_controller.mm

Issue 353024: Mac: Enable OK Button when editing a bookmark text to be blank... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: chrome/browser/cocoa/bookmark_editor_controller.mm
===================================================================
--- chrome/browser/cocoa/bookmark_editor_controller.mm (revision 31008)
+++ chrome/browser/cocoa/bookmark_editor_controller.mm (working copy)
@@ -328,10 +328,8 @@
// (Yes, setting ourself as a delegate automatically registers us for
// the notification.)
- (void)controlTextDidChange:(NSNotification*)aNotification {
- // Name must not be empty, but it can be whitespace.
- NSString* name = [nameField_ stringValue];
GURL newURL = [self GURLFromUrlField];
- [okButton_ setEnabled:([name length] != 0 && newURL.is_valid()) ? YES : NO];
+ [okButton_ setEnabled:(newURL.is_valid()) ? YES : NO];
}
// The ok: action is connected to the OK button in the Edit Bookmark window

Powered by Google App Engine