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

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

Issue 374024: Allow return key to add new line in description text field.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 | « chrome/browser/cocoa/bug_report_window_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/bug_report_window_controller.mm
===================================================================
--- chrome/browser/cocoa/bug_report_window_controller.mm (revision 31238)
+++ chrome/browser/cocoa/bug_report_window_controller.mm (working copy)
@@ -129,7 +129,7 @@
l10n_util::GetNSStringWithFixup(IDS_BUGREPORT_PHISHING_PAGE)];
}
-- (void)menu:(NSMenu *)menu willHighlightItem:(NSMenuItem *)item {
+- (void)menu:(NSMenu*)menu willHighlightItem:(NSMenuItem *)item {
NSString* buttonTitle = [[item title] isEqualToString:
l10n_util::GetNSStringWithFixup(IDS_BUGREPORT_PHISHING_PAGE)] ?
l10n_util::GetNSStringWithFixup(IDS_BUGREPORT_SEND_PHISHING_REPORT) :
@@ -147,6 +147,15 @@
}
}
+- (BOOL)control:(NSControl*)control textView:(NSTextView*)textView
+ doCommandBySelector:(SEL)commandSelector {
+ if (commandSelector == @selector(insertNewline:)) {
+ [textView insertNewlineIgnoringFieldEditor:self];
+ return YES;
+ }
+ return NO;
+}
+
// BugReportWindowController needs to change the title of the Send Report
// button when the user chooses the phishing bug type, so we need to bind
// the function that changes the button title to the bug type key.
« no previous file with comments | « chrome/browser/cocoa/bug_report_window_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698